diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 186 |
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 @@ | |||
1 | dnl Process this file with autoconf to produce a configure script. | ||
2 | AC_INIT(mod_log_sql.c) | ||
3 | |||
4 | AC_CONFIG_HEADER(config.h:config.in) | ||
5 | |||
6 | dnl OVERRIDABLE DEFAULTS | ||
7 | APDSTDIR="/usr/local/apache" | ||
8 | APSRCDIR="/usr/local/src/apache-1.3.27" | ||
9 | MYSQLHDRDIR="/usr/include/mysql" | ||
10 | MYSQLLIBDIR="/usr/lib" | ||
11 | |||
12 | dnl Check for command line arguments | ||
13 | AC_ARG_WITH( apache, | ||
14 | [ --with-apache=DIR Where to look for Apache's installation], | ||
15 | APDSTDIR=${withval}) | ||
16 | |||
17 | APXSDIR="$APDSTDIR/bin" | ||
18 | APHDRDIR="$APDSTDIR/include" | ||
19 | |||
20 | AC_ARG_WITH( apache-source, | ||
21 | [ --with-apache-source=DIR Where to look for Apache sources [${APSRCDIR}]], | ||
22 | APSRCDIR=${withval}) | ||
23 | |||
24 | AC_ARG_WITH( apache-headers, | ||
25 | [ --with-apache-headers=DIR Where to look for Apache's header files], | ||
26 | APHDRDIR=${withval}) | ||
27 | |||
28 | AC_ARG_WITH( apxs, | ||
29 | [ --with-apxs=DIR Where to look for apxs], | ||
30 | APXSDIR=${withval}) | ||
31 | |||
32 | AC_ARG_WITH( mysql-headers, | ||
33 | [ --with-mysql-headers=DIR Where to look for MySQL headers], | ||
34 | MYSQLHDRDIR=${withval}) | ||
35 | |||
36 | AC_ARG_WITH( mysql-libs, | ||
37 | [ --with-mysql-libs=DIR Where to look for MySQL libraries], | ||
38 | MYSQLLIBDIR=${withval}) | ||
39 | |||
40 | AC_ARG_ENABLE( ssl, | ||
41 | [ --disable-ssl Do not attempt to compile in SSL support], | ||
42 | WITHSSL=0, | ||
43 | WITHSSL=1) | ||
44 | |||
45 | |||
46 | AC_SUBST(APDSTDIR) | ||
47 | AC_SUBST(APSRCDIR) | ||
48 | AC_SUBST(MYSQLHDRDIR) | ||
49 | AC_SUBST(MYSQLLIBDIR) | ||
50 | AC_SUBST(APXSDIR) | ||
51 | AC_SUBST(APHDRDIR) | ||
52 | |||
53 | echo "Using the following locations:" | ||
54 | echo " Apache installed in $APDSTDIR" | ||
55 | echo " Apache source in $APSRCDIR" | ||
56 | echo " Apache headers in $APHDRDIR" | ||
57 | echo " apxs in $APXSDIR" | ||
58 | echo " MySQL headers in $MYSQLHDRDIR" | ||
59 | echo " MySQL libraries in $MYSQLLIBDIR" | ||
60 | |||
61 | |||
62 | AC_CANONICAL_HOST | ||
63 | case "$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 | ;; | ||
88 | esac | ||
89 | |||
90 | |||
91 | |||
92 | dnl ==================================================================== | ||
93 | dnl Checks for programs. | ||
94 | AC_PROG_CC | ||
95 | AC_PROG_INSTALL | ||
96 | AC_PROG_LN_S | ||
97 | AC_PROG_MAKE_SET | ||
98 | AC_PATH_PROG(RM, rm, no, $PATH:/usr/bin:/usr/local/bin) | ||
99 | if test $RM = no; then | ||
100 | AC_MSG_ERROR("rm not found in the PATH") | ||
101 | fi | ||
102 | AC_PATH_PROG(APXS, apxs, no, $APXSDIR) | ||
103 | if test $APXS = no; then | ||
104 | AC_MSG_ERROR("apxs not found. Please specify its location using --with-apxs") | ||
105 | fi | ||
106 | |||
107 | AC_PATH_PROG(LYX,lyx,,$PATH:/usr/local/bin) | ||
108 | AC_PATH_PROG(LATEX,latex,,$PATH:/usr/local/bin) | ||
109 | AC_PATH_PROG(DVIPS,dvips,,$PATH:/usr/local/bin) | ||
110 | AC_PATH_PROG(LINKS,lynx,,$PATH:/usr/local/bin) | ||
111 | AC_PATH_PROG(L2H,latex2html,,$PATH:/usr/local/bin) | ||
112 | |||
113 | AC_SUBST(RM) | ||
114 | AC_SUBST(LYX) | ||
115 | AC_SUBST(LATEX) | ||
116 | AC_SUBST(DVIPS) | ||
117 | AC_SUBST(LINKS) | ||
118 | AC_SUBST(L2H) | ||
119 | |||
120 | dnl ==================================================================== | ||
121 | dnl Checks for libraries. | ||
122 | AC_CHECK_LIB(z, | ||
123 | main, | ||
124 | LIBS="$LIBS -lz", | ||
125 | AC_MSG_ERROR("libz not found. Compilation cannot continue without this library.") ) | ||
126 | AC_CHECK_FUNC( nanosleep, , | ||
127 | AC_CHECK_LIB(rt, | ||
128 | nanosleep, | ||
129 | LIBS="$LIBS -lrt", | ||
130 | AC_MSG_ERROR("nanosleep function not available in librt.") ) ) | ||
131 | AC_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 | |||
136 | dnl ==================================================================== | ||
137 | dnl Checks for header files. | ||
138 | AC_HEADER_STDC | ||
139 | AC_HEADER_TIME | ||
140 | AC_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]) | ||
144 | AC_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]) | ||
148 | if test $WITHSSL = 1; then | ||
149 | AC_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 | ||
155 | else | ||
156 | AC_MSG_WARN("SSL checking/capability disabled by commandline option.") | ||
157 | HAVE_MODSSL=0 | ||
158 | fi | ||
159 | AC_SUBST(HAVE_MODSSL) | ||
160 | |||
161 | dnl ==================================================================== | ||
162 | dnl Checks for typedefs, structures, and compiler characteristics. | ||
163 | AC_C_CONST | ||
164 | AC_STRUCT_TM | ||
165 | |||
166 | dnl ==================================================================== | ||
167 | dnl Checks for library functions. | ||
168 | AC_TYPE_SIGNAL | ||
169 | AC_FUNC_STRFTIME | ||
170 | AC_CHECK_FUNCS(strstr atoi mysql_real_connect mysql_escape_string mysql_real_escape_string, , AC_MSG_ERROR("a necessary function is not available.")) | ||
171 | |||
172 | dnl ==================================================================== | ||
173 | dnl Create the Makefile | ||
174 | AC_OUTPUT(Makefile) | ||
175 | |||
176 | dnl ==================================================================== | ||
177 | dnl Final output | ||
178 | echo | ||
179 | if test $HAVE_MODSSL = 1; then | ||
180 | echo "mod_ssl support has been compiled into this module" | ||
181 | else | ||
182 | echo "no mod_ssl support" | ||
183 | fi | ||
184 | |||
185 | echo | ||
186 | dnl echo $LIBS | ||