Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit916cb38

Browse files
committed
Here are two patches to fix up the c++ (and c) support in the
configuration system. The idea is to make the configure argumentsthat specify compilers to be compatible with the other --withoptions. The main point, though, is that the c++ support is on bydefault, but can easily be disabled by the --without-CXX optionfor those few(?) that don't want it.Brook Milligan
1 parent26d5a31 commit916cb38

File tree

2 files changed

+39
-20
lines changed

2 files changed

+39
-20
lines changed

‎INSTALL

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,16 @@ PostgreSQL:
286286
for archive libraries. (Typical use will need
287287
--with-libraries=/usr/local/lib)
288288

289+
--with-CC=compiler
290+
Use a specific C compiler that the configure
291+
script cannot find.
292+
293+
--with-CXX=compiler
294+
--without-CXX
295+
Use a specific C++ compiler that the configure
296+
script cannot find, or exclude C++ compilation
297+
altogether.
298+
289299
As an example, here is the configure script I use on a Sparc
290300
Solaris 2.5 system with /opt/postgres being the install base.
291301

‎src/configure.in

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -280,12 +280,18 @@ AC_ARG_ENABLE(
280280
AC_MSG_RESULT(disabled)
281281
)
282282

283-
if test "X$with_compiler" != "X"
284-
then
285-
CC=$with_compiler
286-
else
287-
AC_PROG_CC
288-
fi
283+
dnl Check for C support (allow override if needed)
284+
AC_ARG_WITH(CC,
285+
[ --with-CC=compiler use specific C compiler],
286+
[
287+
case "$withval" in
288+
"" | y | ye | yes | n | no)
289+
AC_MSG_ERROR([*** You must supply an argument to the --with-CC option.])
290+
;;
291+
esac
292+
CC="$withval"
293+
],
294+
[ AC_PROG_CC])
289295

290296
if test "$CC" = "gcc"
291297
then
@@ -320,21 +326,24 @@ AC_SUBST(USE_TCL)
320326
AC_SUBST(USE_PERL)
321327
AC_SUBST(MB)
322328

323-
dnl ****************************************************************
324-
dnl Hold off on the C++ stuff until we can figure out why it doesn't
325-
dnl work under Solaris..
326-
dnl
327-
dnl AC_PROG_CXX
328-
dnl
329-
dnl Check if we should set Have_Cplusplus
330-
dnl if test -n "$CXX"; then
331-
dnl export HAVECXX
332-
dnl HAVECXX='HAVE_Cplusplus=true'
333-
dnl fi
334-
dnl AC_SUBST(HAVECXX)
335-
dnl ****************************************************************
336-
HAVECXX='HAVE_Cplusplus=false'
329+
dnl Check for C++ support (allow override if needed)
330+
HAVECXX='HAVE_Cplusplus=true'
331+
AC_ARG_WITH(CXX,
332+
[ --with-CXX=compiler use specific C++ compiler],
333+
[
334+
case "$withval" in
335+
"" | y | ye | yes)
336+
AC_MSG_ERROR([*** You must supply an argument to the --with-CC option.])
337+
;;
338+
n | no)
339+
HAVECXX='HAVE_Cplusplus=false'
340+
;;
341+
esac
342+
CXX="$withval"
343+
],
344+
[ AC_PROG_CXX])
337345
AC_SUBST(HAVECXX)
346+
338347
INSTALLPATH="/usr/ucb:$PATH"
339348
AC_PATH_PROGS(INSTALL, ginstall installbsd bsdinst scoinst install, NONE, $INSTALLPATH)
340349
if test $INSTALL = "NONE"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp