[xiph-commits] r7474 - icecast/branches/kh/m4

karl at motherfish-iii.xiph.org karl
Thu Aug 5 19:10:25 PDT 2004


Author: karl
Date: Thu Aug  5 19:10:25 2004
New Revision: 7474

Modified:
icecast/branches/kh/m4/xiph_compiler.m4
Log:
autofoo magic. The () looks like it needs special handling. It isn't
clear from the docs but this does look to work better. resync with
trunk as well


Modified: icecast/branches/kh/m4/xiph_compiler.m4
===================================================================
--- icecast/branches/kh/m4/xiph_compiler.m4	2004-08-03 23:51:37 UTC (rev 7473)
+++ icecast/branches/kh/m4/xiph_compiler.m4	2004-08-04 00:44:53 UTC (rev 7474)
@@ -22,7 +22,6 @@
AC_MSG_RESULT([memcpy])
])
])
-])
])dnl XIPH_FUNC_VA_COPY

dnl XIPH_C_ATTRIBUTE
@@ -33,14 +32,13 @@
AC_DEFUN([XIPH_C_ATTRIBUTE],
[dnl
# check for __attribute__
-AC_TRY_COMPILE([int func(void) __attribute__((unused));],[int x __attribute__ ((unused));],,
-??? [ AH_TEMPLATE([__attribute__], [Compile away if __attribute__ keyword is not supported])
-??? AC_DEFINE([__attribute__(x)],[/**/])
-??? ])
-])
+AC_TRY_COMPILE([int func(void) __attribute__((unused));],
+    [int x __attribute__ ((unused));],,[dnl
+    AH_TEMPLATE([__attribute__],[Define to empty if __attribute__ is not supported])
+    AC_DEFINE([__attribute__(x)],[/**/])
+    ])
])dnl XIPH_C_ATTRIBUTE

-
dnl XIPH_GCC_WARNING
dnl Karl Heyes
dnl
@@ -169,3 +167,21 @@
done
$1="$xt_filtered $$1"
])dnl XIPH_VAR_PREPEND
+
+dnl XIPH_C__FUNC__
+dnl Karl Heyes <karl at xiph.org> 07/2004
+AC_DEFUN([XIPH_C__FUNC__],
+[dnl
+AC_MSG_CHECKING([for __func__])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[const char *x = __func__;])],
+    [ AC_MSG_RESULT([yes])],
+    [ AH_TEMPLATE([__func__], [Replace __func__ if not supported])
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[const char *x = __FUNCTION__;])],
+        [ AC_DEFINE([__func__],[__FUNCTION__])
+        AC_MSG_RESULT([yes])],
+        [ AC_DEFINE([__func__],[""])
+        AC_MSG_RESULT([no])
+        ])
+    ])
+])dnl XIPH_C__FUNC__
+



More information about the commits mailing list