2 dnl ----------------------------------------------------------
4 echo Configuring mod.auth...
7 AC_REVISION($Revision$)
9 AC_CONFIG_SRCDIR([auth.cc])
10 AM_INIT_AUTOMAKE(auth,1.0)
11 AC_CONFIG_HEADERS(defs_auth.h)
18 dnl Substitute INCLTDL and LIBLTDL in the Makefiles
19 dnl For some reason, INCLTDL and LIBLTDL aren't set
20 dnl properly on OpenBSD
21 LIBLTDL="$srcdir/../libltdl/libltdlc.la"
25 AC_PREFIX_DEFAULT(`pwd`/..)
27 dnl Check for dlopen support
33 CXXFLAGS="-W -Wall -pipe -I$srcdir/../libltdl -I$srcdir/../include"
34 CXXFLAGS="$CXXFLAGS -I$srcdir/../libgnuworld"
42 AC_PROG_MAKE_SET(gmake)
44 dnl ----------------------------------------------------------
46 dnl Checking for headers, functions, and a type declarations
49 AC_CHECK_HEADERS(sys/file.h unistd.h sys/stat.h sys/ioctl.h sys/resource.h )
50 AC_CHECK_HEADERS(sys/time.h asm/ioctls.h xti_inet.h sys/filio.h getopt.h)
51 AC_CHECK_HEADERS(sys/types.h sys/socket.h netinet/in.h sys/un.h pthread.h)
62 AC_HELP_STRING([--without-debug],
63 [Disable debugging in the executables]),
65 [CXXFLAGS="$CXXFLAGS -g"]
69 AC_HELP_STRING([--with-pedantic],
70 [Add -pedantic to compile options]),
71 [CXXFLAGS="$CXXFLAGS -pedantic"]
74 AC_ARG_WITH(optimization,
75 AC_HELP_STRING([--with-optimization],
76 [Optimize the executables]),
77 [CXXFLAGS="$CXXFLAGS -O2"],
78 [CXXFLAGS="$CXXFLAGS -O0"]
82 AC_HELP_STRING([--with-prof],
83 [Generate profiling information]),
84 [CXXFLAGS="$CXXFLAGS -pg"]
89 AC_HELP_STRING([--without-pgsql],
90 [Do not check for pgsql. This will cause \
91 several modules to be uncompilable]),
92 [check_pgsql=$withval]
95 PGSQL_LIB=/usr/local/pgsql/lib
96 AC_ARG_WITH(pgsql-lib,
97 AC_HELP_STRING([--with-pgsql-lib=PGSQLLIBDIR],
98 [Specify location to find libpq++.so, default is \
99 /usr/local/pgsql/lib]),
102 dnl echo PGSQL_LIB: $PGSQL_LIB
104 PGSQL_INCLUDE=/usr/local/pgsql/include
105 AC_ARG_WITH(pgsql-include,
106 AC_HELP_STRING([--with-pgsql-include=PGSQLINCLUDEDIR],
107 [Specify location to find libpq++.h, default is \
108 /usr/local/pgsql/include]),
109 [PGSQL_INCLUDE=$withval]
111 dnl echo PGSQL_INCLUDE: $PGSQL_INCLUDE
113 if [test $check_pgsql = "yes" ]; then
114 AC_MSG_CHECKING(for libpq++.h)
115 if [test -f "$PGSQL_INCLUDE/libpq++.h"]; then
117 elif [test -f "/usr/local/include/libpq++.h"]; then
118 PGSQL_INCLUDE=/usr/local/include
119 elif [test -f "/usr/include/postgresql/libpq++.h"]; then
120 PGSQL_INCLUDE=/usr/include/postgresql
121 elif [test -f "/usr/include/pgsql/libpq++.h"]; then
122 PGSQL_INCLUDE=/usr/include/pgsql
123 elif [test -f "/usr/include/libpq++.h"]; then
124 PGSQL_INCLUDE=/usr/include
126 AC_MSG_ERROR( Unable to find libpq++.h )
131 if [test $check_pgsql = "yes" ]; then
132 AC_MSG_CHECKING(for libpq++.so)
133 if [test -f "$PGSQL_LIB/libpq++.so"]; then
135 elif [test -f "/usr/local/lib/libpq++.so"]; then
136 PGSQL_LIB=/usr/local/lib
137 elif [test -f "/usr/lib/libpq++.so"]; then
139 elif [test -f "/usr/lib/postgresql/libpq++.so"]; then
140 PGSQL_LIB=/usr/lib/postgresql
141 elif [test -f "/usr/lib/pgsql/libpq++.so"]; then
142 PGSQL_LIB=/usr/lib/pgsql
143 elif [test -f "/usr/local/pgsql/lib/libpq++.so"]; then
144 PGSQL_LIB=/usr/local/pgsql/lib
145 elif [test -f "/usr/local/postgresql/lib/libpq++.so"]; then
146 PGSQL_LIB=/usr/local/postgresql/lib
148 AC_MSG_ERROR( Unable to find libpq++.so)
153 dnl echo "PGSQL_INCLUDE: $PGSQL_INCLUDE"
154 dnl echo "PGSQL_LIB: $PGSQL_LIB"
157 LIBGNUWORLD="../libgnuworld/libgnuworld.la"
158 AC_SUBST(LIBGNUWORLD)
163 AC_SUBST(PGSQL_INCLUDE)
166 AC_CONFIG_FILES([Makefile \