From: Dave Hart Date: Wed, 1 Dec 2010 04:50:51 +0000 (+0000) Subject: Refine HP-UX mpinfou workaround to add predeclaration only if it helps. X-Git-Tag: NTP_4_2_7P89~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32ac268cb0be67e2b19c04e7352d8e76e99cd910;p=thirdparty%2Fntp.git Refine HP-UX mpinfou workaround to add predeclaration only if it helps. Remove unused u_int8_t and u_int64_t tests. Remove qsort type check, ANSI C nails it down. Remove AC_C_CONST for similar reason. Enable propdelay, chutest, clktest builds. bk: 4cf5d42bvN7bnMDTBej0-JxTqJgoZg --- diff --git a/clockstuff/Makefile.am b/clockstuff/Makefile.am index c4d053246..9bf6fd8ad 100644 --- a/clockstuff/Makefile.am +++ b/clockstuff/Makefile.am @@ -1,21 +1,37 @@ -#AUTOMAKE_OPTIONS = ../ansi2knr no-dependencies -AUTOMAKE_OPTIONS = +AUTOMAKE_OPTIONS = noinst_PROGRAMS = @PROPDELAY@ @CHUTEST@ @CLKTEST@ EXTRA_PROGRAMS = propdelay chutest clktest -INCLUDES = -I$(top_srcdir)/include -propdelay_LDADD = $(LIBM) ../libntp/libntp.a -chutest_LDADD = ../libntp/libntp.a -clktest_LDADD = ../libntp/libntp.a -ETAGS_ARGS = Makefile.am -#EXTRA_DIST = TAGS -BUILT_SOURCES = -CLEANFILES = +BUILT_SOURCES = clktest-opts.c clktest-opts.h + +clktest_SOURCES = clktest.c clktest-opts.c clktest-opts.h + +INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include +INCLUDES += -I$(top_srcdir)/lib/isc/nothreads/include +INCLUDES += -I$(top_srcdir)/lib/isc/unix/include $(LIBOPTS_CFLAGS) -# clktest-opts.def wants ../include/copyright.def ../include/homerc.def +LDADD = ../libntp/libntp.a +propdelay_LDADD = $(LIBM) $(LDADD) -chutest$(EXEEXT): ../libntp/libntp.a +run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" \ + autogen -L ../include --writable +std_def_list= $(top_srcdir)/include/debug-opt.def \ + $(top_srcdir)/include/autogen-version.def \ + $(top_srcdir)/include/copyright.def \ + $(top_srcdir)/include/homerc.def \ + $(top_srcdir)/include/version.def -clktest$(EXEEXT): ../libntp/libntp.a +$(srcdir)/clktest-opts.h: $(srcdir)/clktest-opts.c + @: do-nothing action to avoid default SCCS get, .h built with .c + +$(srcdir)/clktest-opts.c: $(srcdir)/clktest-opts.def $(std_def_list) + $(run_ag) clktest-opts.def +## chutest$(EXEEXT): ../libntp/libntp.a +## clktest$(EXEEXT): ../libntp/libntp.a + +../libntp/libntp.a: + cd ../libntp && $(MAKE) + +CLEANFILES = include $(top_srcdir)/depsver.mf diff --git a/clockstuff/chutest.c b/clockstuff/chutest.c index 785c253ed..b96d5f7ed 100644 --- a/clockstuff/chutest.c +++ b/clockstuff/chutest.c @@ -2,7 +2,21 @@ * chutest - test the CHU clock */ +#ifdef HAVE_CONFIG_H +# include +#endif #include +#include +#ifdef HAVE_UNISTD_H +# include +#endif +#ifdef HAVE_STROPTS_H +# include +#else +# ifdef HAVE_SYS_STROPTS_H +# include +# endif +#endif #include #include #include @@ -11,27 +25,18 @@ #include #include -#include "../include/ntp_fp.h" -#include "../include/ntp.h" -#include "../include/ntp_unixtime.h" +#include "ntp_fp.h" +#include "ntp.h" +#include "ntp_unixtime.h" #ifdef CHULDISC -#ifdef STREAM # ifdef HAVE_SYS_CHUDEFS_H -#include -#endif -#include -#endif +# include +# endif #endif -#ifdef CHULDISC -# ifdef HAVE_SYS_CHUDEFS_H -#include -#endif -#endif #ifndef CHULDISC -#ifndef STREAM #define NCHUCHARS (10) struct chucode { @@ -41,7 +46,6 @@ struct chucode { struct timeval codetimes[NCHUCHARS]; /* arrival times */ }; #endif -#endif #define STREQ(a, b) (*(a) == *(b) && strcmp((a), (b)) == 0) @@ -65,6 +69,15 @@ extern u_long ustotslo[]; extern u_long ustotsmid[]; extern u_long ustotshi[]; +void error(char *fmt, char *s1, char *s2); +void init_chu(void); +int openterm(char *dev); +int process_raw(int s); +int process_ldisc(int s); +int raw_filter(unsigned int c, struct timeval *tv); +void chufilter(struct chucode *chuc, l_fp *rtime); + + /* * main - parse arguments and handle options */ @@ -77,8 +90,6 @@ main( int c; int errflg = 0; extern int ntp_optind; - extern char *ntp_optarg; - void init_chu(); progname = argv[0]; while ((c = ntp_getopt(argc, argv, "cdfpt")) != EOF) @@ -267,15 +278,14 @@ raw_filter( struct timeval *tv ) { - static struct timeval diffs[10] = { 0 }; + static struct timeval diffs[10]; struct timeval diff; l_fp ts; - void chufilter(); if ((c & 0xf) > 9 || ((c>>4)&0xf) > 9) { if (debug) (void) fprintf(stderr, - "character %02x failed BCD test\n"); + "character %02x failed BCD test\n", c); chudata.ncodechars = 0; return; } @@ -543,10 +553,6 @@ chufilter( l_fp ts; int day, hour, minute, second; static u_char lastcode[NCHUCHARS]; - extern u_long calyearstart(); - extern char *mfptoa(); - void chu_process(); - extern char *prettydate(); /* * We'll skip the checks made in the kernel, but assume they've @@ -632,6 +638,7 @@ chufilter( * work most of the time. */ date_ui = tmp + yearstart; +#define CLOCK_WAYTOOBIG (4 * 60 * 60) /* WAG Juergen please review */ if (date_ui < (rtime->l_ui + CLOCK_WAYTOOBIG) && date_ui > (rtime->l_ui - CLOCK_WAYTOOBIG)) goto codeokay; /* looks good */ diff --git a/clockstuff/clktest.c b/clockstuff/clktest.c index 04df4b9bb..a97884fb2 100644 --- a/clockstuff/clktest.c +++ b/clockstuff/clktest.c @@ -4,6 +4,9 @@ * usage: clktest -b bps -f -t timeo -s cmd -c char1 -a char2 /dev/whatever */ +#ifdef HAVE_CONFIG_H +# include +#endif #include "clktest-opts.h" #define STREQ(a, b) (*(a) == *(b) && strcmp((a), (b)) == 0) diff --git a/clockstuff/propdelay.c b/clockstuff/propdelay.c index c8df6866b..3a73fb58d 100644 --- a/clockstuff/propdelay.c +++ b/clockstuff/propdelay.c @@ -47,6 +47,9 @@ * to find delays to GOES via each of the three satellites. */ +#ifdef HAVE_CONFIG_H +# include +#endif #include #include diff --git a/configure.ac b/configure.ac index 4f2947f68..f7bb9b89a 100644 --- a/configure.ac +++ b/configure.ac @@ -53,16 +53,13 @@ dnl check these early to avoid autoconf warnings AC_AIX AC_MINIX -# 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 - dnl we need to check for cross compile tools for vxWorks here AC_PROG_CC # 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_CPP +AC_PROG_CXX AC_PROG_YACC # AC_PROG_CC_STDC has two functions. It attempts to find a compiler @@ -221,9 +218,15 @@ case "$ans" in ;; esac -AC_ARG_WITH(rpath, - AS_HELP_STRING([--without-rpath], [s Disable auto-added -R linker paths]), -[ans=$withval], [ans=x]) +AC_ARG_WITH( + [rpath], + [AS_HELP_STRING( + [--without-rpath], + [s Disable auto-added -R linker paths] + )], + [ans=$withval], + [ans=x] +) case "$ans" in no) need_dash_r= @@ -318,6 +321,9 @@ esac AC_SUBST([CFLAGS]) AC_SUBST([LDFLAGS]) +# 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 AC_PROG_LN_S @@ -498,33 +504,61 @@ esac AC_CHECK_HEADERS([arpa/nameser.h]) AC_CHECK_HEADERS([sys/socket.h]) + dnl HP-UX 11.31 on HPPA has a net/if.h that can't be compiled with gcc4 dnl due to an incomplete type (a union) mpinfou used in an array. gcc3 dnl compiles it without complaint. The mpinfou union is defined later dnl in the resulting preprocessed source than the spu_info array in dnl /usr/include/machine/sys/getppdp.h: dnl extern union mpinfou spu_info[]; -dnl triggering the error. Our strategy is on HP-UX only, test for -dnl net/netmp.h, which is the file included by net/if.h that leads to -dnl getppdp.h. If it is present but can't be compiled, try adding -dnl a duplicate definition of mpinfou, which should then allow the -dnl following net/if.h and net/if6.h tests to proceed normally. -dnl Using net/netmp.h allows us to avoid polluting test results for -dnl net/if.h. +dnl triggering the error. Our strategy is on HP-UX only, test compile +dnl net/if.h. If that fails, try adding a duplicate definition of +dnl mpinfou, and if that helps add it to confdefs.h (used for further +dnl configure tests) and config.h. # +AC_CHECK_HEADERS([net/if.h], [], [], [ + #ifdef HAVE_SYS_SOCKET_H + # include + #endif +]) case "$host" in *-hp-hpux*) - AC_CHECK_HEADERS( - [net/netmp.h], - [netmp_h_works=yes], - [netmp_h_works=no] + AC_CACHE_CHECK( + [if net/if.h requires mpinfou predeclaration], + [ntp_cv_predecl_mpinfou], + [ + np_cv_predecl_mpinfou=no + case "$ac_cv_header_net_if_h" in + no) + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ + typedef union mpinfou { + struct pdk_mpinfo *pdkptr; + struct mpinfo *pikptr; + } mpinfou_t; + #ifdef HAVE_SYS_SOCKET_H + # include + #endif + #include + ]], + [[ + ]] + )], + [ + ntp_cv_predecl_mpinfou=yes + ac_cv_header_net_if_h=yes + ] + ) + esac + ] ) - case "$netmp_h_works" in - no) + case "$ntp_cv_predecl_mpinfou" in + yes) cat >>confdefs.h <<_ACEOF #ifndef MPINFOU_PREDECLARED # define MPINFOU_PREDECLARED -typedef union mpinfou { /* For lint */ +typedef union mpinfou { struct pdk_mpinfo *pdkptr; struct mpinfo *pikptr; } mpinfou_t; @@ -533,62 +567,55 @@ _ACEOF AH_BOTTOM([ #ifndef MPINFOU_PREDECLARED # define MPINFOU_PREDECLARED -typedef union mpinfou { /* For lint */ +typedef union mpinfou { struct pdk_mpinfo *pdkptr; struct mpinfo *pikptr; } mpinfou_t; #endif ]) - ;; esac - ;; esac -AC_CHECK_HEADERS([net/if.h], [], [], -[#ifdef HAVE_SYS_SOCKET_H -#include -#endif -]) AC_CHECK_HEADERS([net/if6.h]) AC_CHECK_HEADERS([net/route.h], [], [], [ -#include -#include -#include + #include + #include + #include ]) AC_CHECK_HEADERS([netinet/in_system.h netinet/in_systm.h netinet/in.h]) -AC_CHECK_HEADERS([net/if_var.h], [], [], -[#if HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_NET_IF_H -#include -#endif +AC_CHECK_HEADERS([net/if_var.h], [], [], [ + #if HAVE_SYS_TYPES_H + # include + #endif + #ifdef HAVE_SYS_SOCKET_H + # include + #endif + #ifdef HAVE_NETINET_IN_H + # include + #endif + #ifdef HAVE_NET_IF_H + # include + #endif ]) -AC_CHECK_HEADERS([netinet/ip.h netinet/in_var.h], [], [], -[#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NET_IF_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_NET_IF_VAR_H -#include -#endif -#ifdef HAVE_NETINET_IN_SYSTM_H -#include -#endif +AC_CHECK_HEADERS([netinet/ip.h netinet/in_var.h], [], [], [ + #ifdef HAVE_SYS_TYPES_H + # include + #endif + #ifdef HAVE_SYS_SOCKET_H + # include + #endif + #ifdef HAVE_NET_IF_H + # include + #endif + #ifdef HAVE_NETINET_IN_H + # include + #endif + #ifdef HAVE_NET_IF_VAR_H + # include + #endif + #ifdef HAVE_NETINET_IN_SYSTM_H + # include + #endif ]) # Check for IPTOS_PREC @@ -624,7 +651,7 @@ case "$ac_cv_header_netinfo_ni_h" in AC_DEFINE([HAVE_NETINFO], [1], [NetInfo support?]) esac AC_CHECK_HEADERS([sun/audioio.h sys/audioio.h]) -dnl AC_CHECK_HEADERS([sys/chudefs.h]) +AC_CHECK_HEADERS([sys/chudefs.h]) AC_CHECK_HEADERS([sys/clkdefs.h sys/file.h]) case "$host" in *-*-sunos4*) @@ -659,7 +686,7 @@ case "$host" in AC_CHECK_HEADERS([machine/soundcard.h sys/soundcard.h]) ;; esac -AC_CHECK_HEADERS([sys/stat.h sys/stream.h sys/stropts.h]) +AC_CHECK_HEADERS([sys/stat.h sys/stream.h stropts.h sys/stropts.h]) # sys/sysctl.h depends on sys/param.h on OpenBSD - Bug 1576 AC_CHECK_HEADERS([sys/sysctl.h], [], [], [#if defined HAVE_SYS_PARAM_H @@ -750,46 +777,46 @@ case "$ac_cv_func___adjtimex" in ;; esac -AC_CHECK_HEADERS([sys/proc.h], [], [], -[#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_TIME_H -# include -#endif +AC_CHECK_HEADERS([sys/proc.h], [], [], [ + #ifdef HAVE_SYS_TYPES_H + # include + #endif + #ifdef HAVE_SYS_TIME_H + # include + #endif ]) -AC_CHECK_HEADERS([sys/resource.h], [], [], -[#ifdef HAVE_SYS_TIME_H -# include -#endif +AC_CHECK_HEADERS([sys/resource.h], [], [], [ + #ifdef HAVE_SYS_TIME_H + # include + #endif ]) -AC_CHECK_HEADERS([sys/shm.h], [], [], -[#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_IPC_H -# include -#endif +AC_CHECK_HEADERS([sys/shm.h], [], [], [ + #ifdef HAVE_SYS_TYPES_H + # include + #endif + #ifdef HAVE_SYS_IPC_H + # include + #endif ]) -AC_CHECK_HEADERS([sys/timex.h], [], [], -[#if HAVE_SYS_TIME_H -# include -#endif +AC_CHECK_HEADERS([sys/timex.h], [], [], [ + #ifdef HAVE_SYS_TIME_H + # include + #endif ]) -AC_CHECK_HEADERS([resolv.h], [], [], -[#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_NAMESER_H -#include -#endif +AC_CHECK_HEADERS([resolv.h], [], [], [ + #ifdef HAVE_SYS_TYPES_H + # include + #endif + #ifdef HAVE_NETINET_IN_H + # include + #endif + #ifdef HAVE_ARPA_NAMESER_H + # include + #endif ]) AC_CACHE_CHECK( @@ -815,7 +842,6 @@ case "$ntp_cv_c_volatile" in ;; esac -AC_C_CONST AC_C_BIGENDIAN AC_TYPE_SIGNAL AC_TYPE_OFF_T @@ -890,52 +916,6 @@ esac AC_CHECK_SIZEOF([time_t]) AC_STRUCT_TM -AC_CACHE_CHECK( - [for u_int8_t], - [ntp_cv_type_u_int8_t], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[ - #ifdef HAVE_SYS_TYPES_H - # include - #endif - ]], - [[ - u_int8_t len = 42; - ]] - )], - [ntp_cv_type_u_int8_t=yes], - [ntp_cv_type_u_int8_t=no] - )] -) -case "$ntp_cv_type_u_int8_t" in - yes) - AC_DEFINE([HAVE_TYPE_U_INT8_T], [1], [Does u_int8_t exist?]) -esac - -AC_CACHE_CHECK( - [for u_int64_t], - [ntp_cv_type_u_int64_t], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[ - #ifdef HAVE_SYS_TYPES_H - # include - #endif - ]], - [[ - u_int64_t len = 42; - ]] - )], - [ntp_cv_type_u_int64_t=yes], - [ntp_cv_type_u_int64_t=no] - )] -) -case "$ntp_cv_type_u_int64_t" in - yes) - AC_DEFINE([HAVE_TYPE_U_INT64_T], [1], [Does u_int64_t exist?]) -esac - AC_CACHE_CHECK( [for a fallback value for HZ], [ntp_cv_default_hz], @@ -1887,12 +1867,6 @@ case "$ntp_cv_func_setpgrp_nargs" in [define if setpgrp takes 0 arguments]) esac -dnl we require ANSI C which mandates void * here -dnl we should clean up all uses of QSORT_USES_VOID_P so -dnl this can be removed. -AC_DEFINE([QSORT_USES_VOID_P], [1], - [Does qsort expect to work on "void *" stuff?]) - AC_CACHE_CHECK( [if we need to declare 'errno'], [ntp_cv_decl_errno], @@ -2672,7 +2646,7 @@ AC_CACHE_CHECK( [AC_LANG_PROGRAM( [[ #ifdef HAVE_NETINET_IN_H - #include + # include #endif ]], [[ @@ -4127,9 +4101,10 @@ case "$ntp_autokey" in case "$ntp_openssl" in no) AC_MSG_WARN([Disabling Autokey, --enable-autokey requires --with-crypto.]) + ntp_autokey=no ;; *) - AC_DEFINE(AUTOKEY, , [Support NTP Autokey protocol?]) + AC_DEFINE([AUTOKEY], [1], [Support NTP Autokey protocol?]) ntp_autokey=yes ;; esac @@ -4182,7 +4157,7 @@ if test "$ntp_parseutil" = "yes"; then *-*-sunos4*|*-*-solaris2*|*-*-*linux*|*-*-netbsd*) ans="dcfd testdcf" DCFD=dcfd - TESTDCF=testdcf + TESTDCF=testdcf esac fi AC_MSG_RESULT([$ans]) @@ -4218,10 +4193,10 @@ if test "$ntp_refclock" = "yes"; then fi AC_MSG_RESULT($ntp_refclock) -dnl Things that can be made in clockstuff/ -AC_SUBST([PROPDELAY]) dnl Set to "propdelay" -AC_SUBST([CHUTEST]) dnl Set to "chutest" -AC_SUBST([CLKTEST]) dnl Set to "clktest" +dnl Things that can be made in clockstuff +AC_SUBST([PROPDELAY], [propdelay]) +AC_SUBST([CHUTEST]) dnl needs work to compile +AC_SUBST([CLKTEST]) dnl needs work to compile AC_SUBST([MAKE_ADJTIMED]) AC_MSG_CHECKING([if we want HP-UX adjtimed support]) @@ -4974,8 +4949,11 @@ case "$ans" in esac CFLAGS=$save_CFLAGS + AS_UNSET([save_CFLAGS]) CPPFLAGS=$save_CPPFLAGS + AS_UNSET([save_CPPFLAGS]) LIBS=$save_LIBS + AS_UNSET([save_LIBS]) ;; *) AC_MSG_WARN([Cannot build ntpsnmpd - net-snmp-config cannot be found]) @@ -5710,44 +5688,9 @@ fi AM_CONDITIONAL([SAVECONFIG_ENABLED], [test x$ntp_saveconfig_enabled = x1]) AC_MSG_RESULT([$ntp_ok]) -### - -AC_DEFINE_DIR([NTP_KEYSDIR], [sysconfdir], - [Default location of crypto key info]) - -AC_CONFIG_FILES([Makefile]) -AC_CONFIG_FILES([ElectricFence/Makefile]) -AC_CONFIG_FILES([adjtimed/Makefile]) -AC_CONFIG_FILES([clockstuff/Makefile]) -AC_CONFIG_FILES([include/Makefile]) -AC_CONFIG_FILES([include/isc/Makefile]) -AC_CONFIG_FILES([kernel/Makefile]) -AC_CONFIG_FILES([kernel/sys/Makefile]) -AC_CONFIG_FILES([libntp/Makefile]) -AC_CONFIG_FILES([libparse/Makefile]) -AC_CONFIG_FILES([ntpd/Makefile]) -AC_CONFIG_FILES([ntpdate/Makefile]) -AC_CONFIG_FILES([ntpdc/Makefile]) -AC_CONFIG_FILES([ntpdc/nl.pl], [chmod +x ntpdc/nl.pl]) -AC_CONFIG_FILES([ntpq/Makefile]) -AC_CONFIG_FILES([ntpsnmpd/Makefile]) -AC_CONFIG_FILES([parseutil/Makefile]) -AC_CONFIG_FILES([scripts/Makefile]) -AC_CONFIG_FILES([scripts/calc_tickadj], [chmod +x scripts/calc_tickadj]) -AC_CONFIG_FILES([scripts/checktime], [chmod +x scripts/checktime]) -AC_CONFIG_FILES([scripts/freq_adj], [chmod +x scripts/freq_adj]) -AC_CONFIG_FILES([scripts/html2man], [chmod +x scripts/html2man]) -AC_CONFIG_FILES([scripts/mkver], [chmod +x scripts/mkver]) -AC_CONFIG_FILES([scripts/ntp-wait], [chmod +x scripts/ntp-wait]) -AC_CONFIG_FILES([scripts/ntpsweep], [chmod +x scripts/ntpsweep]) -AC_CONFIG_FILES([scripts/ntptrace], [chmod +x scripts/ntptrace]) -AC_CONFIG_FILES([scripts/ntpver], [chmod +x scripts/ntpver]) -AC_CONFIG_FILES([scripts/plot_summary], [chmod +x scripts/plot_summary]) -AC_CONFIG_FILES([scripts/summary], [chmod +x scripts/summary]) -AC_CONFIG_FILES([util/Makefile]) - - -AC_PROG_CXX +dnl gtest is needed for our tests subdirs. It would be nice if we could +dnl require a C++ compiler only if we will use gtest, but AC_PROG_CXX +dnl can't be conditionalized. gta=false AC_ARG_WITH( @@ -5789,11 +5732,46 @@ case "$try_gtest" in esac esac esac - AM_CONDITIONAL([GTEST_AVAILABLE], [$gta]) + +### + +AC_DEFINE_DIR([NTP_KEYSDIR], [sysconfdir], + [Default location of crypto key info]) + +AC_CONFIG_FILES([Makefile]) +AC_CONFIG_FILES([ElectricFence/Makefile]) +AC_CONFIG_FILES([adjtimed/Makefile]) +AC_CONFIG_FILES([clockstuff/Makefile]) +AC_CONFIG_FILES([include/Makefile]) +AC_CONFIG_FILES([include/isc/Makefile]) +AC_CONFIG_FILES([kernel/Makefile]) +AC_CONFIG_FILES([kernel/sys/Makefile]) +AC_CONFIG_FILES([libntp/Makefile]) +AC_CONFIG_FILES([libparse/Makefile]) +AC_CONFIG_FILES([ntpd/Makefile]) +AC_CONFIG_FILES([ntpdate/Makefile]) +AC_CONFIG_FILES([ntpdc/Makefile]) +AC_CONFIG_FILES([ntpdc/nl.pl], [chmod +x ntpdc/nl.pl]) +AC_CONFIG_FILES([ntpq/Makefile]) +AC_CONFIG_FILES([ntpsnmpd/Makefile]) +AC_CONFIG_FILES([parseutil/Makefile]) +AC_CONFIG_FILES([scripts/Makefile]) +AC_CONFIG_FILES([scripts/calc_tickadj], [chmod +x scripts/calc_tickadj]) +AC_CONFIG_FILES([scripts/checktime], [chmod +x scripts/checktime]) +AC_CONFIG_FILES([scripts/freq_adj], [chmod +x scripts/freq_adj]) +AC_CONFIG_FILES([scripts/html2man], [chmod +x scripts/html2man]) +AC_CONFIG_FILES([scripts/mkver], [chmod +x scripts/mkver]) +AC_CONFIG_FILES([scripts/ntp-wait], [chmod +x scripts/ntp-wait]) +AC_CONFIG_FILES([scripts/ntpsweep], [chmod +x scripts/ntpsweep]) +AC_CONFIG_FILES([scripts/ntptrace], [chmod +x scripts/ntptrace]) +AC_CONFIG_FILES([scripts/ntpver], [chmod +x scripts/ntpver]) +AC_CONFIG_FILES([scripts/plot_summary], [chmod +x scripts/plot_summary]) +AC_CONFIG_FILES([scripts/summary], [chmod +x scripts/summary]) AC_CONFIG_FILES([tests/Makefile]) AC_CONFIG_FILES([tests/libntp/Makefile]) +AC_CONFIG_FILES([util/Makefile]) AC_CONFIG_SUBDIRS([sntp]) diff --git a/m4/ntp_openssl.m4 b/m4/ntp_openssl.m4 index 0d88fad0c..278110afd 100644 --- a/m4/ntp_openssl.m4 +++ b/m4/ntp_openssl.m4 @@ -222,6 +222,6 @@ case "$GCC$ntp_openssl" in # gcc without OpenSSL CFLAGS="$SAVED_CFLAGS -Wstrict-prototypes" esac - +AS_UNSET([SAVED_CFLAGS]) ]) dnl ====================================================================== diff --git a/sntp/configure.ac b/sntp/configure.ac index 2e5bd8a2d..353832a48 100644 --- a/sntp/configure.ac +++ b/sntp/configure.ac @@ -131,6 +131,7 @@ case "$host" in esac AC_DISABLE_SHARED +AC_PROG_LIBTOOL # NTP has (so far) been relying on leading-edge autogen. # Therefore, by default: @@ -147,7 +148,6 @@ case "${enable_libopts_install+set}" in esac LIBOPTS_CHECK -AC_PROG_LIBTOOL NTP_DIR_SEP # Checks for libraries. @@ -175,7 +175,7 @@ case "$GCC" in yes) CFLAGS="$CFLAGS -Wstrict-overflow" esac - # -W[no-]strict-prototypes is added later depending on OpenSSL + # -W[no-]strict-prototypes might be added by NTP_OPENSSL esac # [Bug 1628] On Solaris, we need -lxnet -lsocket. Generalize this to @@ -223,52 +223,6 @@ esac # Checks for header files. AC_HEADER_STDC -dnl HP-UX 11.31 on HPPA has a net/if.h that can't be compiled with gcc4 -dnl due to an incomplete type (a union) mpinfou used in an array. gcc3 -dnl compiles it without complaint. The mpinfou union is defined later -dnl in the resulting preprocessed source than the spu_info array in -dnl /usr/include/machine/sys/getppdp.h: -dnl extern union mpinfou spu_info[]; -dnl triggering the error. Our strategy is on HP-UX only, test for -dnl net/netmp.h, which is the file included by net/if.h that leads to -dnl getppdp.h. If it is present but can't be compiled, try adding -dnl a duplicate definition of mpinfou, which should then allow the -dnl following net/if.h and net/if6.h tests to proceed normally. -dnl Using net/netmp.h allows us to avoid polluting test results for -dnl net/if.h. -# -case "$host" in - *-hp-hpux*) - AC_CHECK_HEADERS( - [net/netmp.h], - [netmp_h_works=yes], - [netmp_h_works=no] - ) - case "$netmp_h_works" in - no) - cat >>confdefs.h <<_ACEOF -#ifndef MPINFOU_PREDECLARED -# define MPINFOU_PREDECLARED -typedef union mpinfou { /* For lint */ - struct pdk_mpinfo *pdkptr; - struct mpinfo *pikptr; -} mpinfou_t; -#endif -_ACEOF - AH_BOTTOM([ -#ifndef MPINFOU_PREDECLARED -# define MPINFOU_PREDECLARED -typedef union mpinfou { /* For lint */ - struct pdk_mpinfo *pdkptr; - struct mpinfo *pikptr; -} mpinfou_t; -#endif -]) - ;; - esac - ;; -esac - AC_CHECK_HEADERS([netdb.h netinet/in.h stdlib.h string.h strings.h syslog.h]) AC_CHECK_HEADERS([sys/socket.h sys/time.h]) AC_HEADER_TIME diff --git a/util/Makefile.am b/util/Makefile.am index 9f0cedc47..641194840 100644 --- a/util/Makefile.am +++ b/util/Makefile.am @@ -1,6 +1,5 @@ NULL= -#AUTOMAKE_OPTIONS = ../ansi2knr no-dependencies -AUTOMAKE_OPTIONS= +AUTOMAKE_OPTIONS= if NTP_BINSUBDIR_IS_BIN bin_PROGRAMS= @MAKE_NTPTIME@ @MAKE_TICKADJ@ @MAKE_TIMETRIM@ \