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
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
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
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
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
-# $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
#
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
#| -*-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
(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)
/* -*-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
#include "usrdef.h"
#include "os.h"
-#include <postgresql/libpq-fe.h>
+#include <libpq-fe.h>
\f
#define ARG_CONN(n) ((PGconn *) (arg_ulong_integer (n)))
#define ARG_RESULT(n) ((PGresult *) (arg_ulong_integer (n)))