Move CXX platform-specific stuff into template files.

This commit is contained in:
Bruce Momjian 2002-07-07 20:28:25 +00:00
parent 712f69ece8
commit 4f4753832e
5 changed files with 16 additions and 14 deletions

12
configure vendored
View File

@ -1916,6 +1916,10 @@ echo "$as_me: error: argument required for --with-CC option" >&2;}
fi; fi;
# Set here so it can be over-ridden in the template file
GCC_CXXFLAGS="-O2"
VENDOR_CXXFLAGS=""
case $template in case $template in
aix) pgac_cc_list="gcc xlc";; aix) pgac_cc_list="gcc xlc";;
irix) pgac_cc_list="cc";; # no gcc irix) pgac_cc_list="cc";; # no gcc
@ -4043,13 +4047,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test "$ac_env_CXXFLAGS" != set; then if test "$ac_env_CXXFLAGS" != set; then
if test "$GXX" = yes; then if test "$GXX" = yes; then
CXXFLAGS=-O2 CXXFLAGS="$GCC_CXXFLAGS"
else else
case $template in CXXFLAGS="$VENDOR_CXXFLAGS"
osf) CXXFLAGS='-O4 -Olimit 2000' ;;
unixware) CXXFLAGS='-O' ;;
*) CXXFLAGS= ;;
esac
fi fi
fi fi
if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then

View File

@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script. dnl Process this file with autoconf to produce a configure script.
dnl $Header: /cvsroot/pgsql/configure.in,v 1.186 2002/05/28 16:57:53 petere Exp $ dnl $Header: /cvsroot/pgsql/configure.in,v 1.187 2002/07/07 20:28:24 momjian Exp $
dnl dnl
dnl Developers, please strive to achieve this order: dnl Developers, please strive to achieve this order:
dnl dnl
@ -243,6 +243,10 @@ AC_SUBST(enable_debug)
# variable. # variable.
PGAC_ARG_REQ(with, CC, [], [CC=$with_CC]) PGAC_ARG_REQ(with, CC, [], [CC=$with_CC])
# Set here so it can be over-ridden in the template file
GCC_CXXFLAGS="-O2"
VENDOR_CXXFLAGS=""
case $template in case $template in
aix) pgac_cc_list="gcc xlc";; aix) pgac_cc_list="gcc xlc";;
irix) pgac_cc_list="cc";; # no gcc irix) pgac_cc_list="cc";; # no gcc
@ -593,13 +597,9 @@ PGAC_ARG_OPTARG(with, CXX, [ --with-CXX build C++ modules (libpq++
AC_PROG_CXX AC_PROG_CXX
if test "$ac_env_CXXFLAGS" != set; then if test "$ac_env_CXXFLAGS" != set; then
if test "$GXX" = yes; then if test "$GXX" = yes; then
CXXFLAGS=-O2 CXXFLAGS="$GCC_CXXFLAGS"
else else
case $template in CXXFLAGS="$VENDOR_CXXFLAGS"
osf) CXXFLAGS='-O4 -Olimit 2000' ;;
unixware) CXXFLAGS='-O' ;;
*) CXXFLAGS= ;;
esac
fi fi
fi fi
if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then

View File

@ -2,5 +2,5 @@ CFLAGS='-pipe'
case $host_cpu in case $host_cpu in
alpha*) CFLAGS="$CFLAGS -O";; alpha*) CFLAGS="$CFLAGS -O";;
CXXFLAGS="$CXXFLAGS -O" GCC_CXXFLAGS="-O"
esac esac

View File

@ -6,3 +6,4 @@ else
CFLAGS='-O4 -Olimit 2000' CFLAGS='-O4 -Olimit 2000'
CCC=cxx CCC=cxx
fi fi
VENDOR_CXXFLAGS='-O4 -Olimit 2000'

View File

@ -3,3 +3,4 @@ if test "$GCC" = yes; then
else else
CFLAGS='-O -K inline' CFLAGS='-O -K inline'
fi fi
VENDOR_CXXFLAGS="-O"