Here are two patches to fix up the c++ (and c) support in the
configuration system. The idea is to make the configure arguments that specify compilers to be compatible with the other --with options. The main point, though, is that the c++ support is on by default, but can easily be disabled by the --without-CXX option for those few(?) that don't want it. Brook Milligan
This commit is contained in:
parent
26d5a31dbf
commit
916cb38431
10
INSTALL
10
INSTALL
@ -286,6 +286,16 @@ PostgreSQL:
|
|||||||
for archive libraries. (Typical use will need
|
for archive libraries. (Typical use will need
|
||||||
--with-libraries=/usr/local/lib)
|
--with-libraries=/usr/local/lib)
|
||||||
|
|
||||||
|
--with-CC=compiler
|
||||||
|
Use a specific C compiler that the configure
|
||||||
|
script cannot find.
|
||||||
|
|
||||||
|
--with-CXX=compiler
|
||||||
|
--without-CXX
|
||||||
|
Use a specific C++ compiler that the configure
|
||||||
|
script cannot find, or exclude C++ compilation
|
||||||
|
altogether.
|
||||||
|
|
||||||
As an example, here is the configure script I use on a Sparc
|
As an example, here is the configure script I use on a Sparc
|
||||||
Solaris 2.5 system with /opt/postgres being the install base.
|
Solaris 2.5 system with /opt/postgres being the install base.
|
||||||
|
|
||||||
|
@ -280,12 +280,18 @@ AC_ARG_ENABLE(
|
|||||||
AC_MSG_RESULT(disabled)
|
AC_MSG_RESULT(disabled)
|
||||||
)
|
)
|
||||||
|
|
||||||
if test "X$with_compiler" != "X"
|
dnl Check for C support (allow override if needed)
|
||||||
then
|
AC_ARG_WITH(CC,
|
||||||
CC=$with_compiler
|
[ --with-CC=compiler use specific C compiler],
|
||||||
else
|
[
|
||||||
AC_PROG_CC
|
case "$withval" in
|
||||||
fi
|
"" | y | ye | yes | n | no)
|
||||||
|
AC_MSG_ERROR([*** You must supply an argument to the --with-CC option.])
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
CC="$withval"
|
||||||
|
],
|
||||||
|
[ AC_PROG_CC])
|
||||||
|
|
||||||
if test "$CC" = "gcc"
|
if test "$CC" = "gcc"
|
||||||
then
|
then
|
||||||
@ -320,21 +326,24 @@ AC_SUBST(USE_TCL)
|
|||||||
AC_SUBST(USE_PERL)
|
AC_SUBST(USE_PERL)
|
||||||
AC_SUBST(MB)
|
AC_SUBST(MB)
|
||||||
|
|
||||||
dnl ****************************************************************
|
dnl Check for C++ support (allow override if needed)
|
||||||
dnl Hold off on the C++ stuff until we can figure out why it doesn't
|
HAVECXX='HAVE_Cplusplus=true'
|
||||||
dnl work under Solaris..
|
AC_ARG_WITH(CXX,
|
||||||
dnl
|
[ --with-CXX=compiler use specific C++ compiler],
|
||||||
dnl AC_PROG_CXX
|
[
|
||||||
dnl
|
case "$withval" in
|
||||||
dnl Check if we should set Have_Cplusplus
|
"" | y | ye | yes)
|
||||||
dnl if test -n "$CXX"; then
|
AC_MSG_ERROR([*** You must supply an argument to the --with-CC option.])
|
||||||
dnl export HAVECXX
|
;;
|
||||||
dnl HAVECXX='HAVE_Cplusplus=true'
|
n | no)
|
||||||
dnl fi
|
HAVECXX='HAVE_Cplusplus=false'
|
||||||
dnl AC_SUBST(HAVECXX)
|
;;
|
||||||
dnl ****************************************************************
|
esac
|
||||||
HAVECXX='HAVE_Cplusplus=false'
|
CXX="$withval"
|
||||||
|
],
|
||||||
|
[ AC_PROG_CXX])
|
||||||
AC_SUBST(HAVECXX)
|
AC_SUBST(HAVECXX)
|
||||||
|
|
||||||
INSTALLPATH="/usr/ucb:$PATH"
|
INSTALLPATH="/usr/ucb:$PATH"
|
||||||
AC_PATH_PROGS(INSTALL, ginstall installbsd bsdinst scoinst install, NONE, $INSTALLPATH)
|
AC_PATH_PROGS(INSTALL, ginstall installbsd bsdinst scoinst install, NONE, $INSTALLPATH)
|
||||||
if test $INSTALL = "NONE"
|
if test $INSTALL = "NONE"
|
||||||
|
Loading…
Reference in New Issue
Block a user