[asterisk-commits] kpfleming: branch group/new_loader_completion r40556 - in /team/group/new_loa...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sat Aug 19 18:06:15 MST 2006


Author: kpfleming
Date: Sat Aug 19 20:06:14 2006
New Revision: 40556

URL: http://svn.digium.com/view/asterisk?rev=40556&view=rev
Log:
use configure tests for compiler attributes instead of compiler version checking

Modified:
    team/group/new_loader_completion/Makefile
    team/group/new_loader_completion/acinclude.m4
    team/group/new_loader_completion/configure
    team/group/new_loader_completion/configure.ac
    team/group/new_loader_completion/include/asterisk/autoconfig.h.in
    team/group/new_loader_completion/include/asterisk/compiler.h
    team/group/new_loader_completion/include/asterisk/utils.h
    team/group/new_loader_completion/makeopts.in

Modified: team/group/new_loader_completion/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/Makefile?rev=40556&r1=40555&r2=40556&view=diff
==============================================================================
--- team/group/new_loader_completion/Makefile (original)
+++ team/group/new_loader_completion/Makefile Sat Aug 19 20:06:14 2006
@@ -665,10 +665,10 @@
 	- at menuselect/menuselect $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS) menuselect.makeopts && echo "menuselect changes saved!" || 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 mxml/libmxml.a
-	@CFLAGS="-include $(ASTTOPDIR)/include/asterisk/autoconfig.h -I$(ASTTOPDIR)/include" PARENTSRC="$(ASTTOPDIR)" $(MAKE) -C menuselect menuselect
+	@CFLAGS="-include $(ASTTOPDIR)/include/asterisk/autoconfig.h -I$(ASTTOPDIR)/include" PARENTSRC="$(ASTTOPDIR)" $(MAKE) -C menuselect CC="$(HOST_CC)" menuselect
 
 mxml/libmxml.a:
-	@cd mxml && unset CFLAGS AST_LIBS && test -f config.h || ./configure
+	@cd mxml && unset CFLAGS AST_LIBS && test -f config.h || CC="$(HOST_CC)" ./configure
 	$(MAKE) -C mxml libmxml.a
 
 menuselect-tree: $(foreach dir,$(MOD_SUBDIRS),$(wildcard $(dir)/*.c) $(wildcard $(dir)/*.cc)) build_tools/cflags.xml sounds/sounds.xml build_tools/embed_modules.xml

Modified: team/group/new_loader_completion/acinclude.m4
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/acinclude.m4?rev=40556&r1=40555&r2=40556&view=diff
==============================================================================
--- team/group/new_loader_completion/acinclude.m4 (original)
+++ team/group/new_loader_completion/acinclude.m4 Sat Aug 19 20:06:14 2006
@@ -1,3 +1,16 @@
+# AST_GCC_ATTRIBUTE([attribute name])
+
+AC_DEFUN([AST_GCC_ATTRIBUTE],
+[
+AC_MSG_CHECKING(checking for compiler 'attribute $1' support)
+AC_COMPILE_IFELSE(
+	AC_LANG_PROGRAM([static int __attribute__(($1)) test(void) {}],
+			[]),
+	AC_MSG_RESULT(yes)
+	AC_DEFINE_UNQUOTED([HAVE_ATTRIBUTE_$1], 1, [Define to 1 if your GCC C compiler supports the '$1' attribute.]),
+	AC_MSG_RESULT(no))
+])
+
 # AST_EXT_LIB_SETUP([package symbol name], [package friendly name], [package option name], [additional help text])
 
 AC_DEFUN([AST_EXT_LIB_SETUP],

Modified: team/group/new_loader_completion/configure
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/configure?rev=40556&r1=40555&r2=40556&view=diff
==============================================================================
--- team/group/new_loader_completion/configure (original)
+++ team/group/new_loader_completion/configure Sat Aug 19 20:06:14 2006
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 40544 .
+# From configure.ac Revision: 40547 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.60.
 #
@@ -647,10 +647,6 @@
 host_cpu
 host_vendor
 host_os
-target
-target_cpu
-target_vendor
-target_os
 PBX_PLATFORM
 PBX_CPU
 PBX_VENDOR
@@ -1391,7 +1387,6 @@
 System types:
   --build=BUILD     configure for building on BUILD [guessed]
   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
-  --target=TARGET   configure for building compilers for TARGET [HOST]
 _ACEOF
 fi
 
@@ -1997,49 +1992,6 @@
 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
 
-{ echo "$as_me:$LINENO: checking target system type" >&5
-echo $ECHO_N "checking target system type... $ECHO_C" >&6; }
-if test "${ac_cv_target+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "x$target_alias" = x; then
-  ac_cv_target=$ac_cv_host
-else
-  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
-    { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5
-echo "${ECHO_T}$ac_cv_target" >&6; }
-case $ac_cv_target in
-*-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5
-echo "$as_me: error: invalid value of canonical target" >&2;}
-   { (exit 1); exit 1; }; };;
-esac
-target=$ac_cv_target
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_target
-shift
-target_cpu=$1
-target_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-target_os=$*
-IFS=$ac_save_IFS
-case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
-
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-test -n "$target_alias" &&
-  test "$program_prefix$program_suffix$program_transform_name" = \
-    NONENONEs,x,x, &&
-  program_prefix=${target_alias}-
 
 # check existence of the package
 
@@ -14424,6 +14376,352 @@
 
 rm -f core conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
+
+
+{ echo "$as_me:$LINENO: checking checking for compiler 'attribute pure' support" >&5
+echo $ECHO_N "checking checking for compiler 'attribute pure' support... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+static int __attribute__((pure)) test(void) {}
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_ATTRIBUTE_pure 1
+_ACEOF
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+{ echo "$as_me:$LINENO: checking checking for compiler 'attribute malloc' support" >&5
+echo $ECHO_N "checking checking for compiler 'attribute malloc' support... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+static int __attribute__((malloc)) test(void) {}
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_ATTRIBUTE_malloc 1
+_ACEOF
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+{ echo "$as_me:$LINENO: checking checking for compiler 'attribute const' support" >&5
+echo $ECHO_N "checking checking for compiler 'attribute const' support... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+static int __attribute__((const)) test(void) {}
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_ATTRIBUTE_const 1
+_ACEOF
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+{ echo "$as_me:$LINENO: checking checking for compiler 'attribute unused' support" >&5
+echo $ECHO_N "checking checking for compiler 'attribute unused' support... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+static int __attribute__((unused)) test(void) {}
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_ATTRIBUTE_unused 1
+_ACEOF
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+{ echo "$as_me:$LINENO: checking checking for compiler 'attribute always_inline' support" >&5
+echo $ECHO_N "checking checking for compiler 'attribute always_inline' support... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+static int __attribute__((always_inline)) test(void) {}
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_ATTRIBUTE_always_inline 1
+_ACEOF
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
 
 if test "${ac_cv_header_libkern_OSAtomic_h+set}" = set; then
   { echo "$as_me:$LINENO: checking for libkern/OSAtomic.h" >&5
@@ -30470,10 +30768,6 @@
 host_cpu!$host_cpu$ac_delim
 host_vendor!$host_vendor$ac_delim
 host_os!$host_os$ac_delim
-target!$target$ac_delim
-target_cpu!$target_cpu$ac_delim
-target_vendor!$target_vendor$ac_delim
-target_os!$target_os$ac_delim
 PBX_PLATFORM!$PBX_PLATFORM$ac_delim
 PBX_CPU!$PBX_CPU$ac_delim
 PBX_VENDOR!$PBX_VENDOR$ac_delim
@@ -30522,6 +30816,10 @@
 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
+PBX_GSM!$PBX_GSM$ac_delim
+IKSEMEL_LIB!$IKSEMEL_LIB$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -30563,10 +30861,6 @@
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
-GSM_LIB!$GSM_LIB$ac_delim
-GSM_INCLUDE!$GSM_INCLUDE$ac_delim
-PBX_GSM!$PBX_GSM$ac_delim
-IKSEMEL_LIB!$IKSEMEL_LIB$ac_delim
 IKSEMEL_INCLUDE!$IKSEMEL_INCLUDE$ac_delim
 PBX_IKSEMEL!$PBX_IKSEMEL$ac_delim
 IMAP_TK_LIB!$IMAP_TK_LIB$ac_delim
@@ -30660,6 +30954,10 @@
 ZAPTEL_INCLUDE!$ZAPTEL_INCLUDE$ac_delim
 PBX_ZAPTEL!$PBX_ZAPTEL$ac_delim
 ALLOCA!$ALLOCA$ac_delim
+EGREP!$EGREP$ac_delim
+LIBOBJS!$LIBOBJS$ac_delim
+POW_LIB!$POW_LIB$ac_delim
+GSM_INTERNAL!$GSM_INTERNAL$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -30701,10 +30999,6 @@
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
-EGREP!$EGREP$ac_delim
-LIBOBJS!$LIBOBJS$ac_delim
-POW_LIB!$POW_LIB$ac_delim
-GSM_INTERNAL!$GSM_INTERNAL$ac_delim
 KDEINIT!$KDEINIT$ac_delim
 KDEDIR!$KDEDIR$ac_delim
 NETSNMP_CONFIG!$NETSNMP_CONFIG$ac_delim
@@ -30723,7 +31017,7 @@
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 20; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 16; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5

Modified: team/group/new_loader_completion/configure.ac
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/configure.ac?rev=40556&r1=40555&r2=40556&view=diff
==============================================================================
--- team/group/new_loader_completion/configure.ac (original)
+++ team/group/new_loader_completion/configure.ac Sat Aug 19 20:06:14 2006
@@ -11,7 +11,6 @@
 # cross-compile macros
 AC_CANONICAL_BUILD
 AC_CANONICAL_HOST
-AC_CANONICAL_TARGET
 
 # check existence of the package
 AC_CONFIG_SRCDIR([main/asterisk.c])
@@ -290,6 +289,12 @@
 AC_MSG_RESULT(no)
 )
 
+AST_GCC_ATTRIBUTE(pure)
+AST_GCC_ATTRIBUTE(malloc)
+AST_GCC_ATTRIBUTE(const)
+AST_GCC_ATTRIBUTE(unused)
+AST_GCC_ATTRIBUTE(always_inline)
+
 AC_CHECK_HEADER([libkern/OSAtomic.h],
                 [AC_DEFINE_UNQUOTED([HAVE_OSX_ATOMICS], 1, [Define to 1 if OSX atomic operations are supported.])])
 

Modified: team/group/new_loader_completion/include/asterisk/autoconfig.h.in
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/include/asterisk/autoconfig.h.in?rev=40556&r1=40555&r2=40556&view=diff
==============================================================================
--- team/group/new_loader_completion/include/asterisk/autoconfig.h.in (original)
+++ team/group/new_loader_completion/include/asterisk/autoconfig.h.in Sat Aug 19 20:06:14 2006
@@ -50,6 +50,22 @@
 
 /* Define to 1 if you have the `atexit' function. */
 #undef HAVE_ATEXIT
+
+/* Define to 1 if your GCC C compiler supports the 'always_inline' attribute.
+   */
+#undef HAVE_ATTRIBUTE_always_inline
+
+/* Define to 1 if your GCC C compiler supports the 'const' attribute. */
+#undef HAVE_ATTRIBUTE_const
+
+/* Define to 1 if your GCC C compiler supports the 'malloc' attribute. */
+#undef HAVE_ATTRIBUTE_malloc
+
+/* Define to 1 if your GCC C compiler supports the 'pure' attribute. */
+#undef HAVE_ATTRIBUTE_pure
+
+/* Define to 1 if your GCC C compiler supports the 'unused' attribute. */
+#undef HAVE_ATTRIBUTE_unused
 
 /* Define to 1 if you have the `bzero' function. */
 #undef HAVE_BZERO

Modified: team/group/new_loader_completion/include/asterisk/compiler.h
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/include/asterisk/compiler.h?rev=40556&r1=40555&r2=40556&view=diff
==============================================================================
--- team/group/new_loader_completion/include/asterisk/compiler.h (original)
+++ team/group/new_loader_completion/include/asterisk/compiler.h Sat Aug 19 20:06:14 2006
@@ -23,16 +23,34 @@
 #ifndef _ASTERISK_COMPILER_H
 #define _ASTERISK_COMPILER_H
 
-#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 96)
-#define __builtin_expect(exp, c) (exp)
+#if HAVE_ATTRIBUTE_always_inline
+#define force_inline inline __attribute__((always_inline))
+#else
 #define force_inline inline
-#define attribute_pure
-#else
-#define force_inline inline __attribute__((always_inline))
-#define attribute_pure __attribute__((pure))
 #endif
 
+#if HAVE_ATTRIBUTE_pure
+#define attribute_pure __attribute__((pure))
+#else
+#define attribute_pure
+#endif
+
+#if HAVE_ATTRIBUTE_const
 #define attribute_const __attribute__((const))
+#else
+#define attribute_const
+#endif
+
+#if HAVE_ATTRIBUTE_unused
 #define attribute_unused __attribute__((unused))
+#else
+#define attribute_unused
+#endif
+
+#if HAVE_ATTRIBUTE_malloc
+#define attribute_malloc __attribute__((malloc))
+#else
+#define attribute_malloc
+#endif
 
 #endif /* _ASTERISK_COMPILER_H */

Modified: team/group/new_loader_completion/include/asterisk/utils.h
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/include/asterisk/utils.h?rev=40556&r1=40555&r2=40556&view=diff
==============================================================================
--- team/group/new_loader_completion/include/asterisk/utils.h (original)
+++ team/group/new_loader_completion/include/asterisk/utils.h Sat Aug 19 20:06:14 2006
@@ -303,7 +303,7 @@
 	_ast_malloc((len), __FILE__, __LINE__, __PRETTY_FUNCTION__)
 
 AST_INLINE_API(
-void * __attribute__((malloc)) _ast_malloc(size_t len, const char *file, int lineno, const char *func),
+void * attribute_malloc _ast_malloc(size_t len, const char *file, int lineno, const char *func),
 {
 	void *p;
 
@@ -328,7 +328,7 @@
 	_ast_calloc((num), (len), __FILE__, __LINE__, __PRETTY_FUNCTION__)
 
 AST_INLINE_API(
-void * __attribute__((malloc)) _ast_calloc(size_t num, size_t len, const char *file, int lineno, const char *func),
+void * attribute_malloc _ast_calloc(size_t num, size_t len, const char *file, int lineno, const char *func),
 {
 	void *p;
 
@@ -353,7 +353,7 @@
 	_ast_realloc((p), (len), __FILE__, __LINE__, __PRETTY_FUNCTION__)
 
 AST_INLINE_API(
-void * __attribute__((malloc)) _ast_realloc(void *p, size_t len, const char *file, int lineno, const char *func),
+void * attribute_malloc _ast_realloc(void *p, size_t len, const char *file, int lineno, const char *func),
 {
 	void *newp;
 
@@ -382,7 +382,7 @@
 	_ast_strdup((str), __FILE__, __LINE__, __PRETTY_FUNCTION__)
 
 AST_INLINE_API(
-char * __attribute__((malloc)) _ast_strdup(const char *str, const char *file, int lineno, const char *func),
+char * attribute_malloc _ast_strdup(const char *str, const char *file, int lineno, const char *func),
 {
 	char *newstr = NULL;
 
@@ -413,7 +413,7 @@
 	_ast_strndup((str), (len), __FILE__, __LINE__, __PRETTY_FUNCTION__)
 
 AST_INLINE_API(
-char * __attribute__((malloc)) _ast_strndup(const char *str, size_t len, const char *file, int lineno, const char *func),
+char * attribute_malloc _ast_strndup(const char *str, size_t len, const char *file, int lineno, const char *func),
 {
 	char *newstr = NULL;
 

Modified: team/group/new_loader_completion/makeopts.in
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/makeopts.in?rev=40556&r1=40555&r2=40556&view=diff
==============================================================================
--- team/group/new_loader_completion/makeopts.in (original)
+++ team/group/new_loader_completion/makeopts.in Sat Aug 19 20:06:14 2006
@@ -3,7 +3,7 @@
 #       dependencies in menuselect for the same package.
 
 CC=@CC@
-HOST_CC=@CC@
+HOST_CC=cc
 CXX=@CXX@
 
 INSTALL=@INSTALL@



More information about the asterisk-commits mailing list