Move curl version test to autoconf script
authorTilghman Lesher <tilghman@meg.abyt.es>
Sat, 15 Jul 2006 21:39:26 +0000 (21:39 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Sat, 15 Jul 2006 21:39:26 +0000 (21:39 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37678 65c4cc65-6c06-0410-ace0-fbb531ad65f3

configure.ac
funcs/Makefile

index 853bdb2..10dd522 100644 (file)
@@ -879,9 +879,19 @@ PBX_CURL=0
 AC_PATH_TOOL([CURL], [curl-config], No)
 if test ! x"${CURL}" = xNo; then
 # check for version
-   CURLLIB=$(${CURL} --libs)
-   PBX_CURL=1
-   AC_DEFINE([HAVE_CURL], 1, [Define if your system has the curl libraries.])
+   if test $PBX_OSTYPE = "SunOS"; then
+      if [[ 0x`curl-config --vernum` -ge 0x70907 ]]; then
+         CURLLIB=$(${CURL} --libs)
+         PBX_CURL=1
+         AC_DEFINE([HAVE_CURL], 1, [Define if your system has the curl libraries.])
+      fi
+   else
+      if [[[ 0x`curl-config --vernum` -ge 0x70907 ]]]; then
+         CURLLIB=$(${CURL} --libs)
+         PBX_CURL=1
+         AC_DEFINE([HAVE_CURL], 1, [Define if your system has the curl libraries.])
+      fi
+   fi
 fi
 AC_SUBST(PBX_CURL)
 AC_SUBST(CURLLIB)
index b16355c..7da1342 100644 (file)
@@ -19,17 +19,6 @@ CC_MODS:=$(filter-out $(MENUSELECT_FUNCS),$(patsubst %.cc,%,$(wildcard func_*.cc
 
 SELECTED_MODS:=$(C_MODS) $(CC_MODS)
 
-# TODO This check needs to be handled with autoconf
-ifeq ($(OSARCH),SunOS)
-  ifeq ($(shell if [ 0x`$(CROSS_COMPILE_BIN)curl-config --vernum` -ge 0x70907 ]; then echo "OK" ; fi),)
-    MODS:=$(filter-out func_curl,$(MODS))
-  endif
-else
-  ifeq ($(shell if [[ 0x`$(CROSS_COMPILE_BIN)curl-config --vernum` -ge 0x70907 ]]; then echo "OK" ; fi),)
-    MODS:=$(filter-out func_curl,$(MODS)) 
-  endif
-endif
-
 all: _all
 
 include $(ASTTOPDIR)/Makefile.moddir_rules