6
6
Autoconf Macro: ac_prog_apache
8
8
<link rel="stylesheet" type="text/css" href="autoconf-archive.css">
9
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
11
12
<table summary="web navigation" style="width:100%;">
14
<td style="width:25%;" align="center" valign="top">
15
<a href="http://autoconf-archive.cryp.to/ac_prog_apache.m4">Download M4
15
<td style="width:33%;" align="center" valign="top">
16
<a href="macros-by-category.html">Macros by Category</a>
18
<td style="width:25%;" align="center" valign="top">
18
<td style="width:33%;" align="center" valign="top">
20
"http://git.cryp.to/autoconf-archive?a=history;f=ac_prog_apache.m4">Macro
20
"http://git.cryp.to/autoconf-archive/history/master:/ac_prog_apache.m4">Revision
23
<td style="width:25%;" align="center" valign="top">
24
<a href="macros-by-category.html">Category Index</a>
26
<td style="width:25%;" align="center" valign="top">
23
<td style="width:33%;" align="center" valign="top">
27
24
<form method="get" action="http://www.google.com/search">
29
26
<input name="sitesearch" value="autoconf-archive.cryp.to" type=
30
"hidden"><a href="http://www.google.com/">Search</a>: <input name="q"
31
size="10" maxlength="255" type="text">
27
"hidden">Search: <input name="q" maxlength="255" type="text">
96
Loic Dachary <loic@senga.org>
108
<pre class="m4source">
109
AC_DEFUN([AC_PROG_APACHE],
114
AC_MSG_CHECKING(if apache is wanted)
116
[ --with-apache=PATH absolute path name of apache server (default is to search httpd in
117
/usr/local/apache/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin),
118
--without-apache to disable apache detection],
121
# Run this if -with or -without was specified
123
if test "$withval" != no ; then
126
if test "$withval" != yes ; then
135
# Run this if nothing was said
141
# Now we know if we want apache or not, only go further if
144
if test $APACHE_WANTED = yes ; then
146
# If not specified by caller, search in standard places
148
if test -z "$APACHE" ; then
149
AC_PATH_PROG(APACHE, httpd, , /usr/local/apache/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin)
152
if test -z "$APACHE" ; then
153
AC_MSG_ERROR("apache server executable not found");
156
# Collect apache version number. If for nothing else, this
157
# guaranties that httpd is a working apache executable.
159
changequote(<<, >>)dnl
160
APACHE_READABLE_VERSION=`$APACHE -v | grep 'Server version' | sed -e 's;.*Apache/\([0-9\.][0-9\.]*\).*;\1;'`
162
APACHE_VERSION=`echo $APACHE_READABLE_VERSION | sed -e 's/\.//g'`
163
if test -z "$APACHE_VERSION" ; then
164
AC_MSG_ERROR("could not determine apache version number");
166
APACHE_MAJOR=`expr $APACHE_VERSION : '\(..\)'`
167
APACHE_MINOR=`expr $APACHE_VERSION : '..\(.*\)'`
169
# Check that apache version matches requested version or above
171
if test -n "$1" ; then
172
AC_MSG_CHECKING(apache version >= $1)
173
APACHE_REQUEST=`echo $1 | sed -e 's/\.//g'`
174
APACHE_REQUEST_MAJOR=`expr $APACHE_REQUEST : '\(..\)'`
175
APACHE_REQUEST_MINOR=`expr $APACHE_REQUEST : '..\(.*\)'`
176
if test "$APACHE_MAJOR" -lt "$APACHE_REQUEST_MAJOR" -o "$APACHE_MINOR" -lt "$APACHE_REQUEST_MINOR" ; then
178
AC_MSG_ERROR(apache version is $APACHE_READABLE_VERSION)
184
# Find out if .so modules are in libexec/module.so or modules/module.so
186
HTTP_ROOT=`$APACHE -V | grep HTTPD_ROOT | sed -e 's/.*"\(.*\)"/\1/'`
187
AC_MSG_CHECKING(apache modules)
188
for dir in libexec modules
190
if test -f $HTTP_ROOT/$dir/mod_env.*
195
if test -z "$APACHE_MODULES"
197
AC_MSG_RESULT(not found)
199
AC_MSG_RESULT(in $HTTP_ROOT/$APACHE_MODULES)
201
AC_SUBST(APACHE_MODULES)
210
<span style="white-space:nowrap;">Copyright © 2008 Loic Dachary
211
<loic@senga.org></span>
93
"http://autoconf-archive.cryp.to/ac_prog_apache.m4">http://autoconf-archive.cryp.to/ac_prog_apache.m4</a>
99
<p style="white-space:nowrap;">
100
Copyright © 2008 Loic Dachary <loic@senga.org>
213
103
This program is free software; you can redistribute it and/or modify it
214
104
under the terms of the GNU General Public License as published by the Free
239
129
This special exception to the GPL applies to versions of the Autoconf Macro
240
released by the Autoconf Macro Archive. When you make and distribute a
241
modified version of the Autoconf Macro, you may extend this special
242
exception to the GPL to apply to your modified version as well.
130
released by the Autoconf Archive. When you make and distribute a modified
131
version of the Autoconf Macro, you may extend this special exception to the
132
GPL to apply to your modified version as well.