Add compile -O flag only for non-debug mode, per Tom
authorBruce Momjian <bruce@momjian.us>
Tue, 14 Oct 2003 00:48:09 +0000 (00:48 +0000)
committerBruce Momjian <bruce@momjian.us>
Tue, 14 Oct 2003 00:48:09 +0000 (00:48 +0000)
configure
configure.in

index 0ee499a304d9e3f6834dc6858ea5cbe443e947d0..f376dc92ef577322d84e128b06f993c96f4e17b3 100755 (executable)
--- a/configure
+++ b/configure
@@ -2393,12 +2393,13 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 if test "$ac_env_CFLAGS_set" = set; then
   CFLAGS=$ac_env_CFLAGS_value
 fi
-# configure sets CFLAGS to -O2 for gcc, so this is only for non-gcc
-if test x"$CFLAGS" = x""; then
-   CFLAGS="-O"
-fi
 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
   CFLAGS="$CFLAGS -g"
+else
+  # configure sets CFLAGS to -O2 for gcc, so this is only for non-gcc
+  if test x"$CFLAGS" = x""; then
+    CFLAGS="-O"
+  fi
 fi
 { echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
 echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
index 18d612729b67eb77656abbfe3911fe14fefad202..5a6d85582666e128acbcd597957e5f8f848e6742 100644 (file)
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
-dnl $Header: /cvsroot/pgsql/configure.in,v 1.294 2003/10/09 03:20:33 momjian Exp $
+dnl $Header: /cvsroot/pgsql/configure.in,v 1.295 2003/10/14 00:48:09 momjian Exp $
 dnl
 dnl Developers, please strive to achieve this order:
 dnl
@@ -238,12 +238,13 @@ AC_PROG_CC([$pgac_cc_list])
 if test "$ac_env_CFLAGS_set" = set; then
   CFLAGS=$ac_env_CFLAGS_value
 fi
-# configure sets CFLAGS to -O2 for gcc, so this is only for non-gcc
-if test x"$CFLAGS" = x""; then 
-   CFLAGS="-O"
-fi
 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
   CFLAGS="$CFLAGS -g"
+else
+  # configure sets CFLAGS to -O2 for gcc, so this is only for non-gcc
+  if test x"$CFLAGS" = x""; then   
+    CFLAGS="-O"
+  fi
 fi
 AC_MSG_NOTICE([using CFLAGS=$CFLAGS])