summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in41
1 files changed, 36 insertions, 5 deletions
diff --git a/configure.in b/configure.in
index 6fc6add..ebe14cd 100644
--- a/configure.in
+++ b/configure.in
@@ -36,8 +36,8 @@ dnl Nate Nielsen <nielsen@memberwebs.com>
dnl
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(httpauth, 0.4.2, nielsen@memberwebs.com)
-AM_INIT_AUTOMAKE(httpauth, 0.4.2)
+AC_INIT(httpauth, 0.5, nielsen@memberwebs.com)
+AM_INIT_AUTOMAKE(httpauth, 0.5)
LDFLAGS="$LDFLAGS -L/usr/local/lib"
CFLAGS="$CFLAGS -I/usr/local/include -g -O0"
@@ -64,6 +64,8 @@ fi
# Check for the various options
AC_ARG_WITH(ldap, [ --with-ldap with LDAP support])
+AC_ARG_WITH(pgsql, [ --with-pgsql with Postgres support])
+AC_ARG_WITH(ldap, [ --with-mysql with MYSQL support])
AC_ARG_ENABLE(ntlm, [ --enable-ntlm enable NTLM support])
# TODO: Figure out why we need this wierd hack
@@ -95,7 +97,7 @@ AC_CHECK_DECL(PTHREAD_MUTEX_ERRORCHECK_NP, [AC_DEFINE(HAVE_ERR_MUTEX, 1, "Error
AC_CHECK_FUNCS([memset strerror malloc realloc getopt strchr tolower getaddrinfo], ,
[echo "ERROR: Required function missing"; exit 1])
AC_CHECK_FUNCS([strlwr])
-
+
# LDAP support
AM_CONDITIONAL(WITH_LDAP, test -n "$with_ldap")
if test -n "$with_ldap"; then
@@ -104,7 +106,7 @@ if test -n "$with_ldap"; then
if test "$with_ldap" != "yes"; then
LDFLAGS="$LDFLAGS -L$with_ldap/lib"
- CFLAGS="$CFLAGS -L$with_ldap/include"
+ CFLAGS="$CFLAGS -I$with_ldap/include"
fi
AC_CHECK_LIB([ldap], [ldap_init], ,
@@ -122,7 +124,7 @@ if test -n "$with_pgsql"; then
if test "$with_pgsql" != "yes"; then
LDFLAGS="$LDFLAGS -L$with_pgsql/lib"
- CFLAGS="$CFLAGS -L$with_pgsql/include"
+ CFLAGS="$CFLAGS -I$with_pgsql/include"
fi
AC_CHECK_LIB([pq], [PQexec], ,
@@ -132,6 +134,35 @@ if test -n "$with_pgsql"; then
AC_DEFINE_UNQUOTED(WITH_PGSQL, 1, [With PGSQL Support] )
fi
+# MYSQL support
+
+AM_CONDITIONAL(WITH_MYSQL, test -n "$with_mysql")
+if test -n "$with_mysql"; then
+
+ echo "enabling MYSQL support"
+
+ if test "$with_mysql" != "yes"; then
+
+ MYSQL_LIBS="-L$with_mysql/lib -L$with_mysql/lib/mysql -lz"
+ MYSQL_CFLAGS="-I$with_mysql/include -I$with_mysql/include/mysql"
+
+ else
+
+ AC_CHECK_MYSQL
+
+ fi
+
+ # MYSQL really sucks when it comes to all of this
+ LDFLAGS="$LDFLAGS `echo $MYSQL_LIBS | sed -e "s/'//g"`"
+ CFLAGS="$CFLAGS `echo $MYSQL_CFLAGS | sed -e "s/'//g"`"
+
+ AC_CHECK_LIB([mysqlclient], [mysql_init], ,
+ [ echo "ERROR: MYSQL mysqlclient library required."; exit 1] )
+
+ AC_CHECK_HEADERS(mysql.h)
+ AC_DEFINE_UNQUOTED(WITH_MYSQL, 1, [With MYSQL Support] )
+fi
+
# NTLM Support
AM_CONDITIONAL(WITH_NTLM, test -n "$enable_ntlm")
if test -n "$enable_ntlm"; then