nanosleep: skip configure test (fail it) for apple universal builds
authorBruno Haible <bruno@clisp.org>
Wed, 21 Jan 2009 19:27:39 +0000 (20:27 +0100)
committerJim Meyering <meyering@redhat.com>
Wed, 21 Jan 2009 19:27:39 +0000 (20:27 +0100)
* m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_MULTIARCH. In Apple
universal builds, assume that nanosleep does not work.
* modules/nanosleep (Depends-on): Add multiarch.

ChangeLog
m4/nanosleep.m4
modules/nanosleep

index 07eb24a..4dd6650 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,11 @@
 2009-01-21  Bruno Haible  <bruno@clisp.org>
        and Jim Meyering  <meyering@redhat.com>
 
+       nanosleep: skip configure test (fail it) for apple universal builds
+       * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_MULTIARCH. In Apple
+       universal builds, assume that nanosleep does not work.
+       * modules/nanosleep (Depends-on): Add multiarch.
+
        mktime: skip configure test (fail it) for apple universal builds
        * m4/mktime.m4 (AC_FUNC_MKTIME): Require gl_MULTIARCH. In Apple
        universal builds, assume that mktime does not work.
index ba54130..7f08744 100644 (file)
@@ -1,4 +1,4 @@
-# serial 26
+# serial 27
 
 dnl From Jim Meyering.
 dnl Check for the nanosleep function.
@@ -28,6 +28,15 @@ AC_DEFUN([gl_FUNC_NANOSLEEP],
                 [test "$ac_cv_search_nanosleep" = "none required" ||
                 LIB_NANOSLEEP=$ac_cv_search_nanosleep])
 
+ AC_REQUIRE([gl_MULTIARCH])
+ if test $APPLE_UNIVERSAL_BUILD = 1; then
+   # A universal build on Apple MacOS X platforms.
+   # The test result would be 'no (mishandles large arguments)' in 64-bit mode
+   # but 'yes' in 32-bit mode. But we need a configuration result that is
+   # valid in both modes.
+   gl_cv_func_nanosleep='no (mishandles large arguments)'
+ fi
+
  AC_CACHE_CHECK([for working nanosleep],
   [gl_cv_func_nanosleep],
   [
index 61b4527..ef10653 100644 (file)
@@ -9,6 +9,7 @@ Depends-on:
 clock-time
 extensions
 gettime
+multiarch
 sigaction
 stdbool
 sys_select