diff --git a/configure b/configure index aaf84be6a..8c418df55 100755 --- a/configure +++ b/configure @@ -1893,7 +1893,9 @@ fi # Allow to overwrite the C compiler, default to the one postgres was -# compiled with +# compiled with. We don't want autoconf's default CFLAGS though, so save +# those. +SAVE_CFLAGS="$CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -2491,6 +2493,7 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu +CFLAGS="$SAVE_CFLAGS" # check for a number of CFLAGS that make development easier diff --git a/configure.in b/configure.in index 5248f36f5..7ef13e2eb 100644 --- a/configure.in +++ b/configure.in @@ -52,8 +52,11 @@ fi AC_SUBST(vpath_build) # Allow to overwrite the C compiler, default to the one postgres was -# compiled with +# compiled with. We don't want autoconf's default CFLAGS though, so save +# those. +SAVE_CFLAGS="$CFLAGS" AC_PROG_CC([$($PG_CONFIG --cc)]) +CFLAGS="$SAVE_CFLAGS" # check for a number of CFLAGS that make development easier