[svn-commits] branch group/autoconf_and_menuselect r20961 - in /team/group/autoconf_and_men...

svn-commits at lists.digium.com svn-commits at lists.digium.com
Mon Apr 17 08:40:52 MST 2006


Author: russell
Date: Mon Apr 17 10:40:48 2006
New Revision: 20961

URL: http://svn.digium.com/view/asterisk?rev=20961&view=rev
Log:
- add the curl libs to the makeopts file
- use CURL_LIB and CURL_INCLUDE for the build of func_curl
- use ODBC_LIB and ODBC_INCLUDE for the build of func_odbc
- use $(...) instead of ${...} everywhere to be consistent

- add a note that the libcurl version check needs to be done with autoconf
  instead of the way it is currently done in the Makefile.  Doing this check
  the exact same way in autoconf is trivial.  However, we should be checking
  for which feature of libcurl it is that we need and check for that instead
  if possible.

Modified:
    team/group/autoconf_and_menuselect/funcs/Makefile
    team/group/autoconf_and_menuselect/makeopts.in

Modified: team/group/autoconf_and_menuselect/funcs/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/funcs/Makefile?rev=20961&r1=20960&r2=20961&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/funcs/Makefile (original)
+++ team/group/autoconf_and_menuselect/funcs/Makefile Mon Apr 17 10:40:48 2006
@@ -13,21 +13,18 @@
 
 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
+  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
 
-ifeq (${CURLLIBS},)
-  MODS:=$(filter-out func_curl.so,$(MODS))
-endif
-
-ifeq (${OSARCH},CYGWIN)
+ifeq ($(OSARCH),CYGWIN)
   CYGSOLINK=-Wl,--out-implib=lib$@.a -Wl,--export-all-symbols
   CYGSOLIB=-L.. -L. -lasterisk.dll
 else
@@ -43,13 +40,19 @@
 	rm -f *.so *.o
 
 %.so : %.o
-	$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB}
+	$(CC) $(SOLINK) -o $@ $(CYGSOLINK) $< $(CYGSOLIB)
 
 func_curl.so: func_curl.o
-	$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(CURLLIBS)
+	$(CC) $(SOLINK) -o $@ $(CYGSOLINK) $< $(CYGSOLIB) $(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 $@ $(CYGSOLINK) $< $(CYGSOLIB) $(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

Modified: team/group/autoconf_and_menuselect/makeopts.in
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/makeopts.in?rev=20961&r1=20960&r2=20961&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/makeopts.in (original)
+++ team/group/autoconf_and_menuselect/makeopts.in Mon Apr 17 10:40:48 2006
@@ -93,3 +93,5 @@
 
 GTK_INCLUDE=@GTK_INCLUDE@
 GTK_LIBS=@GTK_LIBS@
+
+CURL_LIB=@CURLLIBS@



More information about the svn-commits mailing list