From: Linux Karlsson Date: Sun, 31 Oct 2010 11:57:32 +0000 (-0400) Subject: [BUG 1690] Unit tests fails to build on some systems X-Git-Tag: NTP_4_2_7P76~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e94be9d440a249baca0d8f8a22024acefafc81c5;p=thirdparty%2Fntp.git [BUG 1690] Unit tests fails to build on some systems bk: 4ccd59acz6VErP1tXl0VWGhLH-ON5A --- diff --git a/ChangeLog b/ChangeLog index 57242530f..8a59ce624 100644 --- 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 diff --git a/sntp/configure.ac b/sntp/configure.ac index 00a141eea..450afa933 100644 --- a/sntp/configure.ac +++ b/sntp/configure.ac @@ -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])