aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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__)
])