From 8b932375ecca3fefc1190a8d23d5c24ae538cfae Mon Sep 17 00:00:00 2001 From: Antoine Verheijen Date: Wed, 19 Jan 2011 15:57:25 -0700 Subject: [PATCH] Move check for unspecified CFLAGS in configure.ac configure.ac provides a check to see if the user has specified CFLAGS and if not, it sets CFLAGS to a blank (not NULL) string so that the resultant configure script does not set '-g' and/or '-O2' by default. This check occurs after AC_USE_SYSTEM_EXTENSIONS in the configure.ac file. However, on at least some systems, such as OpenBSD, AC_USE_SYSTEM_EXTENSIONS expands to include the code that configure uses to set '-g -O2' so the check has no effect and '-g' or '-O2' can not be turned off. This patch moves the "CFLAGS specified" check so that it precedes the AC_USE_SYSTEM_EXTENSIONS directive, in which case everything works. Change-Id: I68ed5a3c5129a55f7dcd7413c93f35cc7cb14b9c Reviewed-on: http://gerrit.openafs.org/3688 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- configure.ac | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index fdf43f3..5c1cd35 100644 --- a/configure.ac +++ b/configure.ac @@ -22,10 +22,11 @@ AC_SUBST(LINUX_PKGVER) AC_SUBST(LINUX_PKGREL) AC_SUBST(DEB_PKGVER) -AC_USE_SYSTEM_EXTENSIONS - dnl If the user hasn't specified CFLAGS don't let configure pick -g -O2 AS_IF([test -z "$CFLAGS"], [CFLAGS=" "], []) + +AC_USE_SYSTEM_EXTENSIONS + AC_PROG_CC AC_PATH_PROGS([PATH_CPP], [cpp], [${CC-cc} -E], [$PATH:/lib:/usr/ccs/lib]) -- 1.9.4