diff options
author | Tom Lane | 2000-05-03 18:30:17 +0000 |
---|---|---|
committer | Tom Lane | 2000-05-03 18:30:17 +0000 |
commit | de13d88146cceb9eecd47c6998e5daa6995e8dd0 (patch) | |
tree | a7a070fc93ec00e14777f063f83113bb24c0b218 /src/configure.in | |
parent | 86b8bd0748bd2211905fcc06780e91b96182db87 (diff) |
Do not try to build libpq++ if class 'string' is not defined in the
available C++ header files.
Diffstat (limited to 'src/configure.in')
-rw-r--r-- | src/configure.in | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/configure.in b/src/configure.in index b6dfb1cf48f..d8791b48584 100644 --- a/src/configure.in +++ b/src/configure.in @@ -526,7 +526,26 @@ using namespace std; #include <string> ], [], [AC_DEFINE(HAVE_CXX_STRING_HEADER) AC_MSG_RESULT(yes)], - [AC_MSG_RESULT(no)]) + [AC_MSG_RESULT(no) + + dnl If we found a <string> header then it's probably safe to assume + dnl class string exists. But if not, check to make sure that <string.h> + dnl defines class string; libpq++ can't build without class string. + AC_MSG_CHECKING([for class string in C++]) + AC_TRY_COMPILE([#include <stdio.h> +#include <stdlib.h> +#include <string.h> +], [string foo = "test"], + [AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no) + AC_MSG_WARN([ +*** +Disabling build of libpq++ because we cannot find class string in the +system's C++ header files. +***]) + HAVECXX='false' +]) +]) fi |