m4-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Changes to m4/configure.ac,v [branch-1_4]


From: Eric Blake
Subject: Changes to m4/configure.ac,v [branch-1_4]
Date: Thu, 22 Jun 2006 03:29:37 +0000

CVSROOT:        /sources/m4
Module name:    m4
Branch:         branch-1_4
Changes by:     Eric Blake <ericb>      06/06/22 03:29:36

Index: configure.ac
===================================================================
RCS file: /sources/m4/m4/configure.ac,v
retrieving revision 1.36.2.14
retrieving revision 1.36.2.15
diff -u -b -r1.36.2.14 -r1.36.2.15
--- configure.ac        18 Jun 2006 20:38:02 -0000      1.36.2.14
+++ configure.ac        22 Jun 2006 03:29:36 -0000      1.36.2.15
@@ -24,6 +24,7 @@
 VERSION=$PACKAGE_VERSION; AC_SUBST([VERSION])
 
 m4_pattern_forbid([^M4_])
+m4_pattern_allow([^M4_cv_])
 
 AC_CONFIG_SRCDIR([src/m4.h])
 AC_CONFIG_HEADERS([config.h:config-h.in])
@@ -32,7 +33,16 @@
 M4_EARLY
 
 AC_CHECK_HEADERS([limits.h siginfo.h])
-AC_CHECK_HEADERS([signal.h sys/signal.h], [break])
+AC_CHECK_TYPES([siginfo_t], [], [],
+[[#include <signal.h>
+#if HAVE_SIGINFO_H
+# include <siginfo.h>
+#endif
+]])
+AC_CHECK_MEMBERS([struct sigaction.sa_sigaction], [], [],
+[[#include <signal.h>
+]])
+
 AC_TYPE_SIGNAL
 AC_TYPE_SIZE_T
 
@@ -50,42 +60,43 @@
   [AC_MSG_RESULT([no]); AC_CHECK_FUNCS([ecvt])])
 
 
-AC_MSG_CHECKING([if stack overflow is detectable])
 # Code from Jim Avera <address@hidden>.
 # stackovf.c requires:
 #  1. Either sigaction with SA_ONSTACK, or sigvec with SV_ONSTACK
 #  2. Either sigaltstack or sigstack
 #  3. getrlimit, including support for RLIMIT_STACK
-use_stackovf=no
+AC_CACHE_CHECK([if stack overflow is detectable], [M4_cv_use_stackovf],
+[M4_cv_use_stackovf=no
 if test "$ac_cv_func_sigaction" = yes || test "$ac_cv_func_sigvec" = yes; then
   if test "$ac_cv_func_sigaltstack" = yes || test "$ac_cv_func_sigstack" = 
yes; then
-    AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/time.h>
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/time.h>
 #include <sys/resource.h>
-#include <signal.h>]],
-      [[struct rlimit r; int i; getrlimit (RLIMIT_STACK, &r)
+#include <signal.h>
+]], [[struct rlimit r; getrlimit (RLIMIT_STACK, &r);
 #if (!defined(HAVE_SIGACTION) || !defined(SA_ONSTACK)) \
     && (!defined(HAVE_SIGVEC) || !defined(SV_ONSTACK))
 choke me               /* SA_ONSTACK and/or SV_ONSTACK are not defined */
-#endif]])],[use_stackovf=yes],[])
+#endif
+]])], [M4_cv_use_stackovf=yes])
   fi
-fi
-AC_MSG_RESULT([$use_stackovf])
-AM_CONDITIONAL([STACKOVF], [test "$use_stackovf" = yes])
-if test "$use_stackovf" = yes; then
+fi])
+AM_CONDITIONAL([STACKOVF], [test "$M4_cv_use_stackovf" = yes])
+if test "$M4_cv_use_stackovf" = yes; then
   AC_DEFINE([USE_STACKOVF], [1],
     [Define to 1 if using stack overflow detection])
-  AC_EGREP_HEADER([rlim_t], [sys/resource.h], [],
+  AC_CHECK_TYPES([rlim_t], [],
     [AC_DEFINE([rlim_t], [int],
-      [Define to int if rlim_t is not defined in sys/resource.h])
-  ])
-  AC_EGREP_HEADER([stack_t], [signal.h], [],
+      [Define to int if rlim_t is not defined in sys/resource.h])],
+    [[#include <sys/resource.h>
+  ]])
+  AC_CHECK_TYPES([stack_t], [],
     [AC_DEFINE([stack_t], [struct sigaltstack],
-      [Define to struct sigaltstack if stack_t is not in sys/signal.h])
-  ])
-  AC_EGREP_HEADER([sigcontext], [signal.h],
-    [AC_DEFINE([HAVE_SIGCONTEXT], [1],
-      [Define to 1 if signal.h declares struct sigcontext])
-  ])
+      [Define to struct sigaltstack if stack_t is not in signal.h])],
+    [[#include <signal.h>
+  ]])
+  AC_CHECK_TYPES([sigcontext], [], [], [[#include <signal.h>
+  ]])
 fi
 
 dnl Don't let changeword get in our way, if bootstrapping with a version of




reply via email to

[Prev in Thread] Current Thread [Next in Thread]