File tree Expand file tree Collapse file tree 3 files changed +35
-5
lines changed Expand file tree Collapse file tree 3 files changed +35
-5
lines changed Original file line number Diff line number Diff line change 7
7
#
8
8
#
9
9
# IDENTIFICATION
10
- # $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.67 2000/03/08 01:58:15 momjian Exp $
10
+ # $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.68 2000/03/30 05:29:20 tgl Exp $
11
11
#
12
12
# NOTES
13
13
# Essentially all Postgres make files include this file and use the
@@ -105,7 +105,7 @@ ODBCINST= $(POSTGRESDIR)
105
105
# (that is, prepend '#', don't set it to "0" or "no").
106
106
107
107
# Compile libpq++
108
- @HAVECXX@
108
+ HAVE_Cplusplus= @HAVECXX@
109
109
110
110
# Comment out ENFORCE_ALIGNMENT if you do NOT want unaligned access to
111
111
# multi-byte types to generate a bus error.
Original file line number Diff line number Diff line change @@ -488,7 +488,7 @@ AC_SUBST(USE_ODBC)
488
488
AC_SUBST(MULTIBYTE)
489
489
490
490
dnl Check for C++ support (allow override if needed)
491
- HAVECXX='HAVE_Cplusplus= true'
491
+ HAVECXX='true'
492
492
AC_ARG_WITH(CXX,
493
493
[ --with-CXX=compiler use specific C++ compiler
494
494
--without-CXX prevent building C++ code ],
@@ -498,14 +498,37 @@ AC_ARG_WITH(CXX,
498
498
AC_MSG_ERROR([*** You must supply an argument to the --with-CC option.])
499
499
;;
500
500
n | no)
501
- HAVECXX='HAVE_Cplusplus= false'
501
+ HAVECXX='false'
502
502
;;
503
503
esac
504
504
CXX="$withval"
505
505
],
506
506
[ AC_PROG_CXX])
507
507
AC_SUBST(HAVECXX)
508
508
509
+ if test "$HAVECXX" = 'true' ; then
510
+ AC_LANG_CPLUSPLUS
511
+
512
+ dnl check whether "using namespace std" works on this C++ compiler
513
+ AC_MSG_CHECKING([for namespace std in C++])
514
+ AC_TRY_COMPILE([#include <stdio.h>
515
+ #include <stdlib.h>
516
+ using namespace std;
517
+ ], [],
518
+ [AC_DEFINE(HAVE_NAMESPACE_STD) AC_MSG_RESULT(yes)],
519
+ [AC_MSG_RESULT(no)])
520
+
521
+ dnl check whether "#include <string>" works on this C++ compiler
522
+ AC_MSG_CHECKING([for include <string> in C++])
523
+ AC_TRY_COMPILE([#include <stdio.h>
524
+ #include <stdlib.h>
525
+ #include <string>
526
+ ], [],
527
+ [AC_DEFINE(HAVE_CXX_STRING_HEADER) AC_MSG_RESULT(yes)],
528
+ [AC_MSG_RESULT(no)])
529
+
530
+ fi
531
+
509
532
dnl make sure we revert to C compiler, not C++, for subsequent tests
510
533
AC_LANG_C
511
534
Original file line number Diff line number Diff line change 8
8
* or in config.h afterwards. Of course, if you edit config.h, then your
9
9
* changes will be overwritten the next time you run configure.
10
10
*
11
- * $Id: config.h.in,v 1.110 2000/03/17 05:29:06 tgl Exp $
11
+ * $Id: config.h.in,v 1.111 2000/03/30 05:29:21 tgl Exp $
12
12
*/
13
13
14
14
#ifndef CONFIG_H
@@ -529,6 +529,13 @@ extern void srandom(unsigned int seed);
529
529
/* Define if POSIX signal interface is available */
530
530
#undef USE_POSIX_SIGNALS
531
531
532
+ /* Define if C++ compiler accepts "using namespace std" */
533
+ #undef HAVE_NAMESPACE_STD
534
+
535
+ /* Define if C++ compiler accepts "#include <string>" */
536
+ #undef HAVE_CXX_STRING_HEADER
537
+
538
+
532
539
/*
533
540
* Pull in OS-specific declarations (using link created by configure)
534
541
*/
You can’t perform that action at this time.
0 commit comments