Determine CXXFLAGS after the C++ compiler was detected. Also honor
--enable-debug and environment variable override.
This commit is contained in:
parent
fae180f477
commit
dc0f5cb090
21
configure.in
21
configure.in
@ -543,7 +543,28 @@ PGAC_ARG_OPTARG(with, CXX, [ --with-CXX build C++ modules (libpq++
|
|||||||
[CXX=$withval],
|
[CXX=$withval],
|
||||||
[
|
[
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
|
|
||||||
|
# If the user has specified CXXFLAGS in the environment, leave it
|
||||||
|
# alone, else use a default.
|
||||||
|
|
||||||
|
has_cmdline_CXXFLAGS="${CXXFLAGS+yes}"
|
||||||
AC_PROG_CXX
|
AC_PROG_CXX
|
||||||
|
if test "$has_cmdline_CXXFLAGS" != yes; then
|
||||||
|
if test "$GXX" = yes; then
|
||||||
|
CXXFLAGS=-O2
|
||||||
|
else
|
||||||
|
case $template in
|
||||||
|
osf) CXXFLAGS='-O4 -Olimit 2000' ;;
|
||||||
|
unixware) CXXFLAGS='-O' ;;
|
||||||
|
*) CXXFLAGS= ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
|
||||||
|
CXXFLAGS="$CXXFLAGS -g"
|
||||||
|
fi
|
||||||
|
echo "using CXXFLAGS=$CXXFLAGS"
|
||||||
|
|
||||||
AC_PROG_CXXCPP
|
AC_PROG_CXXCPP
|
||||||
AC_SUBST(GXX)
|
AC_SUBST(GXX)
|
||||||
PGAC_CLASS_STRING
|
PGAC_CLASS_STRING
|
||||||
|
@ -14,3 +14,6 @@ CFLAGS_SL =
|
|||||||
|
|
||||||
%$(DLSUFFIX): %.o
|
%$(DLSUFFIX): %.o
|
||||||
@echo 'cannot make shared object $@ from $<'
|
@echo 'cannot make shared object $@ from $<'
|
||||||
|
|
||||||
|
# Hack alert! Fix your compiler installation...
|
||||||
|
override CXXFLAGS +=-I/usr/local/lib/gcc-lib/i386-pc-qnx4/egcs-2.91.60/include/g++
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
if test "$GCC" = yes ; then
|
if test "$GCC" = yes ; then
|
||||||
CFLAGS=-pipe
|
CFLAGS=-pipe
|
||||||
CXXFLAGS=-pipe
|
|
||||||
else # not GCC
|
else # not GCC
|
||||||
case $host_os in
|
case $host_os in
|
||||||
aix3.2.5)
|
aix3.2.5)
|
||||||
|
@ -5,5 +5,4 @@ else
|
|||||||
CC="$CC -std"
|
CC="$CC -std"
|
||||||
CFLAGS='-O4 -Olimit 2000'
|
CFLAGS='-O4 -Olimit 2000'
|
||||||
CCC=cxx
|
CCC=cxx
|
||||||
CXXFLAGS='-O4 -Olimit 2000'
|
|
||||||
fi
|
fi
|
||||||
|
@ -1,3 +1,2 @@
|
|||||||
CFLAGS=
|
CFLAGS=
|
||||||
LIBS=-lunix
|
LIBS=-lunix
|
||||||
CXXFLAGS=-I/usr/local/lib/gcc-lib/i386-pc-qnx4/egcs-2.91.60/include/g++
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user