]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[BUG 1690] Unit tests fails to build on some systems
authorLinux Karlsson <karlsson@ntp.org>
Sun, 31 Oct 2010 11:57:32 +0000 (07:57 -0400)
committerLinux Karlsson <karlsson@ntp.org>
Sun, 31 Oct 2010 11:57:32 +0000 (07:57 -0400)
bk: 4ccd59acz6VErP1tXl0VWGhLH-ON5A

ChangeLog
sntp/configure.ac

index 57242530f6c93fa1e5b8d1e36e4dd29fbdf43e90..8a59ce624c73dd8884a6def05438159f449f18d7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,4 @@
+* [Bug 1690] Unit tests fails to build on some systems
 * Put the sntp tests under sntp/ .
 * ... and only build/run them if we have gtest.
 (4.2.7p75) 2010/10/30 Released by Harlan Stenn <stenn@ntp.org>
index 00a141eea8af2e811d0c22f8302fce63318e748a..450afa933402117dc2d4508a9f58892d39741061 100644 (file)
@@ -46,6 +46,10 @@ AC_PREREQ([2.53])
 # Expose a cross-compilation indicator to makefiles
 AM_CONDITIONAL(SNTP_CROSSCOMPILE, test $build != $host)
 
+dnl check these early to avoid autoconf warnings
+AC_AIX
+AC_MINIX
+
 # Checks for programs.
 AC_PROG_CC
 
@@ -165,6 +169,20 @@ $as_unset saved_LIBS
 AC_SEARCH_LIBS([inet_pton], [nsl])
 AC_SEARCH_LIBS([openlog], [gen syslog])
 
+case "$host" in
+ *-*-aix[[456]]*)
+       # (prr) aix 4.1 doesn't have clock_settime, but in aix 4.3 it's a stub
+       # (returning ENOSYS).  I didn't check 4.2.  If, in the future,
+       # IBM pulls its thumbs out long enough to implement clock_settime,
+       # this conditional will need to change.  Maybe use AC_TRY_RUN
+       # instead to try to set the time to itself and check errno.
+    ;;
+ *)
+    AC_SEARCH_LIBS([clock_gettime], [rt])
+    AC_CHECK_FUNCS([clock_gettime clock_settime])
+    ;;
+esac
+
 # Checks for header files.
 AC_HEADER_STDC
 AC_CHECK_HEADERS([netdb.h netinet/in.h stdlib.h string.h strings.h syslog.h])