From 09ce99400f47d2d3d9b4f083d735aa7df2c11f29 Mon Sep 17 00:00:00 2001 From: Harlan Stenn Date: Sun, 10 Apr 2011 22:39:36 -0700 Subject: [PATCH] Cleanup autoconf macro ordering/dependencies bk: 4da29418DJs1CpD7SNa-3MgvVDCDKA --- configure.ac | 1 + sntp/configure.ac | 1 + sntp/m4/ntp_libntp.m4 | 15 ++------------- sntp/m4/ntp_prog_cc.m4 | 21 +++++++++++++++++++++ 4 files changed, 25 insertions(+), 13 deletions(-) create mode 100644 sntp/m4/ntp_prog_cc.m4 diff --git a/configure.ac b/configure.ac index 98b853f30f..b86f2d8387 100644 --- a/configure.ac +++ b/configure.ac @@ -63,6 +63,7 @@ ntp_parse_ok=${ntp_parse_ok=no} ntp_ripe_ncc_ok=${ntp_parse_ok=no} ntp_jupiter_ok=${ntp_jupiter_ok=no} +NTP_PROG_CC AC_PROG_CPP AC_PROG_CXX AC_PROG_YACC diff --git a/sntp/configure.ac b/sntp/configure.ac index fcf356a2a4..af8d1be66d 100644 --- a/sntp/configure.ac +++ b/sntp/configure.ac @@ -53,6 +53,7 @@ AC_DEFINE_UNQUOTED([STR_SYSTEM], "$host", [canonical system (cpu-vendor-os) of w AC_CONFIG_HEADER([config.h]) dnl AC_ARG_PROGRAM +NTP_PROG_CC NTP_LIBNTP AC_DISABLE_SHARED diff --git a/sntp/m4/ntp_libntp.m4 b/sntp/m4/ntp_libntp.m4 index a9e3bcfb66..952b14016f 100644 --- a/sntp/m4/ntp_libntp.m4 +++ b/sntp/m4/ntp_libntp.m4 @@ -18,19 +18,8 @@ AC_SUBST([LDADD_LIBNTP]) __LIBS=$LIBS LIBS= -dnl must come before AC_PROG_CC or similar -AC_USE_SYSTEM_EXTENSIONS - -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_GCC_TRADITIONAL -NTP_COMPILER -AC_C_BIGENDIAN -AC_C_VOLATILE -AC_PROG_CPP +dnl The contents of NTP_PROG_CC used to be here... + AC_PROG_INSTALL NTP_BINDIR diff --git a/sntp/m4/ntp_prog_cc.m4 b/sntp/m4/ntp_prog_cc.m4 new file mode 100644 index 0000000000..c6b4e03f07 --- /dev/null +++ b/sntp/m4/ntp_prog_cc.m4 @@ -0,0 +1,21 @@ +dnl ###################################################################### +dnl NTP compiler basics +dnl +AC_DEFUN([NTP_PROG_CC], [ + +dnl must come before AC_PROG_CC or similar +AC_USE_SYSTEM_EXTENSIONS + +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_GCC_TRADITIONAL +NTP_COMPILER +AC_C_BIGENDIAN +AC_C_VOLATILE +AC_PROG_CPP + +])dnl +dnl ====================================================================== -- 2.47.3