[asterisk-commits] kpfleming: trunk r44013 - in /trunk: ./ channels/ codecs/ codecs/gsm/ include...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Sep 29 11:54:22 MST 2006


Author: kpfleming
Date: Fri Sep 29 13:54:21 2006
New Revision: 44013

URL: http://svn.digium.com/view/asterisk?rev=44013&view=rev
Log:
Merged revisions 43996-43997,44008,44011-44012 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r43996 | kpfleming | 2006-09-29 11:47:05 -0500 (Fri, 29 Sep 2006) | 2 lines

another cross-compile fix

........
r43997 | kpfleming | 2006-09-29 11:52:27 -0500 (Fri, 29 Sep 2006) | 2 lines

support --without-curl in configure script

........
r44008 | kpfleming | 2006-09-29 13:25:49 -0500 (Fri, 29 Sep 2006) | 2 lines

don't abuse CFLAGS and LDFLAGS for build of Asterisk components, because they are also then used for non-Asterisk components (like menuselect); use our own variables instead

........
r44011 | kpfleming | 2006-09-29 13:40:17 -0500 (Fri, 29 Sep 2006) | 2 lines

missed one conversion to ASTCFLAGS

........
r44012 | kpfleming | 2006-09-29 13:49:07 -0500 (Fri, 29 Sep 2006) | 2 lines

yet another place where we were not using the correct CFLAGS by default

........

Modified:
    trunk/   (props changed)
    trunk/Makefile
    trunk/Makefile.moddir_rules
    trunk/Makefile.rules
    trunk/channels/Makefile
    trunk/codecs/Makefile
    trunk/codecs/gsm/Makefile
    trunk/configure
    trunk/configure.ac
    trunk/include/asterisk/autoconfig.h.in
    trunk/main/Makefile
    trunk/main/db1-ast/Makefile
    trunk/pbx/Makefile
    trunk/utils/Makefile

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/Makefile?rev=44013&r1=44012&r2=44013&view=diff
==============================================================================
--- trunk/Makefile (original)
+++ trunk/Makefile Fri Sep 29 13:54:21 2006
@@ -13,14 +13,43 @@
 
 # All Makefiles use the following variables:
 #
-# LDFLAGS - linker flags (not libraries), used for all links
+# ASTCFLAGS - compiler options
+# ASTLDFLAGS - linker flags (not libraries)
 # LIBS - additional libraries, at top-level for all links,
 #      on a single object just for that object
 # SOLINK - linker flags used only for creating shared objects (.so files),
 #      used for all .so links
 #
-
-.EXPORT_ALL_VARIABLES:
+# Default values fo ASTCFLAGS and ASTLDFLAGS can be specified in the
+# environment when running make, as follows:
+#
+# $ ASTCFLAGS="-Werror" make
+
+export ASTTOPDIR
+export ASTERISKVERSION
+export ASTERISKVERSIONNUM
+export INSTALL_PATH
+export ASTETCDIR
+export ASTVARRUNDIR
+export MODULES_DIR
+export ASTSPOOLDIR
+export ASTVARLIBDIR
+export ASTDATADIR
+export ASTLOGDIR
+export AGI_DIR
+export ASTCONFPATH
+export NOISY_BUILD
+export MENUSELECT_CFLAGS
+export CC
+export CXX
+export AR
+export RANLIB
+export HOST_CC
+export STATIC_BUILD
+export INSTALL
+export DESTDIR
+export PROC
+export SOLINK
 
 # even though we could use '-include makeopts' here, use a wildcard
 # lookup anyway, so that make won't try to build makeopts if it doesn't
@@ -92,8 +121,6 @@
 # Determine by a grep 'ScriptAlias' of your Apache httpd.conf file
 HTTP_CGIDIR=/var/www/cgi-bin
 
-ASTCFLAGS=
-
 # Uncomment this to use the older DSP routines
 #ASTCFLAGS+=-DOLD_DSP_ROUTINES
 
@@ -275,10 +302,10 @@
 main: $(filter-out main,$(MOD_SUBDIRS))
 
 $(MOD_SUBDIRS):
-	@CFLAGS="$(MOD_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) --no-print-directory -C $@ SUBDIR=$@ all
+	@ASTCFLAGS="$(MOD_SUBDIR_CFLAGS) $(ASTCFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" $(MAKE) --no-print-directory -C $@ SUBDIR=$@ all
 
 $(OTHER_SUBDIRS):
-	@CFLAGS="$(OTHER_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) --no-print-directory -C $@ SUBDIR=$@ all
+	@ASTCFLAGS="$(OTHER_SUBDIR_CFLAGS) $(ASTCFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" $(MAKE) --no-print-directory -C $@ SUBDIR=$@ all
 
 defaults.h: makeopts
 	@build_tools/make_defaults_h > $@.tmp
@@ -588,10 +615,10 @@
 	fi
 
 $(MOD_SUBDIRS_DEPEND):
-	@CFLAGS="$(MOD_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) --no-print-directory -C $(@:-depend=) depend
+	@ASTCFLAGS="$(MOD_SUBDIR_CFLAGS) $(ASTCFLAGS)" $(MAKE) --no-print-directory -C $(@:-depend=) depend
 
 $(OTHER_SUBDIRS_DEPEND):
-	@CFLAGS="$(OTHER_SUBDIR_CFLAGS)$(ASTCFLAGS)" $(MAKE) --no-print-directory -C $(@:-depend=) depend
+	@ASTCFLAGS="$(OTHER_SUBDIR_CFLAGS) $(ASTCFLAGS)" $(MAKE) --no-print-directory -C $(@:-depend=) depend
 
 depend: include/asterisk/version.h include/asterisk/buildopts.h defaults.h $(SUBDIRS_DEPEND)
 
@@ -646,7 +673,7 @@
 	- at menuselect/menuselect $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS) menuselect.makeopts && (echo "menuselect changes saved!"; rm -f channels/h323/Makefile.ast main/asterisk) || echo "menuselect changes NOT saved!"
 
 menuselect/menuselect: makeopts menuselect/menuselect.c menuselect/menuselect_curses.c menuselect/menuselect_stub.c menuselect/menuselect.h menuselect/linkedlists.h makeopts
-	@unset CC LD AR RANLIB CFLAGS LDFLAGS && $(MAKE) -C menuselect CONFIGURE_SILENT="--silent"
+	@unset CC LD AR RANLIB && $(MAKE) -C menuselect CONFIGURE_SILENT="--silent"
 
 menuselect-tree: $(foreach dir,$(filter-out main,$(MOD_SUBDIRS)),$(wildcard $(dir)/*.c) $(wildcard $(dir)/*.cc)) build_tools/cflags.xml sounds/sounds.xml build_tools/embed_modules.xml
 	@echo "Generating input for menuselect ..."

Modified: trunk/Makefile.moddir_rules
URL: http://svn.digium.com/view/asterisk/trunk/Makefile.moddir_rules?rev=44013&r1=44012&r2=44013&view=diff
==============================================================================
--- trunk/Makefile.moddir_rules (original)
+++ trunk/Makefile.moddir_rules Fri Sep 29 13:54:21 2006
@@ -12,11 +12,11 @@
 #
 
 ifneq ($(findstring MALLOC_DEBUG,$(MENUSELECT_CFLAGS)),)
-  CFLAGS+=-include $(ASTTOPDIR)/include/asterisk/astmm.h
+  ASTCFLAGS+=-include $(ASTTOPDIR)/include/asterisk/astmm.h
 endif
 
 ifeq ($(findstring LOADABLE_MODULES,$(MENUSELECT_CFLAGS)),)
-  CFLAGS+=${GC_CFLAGS}
+  ASTCFLAGS+=${GC_CFLAGS}
 endif
 
 ifneq ($(findstring STATIC_BUILD,$(MENUSELECT_CFLAGS)),)
@@ -29,14 +29,14 @@
 
 define module_o_template
 $(2): $(3)
-$(2): CFLAGS+=-DAST_MODULE=\"$(1)\" $$(MENUSELECT_OPTS_$(1):%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_$(1)),$$(value $(dep)_INCLUDE))
+$(2): ASTCFLAGS+=-DAST_MODULE=\"$(1)\" $$(MENUSELECT_OPTS_$(1):%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_$(1)),$$(value $(dep)_INCLUDE))
 endef
 
 define module_so_template
 $(1)=$(1).so
-$(1).so: CFLAGS+=-fPIC
+$(1).so: ASTCFLAGS+=-fPIC
 $(1).so: LIBS+=$(foreach dep,$(MENUSELECT_DEPENDS_$(1)),$$(value $(dep)_LIB))
-$(1).so: LDFLAGS+=$(foreach dep,$(MENUSELECT_DEPENDS_$(1)),$$(value $(dep)_LDFLAGS))
+$(1).so: ASTLDFLAGS+=$(foreach dep,$(MENUSELECT_DEPENDS_$(1)),$$(value $(dep)_LDFLAGS))
 $(1).so: $(2)
 endef
 
@@ -102,4 +102,4 @@
 depend: .depend
 
 .depend:
-	../build_tools/mkdep $(CFLAGS) `ls *.c *.cc 2> /dev/null`
+	../build_tools/mkdep $(ASTCFLAGS) `ls *.c *.cc 2> /dev/null`

Modified: trunk/Makefile.rules
URL: http://svn.digium.com/view/asterisk/trunk/Makefile.rules?rev=44013&r1=44012&r2=44013&view=diff
==============================================================================
--- trunk/Makefile.rules (original)
+++ trunk/Makefile.rules Fri Sep 29 13:54:21 2006
@@ -33,19 +33,19 @@
 #K6OPT=-DK6OPT
 
 OPTIMIZE?=-O6
-CFLAGS+=$(OPTIMIZE)
+ASTCFLAGS+=$(OPTIMIZE)
 endif
 
 define ast_make_o_c
 $(1): $(2)
 	$(ECHO_PREFIX) echo "   [CC] $$< -> $$@"
-	$(CMD_PREFIX) $$(CC) -o $$@ -c $$< $$(CFLAGS)
+	$(CMD_PREFIX) $$(CC) -o $$@ -c $$< $$(ASTCFLAGS)
 endef
 
 define ast_make_oo_cc
 $(1): $(2)
 	$(ECHO_PREFIX) echo "   [CXX] $$< -> $$@"
-	$(CMD_PREFIX) $$(CXX) -o $$@ -c $$< $$(CFLAGS)
+	$(CMD_PREFIX) $$(CXX) -o $$@ -c $$< $$(ASTCFLAGS)
 endef
 
 define ast_make_c_y
@@ -63,13 +63,13 @@
 define ast_make_so_o
 $(1): $(2)
 	$(ECHO_PREFIX) echo "   [LD] $$^ -> $$@"
-	$(CMD_PREFIX) $$(CC) $$(STATIC_BUILD) -o $$@ $$(LDFLAGS) $$(SOLINK) $$^ $$(LIBS)
+	$(CMD_PREFIX) $$(CC) $$(STATIC_BUILD) -o $$@ $$(ASTLDFLAGS) $$(SOLINK) $$^ $$(LIBS)
 endef
 
 define ast_make_so_oo
 $(1): $(2)
 	$(ECHO_PREFIX) echo "   [LDXX] $$^ -> $$@"
-	$(CMD_PREFIX) $$(CXX) $$(STATIC_BUILD) -o $$@ $$(LDFLAGS) $$(SOLINK) $$^ $$(LIBS)
+	$(CMD_PREFIX) $$(CXX) $$(STATIC_BUILD) -o $$@ $$(ASTLDFLAGS) $$(SOLINK) $$^ $$(LIBS)
 endef
 
 define ast_make_a_o
@@ -82,13 +82,13 @@
 define ast_make_final
 $(1): $(2)
 	$(ECHO_PREFIX) echo "   [LD] $$^ -> $$@"
-	$(CMD_PREFIX) $$(CXX) $$(STATIC_BUILD) -o $$@ $$(LDFLAGS) $$^ $$(LIBS)
+	$(CMD_PREFIX) $$(CXX) $$(STATIC_BUILD) -o $$@ $$(ASTLDFLAGS) $$^ $$(LIBS)
 endef
 
 define ast_make_final_host
 $(1): $(2)
 	$(ECHO_PREFIX) echo "   [LD] $$^ -> $$@"
-	$(CMD_PREFIX) $$(HOST_CC) $$(STATIC_BUILD) -o $$@ $$(CFLAGS) $$(LDFLAGS) $$^ $$(LIBS)
+	$(CMD_PREFIX) $$(HOST_CC) $$(STATIC_BUILD) -o $$@ $$(HOST_CFLAGS) $$(HOST_LDFLAGS) $$^ $$(LIBS)
 endef
 
 $(eval $(call ast_make_o_c,%.o,%.c))

Modified: trunk/channels/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/channels/Makefile?rev=44013&r1=44012&r2=44013&view=diff
==============================================================================
--- trunk/channels/Makefile (original)
+++ trunk/channels/Makefile Fri Sep 29 13:54:21 2006
@@ -65,7 +65,7 @@
 
 ifneq ($(wildcard h323/Makefile.ast),)
   include h323/Makefile.ast
-H323LDFLAGS += -Wl,--version-script=h323/noexport.map
+H323LDFLAGS+=-Wl,--version-script=h323/noexport.map
 clean::
 	$(MAKE) -C h323 clean
 else
@@ -105,8 +105,8 @@
 	$(CMD_PREFIX) $(CXX) $(SOLINK) -o $@ $< h323/libchanh323.a $(CHANH323LIB) -L$(PWLIBDIR)/lib $(PTLIB) -L$(OPENH323DIR)/lib $(H323LIB) -L/usr/lib -lcrypto -lssl -lexpat
 endif
 
-chan_misdn.o: CFLAGS+=-Imisdn 
+chan_misdn.o: ASTCFLAGS+=-Imisdn 
 
-misdn_config.o: CFLAGS+=-Imisdn 
+misdn_config.o: ASTCFLAGS+=-Imisdn 
 
 $(chan_misdn): chan_misdn.o misdn_config.o misdn/isdn_lib.o misdn/isdn_msg_parser.o

Modified: trunk/codecs/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/codecs/Makefile?rev=44013&r1=44012&r2=44013&view=diff
==============================================================================
--- trunk/codecs/Makefile (original)
+++ trunk/codecs/Makefile Fri Sep 29 13:54:21 2006
@@ -42,14 +42,14 @@
 
 gsm/lib/libgsm.a:
 	@mkdir -p gsm/lib
-	@CFLAGS="$(OTHER_SUBDIR_CFLAGS) -I." $(MAKE) -C gsm lib/libgsm.a
+	@$(MAKE) -C gsm lib/libgsm.a
 
 $(LIBLPC10):
-	@CFLAGS="$(OTHER_SUBDIR_CFLAGS)" $(MAKE) -C lpc10 all
+	@$(MAKE) -C lpc10 all
 
 $(codec_lpc10): $(LIBLPC10)
 
 $(LIBILBC):
-	@CFLAGS="$(OTHER_SUBDIR_CFLAGS)" $(MAKE) -C ilbc all
+	@$(MAKE) -C ilbc all
 
 $(codec_ilbc): $(LIBILBC)

Modified: trunk/codecs/gsm/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/codecs/gsm/Makefile?rev=44013&r1=44012&r2=44013&view=diff
==============================================================================
--- trunk/codecs/gsm/Makefile (original)
+++ trunk/codecs/gsm/Makefile Fri Sep 29 13:54:21 2006
@@ -72,7 +72,6 @@
 # CCFLAGS 	= -c -O
 
 CCFLAGS 	+= -c -DNeedFunctionPrototypes=1 -funroll-loops $(OPTIMIZE)
-CCFLAGS   += -fPIC
 
 # LD		= gcc
 # LDFLAGS 	=
@@ -155,7 +154,7 @@
 DEBUG	= -DNDEBUG
 ######### Remove -DNDEBUG to enable assertions.
 
-CFLAGS += $(PG) $(CCFLAGS) $(SASR) $(DEBUG) $(MULHACK) $(FAST) \
+ASTCFLAGS += $(PG) $(CCFLAGS) $(SASR) $(DEBUG) $(MULHACK) $(FAST) \
 	$(LTP_CUT) $(WAV49) $(K6OPT) $(CCINC) -I$(INC)
 ######### It's $(CC) $(CFLAGS)
 
@@ -319,10 +318,6 @@
 
 # Default rules
 
-.c.o:
-		$(CC) $(CFLAGS:-Werror=) $?
-		@-mv `$(BASENAME) $@` $@ > /dev/null 2>&1
-
 include $(ASTTOPDIR)/Makefile.rules
 
 # Target rules

Modified: trunk/configure
URL: http://svn.digium.com/view/asterisk/trunk/configure?rev=44013&r1=44012&r2=44013&view=diff
==============================================================================
--- trunk/configure (original)
+++ trunk/configure Fri Sep 29 13:54:21 2006
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 43427 .
+# From configure.ac Revision: 43830 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.60a.
 #
@@ -694,6 +694,9 @@
 CAP_LIB
 CAP_INCLUDE
 PBX_CAP
+CURL_LIB
+CURL_INCLUDE
+PBX_CURL
 CURSES_LIB
 CURSES_INCLUDE
 PBX_CURSES
@@ -832,9 +835,6 @@
 GTK_INCLUDE
 GTK_LIB
 CURL
-PBX_CURL
-CURL_INCLUDE
-CURL_LIB
 LTLIBOBJS'
 ac_subst_files=''
       ac_precious_vars='build_alias
@@ -1429,6 +1429,7 @@
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --with-asound=PATH      use Advanced Linux Sound Architecture files in PATH
   --with-cap=PATH         use POSIX 1.e capabilities files in PATH
+  --with-curl=PATH        use cURL files in PATH
   --with-curses=PATH      use curses files in PATH
   --with-gnutls=PATH      use GNU TLS support (used for iksemel only) files in
                           PATH
@@ -5417,6 +5418,33 @@
 fi
 
 PBX_CAP=0
+
+
+
+
+
+CURL_DESCRIP="cURL"
+CURL_OPTION="curl"
+
+# Check whether --with-curl was given.
+if test "${with_curl+set}" = set; then
+  withval=$with_curl;
+case ${withval} in
+     n|no)
+     USE_CURL=no
+     ;;
+     y|ye|yes)
+     CURL_MANDATORY="yes"
+     ;;
+     *)
+     CURL_DIR="${withval}"
+     CURL_MANDATORY="yes"
+     ;;
+esac
+
+fi
+
+PBX_CURL=0
 
 
 
@@ -31436,8 +31464,8 @@
 
 
 
-PBX_CURL=0
-if test -n "$ac_tool_prefix"; then
+if test "${USE_CURL}" != "no"; then
+   if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}curl-config", so it can be a program name with args.
 set dummy ${ac_tool_prefix}curl-config; ac_word=$2
 { echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -31539,35 +31567,33 @@
   CURL="$ac_cv_path_CURL"
 fi
 
-if test ! x"${CURL}" = xNo; then
-# check for version
-   if test "${host_os}" = "SunOS"; then
-      if [ 0x`curl-config --vernum` -ge 0x70907 ]; then
-         CURL_INCLUDE=$(${CURL} --cflags)
-         CURL_LIB=$(${CURL} --libs)
-         PBX_CURL=1
+   if test ! x"${CURL}" = xNo; then
+   # check for version
+      if test "${host_os}" = "SunOS"; then
+            if [ 0x`curl-config --vernum` -ge 0x70907 ]; then
+	        CURL_INCLUDE=$(${CURL} --cflags)
+		CURL_LIB=$(${CURL} --libs)
+		PBX_CURL=1
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_CURL 1
 _ACEOF
 
-      fi
-   else
-      if [[ 0x`curl-config --vernum` -ge 0x70907 ]]; then
-         CURL_INCLUDE=$(${CURL} --cflags)
-         CURL_LIB=$(${CURL} --libs)
-         PBX_CURL=1
+	    fi
+	 else
+	    if [[ 0x`curl-config --vernum` -ge 0x70907 ]]; then
+	        CURL_INCLUDE=$(${CURL} --cflags)
+		CURL_LIB=$(${CURL} --libs)
+		PBX_CURL=1
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_CURL 1
 _ACEOF
 
-      fi
-   fi
-fi
-
-
-
+	    fi
+	fi
+    fi
+fi
 
 ac_config_files="$ac_config_files build_tools/menuselect-deps makeopts channels/h323/Makefile"
 
@@ -32268,11 +32294,11 @@
 CAP_LIB!$CAP_LIB$ac_delim
 CAP_INCLUDE!$CAP_INCLUDE$ac_delim
 PBX_CAP!$PBX_CAP$ac_delim
+CURL_LIB!$CURL_LIB$ac_delim
+CURL_INCLUDE!$CURL_INCLUDE$ac_delim
+PBX_CURL!$PBX_CURL$ac_delim
 CURSES_LIB!$CURSES_LIB$ac_delim
 CURSES_INCLUDE!$CURSES_INCLUDE$ac_delim
-PBX_CURSES!$PBX_CURSES$ac_delim
-GNUTLS_LIB!$GNUTLS_LIB$ac_delim
-GNUTLS_INCLUDE!$GNUTLS_INCLUDE$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -32314,6 +32340,9 @@
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+PBX_CURSES!$PBX_CURSES$ac_delim
+GNUTLS_LIB!$GNUTLS_LIB$ac_delim
+GNUTLS_INCLUDE!$GNUTLS_INCLUDE$ac_delim
 PBX_GNUTLS!$PBX_GNUTLS$ac_delim
 GSM_LIB!$GSM_LIB$ac_delim
 GSM_INCLUDE!$GSM_INCLUDE$ac_delim
@@ -32408,9 +32437,6 @@
 VORBIS_LIB!$VORBIS_LIB$ac_delim
 VORBIS_INCLUDE!$VORBIS_INCLUDE$ac_delim
 PBX_VORBIS!$PBX_VORBIS$ac_delim
-VPB_LIB!$VPB_LIB$ac_delim
-VPB_INCLUDE!$VPB_INCLUDE$ac_delim
-PBX_VPB!$PBX_VPB$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -32452,6 +32478,9 @@
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+VPB_LIB!$VPB_LIB$ac_delim
+VPB_INCLUDE!$VPB_INCLUDE$ac_delim
+PBX_VPB!$PBX_VPB$ac_delim
 ZLIB_LIB!$ZLIB_LIB$ac_delim
 ZLIB_INCLUDE!$ZLIB_INCLUDE$ac_delim
 PBX_ZLIB!$PBX_ZLIB$ac_delim
@@ -32488,9 +32517,6 @@
 GTK_INCLUDE!$GTK_INCLUDE$ac_delim
 GTK_LIB!$GTK_LIB$ac_delim
 CURL!$CURL$ac_delim
-PBX_CURL!$PBX_CURL$ac_delim
-CURL_INCLUDE!$CURL_INCLUDE$ac_delim
-CURL_LIB!$CURL_LIB$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 

Modified: trunk/configure.ac
URL: http://svn.digium.com/view/asterisk/trunk/configure.ac?rev=44013&r1=44012&r2=44013&view=diff
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Fri Sep 29 13:54:21 2006
@@ -176,6 +176,7 @@
 
 AST_EXT_LIB_SETUP([ALSA], [Advanced Linux Sound Architecture], [asound])
 AST_EXT_LIB_SETUP([CAP], [POSIX 1.e capabilities], [cap])
+AST_EXT_LIB_SETUP([CURL], [cURL], [curl])
 AST_EXT_LIB_SETUP([CURSES], [curses], [curses])
 AST_EXT_LIB_SETUP([GNUTLS], [GNU TLS support (used for iksemel only)], [gnutls])
 AST_EXT_LIB_SETUP([GSM], [GSM], [gsm], [, or 'internal'])
@@ -997,29 +998,27 @@
 AC_SUBST(GTK_INCLUDE)
 AC_SUBST(GTK_LIB)
 
-PBX_CURL=0
-AC_PATH_TOOL([CURL], [curl-config], No)
-if test ! x"${CURL}" = xNo; then
-# check for version
-   if test "${host_os}" = "SunOS"; then
-      if [[ 0x`curl-config --vernum` -ge 0x70907 ]]; then
-         CURL_INCLUDE=$(${CURL} --cflags)
-         CURL_LIB=$(${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
-         CURL_INCLUDE=$(${CURL} --cflags)
-         CURL_LIB=$(${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(CURL_INCLUDE)
-AC_SUBST(CURL_LIB)
+if test "${USE_CURL}" != "no"; then
+   AC_PATH_TOOL([CURL], [curl-config], No)
+   if test ! x"${CURL}" = xNo; then
+   # check for version
+      if test "${host_os}" = "SunOS"; then
+            if [[ 0x`curl-config --vernum` -ge 0x70907 ]]; then
+	        CURL_INCLUDE=$(${CURL} --cflags)
+		CURL_LIB=$(${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
+	        CURL_INCLUDE=$(${CURL} --cflags)
+		CURL_LIB=$(${CURL} --libs)
+		PBX_CURL=1
+		AC_DEFINE([HAVE_CURL], 1, [Define if your system has the curl libraries.])
+	    fi
+	fi
+    fi
+fi
 
 AC_CONFIG_FILES([build_tools/menuselect-deps makeopts channels/h323/Makefile])
 AC_OUTPUT

Modified: trunk/include/asterisk/autoconfig.h.in
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/autoconfig.h.in?rev=44013&r1=44012&r2=44013&view=diff
==============================================================================
--- trunk/include/asterisk/autoconfig.h.in (original)
+++ trunk/include/asterisk/autoconfig.h.in Fri Sep 29 13:54:21 2006
@@ -61,6 +61,9 @@
 
 /* Define to 1 if you have the `bzero' function. */
 #undef HAVE_BZERO
+
+/* Define to indicate the ${CAP_DESCRIP} library */
+#undef HAVE_CAP
 
 /* Define to 1 if your system has a working `chown' function. */
 #undef HAVE_CHOWN

Modified: trunk/main/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/main/Makefile?rev=44013&r1=44012&r2=44013&view=diff
==============================================================================
--- trunk/main/Makefile (original)
+++ trunk/main/Makefile Fri Sep 29 13:54:21 2006
@@ -93,11 +93,11 @@
 endif
 
 editline/libedit.a:
-	cd editline && unset CFLAGS AST_LIBS && test -f config.h || CFLAGS="$(OPTIMIZE)" ./configure --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)
+	cd editline && test -f config.h || CFLAGS="$(ASTCFLAGS)" ./configure --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)
 	$(MAKE) -C editline libedit.a
 
 db1-ast/libdb1.a:
-	CFLAGS="$(ASTCFLAGS)" $(MAKE) -C db1-ast libdb1.a
+	CFLAGS="$(ASTCFLAGS)" LDFLAGS="$(ASTLDFLAGS)" $(MAKE) -C db1-ast libdb1.a
 
 ast_expr2.c ast_expr2.h:
 	bison -o $@ -d --name-prefix=ast_yy ast_expr2.y
@@ -111,7 +111,7 @@
 	$(CC) -g -o testexpr2 ast_expr2f.o ast_expr2.o
 	rm ast_expr2.o ast_expr2f.o 
 
-channel.o: CFLAGS+=$(ZAPTEL_INCLUDE)
+channel.o: ASTCFLAGS+=$(ZAPTEL_INCLUDE)
 
 AST_EMBED_LDSCRIPTS:=$(sort $(EMBED_LDSCRIPTS))
 AST_EMBED_LDFLAGS:=$(foreach dep,$(EMBED_LDFLAGS),$(value $(dep)))
@@ -131,9 +131,9 @@
 		mv $(ASTTOPDIR)/include/asterisk/build.h.tmp $(ASTTOPDIR)/include/asterisk/build.h ; \
 	fi
 	@rm -f $(ASTTOPDIR)/include/asterisk/build.h.tmp
-	@$(CC) -c -o buildinfo.o $(CFLAGS) buildinfo.c
+	@$(CC) -c -o buildinfo.o $(ASTCFLAGS) buildinfo.c
 	$(ECHO_PREFIX) echo "   [LD] $^ -> $@"
-	$(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(LDFLAGS) $(H323LDFLAGS) $^ buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(H323LDLIBS)
+	$(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(ASTLDFLAGS) $(H323LDFLAGS) $^ buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(H323LDLIBS)
 	@$(ASTTOPDIR)/build_tools/strip_nonapi $@
 
 clean::

Modified: trunk/main/db1-ast/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/main/db1-ast/Makefile?rev=44013&r1=44012&r2=44013&view=diff
==============================================================================
--- trunk/main/db1-ast/Makefile (original)
+++ trunk/main/db1-ast/Makefile Fri Sep 29 13:54:21 2006
@@ -10,7 +10,7 @@
 #Added support for UltraSparc - Belgarath
 ifeq ($(ARCH),sparc64)
 PROC=ultrasparc
-CFLAGS += -mtune=$(PROC) -pipe -fomit-frame-pointer -mcpu=v8
+ASTCFLAGS += -mtune=$(PROC) -pipe -fomit-frame-pointer -mcpu=v8
 endif
 
 ifeq ($(OSARCH),Darwin)
@@ -50,11 +50,11 @@
 clean:
 	rm -f $(LIBDB) $(LIBDBSO) $(OBJS) $(SHOBJS)
 
-CFLAGS+=-Wall -D__DBINTERFACE_PRIVATE -I. -I.. -Iinclude -Ihash -Ibtree -Irecno
+ASTCFLAGS+=-Wall -D__DBINTERFACE_PRIVATE -I. -I.. -Iinclude -Ihash -Ibtree -Irecno
 
 OSTYPE=$(shell uname -s)
 ifeq ($(OSTYPE),SunOS)
-CFLAGS+=-I../../include -I../../include/solaris-compat -DSOLARIS
+ASTCFLAGS+=-I../../include -I../../include/solaris-compat -DSOLARIS
 endif
 
 db_dump185.o: db_dump185.c

Modified: trunk/pbx/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/pbx/Makefile?rev=44013&r1=44012&r2=44013&view=diff
==============================================================================
--- trunk/pbx/Makefile (original)
+++ trunk/pbx/Makefile Fri Sep 29 13:54:21 2006
@@ -29,10 +29,10 @@
 	rm -f ael/*.o
 
 $(eval $(call ast_make_o_c,ael/aelflex.o,ael/ael_lex.c ../include/asterisk/ael_structs.h ael/ael.tab.h))
-ael/aelflex.o: CFLAGS+=-I.
+ael/aelflex.o: ASTCFLAGS+=-I.
 
 $(eval $(call ast_make_o_c,ael/aelbison.o,ael/ael.tab.c ael/ael.tab.h ../include/asterisk/ael_structs.h))
-ael/aelbison.o: CFLAGS+=-I.
+ael/aelbison.o: ASTCFLAGS+=-I.
 
 $(pbx_ael): ael/aelbison.o ael/aelflex.o
 
@@ -43,6 +43,6 @@
 	(cd ael; bison -v -d ael.y)
 
 dundi-parser.o: dundi-parser.h
-dundi-parser.o: CFLAGS+=-I.
+dundi-parser.o: ASTCFLAGS+=-I.
 
 $(pbx_dundi): dundi-parser.o

Modified: trunk/utils/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/utils/Makefile?rev=44013&r1=44012&r2=44013&view=diff
==============================================================================
--- trunk/utils/Makefile (original)
+++ trunk/utils/Makefile Fri Sep 29 13:54:21 2006
@@ -71,18 +71,18 @@
 $(eval $(call ast_make_o_c,ast_expr2.o,../main/ast_expr2.c))
 
 $(eval $(call ast_make_o_c,ast_expr2f.o,../main/ast_expr2f.c))
-ast_expr2f.o: CFLAGS+=-DSTANDALONE_AEL
+ast_expr2f.o: ASTCFLAGS+=-DSTANDALONE_AEL
 
 $(eval $(call ast_make_final,check_expr,check_expr.c ast_expr2.o ast_expr2f.o))
 
 $(eval $(call ast_make_o_c,aelflex.o,../pbx/ael/ael_lex.c ../include/asterisk/ael_structs.h ../pbx/ael/ael.tab.h))
-aelflex.o: CFLAGS+=-I../pbx -DSTANDALONE_AEL
+aelflex.o: ASTCFLAGS+=-I../pbx -DSTANDALONE_AEL
 
 $(eval $(call ast_make_o_c,aelbison.o,../pbx/ael/ael.tab.c ../pbx/ael/ael.tab.h ../include/asterisk/ael_structs.h))
-aelbison.o: CFLAGS+=-I../pbx
+aelbison.o: ASTCFLAGS+=-I../pbx
 
 $(eval $(call ast_make_o_c,pbx_ael.o,../pbx/pbx_ael.c))
-pbx_ael.o: CFLAGS+=-DSTANDALONE_AEL
+pbx_ael.o: ASTCFLAGS+=-DSTANDALONE_AEL
 
 $(eval $(call ast_make_final,aelparse,aelflex.o aelbison.o pbx_ael.o ael_main.o ast_expr2f.o ast_expr2.o strcompat.o))
 
@@ -110,4 +110,4 @@
 depend: .depend
 
 .depend:
-	../build_tools/mkdep $(CFLAGS) `ls *.c`
+	../build_tools/mkdep $(ASTCFLAGS) `ls *.c`



More information about the asterisk-commits mailing list