From: Simon Wilkinson Date: Mon, 4 Oct 2010 12:45:53 +0000 (+0100) Subject: configure: Don't let autoconf pick our CFLAGS X-Git-Tag: upstream/1.8.0_pre1^2~4718 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=b1f747c1f131fc1a9f8a5895fb06607a255a27d8;p=packages%2Fo%2Fopenafs.git configure: Don't let autoconf pick our CFLAGS If the user hasn't specified CFLAGS on the command line to ./configure, then autoconf will set them to -g -O2 if the compiler supports those options. For compatibility with what OpenAFS has always done, and to let us manually set optimisation and debugging flags later, disable this behaviour. Change-Id: Ic78d5f824433d94d76f16c107af3488132d57155 Reviewed-on: http://gerrit.openafs.org/2895 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- diff --git a/configure-libafs.ac b/configure-libafs.ac index 1bbdc749e..6e11ba8c2 100644 --- a/configure-libafs.ac +++ b/configure-libafs.ac @@ -14,7 +14,10 @@ AC_SUBST(MACOS_VERSION) AC_SUBST(LINUX_PKGVER) AC_SUBST(LINUX_PKGREL) +dnl If the user hasn't specified CFLAGS don't let configure pick -g -O2 +AS_IF([test -z "$CFLAGS"], [CFLAGS=" "], []) AC_PROG_CC + OPENAFS_CONFIGURE_COMMON AC_OUTPUT( \ diff --git a/configure.ac b/configure.ac index 7f8e0ce3c..3d41681f6 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,11 @@ 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_PROG_CC + AC_PATH_PROGS([PATH_CPP], [cpp], [${CC-cc} -E], [$PATH:/lib:/usr/ccs/lib]) AC_SUBST([PATH_CPP]) OPENAFS_CONFIGURE_COMMON