~ubuntu-branches/ubuntu/lucid/autoconf-archive/lucid

« back to all changes in this revision

Viewing changes to html/ac_prog_apache.html

  • Committer: Bazaar Package Importer
  • Author(s): Deng Xiyue
  • Date: 2009-05-12 17:30:18 UTC
  • mfrom: (1.1.9 upstream) (3.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090512173018-s7y88nfoxpaauztk
Tags: 20090426-1
* New upstream release.
* Update Standard-Version to 3.8.1:
  + List original Debianizer.
  + Point to versioned license file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
   Autoconf Macro: ac_prog_apache
7
7
  </title>
8
8
  <link rel="stylesheet" type="text/css" href="autoconf-archive.css">
 
9
  <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
9
10
 </head>
10
11
 <body>
11
12
  <table summary="web navigation" style="width:100%;">
12
13
   <tbody>
13
14
    <tr>
14
 
     <td style="width:25%;" align="center" valign="top">
15
 
      <a href="http://autoconf-archive.cryp.to/ac_prog_apache.m4">Download M4
16
 
      Source</a>
 
15
     <td style="width:33%;" align="center" valign="top">
 
16
      <a href="macros-by-category.html">Macros by Category</a>
17
17
     </td>
18
 
     <td style="width:25%;" align="center" valign="top">
 
18
     <td style="width:33%;" align="center" valign="top">
19
19
      <a href=
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
21
21
      History</a>
22
22
     </td>
23
 
     <td style="width:25%;" align="center" valign="top">
24
 
      <a href="macros-by-category.html">Category Index</a>
25
 
     </td>
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">
28
25
       <div>
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">
32
28
       </div>
33
29
      </form>
34
30
     </td>
40
36
   ac_prog_apache
41
37
  </h1>
42
38
  <h2>
43
 
   Synopsis
 
39
   SYNOPSIS
44
40
  </h2>
45
41
  <p class="indent" style="white-space:nowrap;">
46
42
   <code>AC_PROG_APACHE([version])</code>
47
43
  </p>
48
44
  <h2>
49
 
   Description
 
45
   DESCRIPTION
50
46
  </h2>
51
47
  <div class="indent">
52
48
   <p>
90
86
</pre>
91
87
  </div>
92
88
  <h2>
93
 
   Author
94
 
  </h2>
95
 
  <p class="indent">
96
 
   Loic Dachary &lt;loic@senga.org&gt;
97
 
  </p>
98
 
  <h2>
99
 
   Last Modified
100
 
  </h2>
101
 
  <p class="indent">
102
 
   2008-04-12
103
 
  </p>
104
 
  <h2>
105
 
   M4 Source Code
106
 
  </h2>
107
 
  <div class="indent">
108
 
   <pre class="m4source">
109
 
AC_DEFUN([AC_PROG_APACHE],
110
 
#
111
 
# Handle user hints
112
 
#
113
 
[
114
 
 AC_MSG_CHECKING(if apache is wanted)
115
 
 AC_ARG_WITH(apache,
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],
119
 
  [
120
 
    #
121
 
    # Run this if -with or -without was specified
122
 
    #
123
 
    if test "$withval" != no ; then
124
 
       AC_MSG_RESULT(yes)
125
 
       APACHE_WANTED=yes
126
 
       if test "$withval" != yes ; then
127
 
         APACHE="$withval"
128
 
       fi
129
 
    else
130
 
       APACHE_WANTED=no
131
 
       AC_MSG_RESULT(no)
132
 
    fi
133
 
  ], [
134
 
    #
135
 
    # Run this if nothing was said
136
 
    #
137
 
    APACHE_WANTED=yes
138
 
    AC_MSG_RESULT(yes)
139
 
  ])
140
 
  #
141
 
  # Now we know if we want apache or not, only go further if
142
 
  # it's wanted.
143
 
  #
144
 
  if test $APACHE_WANTED = yes ; then
145
 
    #
146
 
    # If not specified by caller, search in standard places
147
 
    #
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)
150
 
    fi
151
 
    AC_SUBST(APACHE)
152
 
    if test -z "$APACHE" ; then
153
 
        AC_MSG_ERROR("apache server executable not found");
154
 
    fi
155
 
    #
156
 
    # Collect apache version number. If for nothing else, this
157
 
    # guaranties that httpd is a working apache executable.
158
 
    #
159
 
    changequote(&lt;&lt;, &gt;&gt;)dnl
160
 
    APACHE_READABLE_VERSION=`$APACHE -v | grep 'Server version' | sed -e 's;.*Apache/\([0-9\.][0-9\.]*\).*;\1;'`
161
 
    changequote([, ])dnl
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");
165
 
    fi
166
 
    APACHE_MAJOR=`expr $APACHE_VERSION : '\(..\)'`
167
 
    APACHE_MINOR=`expr $APACHE_VERSION : '..\(.*\)'`
168
 
    #
169
 
    # Check that apache version matches requested version or above
170
 
    #
171
 
    if test -n "$1" ; then
172
 
      AC_MSG_CHECKING(apache version &gt;= $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
177
 
        AC_MSG_RESULT(no)
178
 
        AC_MSG_ERROR(apache version is $APACHE_READABLE_VERSION)
179
 
      else
180
 
        AC_MSG_RESULT(yes)
181
 
      fi
182
 
    fi
183
 
    #
184
 
    # Find out if .so modules are in libexec/module.so or modules/module.so
185
 
    #
186
 
    HTTP_ROOT=`$APACHE -V | grep HTTPD_ROOT | sed -e 's/.*"\(.*\)"/\1/'`
187
 
    AC_MSG_CHECKING(apache modules)
188
 
    for dir in libexec modules
189
 
    do
190
 
      if test -f $HTTP_ROOT/$dir/mod_env.*
191
 
      then
192
 
        APACHE_MODULES=$dir
193
 
      fi
194
 
    done
195
 
    if test -z "$APACHE_MODULES"
196
 
    then
197
 
      AC_MSG_RESULT(not found)
198
 
    else
199
 
      AC_MSG_RESULT(in $HTTP_ROOT/$APACHE_MODULES)
200
 
    fi
201
 
    AC_SUBST(APACHE_MODULES)
202
 
  fi
203
 
])
204
 
</pre>
205
 
  </div>
206
 
  <h2>
207
 
   License
208
 
  </h2>
209
 
  <div class="indent">
210
 
   <span style="white-space:nowrap;">Copyright &copy; 2008 Loic Dachary
211
 
   &lt;loic@senga.org&gt;</span>
 
89
   SOURCE CODE
 
90
  </h2>
 
91
  <p class="indent">
 
92
   <a href=
 
93
   "http://autoconf-archive.cryp.to/ac_prog_apache.m4">http://autoconf-archive.cryp.to/ac_prog_apache.m4</a>
 
94
  </p>
 
95
  <h2>
 
96
   LICENSE
 
97
  </h2>
 
98
  <div class="indent">
 
99
   <p style="white-space:nowrap;">
 
100
    Copyright &copy; 2008 Loic Dachary &lt;loic@senga.org&gt;
 
101
   </p>
212
102
   <p>
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
237
127
   </p>
238
128
   <p>
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.
243
133
   </p>
244
134
  </div>
245
135
 </body>