From 574e14cbea69b596a9a540b6401f2a087ec1e9ac Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Mon, 24 Apr 2006 17:11:45 +0000 Subject: Thanks to the fine work of Russell Bryant and Dancho Lazarov, we now have autoconf and menuselect tools for Asterisk! git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22267 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- funcs/Makefile | 42 +++++++++++++++++------------------------- funcs/func_curl.c | 5 +++++ funcs/func_odbc.c | 6 ++++++ 3 files changed, 28 insertions(+), 25 deletions(-) (limited to 'funcs') diff --git a/funcs/Makefile b/funcs/Makefile index e679e681c..33edf55d2 100644 --- a/funcs/Makefile +++ b/funcs/Makefile @@ -11,31 +11,17 @@ # the GNU General Public License # -MODS:=$(patsubst %.c,%.so,$(wildcard func_*.c)) - -ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/odbcinst.h $(CROSS_COMPILE_TARGET)/usr/local/include/odbcinst.h),) - MODS:=$(filter-out func_odbc.so,$(MODS)) -endif +MODS:=$(filter-out $(MENUSELECT_FUNCS),$(patsubst %.c,%.so,$(wildcard func_*.c))) +# TODO This check needs to be handled with autoconf ifeq ($(OSARCH),SunOS) -ifneq ($(shell if [ 0x`$(CROSS_COMPILE_BIN)curl-config --vernum` -ge 0x70907 ]; then echo "OK" ; fi),) - CURLLIBS:=$(shell $(CROSS_COMPILE_BIN)curl-config --libs) -endif + ifeq ($(shell if [ 0x`$(CROSS_COMPILE_BIN)curl-config --vernum` -ge 0x70907 ]; then echo "OK" ; fi),) + MODS:=$(filter-out func_curl.so,$(MODS)) + endif else -ifneq ($(shell if [[ 0x`$(CROSS_COMPILE_BIN)curl-config --vernum` -ge 0x70907 ]]; then echo "OK" ; fi),) - CURLLIBS:=$(shell $(CROSS_COMPILE_BIN)curl-config --libs) -endif -endif - -ifeq (${CURLLIBS},) - MODS:=$(filter-out func_curl.so,$(MODS)) -endif - -ifeq (${OSARCH},CYGWIN) - CYGSOLINK=-Wl,--out-implib=lib$@.a -Wl,--export-all-symbols - CYGSOLIB=-L.. -L. -lasterisk.dll -else - CFLAGS+=-fPIC + ifeq ($(shell if [[ 0x`$(CROSS_COMPILE_BIN)curl-config --vernum` -ge 0x70907 ]]; then echo "OK" ; fi),) + MODS:=$(filter-out func_curl.so,$(MODS)) + endif endif all: $(MODS) @@ -47,13 +33,19 @@ clean: clean-depend rm -f *.so *.o %.so : %.o - $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} + $(CC) $(SOLINK) -o $@ $< func_curl.so: func_curl.o - $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(CURLLIBS) + $(CC) $(SOLINK) -o $@ $< $(CURL_LIB) + +func_curl.o: func_curl.c + $(CC) -c -o $@ $(CFLAGS) $(CURL_INCLUDE) $< func_odbc.so: func_odbc.o - $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lodbc + $(CC) $(SOLINK) -o $@ $< $(ODBC_LIB) + +func_odbc.o: func_odbc.c + $(CC) -c -o $@ $(CFLAGS) $(ODBC_INCLUDE) $< install: all for x in $(MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done diff --git a/funcs/func_curl.c b/funcs/func_curl.c index 7d55f9b08..2216e65b9 100644 --- a/funcs/func_curl.c +++ b/funcs/func_curl.c @@ -28,6 +28,10 @@ * \ingroup functions */ +/*** MODULEINFO + curl + ***/ + #include #include #include @@ -186,3 +190,4 @@ static const char *key(void) } STD_MOD(MOD_1 | NO_USECOUNT, NULL, NULL, NULL); + diff --git a/funcs/func_odbc.c b/funcs/func_odbc.c index b9751edee..2dda6528a 100644 --- a/funcs/func_odbc.c +++ b/funcs/func_odbc.c @@ -24,6 +24,10 @@ * \author Tilghman Lesher */ +/*** MODULEINFO + unixodbc + ***/ + #include #include #include @@ -667,4 +671,6 @@ static const char *key(void) { return ASTERISK_GPL_KEY; } + STD_MOD(MOD_1, reload, NULL, NULL); + -- cgit v1.2.3