isdn4k-utils/isdnlog/aclocal.m4

58 lines
1.8 KiB
Plaintext
Raw Normal View History

1997-03-23 19:22:36 +00:00
dnl
dnl Check for postgres
dnl
AC_DEFUN(AC_CHECK_POSTGRES, [
POSTGRESDIR=""
pqdir="no"
tst_postgresdir="$CONFIG_ISDNLOG_POSTGRESDIR"
1997-03-23 19:22:36 +00:00
AC_ARG_WITH(postgres,
[ --with-postgres=DIR Set postgres directory []],
tst_postgresdir="${withval}")
if test "$tst_postgresdir" != "" || test "$CONFIG_ISDNLOG_POSTGRES" = "y" ; then
AC_MSG_CHECKING([for postgres in ${tst_postgresdir}])
1997-03-23 19:22:36 +00:00
if test "${tst_postgresdir}" != "" ; then
CPPFLAGS="-nostdinc -I${tst_postgresdir}/include"
AC_TRY_CPP([#include <libpq-fe.h>], pqdir=${tst_postgresdir})
fi
if test "$pqdir" = "no" ; then
AC_MSG_RESULT("$pqdir")
AC_MSG_CHECKING([for postgres in /lib/postgres95])
1997-03-23 19:22:36 +00:00
CPPFLAGS="-nostdinc -I/lib/postgres95/include"
AC_TRY_CPP([#include <libpq-fe.h>], pqdir=/lib/postgres95)
fi
if test "$pqdir" = "no" ; then
AC_MSG_RESULT("$pqdir")
AC_MSG_CHECKING([for postgres in /usr/lib/postgres95])
1997-03-23 19:22:36 +00:00
CPPFLAGS="-nostdinc -I/usr/lib/postgres95/include"
AC_TRY_CPP([#include <libpq-fe.h>], pqdir=/usr/lib/postgres95)
fi
if test "$pqdir" = "no" ; then
AC_MSG_RESULT("$pqdir")
AC_MSG_CHECKING([for postgres in /usr/local/postgres95])
1997-03-23 19:22:36 +00:00
CPPFLAGS="-nostdinc -I/usr/local/postgres95/include"
AC_TRY_CPP([#include <libpq-fe.h>], pqdir=/usr/local/postgres95)
fi
if test "$pqdir" = "no" ; then
AC_MSG_RESULT("$pqdir")
AC_MSG_CHECKING([for postgres in /usr/local/lib/postgres95])
1997-03-23 19:22:36 +00:00
CPPFLAGS="-nostdinc -I/usr/local/lib/postgres95/include"
AC_TRY_CPP([#include <libpq-fe.h>], pqdir=/usr/local/lib/postgres95)
fi
fi
if test "$pqdir" != "no" ; then
AC_MSG_RESULT("yes")
1997-03-23 19:22:36 +00:00
POSTGRES=1
AC_DEFINE_UNQUOTED(POSTGRES,1)
else
AC_MSG_RESULT("no POSTGRES DISABLED")
1997-03-23 19:22:36 +00:00
pqdir=""
fi
POSTGRESDIR="$pqdir"
AC_DEFINE_UNQUOTED(POSTGRESDIR,"$pqdir")
AC_SUBST(POSTGRES)
AC_SUBST(POSTGRESDIR)
])