From: Chris Hanson Date: Sun, 26 Jun 2005 05:36:52 +0000 (+0000) Subject: Change configuration to handle PostgreSQL 8.0 includes. X-Git-Tag: 20090517-FFI~1268 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=fe47ea5b61cd1b69e001d2eaf11e0023bbc2ea59;p=mit-scheme.git Change configuration to handle PostgreSQL 8.0 includes. --- diff --git a/v7/src/microcode/configure.ac b/v7/src/microcode/configure.ac index 78c99acf7..0ae417782 100644 --- a/v7/src/microcode/configure.ac +++ b/v7/src/microcode/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT([MIT/GNU Scheme], [14.16], [bug-mit-scheme@gnu.org], [mit-scheme]) -AC_REVISION([$Id: configure.ac,v 1.5 2005/06/26 04:35:35 cph Exp $]) +AC_REVISION([$Id: configure.ac,v 1.6 2005/06/26 05:36:52 cph Exp $]) AC_CONFIG_SRCDIR([boot.c]) AC_CONFIG_HEADERS([config.h]) AC_PROG_MAKE_SET @@ -213,6 +213,18 @@ AC_TRY_LINK( LIBS="$save_LIBS" AC_MSG_RESULT(${scheme_cv_lib_db4}) +if test "${scheme_cv_lib_pq}" = "yes"; then + PQ_INCLUDE= + if test -x "/usr/bin/pg_config"; then + PQ_INCLUDE="$(/usr/bin/pg_config --includedir 2> /dev/null)" + elif test -d "/usr/include/postgresql"; then + PQ_INCLUDE="/usr/include/postgresql" + fi + if test "${PQ_INCLUDE}"; then + CPPFLAGS="${CPPFLAGS} -I${PQ_INCLUDE}" + fi +fi + dnl Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDC @@ -224,7 +236,7 @@ AC_CHECK_HEADERS([sys/ptyio.h sys/socket.h sys/time.h sys/un.h sys/vfs.h]) AC_CHECK_HEADERS([stdbool.h termio.h termios.h unistd.h utime.h]) AC_CHECK_HEADERS([openssl/blowfish.h openssl/md5.h blowfish.h md5.h]) AC_CHECK_HEADERS([mhash.h mcrypt.h gdbm.h db.h curses.h term.h dlfcn.h]) -AC_CHECK_HEADERS([sys/mman.h postgresql/libpq-fe.h]) +AC_CHECK_HEADERS([sys/mman.h libpq-fe.h]) dnl Checks for typedefs AC_TYPE_MODE_T @@ -719,7 +731,7 @@ dnl PostgreSQL support. if test "${scheme_cv_lib_pq}" = "yes"; then AC_DEFINE([HAVE_LIBPQ], [1], [Define if PostgreSQL libpq library is present.]) - if test "${ac_cv_header_postgresql_libpq_fe_h}" = "yes"; then + if test "${ac_cv_header_libpq_fe_h}" = "yes"; then if test "${enable_dynamic_modules}" = "yes"; then MODULE_BASES="${MODULE_BASES} prpgsql" else @@ -868,6 +880,12 @@ AC_SUBST([MODULE_LDFLAGS]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT +# Make custom compilation program for "makegen.scm". +rm -f makegen-cc +echo "#!/bin/sh" > makegen-cc +echo "exec gcc -M -DMIT_SCHEME ${CPPFLAGS} \"\${1}\"" >> makegen-cc +chmod +x makegen-cc + if test "${MODULE_RULES}" != "/dev/null"; then rm -f "${MODULE_RULES}" fi diff --git a/v7/src/microcode/makegen/Makefile.in.in b/v7/src/microcode/makegen/Makefile.in.in index 59dda0481..57ae7ed09 100644 --- a/v7/src/microcode/makegen/Makefile.in.in +++ b/v7/src/microcode/makegen/Makefile.in.in @@ -1,4 +1,4 @@ -# $Id: Makefile.in.in,v 1.24 2005/01/11 03:44:43 cph Exp $ +# $Id: Makefile.in.in,v 1.25 2005/06/26 05:36:52 cph Exp $ # # Copyright 2000,2001,2002,2003 Massachusetts Institute of Technology # @@ -173,7 +173,7 @@ MOSTLYCLEAN_FILES = *.o cmpauxmd.s usrdef.c bchdef.c CLEAN_FILES = $(ALL_PROGRAMS) $(ALL_LIBS) $(ALL_DATA) $(EXTRA_PROGRAMS) DISTCLEAN_FILES = Makefile config.h config.cache config.log config.status \ - cmpauxmd.m4 cmpintmd.h TAGS + cmpauxmd.m4 cmpintmd.h TAGS makegen-cc MAINTAINER_CLEAN_FILES = Makefile.in Makefile.deps config.h.in configure diff --git a/v7/src/microcode/makegen/makegen.scm b/v7/src/microcode/makegen/makegen.scm index dfca418f2..dbb02723c 100644 --- a/v7/src/microcode/makegen/makegen.scm +++ b/v7/src/microcode/makegen/makegen.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: makegen.scm,v 1.6 2003/02/14 18:28:31 cph Exp $ +$Id: makegen.scm,v 1.7 2005/06/26 05:36:52 cph Exp $ Copyright 2000,2001,2003 Massachusetts Institute of Technology @@ -143,7 +143,7 @@ USA. (unbreak-lines (call-with-output-string (lambda (port) - (run-shell-command (string-append "gcc -M -DMIT_SCHEME " filename) + (run-shell-command (string-append "./makegen-cc " filename) 'OUTPUT port)))))) (define (unbreak-lines string) diff --git a/v7/src/microcode/prpgsql.c b/v7/src/microcode/prpgsql.c index e195bdedc..3e40fbf73 100644 --- a/v7/src/microcode/prpgsql.c +++ b/v7/src/microcode/prpgsql.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: prpgsql.c,v 1.8 2005/01/16 04:12:59 cph Exp $ +$Id: prpgsql.c,v 1.9 2005/06/26 05:36:52 cph Exp $ Copyright 2003,2005 Massachusetts Institute of Technology @@ -30,7 +30,7 @@ USA. #include "usrdef.h" #include "os.h" -#include +#include #define ARG_CONN(n) ((PGconn *) (arg_ulong_integer (n))) #define ARG_RESULT(n) ((PGresult *) (arg_ulong_integer (n)))