From: Chris Hanson Date: Sat, 13 Jan 2007 07:45:54 +0000 (+0000) Subject: Properly handle case where pg_config isn't available. X-Git-Tag: 20090517-FFI~786 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=a0902f4e9f7f8605e5289842b78fc7e79f657b1e;p=mit-scheme.git Properly handle case where pg_config isn't available. --- diff --git a/v7/src/microcode/configure.ac b/v7/src/microcode/configure.ac index 36b963d6d..c8509a99d 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 microcode], [14.18], [bug-mit-scheme@gnu.org], [mit-scheme]) -AC_REVISION([$Id: configure.ac,v 1.30 2007/01/13 07:12:29 cph Exp $]) +AC_REVISION([$Id: configure.ac,v 1.31 2007/01/13 07:45:54 cph Exp $]) AC_CONFIG_SRCDIR([boot.c]) AC_CONFIG_HEADERS([config.h]) AC_PROG_MAKE_SET @@ -658,21 +658,28 @@ fi dnl PostgreSQL support if test "${with_libpq}" != no; then if test "${with_libpq}" != yes; then - CPPFLAGS="${CPPFLAGS} -I${with_libpq}/include" - LDFLAGS="${LDFLAGS} -L${with_libpq}/lib" + libpq_inc=${with_libpq}/include + libpq_lib=${with_libpq}/lib else AC_PATH_PROG([PG_CONFIG], [pg_config]) - if test ${PG_CONFIG} != no; then + if test "x${PG_CONFIG}" != x; then libpq_inc=`${PG_CONFIG} --includedir 2>/dev/null` - if test "${libpq_inc}" != /usr/include; then - CPPFLAGS="${CPPFLAGS} -I${libpq_inc}" - fi libpq_lib=`${PG_CONFIG} --libdir 2>/dev/null` - if test "${libpq_lib}" != /usr/lib; then - LDFLAGS="${LDFLAGS} -L${libpq_lib}" + else + if test -d /usr/include/postgresql; then + libpq_inc=/usr/include/postgresql + else + libpq_inc=/usr/include fi + libpq_lib=/usr/lib fi fi + if test "${libpq_inc}" != /usr/include; then + CPPFLAGS="${CPPFLAGS} -I${libpq_inc}" + fi + if test "${libpq_lib}" != /usr/lib; then + LDFLAGS="${LDFLAGS} -L${libpq_lib}" + fi AC_CHECK_HEADER([libpq-fe.h], [ AC_DEFINE([HAVE_LIBPQ_FE_H], [1],