ntp_jupiter_ok=${ntp_jupiter_ok=no}
NTP_PROG_CC
-AC_PROG_CPP
-# Do we need CXX for anything besides google test?
-AC_PROG_CXX
+NTP_COMPILER
+
+dnl # Do we need CXX for anything besides google test?
+dnl AC_PROG_CXX
AC_PROG_YACC
-AC_PROG_CC_C_O
+dnl AC_PROG_CC_C_O # called by NTP_COMPILER
AX_C99_STRUCT_INIT
NTP_HARDEN([sntp])
dnl AC_ARG_PROGRAM
NTP_PROG_CC
-
+NTP_COMPILER
NTP_HARDEN
NTP_LOCINFO()
AC_CHECK_FUNCS([socket])
NTP_UNITYBUILD
-# HMS: if we don't find c++ we should not look for gtest.
-AC_PROG_CXX
-NTP_GOOGLETEST
+## HMS: if we don't find c++ we should not look for gtest.
+#AC_PROG_CXX
+#NTP_GOOGLETEST
SNTP_PROBLEM_TESTS
# FreeBSD-11 hardening flags
-NTP_HARD_CFLAGS="-fsanitize=safe-stack -fstack-protector -Wformat -Wformat-security -Werror=format-security"
+NTP_HARD_CFLAGS="-fstack-protector -Wformat -Wformat-security -Werror=format-security"
NTP_HARD_CPPFLAGS=""
NTP_HARD_LDFLAGS="-Wl,-z,relro"
# FreeBSD-11 hardening flags
-NTP_HARD_CFLAGS="-fsanitize=safe-stack -fstack-protector -Wformat -Wformat-security -Werror=format-security"
+NTP_HARD_CFLAGS="-fstack-protector -Wformat -Wformat-security -Werror=format-security"
NTP_HARD_CPPFLAGS=""
NTP_HARD_LDFLAGS="-Wl,-z,relro"
dnl ######################################################################
dnl Common m4sh code for compiler stuff
AC_DEFUN([NTP_COMPILER], [
-AC_REQUIRE([AC_PROG_CC_C89])
-AC_REQUIRE([AC_PROG_CC_C99])
+
+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])
+dnl AC_REQUIRE([AC_PROG_CC_C89])
+dnl AC_REQUIRE([AC_PROG_CC_C99])
CFLAGS_NTP=
CPPFLAGS_NTP=
NTP_OS_CFLAGS
+AC_C_BIGENDIAN
+AC_C_VOLATILE
+AC_PROG_CPP
+
])dnl
dnl ======================================================================
dnl NTP compiler basics
dnl
AC_DEFUN([NTP_PROG_CC], [
+case "$build" in
+ *-*-freebsd1?.*)
+ cclist=cc
+ ;;
+ *)
+ cclist=
+ ;;
+esac
+
+dnl we need to check for cross compile tools for vxWorks here
dnl must come before AC_PROG_CC or similar
-AC_USE_SYSTEM_EXTENSIONS
+#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
+AC_PROG_CC([$cclist])
])dnl
dnl ======================================================================