1997-03-23 19:22:36 +00:00
|
|
|
dnl
|
|
|
|
dnl Check for postgres
|
|
|
|
dnl
|
|
|
|
|
|
|
|
AC_DEFUN(AC_CHECK_POSTGRES, [
|
|
|
|
POSTGRESDIR=""
|
|
|
|
pqdir="no"
|
1997-03-29 12:47:29 +00:00
|
|
|
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
|
1997-03-29 12:47:29 +00:00
|
|
|
AC_MSG_CHECKING([for postgres in ${tst_postgresdir}])
|
1997-03-23 19:22:36 +00:00
|
|
|
if test "${tst_postgresdir}" != "" ; then
|
1997-03-31 19:36:52 +00:00
|
|
|
AC_EGREP_HEADER(PGconn,${tst_postgresdir}/include/libpq-fe.h,
|
|
|
|
pqdir=${tst_postgresdir})
|
1997-03-23 19:22:36 +00:00
|
|
|
fi
|
|
|
|
if test "$pqdir" = "no" ; then
|
1997-03-29 12:47:29 +00:00
|
|
|
AC_MSG_RESULT("$pqdir")
|
|
|
|
AC_MSG_CHECKING([for postgres in /lib/postgres95])
|
1997-03-31 19:36:52 +00:00
|
|
|
AC_EGREP_HEADER(PGconn,/lib/postgre95/include/libpq-fe.h,
|
|
|
|
pqdir=/lib/postgres95)
|
1997-03-23 19:22:36 +00:00
|
|
|
fi
|
|
|
|
if test "$pqdir" = "no" ; then
|
1997-03-29 12:47:29 +00:00
|
|
|
AC_MSG_RESULT("$pqdir")
|
|
|
|
AC_MSG_CHECKING([for postgres in /usr/lib/postgres95])
|
1997-03-31 19:36:52 +00:00
|
|
|
AC_EGREP_HEADER(PGconn,/usr/lib/postgre95/include/libpq-fe.h,
|
|
|
|
pqdir=/usr/lib/postgres95)
|
1997-03-23 19:22:36 +00:00
|
|
|
fi
|
|
|
|
if test "$pqdir" = "no" ; then
|
1997-03-29 12:47:29 +00:00
|
|
|
AC_MSG_RESULT("$pqdir")
|
|
|
|
AC_MSG_CHECKING([for postgres in /usr/local/postgres95])
|
1997-03-31 19:36:52 +00:00
|
|
|
AC_EGREP_HEADER(PGconn,/usr/lib/local/postgre95/include/libpq-fe.h,
|
|
|
|
pqdir=/usr/local/postgres95)
|
1997-03-23 19:22:36 +00:00
|
|
|
fi
|
|
|
|
if test "$pqdir" = "no" ; then
|
1997-03-29 12:47:29 +00:00
|
|
|
AC_MSG_RESULT("$pqdir")
|
|
|
|
AC_MSG_CHECKING([for postgres in /usr/local/lib/postgres95])
|
1997-03-31 19:36:52 +00:00
|
|
|
AC_EGREP_HEADER(PGconn,/usr/lib/local/lib/postgre95/include/libpq-fe.h,
|
|
|
|
pqdir=/usr/local/lib/postgres95)
|
1997-03-23 19:22:36 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if test "$pqdir" != "no" ; then
|
1997-03-29 12:47:29 +00:00
|
|
|
AC_MSG_RESULT("yes")
|
1997-03-23 19:22:36 +00:00
|
|
|
POSTGRES=1
|
|
|
|
AC_DEFINE_UNQUOTED(POSTGRES,1)
|
|
|
|
else
|
1997-03-29 12:47:29 +00:00
|
|
|
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)
|
|
|
|
])
|
1997-10-26 23:14:42 +00:00
|
|
|
dnl
|
1998-03-29 23:18:14 +00:00
|
|
|
dnl Check for mysql
|
|
|
|
dnl
|
|
|
|
|
|
|
|
AC_DEFUN(AC_CHECK_MYSQLDB, [
|
|
|
|
MYSQLDIR=""
|
|
|
|
mydir="no"
|
|
|
|
tst_mysqldir="$CONFIG_ISDNLOG_MYSQLDIR"
|
|
|
|
|
|
|
|
AC_ARG_WITH(mysql,
|
|
|
|
[ --with-mysql=DIR Set mysql directory []],
|
|
|
|
tst_mysqldir="${withval}")
|
|
|
|
|
|
|
|
if test "$tst_mysqldir" != "" || test "$CONFIG_ISDNLOG_MYSQLDB" = "y" ; then
|
|
|
|
AC_MSG_CHECKING([for mysql in ${tst_mysqldir}])
|
|
|
|
if test "${tst_mysqldir}" != "" ; then
|
|
|
|
AC_EGREP_HEADER(MYSQL,${tst_mysqldir}/include/mysql.h,
|
|
|
|
mydir=${tst_mysqldir})
|
|
|
|
fi
|
|
|
|
if test "$mydir" = "no" ; then
|
|
|
|
AC_MSG_RESULT("$mydir")
|
|
|
|
AC_MSG_CHECKING([for mysql in /lib/mysql])
|
|
|
|
AC_EGREP_HEADER(MYSQL,/lib/mysql/include/mysql.h,
|
|
|
|
mydir=/lib/mysql)
|
|
|
|
fi
|
|
|
|
if test "$mydir" = "no" ; then
|
|
|
|
AC_MSG_RESULT("$mydir")
|
|
|
|
AC_MSG_CHECKING([for mysql in /usr/lib/mysql])
|
|
|
|
AC_EGREP_HEADER(MYSQL,/usr/lib/mysql/include/mysql.h,
|
|
|
|
mydir=/usr/lib/mysql)
|
|
|
|
fi
|
|
|
|
if test "$mydir" = "no" ; then
|
|
|
|
AC_MSG_RESULT("$mydir")
|
|
|
|
AC_MSG_CHECKING([for mysql in /usr/local/mysql])
|
|
|
|
AC_EGREP_HEADER(MYSQL,/usr/local/postgre95/include/mysql.h,
|
|
|
|
mydir=/usr/local/mysql)
|
|
|
|
fi
|
|
|
|
if test "$mydir" = "no" ; then
|
|
|
|
AC_MSG_RESULT("$mydir")
|
|
|
|
AC_MSG_CHECKING([for mysql in /usr/local/lib/mysql])
|
|
|
|
AC_EGREP_HEADER(MYSQL,/usr/local/lib/mysql/include/mysql.h,
|
|
|
|
mydir=/usr/local/lib/mysql)
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if test "$mydir" != "no" ; then
|
|
|
|
AC_MSG_RESULT("yes")
|
|
|
|
MYSQLDB=1
|
|
|
|
AC_DEFINE_UNQUOTED(MYSQLDB,1)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT("no MYSQL DISABLED")
|
|
|
|
mydir=""
|
|
|
|
fi
|
|
|
|
MYSQLDIR="$mydir"
|
|
|
|
AC_DEFINE_UNQUOTED(MYSQLDIR,"$mydir")
|
|
|
|
AC_SUBST(MYSQLDB)
|
|
|
|
AC_SUBST(MYSQLDIR)
|
|
|
|
])
|
1997-10-26 23:14:42 +00:00
|
|
|
|
1998-10-13 22:37:11 +00:00
|
|
|
sinclude(../etc/ackernel.m4)dnl
|