[asterisk-commits] trunk r23380 - in /trunk: acinclude.m4
configure.ac utils/Makefile
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sat Apr 29 08:31:46 MST 2006
Author: kpfleming
Date: Sat Apr 29 10:31:45 2006
New Revision: 23380
URL: http://svn.digium.com/view/asterisk?rev=23380&view=rev
Log:
and now with the correct filenames
add basic support for checking for C compiler attribute support
Modified:
trunk/acinclude.m4
trunk/configure.ac
trunk/utils/Makefile
Modified: trunk/acinclude.m4
URL: http://svn.digium.com/view/asterisk/trunk/acinclude.m4?rev=23380&r1=23379&r2=23380&view=diff
==============================================================================
--- trunk/acinclude.m4 (original)
+++ trunk/acinclude.m4 Sat Apr 29 10:31:45 2006
@@ -68,7 +68,7 @@
AC_DEFUN(
-[AST_CHECK_GNU_MAKE], [ AC_CACHE_CHECK( for GNU make, GNU_MAKE,
+[AST_CHECK_GNU_MAKE], [AC_CACHE_CHECK(for GNU make, GNU_MAKE,
GNU_MAKE='Not Found' ;
for a in make gmake gnumake ; do
if test -z "$a" ; then continue ; fi ;
@@ -83,4 +83,19 @@
exit 1
fi
AC_SUBST([GNU_MAKE])
-] )
+])
+
+AC_DEFUN(
+[AST_C_ATTRIBUTE],
+[AC_CACHE_CHECK([for $1 attribute support],
+ [ac_cv_attribute_$1],
+ AC_COMPILE_IFELSE(
+ AC_LANG_PROGRAM(
+ [[static void foo(void) __attribute__ (($1));xyz]],
+ []),
+ have_attribute_$1=1, have_attribute_$1=0)
+ )
+ if test "$have_attribute_$1" = "1"; then
+ AC_DEFINE_UNQUOTED([HAVE_ATTRIBUTE_$1], 1, [Define to indicate the compiler supports __attribute__ (($1))])
+ fi
+])
Modified: trunk/configure.ac
URL: http://svn.digium.com/view/asterisk/trunk/configure.ac?rev=23380&r1=23379&r2=23380&view=diff
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Sat Apr 29 10:31:45 2006
@@ -614,6 +614,9 @@
AC_STRUCT_TM
AC_C_VOLATILE
AC_CHECK_TYPES([ptrdiff_t])
+AST_C_ATTRIBUTE([malloc])
+AST_C_ATTRIBUTE([printf])
+AST_C_ATTRIBUTE([mallocx])
# Checks for library functions.
AC_FUNC_CHOWN
Modified: trunk/utils/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/utils/Makefile?rev=23380&r1=23379&r2=23380&view=diff
==============================================================================
--- trunk/utils/Makefile (original)
+++ trunk/utils/Makefile Sat Apr 29 10:31:45 2006
@@ -57,7 +57,7 @@
stereorize: stereorize.o frame.o
$(CC) $(CFLAGS) -o stereorize stereorize.o frame.o -lm
-.PHONY: ../ast_expr2.o ../ast_expr2f.o ../pbx/ael/aelflex.o ../pbx/ael/aelbison.o ../pbx/pbx_ael.o
+.PHONY: ../ast_expr2.c ../ast_expr2f.c ../pbx/ael/aelflex.o ../pbx/ael/aelbison.o ../pbx/pbx_ael.o
ast_expr2.o: ../ast_expr2.c
gcc $(CFLAGS) -include ../include/autoconfig.h -c -o $@ $<
More information about the asterisk-commits
mailing list