From: Antoine Verheijen Date: Wed, 19 Jan 2011 22:57:25 +0000 (-0700) Subject: Move check for unspecified CFLAGS in configure.ac X-Git-Tag: upstream/1.8.0_pre1^2~4269 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=8b932375ecca3fefc1190a8d23d5c24ae538cfae;p=packages%2Fo%2Fopenafs.git 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 --- diff --git a/configure.ac b/configure.ac index fdf43f391..5c1cd3591 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])