Make autoconf tests structure consistent with source files in lib/.
authorBruno Haible <bruno@clisp.org>
Sun, 21 Sep 2008 22:47:13 +0000 (00:47 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 21 Sep 2008 22:47:13 +0000 (00:47 +0200)
ChangeLog
m4/sigaction.m4

index acf9b88b795b6393fc4347e6d48d8b429b8588f8..cad2082dc7a2bf7e1f5d12686d6065ab34cfbdc3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-09-21  Bruno Haible  <bruno@clisp.org>
+
+       * m4/sigaction.m4 (gl_SIGACTION): Remove unnecessary AC_SUBST. Check
+       whether 'struct sigaction' has sa_sigaction here...
+       (gl_PREREQ_SIG_HANDLER_H): ... not here.
+       (gl_PREREQ_SIGACTION): Remove unnecessary AC_SUBST.
+
 2008-09-21  Bruno Haible  <bruno@clisp.org>
 
        * MODULES.html.sh (Support for obsolete systems lacking ANSI C 89): New
index f11d4cf0f17c77d7aad359c129895762199829f2..3a3ed9f24db57916ab3a32aabe8b8b44b04ca1c8 100644 (file)
@@ -1,4 +1,4 @@
-# sigaction.m4 serial 4
+# sigaction.m4 serial 5
 dnl Copyright (C) 2008 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,10 +8,16 @@ dnl with or without modifications, as long as this notice is preserved.
 AC_DEFUN([gl_SIGACTION],
 [
   AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
-  AC_REPLACE_FUNCS([sigaction])
-  if test $ac_cv_func_sigaction = no ; then
+  AC_CHECK_FUNCS_ONCE([sigaction])
+  if test $ac_cv_func_sigaction = yes; then
+    AC_CHECK_MEMBERS([struct sigaction.sa_sigaction], , ,
+                     [[#include <signal.h>]])
+    if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
+      HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
+    fi
+  else
     HAVE_SIGACTION=0
-    AC_SUBST([HAVE_SIGACTION])
+    AC_LIBOBJ([sigaction])
     gl_PREREQ_SIGACTION
   fi
 ])
@@ -29,7 +35,6 @@ AC_DEFUN([gl_PREREQ_SIGACTION],
   ]])
   if test $ac_cv_type_siginfo_t = no; then
     HAVE_SIGINFO_T=0
-    AC_SUBST([HAVE_SIGINFO_T])
   fi
 ])
 
@@ -37,10 +42,4 @@ AC_DEFUN([gl_PREREQ_SIGACTION],
 AC_DEFUN([gl_PREREQ_SIG_HANDLER_H],
 [
   AC_REQUIRE([AC_C_INLINE])
-  AC_CHECK_MEMBERS([struct sigaction.sa_sigaction], , ,
-                   [[#include <signal.h>]])
-  if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
-    HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
-    AC_SUBST([HAVE_STRUCT_SIGACTION_SA_SIGACTION])
-  fi
 ])