aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbeber <beber>2005-12-08 23:03:15 +0000
committerbeber <beber>2005-12-08 23:03:15 +0000
commit96a288f349e99377798be13b04766aaa996ce07c (patch)
tree6b085d27fecc858f599e77d2119eb9d36927a9fc
parentdel blank line in m4/ac_attribute.m4 (diff)
downloadespik-96a288f349e99377798be13b04766aaa996ce07c.tar.xz
__GNUC__ not _GNUC_
add a sh code with give me the result I attend to have
-rw-r--r--m4/ac_gnuc.m422
1 files changed, 15 insertions, 7 deletions
diff --git a/m4/ac_gnuc.m4 b/m4/ac_gnuc.m4
index 6639d3b..222d7f3 100644
--- a/m4/ac_gnuc.m4
+++ b/m4/ac_gnuc.m4
@@ -1,12 +1,20 @@
-AC_DEFUN([AC__GNUC_],
+# if { echo '#if __GNUC__'
+# echo ' yes '
+# echo '#endif'; } | ${CC} -E - | grep yes > /dev/null } ; then
+# gnuc_compiler=yes
+# else
+# gnuc_compiler=no
+# fi
+
+AC_DEFUN([AC___GNUC__],
[
- AC_MSG_CHECKING(for _GNUC_)
- AC_CACHE_VAL(ac_cv___attribute__, [
+ AC_MSG_CHECKING(for __GNUC__)
+ AC_CACHE_VAL(ac_cv___gnuc__, [
AC_TRY_COMPILE([#include <stdlib.h>],
[int func(int x); int foo(int x __attribute__ ((unused))) { exit(1); }],
- ac_cv___attribute__=yes, ac_cv___attribute__=no)])
- if test "$ac_cv___attribute__" = "yes"; then
- AC_DEFINE(HAVE___ATTRIBUTE__, 1, [Define to 1 if your compiler has __attribute__])
+ ac_cv___gnuc__=yes, ac_cv___gnuc__=no)])
+ if test "$ac_cv___gnuc__" = "yes"; then
+ AC_DEFINE(_ESPIK_DEBUG_, 1, [Define to 1 if your platform is ok for debug])
fi
- AC_MSG_RESULT($ac_cv___attribute__)
+ AC_MSG_RESULT($ac_cv___gnuc__)
])