From ec5f0f5729a454e203621bbe66ac86028282b636 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 7 Mar 2004 18:56:13 +0000 Subject: add documentation assorted other fixes git-svn-id: file:///home/lennart/svn/public/pgets/trunk@4 768266df-afd4-0310-94a7-d396c829e022 --- configure.ac | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 8d6e9e3..81725e2 100644 --- a/configure.ac +++ b/configure.ac @@ -42,11 +42,36 @@ if test "x$GCC" = "xyes" ; then CFLAGS="$CFLAGS -pipe -Wall" fi -AC_CHECK_LIB([pq], [PQconnectdb]) -AC_CHECK_LIB([sqlite], [sqlite_open]) +# Check for PostgreSQL +AC_ARG_ENABLE(postgres, AS_HELP_STRING(--disable-postgres,Don't build postgres client), +[case "${enableval}" in + yes) postgres=yes ;; + no) postgres=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for --disable-postgres) ;; +esac],[postgres=yes]) + +if test "x$postgres" = "xyes" ; then + AC_CHECK_LIB([pq], [PQconnectdb],,[AC_MSG_ERROR([*** Sorry, you have to install libpq or use --disable-postgres ***])]) + AC_CHECK_HEADER([postgresql/libpq-fe.h],,[AC_MSG_ERROR([*** Sorry, you have to install postgresql-dev or use --disable-postgres ***])]) +fi + + +AM_CONDITIONAL([POSTGRES], [test "x$postgres" = "xyes"]) + +# Check for SQLite +AC_ARG_ENABLE(sqlite, AS_HELP_STRING(--disable-sqlite,Don't build sqlite client), +[case "${enableval}" in + yes) sqlite=yes ;; + no) sqlite=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for --sqlite-postgres);; +esac],[sqlite=yes]) + +if test "x$sqlite" = "xyes" ; then + AC_CHECK_LIB([sqlite], [sqlite_open],,[AC_MSG_ERROR([*** Sorry, you have to install libsqlite or use --disable-sqlite ***])]) + AC_CHECK_HEADER([sqlite.h],,[AC_MSG_ERROR([*** Sorry, you have to install libsqlite-dev or use --disable-sqlite ***])]) +fi -AM_CONDITIONAL([POSTGRES], [true]) -AM_CONDITIONAL([SQLITE], [true]) +AM_CONDITIONAL([SQLITE], [test "x$sqlite" = "xyes"]) # Checks for header files. AC_HEADER_STDC @@ -85,5 +110,5 @@ fi AM_CONDITIONAL([USE_LYNX], [test "x$lynx" = xyes]) -AC_CONFIG_FILES([src/Makefile Makefile]) # conf/Makefile doc/Makefile doc/README.html]) +AC_CONFIG_FILES([src/Makefile Makefile doc/Makefile doc/README.html php/Makefile sql/Makefile]) AC_OUTPUT -- cgit