From: Dave Hart Date: Fri, 12 Apr 2024 12:23:49 +0000 (+0000) Subject: Update libtool initialization macros to recommended. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f9eb726328711dce2d1f10a49c1e9942f2f00777;p=thirdparty%2Fntp.git Update libtool initialization macros to recommended. Quiet some more Autoconf deprecation warnings. bk: 661927d5ob0e-w_tWoHMdRuuU7t4XQ --- diff --git a/configure.ac b/configure.ac index 7362ec6cd..fdb70200c 100644 --- a/configure.ac +++ b/configure.ac @@ -78,8 +78,7 @@ AM_PROG_AR # So far, the only shared library we might use is libopts. # It's a small library - we might as well use a static version of it. -AC_DISABLE_SHARED -AC_PROG_LIBTOOL +LT_INIT([disable-shared]) AC_SUBST([LIBTOOL_DEPS]) # NTP has (so far) been relying on leading-edge autogen, which @@ -87,7 +86,7 @@ AC_SUBST([LIBTOOL_DEPS]) # Therefore, by default: # - use the version of libopts we ship with # - do not install it -# - build a static copy (AC_DISABLE_SHARED - done earlier) +# - build a static copy (disable-shared - done earlier) case "${enable_local_libopts+set}" in set) ;; *) enable_local_libopts=yes ;; diff --git a/ntpsnmpd/netsnmp_daemonize.c b/ntpsnmpd/netsnmp_daemonize.c index f806266c6..55f8c3596 100644 --- a/ntpsnmpd/netsnmp_daemonize.c +++ b/ntpsnmpd/netsnmp_daemonize.c @@ -57,20 +57,12 @@ SOFTWARE. #include #endif -#if TIME_WITH_SYS_TIME -# ifdef WIN32 -# include -# else -# include -# endif -# include +#ifdef WIN32 +# include #else -# if HAVE_SYS_TIME_H -# include -# else -# include -# endif +# include #endif +#include #include diff --git a/sntp/configure.ac b/sntp/configure.ac index f5db852d3..23fbdb28d 100644 --- a/sntp/configure.ac +++ b/sntp/configure.ac @@ -62,8 +62,7 @@ AM_PROG_AR NTP_LIBNTP -AC_DISABLE_SHARED -AC_PROG_LIBTOOL +LT_INIT([disable-shared]) AC_SUBST([LIBTOOL_DEPS]) NTP_WITHSNTP @@ -82,7 +81,7 @@ esac # Therefore, by default: # - use the version we ship with # - do not install it -# - build a static copy (AC_DISABLE_SHARED - done earlier) +# - build a static copy (disable-shared - done earlier) case "${enable_local_libopts+set}" in set) ;; *) enable_local_libopts=yes ;; diff --git a/sntp/libevent/configure.ac b/sntp/libevent/configure.ac index f84c237df..6c2646c21 100644 --- a/sntp/libevent/configure.ac +++ b/sntp/libevent/configure.ac @@ -348,7 +348,7 @@ AM_CONDITIONAL(BUILD_MIDIPIX, test x$midipix = xtrue) AM_CONDITIONAL(BUILD_WITH_NO_UNDEFINED, test x$bwin32 = xtrue || test x$cygwin = xtrue || test x$midipix = xtrue) if test x$bwin32 = xtrue; then - AC_HAVE_LIBRARY([ws2_32]) + AC_CHECK_LIB([ws2_32], [main]) fi dnl Checks for typedefs, structures, and compiler characteristics. diff --git a/sntp/libevent/m4/acx_pthread.m4 b/sntp/libevent/m4/acx_pthread.m4 index d2b116945..92ac1089b 100644 --- a/sntp/libevent/m4/acx_pthread.m4 +++ b/sntp/libevent/m4/acx_pthread.m4 @@ -86,7 +86,7 @@ AC_DEFUN([ACX_PTHREAD], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_LANG_SAVE -AC_LANG_C +AC_LANG([C]) acx_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h diff --git a/sntp/m4/ntp_compiler.m4 b/sntp/m4/ntp_compiler.m4 index d1c639125..7a00e64c8 100644 --- a/sntp/m4/ntp_compiler.m4 +++ b/sntp/m4/ntp_compiler.m4 @@ -1,15 +1,10 @@ dnl ###################################################################### dnl Common m4sh code for compiler stuff AC_DEFUN([NTP_COMPILER], [ +AC_REQUIRE([AC_PROG_CC_STDC]) AC_USE_SYSTEM_EXTENSIONS -# Ralf Wildenhues: With per-target flags we need CC_C_O -# AM_PROG_CC_C_O supersets AC_PROG_CC_C_O -AM_PROG_CC_C_O -AC_PROG_GCC_TRADITIONAL -AC_REQUIRE([AC_PROG_CC_STDC]) - CC_NOFORMAT= CFLAGS_NTP= CPPFLAGS_NTP= diff --git a/sntp/m4/ntp_libntp.m4 b/sntp/m4/ntp_libntp.m4 index 917c83044..1341b6f39 100644 --- a/sntp/m4/ntp_libntp.m4 +++ b/sntp/m4/ntp_libntp.m4 @@ -268,7 +268,7 @@ case "$ac_cv_c_inline" in AC_SUBST([HAVE_INLINE]) esac -AC_HEADER_TIME + AC_CHECK_SIZEOF([time_t]) AC_C_CHAR_UNSIGNED dnl CROSS_COMPILE? AC_CHECK_SIZEOF([signed char])