summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorPeter Eisentraut2001-03-14 18:00:09 +0000
committerPeter Eisentraut2001-03-14 18:00:09 +0000
commit707c0ffdab53bf956166e683cc162e4dfd01dc49 (patch)
tree9c423c8799d8891ddf646b2f65a5f55bfcf65c01 /configure.in
parent5dd04603b99fc7288c8988f16bfcb24994b35a38 (diff)
Try to run empty test program before running any real AC_TRY_RUN's, to
prevent disguised failures.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in16
1 files changed, 16 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 91311530212..fd9f22820b5 100644
--- a/configure.in
+++ b/configure.in
@@ -943,6 +943,22 @@ if test x"$pgac_cv_var_int_optreset" = x"yes"; then
AC_DEFINE(HAVE_INT_OPTRESET, 1)
fi
+
+# This test makes sure that run tests work at all. Sometimes a shared
+# library is found by the linker, but the runtime linker can't find it.
+# This check should come after all modifications of compiler or linker
+# variables, and before any other run tests.
+AC_MSG_CHECKING([test program])
+AC_TRY_RUN([int main() { return 0; }],
+[AC_MSG_RESULT(ok)],
+[AC_MSG_RESULT(failed)
+AC_MSG_ERROR([[
+*** Could not execute a simple test program. This may be a problem
+*** related to locating shared libraries. Check the file 'config.log'
+*** for the exact reason.]])],
+[AC_MSG_RESULT([cross-compiling])])
+
+
dnl Check to see if we have a working 64-bit integer type.
dnl This breaks down into two steps:
dnl (1) figure out if the compiler has a 64-bit int type with working