From 7523d1ea94ef9f35c60452cba377b67f52661b60 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Wed, 17 Jun 2015 23:00:08 -0500 Subject: [PATCH] do not override CFLAGS during configure, remove USER_CFLAGS --- compat/Makefile.am | 1 - configure.ac | 13 +++++-------- src/Makefile.am | 2 +- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/compat/Makefile.am b/compat/Makefile.am index fd7242a..9f3a807 100644 --- a/compat/Makefile.am +++ b/compat/Makefile.am @@ -26,7 +26,6 @@ libcompatnoopt_la_SOURCES += explicit_bzero.c endif # other compatibility functions -libcompat_la_CFLAGS = $(CFLAGS) $(USER_CFLAGS) libcompat_la_SOURCES = libcompat_la_LIBADD = $(PLATFORM_LDADD) diff --git a/configure.ac b/configure.ac index e948167..6bf69c5 100644 --- a/configure.ac +++ b/configure.ac @@ -25,8 +25,11 @@ AC_CONFIG_MACRO_DIR([m4]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) -AC_SUBST([USER_CFLAGS], "$CFLAGS") -CFLAGS="-O2 -Wall -std=gnu99 -g" +AC_PROG_CC +AC_PROG_CC_STDC +AM_PROG_CC_C_O +AC_PROG_LIBTOOL +AC_PROG_YACC case $host_os in *darwin*) @@ -72,12 +75,6 @@ AM_CONDITIONAL([HOST_SOLARIS], [test x$HOST_OS = xsolaris]) AC_CHECK_FUNC([dl_iterate_phdr],, [AC_SEARCH_LIBS([dl_iterate_phdr],[dl])]) -AC_PROG_CC -AC_PROG_CC_STDC -AM_PROG_CC_C_O -AC_PROG_LIBTOOL -AC_PROG_YACC - save_cflags="$CFLAGS" CFLAGS=-Wno-pointer-sign AC_MSG_CHECKING([whether CC supports -Wno-pointer-sign]) diff --git a/src/Makefile.am b/src/Makefile.am index 8c30677..1022da2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -23,7 +23,7 @@ CLEANFILES = parse.c sbin_PROGRAMS = ntpd dist_man_MANS = ntpctl.8 ntpd.8 ntpd.conf.5 -ntpd_CFLAGS = $(CFLAGS) $(USER_CFLAGS) +ntpd_CFLAGS = $(CFLAGS) ntpd_CFLAGS += -DSYSCONFDIR=\"$(sysconfdir)\" ntpd_CFLAGS += -DLOCALSTATEDIR=\"$(localstatedir)\"