summaryrefslogtreecommitdiff
path: root/src/configure.in
diff options
context:
space:
mode:
authorThomas G. Lockhart <lockhart@fourpalms.org>1998-10-14 16:02:11 +0000
committerThomas G. Lockhart <lockhart@fourpalms.org>1998-10-14 16:02:11 +0000
commitfe6d19f15fab4a087a532d10c61b6783cb91fbe3 (patch)
tree7d6f1c2b03c9e17fbe3a131a215ea154548ceac0 /src/configure.in
parent56792f372965bc2995a16b63ae3c8ffb0ce6a43c (diff)
downloadpostgresql-fe6d19f15fab4a087a532d10c61b6783cb91fbe3.tar.gz
Add Taral's test for flags required by the detected cpp program to read
from stdin. Necessary at least for systems missing cpp but having gcc -E. Include new configured file backend/catalog/genbki.sh.
Diffstat (limited to 'src/configure.in')
-rw-r--r--src/configure.in41
1 files changed, 40 insertions, 1 deletions
diff --git a/src/configure.in b/src/configure.in
index 94c75d75a0..c1729c310b 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -363,6 +363,44 @@ AC_CONFIG_HEADER(include/config.h)
dnl Checks for programs.
AC_PROG_CPP
+dnl Check to see what flags are required to get stdin into cpp
+AC_DEFUN(AC_TRY_CPPSTDIN,
+ [AC_REQUIRE_CPP()dnl
+ cat > conftest.$ac_ext <<EOF
+[#]line __oline__ "configure"
+#include "confdefs.h"
+[$1]
+EOF
+ ac_try="$ac_cpp $CPPSTDIN <conftest.$ac_ext >/dev/null 2>conftest.out"
+ AC_TRY_EVAL(ac_try)
+ ac_err=`grep -v '^ *+' conftest.out`
+ if test -z "$ac_err"; then
+ ifelse([$2], , :, [rm -rf conftest*
+ $2])
+ else
+ echo "$ac_err" >&AC_FD_CC
+ echo "configure: failed program was:" >&AC_FD_CC
+ cat conftest.$ac_ext >&AC_FD_CC
+ ifelse([$3], , , [ rm -rf conftest*
+ $3
+])dnl
+fi
+rm -f conftest*])
+
+AC_MSG_CHECKING(how to use cpp with stdin)
+if test -z "$CPPSTDIN"; then
+AC_CACHE_VAL(ac_cv_cpp_stdin,
+ [ CPPSTDIN=""
+ AC_TRY_CPPSTDIN([#include <assert.h>
+ Syntax Error], , CPPSTDIN="-")
+ ac_cv_cpp_stdin="$CPPSTDIN"])
+ CPPSTDIN="$ac_cv_cpp_stdin"
+else
+ ac_cv_cpp_stdin="$CPPSTDIN"
+fi
+AC_MSG_RESULT($CPP $CPPSTDIN)
+AC_SUBST(CPPSTDIN)
+
AC_SUBST(PORTNAME)
AC_SUBST(SRCDIR)
AC_SUBST(LDFLAGS)
@@ -865,7 +903,8 @@ AC_CONFIG_HEADER(interfaces/odbc/config.h)
AC_OUTPUT(
GNUmakefile
Makefile.global
- backend/port/Makefile
+ backend/port/Makefile
+ backend/catalog/genbki.sh
backend/utils/Gen_fmgrtab.sh
bin/pg_dump/Makefile
bin/pg_version/Makefile