summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in186
1 files changed, 0 insertions, 186 deletions
diff --git a/configure.in b/configure.in
deleted file mode 100644
index 1103494..0000000
--- a/configure.in
+++ /dev/null
@@ -1,186 +0,0 @@
1dnl Process this file with autoconf to produce a configure script.
2AC_INIT(mod_log_sql.c)
3
4AC_CONFIG_HEADER(config.h:config.in)
5
6dnl OVERRIDABLE DEFAULTS
7APDSTDIR="/usr/local/apache"
8APSRCDIR="/usr/local/src/apache-1.3.27"
9MYSQLHDRDIR="/usr/include/mysql"
10MYSQLLIBDIR="/usr/lib"
11
12dnl Check for command line arguments
13AC_ARG_WITH( apache,
14 [ --with-apache=DIR Where to look for Apache's installation],
15 APDSTDIR=${withval})
16
17APXSDIR="$APDSTDIR/bin"
18APHDRDIR="$APDSTDIR/include"
19
20AC_ARG_WITH( apache-source,
21 [ --with-apache-source=DIR Where to look for Apache sources [${APSRCDIR}]],
22 APSRCDIR=${withval})
23
24AC_ARG_WITH( apache-headers,
25 [ --with-apache-headers=DIR Where to look for Apache's header files],
26 APHDRDIR=${withval})
27
28AC_ARG_WITH( apxs,
29 [ --with-apxs=DIR Where to look for apxs],
30 APXSDIR=${withval})
31
32AC_ARG_WITH( mysql-headers,
33 [ --with-mysql-headers=DIR Where to look for MySQL headers],
34 MYSQLHDRDIR=${withval})
35
36AC_ARG_WITH( mysql-libs,
37 [ --with-mysql-libs=DIR Where to look for MySQL libraries],
38 MYSQLLIBDIR=${withval})
39
40AC_ARG_ENABLE( ssl,
41 [ --disable-ssl Do not attempt to compile in SSL support],
42 WITHSSL=0,
43 WITHSSL=1)
44
45
46AC_SUBST(APDSTDIR)
47AC_SUBST(APSRCDIR)
48AC_SUBST(MYSQLHDRDIR)
49AC_SUBST(MYSQLLIBDIR)
50AC_SUBST(APXSDIR)
51AC_SUBST(APHDRDIR)
52
53echo "Using the following locations:"
54echo " Apache installed in $APDSTDIR"
55echo " Apache source in $APSRCDIR"
56echo " Apache headers in $APHDRDIR"
57echo " apxs in $APXSDIR"
58echo " MySQL headers in $MYSQLHDRDIR"
59echo " MySQL libraries in $MYSQLLIBDIR"
60
61
62AC_CANONICAL_HOST
63case "$host" in
64 *-linux*)
65 AC_DEFINE(__LINUX)
66 ;;
67 *-netbsd*)
68 AC_DEFINE(__NETBSD)
69 ;;
70 *-openbsd*)
71 AC_DEFINE(__OPENBSD)
72 ;;
73 *-solaris*)
74 AC_DEFINE(__SOLARIS)
75 ;;
76 *-sunos4*)
77 AC_DEFINE(__SUNOS)
78 ;;
79 *-freebsd*)
80 AC_DEFINE(__FREEBSD)
81 ;;
82 *-bsdi*)
83 AC_DEFINE(__BSDI)
84 ;;
85 *-apple-darwin*)
86 AC_DEFINE(__MACOSX)
87 ;;
88esac
89
90
91
92dnl ====================================================================
93dnl Checks for programs.
94AC_PROG_CC
95AC_PROG_INSTALL
96AC_PROG_LN_S
97AC_PROG_MAKE_SET
98AC_PATH_PROG(RM, rm, no, $PATH:/usr/bin:/usr/local/bin)
99if test $RM = no; then
100 AC_MSG_ERROR("rm not found in the PATH")
101fi
102AC_PATH_PROG(APXS, apxs, no, $APXSDIR)
103if test $APXS = no; then
104 AC_MSG_ERROR("apxs not found. Please specify its location using --with-apxs")
105fi
106
107AC_PATH_PROG(LYX,lyx,,$PATH:/usr/local/bin)
108AC_PATH_PROG(LATEX,latex,,$PATH:/usr/local/bin)
109AC_PATH_PROG(DVIPS,dvips,,$PATH:/usr/local/bin)
110AC_PATH_PROG(LINKS,lynx,,$PATH:/usr/local/bin)
111AC_PATH_PROG(L2H,latex2html,,$PATH:/usr/local/bin)
112
113AC_SUBST(RM)
114AC_SUBST(LYX)
115AC_SUBST(LATEX)
116AC_SUBST(DVIPS)
117AC_SUBST(LINKS)
118AC_SUBST(L2H)
119
120dnl ====================================================================
121dnl Checks for libraries.
122AC_CHECK_LIB(z,
123 main,
124 LIBS="$LIBS -lz",
125 AC_MSG_ERROR("libz not found. Compilation cannot continue without this library.") )
126AC_CHECK_FUNC( nanosleep, ,
127 AC_CHECK_LIB(rt,
128 nanosleep,
129 LIBS="$LIBS -lrt",
130 AC_MSG_ERROR("nanosleep function not available in librt.") ) )
131AC_CHECK_LIB( mysqlclient,
132 mysql_init,
133 LIBS="$LIBS -lmysqlclient",
134 AC_MSG_ERROR("libmysqlclient not found. Please specify its location using --with-mysql-libs.") )
135
136dnl ====================================================================
137dnl Checks for header files.
138AC_HEADER_STDC
139AC_HEADER_TIME
140AC_CHECK_HEADERS($APDSTDIR/include/httpd.h $APDSTDIR/include/http_config.h $APDSTDIR/include/http_log.h $APDSTDIR/include/http_core.h,
141 ,
142 [ echo "** A required header cannot be located."
143 echo " Please use the --with-apache option."; echo; exit 1])
144AC_CHECK_HEADERS($MYSQLHDRDIR/mysql.h $MYSQLHDRDIR/mysqld_error.h,
145 ,
146 [ echo "** A required header cannot be located."
147 echo " Please use the --with-mysql-headers option."; echo; exit 1])
148if test $WITHSSL = 1; then
149AC_CHECK_FILES($APSRCDIR/src/modules/ssl/mod_ssl.h,
150 AC_CHECK_HEADER(db1/ndbm.h,HAVE_MODSSL=1,HAVE_MODSSL=0),
151 HAVE_MODSSL=0)
152 if test $HAVE_MODSSL = 0; then
153 AC_MSG_WARN("SSL not enabled. Please use the --with-apache-source option if you want it enabled.")
154 fi
155else
156 AC_MSG_WARN("SSL checking/capability disabled by commandline option.")
157 HAVE_MODSSL=0
158fi
159AC_SUBST(HAVE_MODSSL)
160
161dnl ====================================================================
162dnl Checks for typedefs, structures, and compiler characteristics.
163AC_C_CONST
164AC_STRUCT_TM
165
166dnl ====================================================================
167dnl Checks for library functions.
168AC_TYPE_SIGNAL
169AC_FUNC_STRFTIME
170AC_CHECK_FUNCS(strstr atoi mysql_real_connect mysql_escape_string mysql_real_escape_string, , AC_MSG_ERROR("a necessary function is not available."))
171
172dnl ====================================================================
173dnl Create the Makefile
174AC_OUTPUT(Makefile)
175
176dnl ====================================================================
177dnl Final output
178echo
179if test $HAVE_MODSSL = 1; then
180 echo "mod_ssl support has been compiled into this module"
181else
182 echo "no mod_ssl support"
183fi
184
185echo
186dnl echo $LIBS