summaryrefslogtreecommitdiff
path: root/src/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'src/configure.in')
-rw-r--r--src/configure.in21
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