aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1998-06-16 03:28:58 +0000
committerBruce Momjian <bruce@momjian.us>1998-06-16 03:28:58 +0000
commit916cb38431af6e41cdc8f744d545ffd01343daba (patch)
tree12dee8975ca139499ced0eb29e45d2c4c1e3829d /src
parent26d5a31dbf705ca09971be0891963885bb3b4558 (diff)
downloadpostgresql-916cb38431af6e41cdc8f744d545ffd01343daba.tar.gz
postgresql-916cb38431af6e41cdc8f744d545ffd01343daba.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/configure.in49
1 files changed, 29 insertions, 20 deletions
diff --git a/src/configure.in b/src/configure.in
index aa65848bc67..987ee1e2533 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -280,12 +280,18 @@ AC_ARG_ENABLE(
AC_MSG_RESULT(disabled)
)
-if test "X$with_compiler" != "X"
-then
- CC=$with_compiler
-else
- AC_PROG_CC
-fi
+dnl Check for C support (allow override if needed)
+AC_ARG_WITH(CC,
+ [ --with-CC=compiler use specific C compiler],
+ [
+ case "$withval" in
+ "" | 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"
then
@@ -320,21 +326,24 @@ AC_SUBST(USE_TCL)
AC_SUBST(USE_PERL)
AC_SUBST(MB)
-dnl ****************************************************************
-dnl Hold off on the C++ stuff until we can figure out why it doesn't
-dnl work under Solaris..
-dnl
-dnl AC_PROG_CXX
-dnl
-dnl Check if we should set Have_Cplusplus
-dnl if test -n "$CXX"; then
-dnl export HAVECXX
-dnl HAVECXX='HAVE_Cplusplus=true'
-dnl fi
-dnl AC_SUBST(HAVECXX)
-dnl ****************************************************************
-HAVECXX='HAVE_Cplusplus=false'
+dnl Check for C++ support (allow override if needed)
+HAVECXX='HAVE_Cplusplus=true'
+AC_ARG_WITH(CXX,
+ [ --with-CXX=compiler use specific C++ compiler],
+ [
+ case "$withval" in
+ "" | y | ye | yes)
+ AC_MSG_ERROR([*** You must supply an argument to the --with-CC option.])
+ ;;
+ n | no)
+ HAVECXX='HAVE_Cplusplus=false'
+ ;;
+ esac
+ CXX="$withval"
+ ],
+ [ AC_PROG_CXX])
AC_SUBST(HAVECXX)
+
INSTALLPATH="/usr/ucb:$PATH"
AC_PATH_PROGS(INSTALL, ginstall installbsd bsdinst scoinst install, NONE, $INSTALLPATH)
if test $INSTALL = "NONE"