From: Harlan Stenn Date: Mon, 28 Oct 2013 08:17:56 +0000 (+0000) Subject: [Bug 2256] Improve configure's function searches in libraries X-Git-Tag: NTP_4_2_7P394~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33557129b41183654372c09ea9fd02c26d79ab8d;p=thirdparty%2Fntp.git [Bug 2256] Improve configure's function searches in libraries bk: 526e1db4P_Ro6w_UW1AgR_f2TKU5gQ --- diff --git a/configure.ac b/configure.ac index 6154ad2d6..8add1c760 100644 --- a/configure.ac +++ b/configure.ac @@ -207,7 +207,7 @@ case "$host" in *) # HMS: Make sure we check for -lrt for clock_* before this... case "$ac_cv_search_clock_gettime" in - '') AC_MSG_ERROR([Internal Error: Haven't looed for clock_gettime() yet!]) ;; + '') AC_MSG_ERROR([Internal Error: Haven't looked for clock_gettime() yet!]) ;; esac AC_SEARCH_LIBS([sched_setscheduler], [rt posix4]) ;; diff --git a/sntp/configure.ac b/sntp/configure.ac index 8a32978d4..e10346849 100644 --- a/sntp/configure.ac +++ b/sntp/configure.ac @@ -139,7 +139,9 @@ AC_PROG_CXX NTP_GOOGLETEST # All libraries should be in various LIB_* variables now. -LIBS= +#LIBS= +# Sadly not. There is a gettext() check somewhere, and on Solaris this pulls +# in -lintl -lgen, outside our "scope". AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([include/Makefile]) diff --git a/sntp/m4/ntp_ipv6.m4 b/sntp/m4/ntp_ipv6.m4 index abc4b80c2..079e51099 100644 --- a/sntp/m4/ntp_ipv6.m4 +++ b/sntp/m4/ntp_ipv6.m4 @@ -513,7 +513,11 @@ case "$host" in *-hp-hpux*) AC_SEARCH_LIBS([if_nametoindex], [ipv6]) esac +SAVED_LIBS="$LIBS" +LIBS="$LDADD_LIBNTP $LIBS" AC_CHECK_FUNCS([if_nametoindex]) +LIBS="$SAVED_LIBS" +AS_UNSET([SAVED_LIBS]) case "$ac_cv_func_if_nametoindex" in yes) AC_DEFINE([ISC_PLATFORM_HAVEIFNAMETOINDEX], [1],