* configure.in -- fix the PG test to deal properly with non-standard

locations.  In particular, AC_CHECK_HEADERS() uses CPPFLAGS, not
	  CFLAGS.
	* src/backend/postgres/Makefile.am: use PGSQL_CFLAGS and PGSQL_LIBS
	* src/backend/postgres/test/Makefile.am: use PGSQL_CFLAGS


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7891 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Derek Atkins
2003-01-29 05:08:17 +00:00
parent 9aa13ea431
commit 8c88db7d72
4 changed files with 22 additions and 8 deletions

View File

@@ -1,3 +1,11 @@
2003-01-28 Derek Atkins <derek@ihtfp.com>
* configure.in -- fix the PG test to deal properly with non-standard
locations. In particular, AC_CHECK_HEADERS() uses CPPFLAGS, not
CFLAGS.
* src/backend/postgres/Makefile.am: use PGSQL_CFLAGS and PGSQL_LIBS
* src/backend/postgres/test/Makefile.am: use PGSQL_CFLAGS
2003-01-28 Christian Stimming <stimming@tuhh.de>
* po/it.po: Updated Italian translation by Lorenzo Cappelletti

View File

@@ -390,9 +390,11 @@ AC_ARG_ENABLE( sql,
PGSQL_CFLAGS=`${PG_CONFIG} --includedir`
if test "x$PGSQL_CFLAGS" != x; then
CFLAGS="${CFLAGS} -I${PGSQL_CFLAGS}"
PGSQL_CFLAGS="-I${PGSQL_CFLAGS}"
fi
saved_CPPFLAGS="${CPPFLAGS}"
CPPFLAGS="${CPPFLAGS} ${PGSQL_CFLAGS}"
AC_CHECK_HEADERS(pgsql/libpq-fe.h postgresql/libpq-fe.h libpq-fe.h)
if test "x$ac_cv_header_pgsql_libpq_fe_h$ac_cv_header_postgresql_libpq_fe_h$ac_cv_header_libpq_fe_h" = xnonono; then
AC_MSG_ERROR([Cannot find PostgreSQL headers; won't build sql backend])
@@ -414,16 +416,15 @@ AC_ARG_ENABLE( sql,
done
fi
AS_SCRUB_INCLUDE(CFLAGS)
saved_LIBS="$LIBS"
AS_SCRUB_INCLUDE(PGSQL_CFLAGS)
PGSQL_LIBS=`${PG_CONFIG} --libdir`
if test "x$PGSQL_LIBS" != x; then
LIBS="-L${PGSQL_LIBS} -lpq $LIBS"
else
LIBS="-lpq $LIBS"
PGSQL_LIBS="-L${PGSQL_LIBS}"
fi
saved_LIBS="$LIBS"
LIBS="${PGSQL_LIBS} -lpq $LIBS"
AC_MSG_CHECKING(for libpq)
AC_TRY_LINK(
[
@@ -442,10 +443,13 @@ AC_ARG_ENABLE( sql,
)
LIBS="$saved_LIBS"
fi
CPPFLAGS="$saved_CPPFLAGS"
fi
]
)
AC_SUBST(PGSQL_CFLAGS)
AC_SUBST(PGSQL_LIBS)
AC_SUBST(SQL_DIR)

View File

@@ -4,7 +4,7 @@ pkglib_LTLIBRARIES = libgncmod-backend-postgres.la
libgncmod_backend_postgres_la_LDFLAGS = -module
libgncmod_backend_postgres_la_LIBADD = -lpq \
libgncmod_backend_postgres_la_LIBADD = ${PGSQL_LIBS} -lpq \
${top_builddir}/src/engine/libgncmod-engine.la \
${GLIB_LIBS}
@@ -96,6 +96,7 @@ AM_CFLAGS = \
-I../.. -I${srcdir}/../.. \
-I../../engine -I${srcdir}/../../engine \
-I../../gnc-module -I${srcdir}/../../gnc-module \
${PGSQL_CFLAGS} \
${GLIB_CFLAGS}
$(M4_SRC): table.m4

View File

@@ -39,6 +39,7 @@ AM_CFLAGS = \
-I${top_srcdir}/src/engine/test-core \
-I.. \
-I${srcdir}/.. \
${PGSQL_CFLAGS} \
${GLIB_CFLAGS} \
${GUILE_INCS}