Merge lp:~racb/ubuntu/quantal/apache2/988819 into lp:ubuntu/quantal/apache2

Proposed by Robie Basak
Status: Rejected
Rejected by: Robie Basak
Proposed branch: lp:~racb/ubuntu/quantal/apache2/988819
Merge into: lp:ubuntu/quantal/apache2
Diff against target: 97692 lines (+586/-96068)
68 files modified
.pc/004_usr_bin_perl_0wnz_j00/docs/cgi-examples/printenv (+0/-13)
.pc/008_make_include_safe/server/config.c (+0/-2190)
.pc/009_apache2_has_dso/support/apxs.in (+0/-768)
.pc/010_fhs_compliance/config.layout (+0/-324)
.pc/010_fhs_compliance/configure (+0/-20482)
.pc/010_fhs_compliance/configure.in (+0/-732)
.pc/010_fhs_compliance/include/ap_config_layout.h.in (+0/-64)
.pc/031_apxs2_sucks_more/support/apxs.in (+0/-769)
.pc/032_suexec_is_shared/os/unix/unixd.c (+0/-775)
.pc/033_dbm_read_hash_or_btree/support/dbmmanage.in (+0/-312)
.pc/034_apxs2_libtool_fixtastic/support/apxs.in (+0/-771)
.pc/038_no_LD_LIBRARY_PATH/support/envvars-std.in (+0/-24)
.pc/045_suexec_log_cloexec/support/suexec.c (+0/-638)
.pc/047_fix_usage_message/server/main.c (+0/-778)
.pc/052_logresolve_linelength/support/logresolve.c (+0/-387)
.pc/057_disablemods/acinclude.m4 (+0/-576)
.pc/057_disablemods/configure (+0/-20482)
.pc/058_suexec-CVE-2007-1742/support/suexec.c (+0/-636)
.pc/067_fix_segfault_in_ab/support/ab.c (+0/-2298)
.pc/071_fix_cacheenable/modules/cache/cache_util.c (+0/-917)
.pc/073_mod_dav_trunk_fixes/modules/dav/fs/lock.c (+0/-1514)
.pc/073_mod_dav_trunk_fixes/modules/dav/fs/repos.c (+0/-2167)
.pc/073_mod_dav_trunk_fixes/modules/dav/main/mod_dav.c (+0/-4869)
.pc/074_link_support_progs_with_lcrypt/configure (+0/-20486)
.pc/074_link_support_progs_with_lcrypt/support/config.m4 (+0/-140)
.pc/075_mod_rewrite_literal_ipv6_redirect/modules/mappers/mod_rewrite.c (+0/-4940)
.pc/076_apxs2_a2enmod/support/apxs.in (+0/-771)
.pc/077_CacheIgnoreURLSessionIdentifiers/modules/cache/cache_storage.c (+0/-558)
.pc/079_polish_translation/docs/error/HTTP_NOT_FOUND.html.var (+0/-444)
.pc/082_ab_num_requests/support/ab.c (+0/-2297)
.pc/201_build_suexec-custom/Makefile.in (+0/-233)
.pc/201_build_suexec-custom/support/Makefile.in (+0/-72)
.pc/applied-patches (+0/-25)
Makefile.in (+1/-1)
acinclude.m4 (+8/-13)
config.guess (+0/-1500)
config.layout (+3/-3)
config.sub (+0/-1608)
configure (+14/-18)
configure.in (+3/-3)
debian/changelog (+44/-2)
debian/config-dir/sites-available/default (+0/-10)
debian/config-dir/sites-available/default-ssl (+0/-9)
debian/control (+2/-3)
debian/gbp.conf (+3/-0)
debian/patches/083_dlopen_search_path (+145/-0)
debian/patches/series (+1/-0)
debian/rules (+5/-5)
docs/cgi-examples/printenv (+1/-1)
docs/error/HTTP_NOT_FOUND.html.var (+1/-1)
include/ap_config_layout.h.in (+0/-1)
modules/cache/cache_storage.c (+17/-49)
modules/cache/cache_util.c (+35/-72)
modules/dav/fs/lock.c (+84/-13)
modules/dav/fs/repos.c (+54/-125)
modules/dav/main/mod_dav.c (+3/-23)
modules/mappers/mod_rewrite.c (+2/-19)
os/unix/unixd.c (+0/-4)
server/config.c (+2/-29)
server/main.c (+1/-3)
support/Makefile.in (+1/-5)
support/ab.c (+3/-5)
support/apxs.in (+121/-51)
support/config.m4 (+2/-2)
support/dbmmanage.in (+3/-5)
support/envvars-std.in (+3/-0)
support/logresolve.c (+12/-10)
support/suexec.c (+12/-23)
To merge this branch: bzr merge lp:~racb/ubuntu/quantal/apache2/988819
Reviewer Review Type Date Requested Status
masum chechra (community) Approve
Chuck Short (community) Approve
Review via email: mp+106934@code.launchpad.net

Description of the change

This is a merge from Debian in order to pick up a fix to bug 988819. I wasn't sure if I was supposed to close the bug in the changelog or not for this kind of case, since the merge would have happened eventually anyway regardless of the bug being there.

To post a comment you must log in.
Revision history for this message
Chuck Short (zulcss) wrote :

Robie,

Can you do this merge through merges.ubuntu.com. I think the bzr branch is a little messed up:

chuck@homer:~/work/server/merges/quantal/apache2/apache2$ bzr bd -S
Building using working tree
Building package in normal mode
Looking for a way to retrieve the upstream tarball
Using pristine-tar to reconstruct apache2_2.2.22.orig.tar.gz.
bzr: ERROR: [Errno 2] No such file or directory: '/home/chuck/work/server/merges/quantal/apache2/apache2/.pc/004_usr_bin_perl_0wnz_j00/docs/cgi-examples/printenv'
chuck@homer:~/work/server/merges/quantal/apache2/apache2$ ls

review: Approve
Revision history for this message
masum chechra (makhipandey7) wrote :

Hey Dear,

i want be a active member of ubuntu etherpad instance

Revision history for this message
masum chechra (makhipandey7) :
review: Approve
Revision history for this message
masum chechra (makhipandey7) :
review: Approve

Unmerged revisions

77. By Robie Basak

  * Merge from Debian testing. Remaining changes:
    - debian/{control, rules}: Enable PIE hardening.
    - debian/{control, rules, apache2.2-common.ufw.profile}: Add ufw profiles.
    - debian/control: Add bzr tag and point it to our tree
    - debian/apache2.py, debian/apache2.2-common.install: Add apport hook.
    - debian/control, debian/ask-for-passphrase, debian/config-dir/mods-available/ssl.conf:
      Plymouth aware passphrase dialog program ask-for-passphrase.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== removed directory '.pc/004_usr_bin_perl_0wnz_j00'
=== removed directory '.pc/004_usr_bin_perl_0wnz_j00/docs'
=== removed directory '.pc/004_usr_bin_perl_0wnz_j00/docs/cgi-examples'
=== removed file '.pc/004_usr_bin_perl_0wnz_j00/docs/cgi-examples/printenv'
--- .pc/004_usr_bin_perl_0wnz_j00/docs/cgi-examples/printenv 2011-12-29 12:09:14 +0000
+++ .pc/004_usr_bin_perl_0wnz_j00/docs/cgi-examples/printenv 1970-01-01 00:00:00 +0000
@@ -1,13 +0,0 @@
1#!/usr/local/bin/perl
2##
3## printenv -- demo CGI program which just prints its environment
4##
5
6print "Content-type: text/plain; charset=iso-8859-1\n\n";
7foreach $var (sort(keys(%ENV))) {
8 $val = $ENV{$var};
9 $val =~ s|\n|\\n|g;
10 $val =~ s|"|\\"|g;
11 print "${var}=\"${val}\"\n";
12}
13
140
=== removed directory '.pc/008_make_include_safe'
=== removed directory '.pc/008_make_include_safe/server'
=== removed file '.pc/008_make_include_safe/server/config.c'
--- .pc/008_make_include_safe/server/config.c 2011-12-29 12:09:14 +0000
+++ .pc/008_make_include_safe/server/config.c 1970-01-01 00:00:00 +0000
@@ -1,2190 +0,0 @@
1/* Licensed to the Apache Software Foundation (ASF) under one or more
2 * contributor license agreements. See the NOTICE file distributed with
3 * this work for additional information regarding copyright ownership.
4 * The ASF licenses this file to You under the Apache License, Version 2.0
5 * (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/*
18 * http_config.c: once was auxillary functions for reading httpd's config
19 * file and converting filenames into a namespace
20 *
21 * Rob McCool
22 *
23 * Wall-to-wall rewrite for Apache... commands which are part of the
24 * server core can now be found next door in "http_core.c". Now contains
25 * general command loop, and functions which do bookkeeping for the new
26 * Apache config stuff (modules and configuration vectors).
27 *
28 * rst
29 *
30 */
31
32#include "apr.h"
33#include "apr_strings.h"
34#include "apr_portable.h"
35#include "apr_file_io.h"
36#include "apr_fnmatch.h"
37
38#define APR_WANT_STDIO
39#define APR_WANT_STRFUNC
40#include "apr_want.h"
41
42#define CORE_PRIVATE
43
44#include "ap_config.h"
45#include "httpd.h"
46#include "http_config.h"
47#include "http_protocol.h"
48#include "http_core.h"
49#include "http_log.h" /* for errors in parse_htaccess */
50#include "http_request.h" /* for default_handler (see invoke_handler) */
51#include "http_main.h"
52#include "http_vhost.h"
53#include "util_cfgtree.h"
54#include "mpm.h"
55
56
57AP_DECLARE_DATA const char *ap_server_argv0 = NULL;
58
59AP_DECLARE_DATA const char *ap_server_root = NULL;
60
61AP_DECLARE_DATA apr_array_header_t *ap_server_pre_read_config = NULL;
62AP_DECLARE_DATA apr_array_header_t *ap_server_post_read_config = NULL;
63AP_DECLARE_DATA apr_array_header_t *ap_server_config_defines = NULL;
64
65AP_DECLARE_DATA ap_directive_t *ap_conftree = NULL;
66
67APR_HOOK_STRUCT(
68 APR_HOOK_LINK(header_parser)
69 APR_HOOK_LINK(pre_config)
70 APR_HOOK_LINK(post_config)
71 APR_HOOK_LINK(open_logs)
72 APR_HOOK_LINK(child_init)
73 APR_HOOK_LINK(handler)
74 APR_HOOK_LINK(quick_handler)
75 APR_HOOK_LINK(optional_fn_retrieve)
76 APR_HOOK_LINK(test_config)
77)
78
79AP_IMPLEMENT_HOOK_RUN_ALL(int, header_parser,
80 (request_rec *r), (r), OK, DECLINED)
81
82AP_IMPLEMENT_HOOK_RUN_ALL(int, pre_config,
83 (apr_pool_t *pconf, apr_pool_t *plog,
84 apr_pool_t *ptemp),
85 (pconf, plog, ptemp), OK, DECLINED)
86
87AP_IMPLEMENT_HOOK_VOID(test_config,
88 (apr_pool_t *pconf, server_rec *s),
89 (pconf, s))
90
91AP_IMPLEMENT_HOOK_RUN_ALL(int, post_config,
92 (apr_pool_t *pconf, apr_pool_t *plog,
93 apr_pool_t *ptemp, server_rec *s),
94 (pconf, plog, ptemp, s), OK, DECLINED)
95
96/* During the course of debugging I expanded this macro out, so
97 * rather than remove all the useful information there is in the
98 * following lines, I'm going to leave it here in case anyone
99 * else finds it useful.
100 *
101 * Ben has looked at it and thinks it correct :)
102 *
103AP_DECLARE(int) ap_hook_post_config(ap_HOOK_post_config_t *pf,
104 const char * const *aszPre,
105 const char * const *aszSucc,
106 int nOrder)
107{
108 ap_LINK_post_config_t *pHook;
109
110 if (!_hooks.link_post_config) {
111 _hooks.link_post_config = apr_array_make(apr_hook_global_pool, 1,
112 sizeof(ap_LINK_post_config_t));
113 apr_hook_sort_register("post_config", &_hooks.link_post_config);
114 }
115
116 pHook = apr_array_push(_hooks.link_post_config);
117 pHook->pFunc = pf;
118 pHook->aszPredecessors = aszPre;
119 pHook->aszSuccessors = aszSucc;
120 pHook->nOrder = nOrder;
121 pHook->szName = apr_hook_debug_current;
122
123 if (apr_hook_debug_enabled)
124 apr_hook_debug_show("post_config", aszPre, aszSucc);
125}
126
127AP_DECLARE(apr_array_header_t *) ap_hook_get_post_config(void) {
128 return _hooks.link_post_config;
129}
130
131AP_DECLARE(int) ap_run_post_config(apr_pool_t *pconf,
132 apr_pool_t *plog,
133 apr_pool_t *ptemp,
134 server_rec *s)
135{
136 ap_LINK_post_config_t *pHook;
137 int n;
138
139 if(!_hooks.link_post_config)
140 return;
141
142 pHook = (ap_LINK_post_config_t *)_hooks.link_post_config->elts;
143 for (n = 0; n < _hooks.link_post_config->nelts; ++n)
144 pHook[n].pFunc (pconf, plog, ptemp, s);
145}
146 */
147
148AP_IMPLEMENT_HOOK_RUN_ALL(int, open_logs,
149 (apr_pool_t *pconf, apr_pool_t *plog,
150 apr_pool_t *ptemp, server_rec *s),
151 (pconf, plog, ptemp, s), OK, DECLINED)
152
153AP_IMPLEMENT_HOOK_VOID(child_init,
154 (apr_pool_t *pchild, server_rec *s),
155 (pchild, s))
156
157AP_IMPLEMENT_HOOK_RUN_FIRST(int, handler, (request_rec *r),
158 (r), DECLINED)
159
160AP_IMPLEMENT_HOOK_RUN_FIRST(int, quick_handler, (request_rec *r, int lookup),
161 (r, lookup), DECLINED)
162
163AP_IMPLEMENT_HOOK_VOID(optional_fn_retrieve, (void), ())
164
165/****************************************************************
166 *
167 * We begin with the functions which deal with the linked list
168 * of modules which control just about all of the server operation.
169 */
170
171/* total_modules is the number of modules that have been linked
172 * into the server.
173 */
174static int total_modules = 0;
175
176/* dynamic_modules is the number of modules that have been added
177 * after the pre-loaded ones have been set up. It shouldn't be larger
178 * than DYNAMIC_MODULE_LIMIT.
179 */
180static int dynamic_modules = 0;
181
182AP_DECLARE_DATA module *ap_top_module = NULL;
183AP_DECLARE_DATA module **ap_loaded_modules=NULL;
184
185static apr_hash_t *ap_config_hash = NULL;
186
187typedef int (*handler_func)(request_rec *);
188typedef void *(*dir_maker_func)(apr_pool_t *, char *);
189typedef void *(*merger_func)(apr_pool_t *, void *, void *);
190
191/* maximum nesting level for config directories */
192#ifndef AP_MAX_INCLUDE_DIR_DEPTH
193#define AP_MAX_INCLUDE_DIR_DEPTH (128)
194#endif
195
196/* Dealing with config vectors. These are associated with per-directory,
197 * per-server, and per-request configuration, and have a void* pointer for
198 * each modules. The nature of the structure pointed to is private to the
199 * module in question... the core doesn't (and can't) know. However, there
200 * are defined interfaces which allow it to create instances of its private
201 * per-directory and per-server structures, and to merge the per-directory
202 * structures of a directory and its subdirectory (producing a new one in
203 * which the defaults applying to the base directory have been properly
204 * overridden).
205 */
206
207static ap_conf_vector_t *create_empty_config(apr_pool_t *p)
208{
209 void *conf_vector = apr_pcalloc(p, sizeof(void *) *
210 (total_modules + DYNAMIC_MODULE_LIMIT));
211 return conf_vector;
212}
213
214static ap_conf_vector_t *create_default_per_dir_config(apr_pool_t *p)
215{
216 void **conf_vector = apr_pcalloc(p, sizeof(void *) *
217 (total_modules + DYNAMIC_MODULE_LIMIT));
218 module *modp;
219
220 for (modp = ap_top_module; modp; modp = modp->next) {
221 dir_maker_func df = modp->create_dir_config;
222
223 if (df)
224 conf_vector[modp->module_index] = (*df)(p, NULL);
225 }
226
227 return (ap_conf_vector_t *)conf_vector;
228}
229
230AP_CORE_DECLARE(ap_conf_vector_t *) ap_merge_per_dir_configs(apr_pool_t *p,
231 ap_conf_vector_t *base,
232 ap_conf_vector_t *new_conf)
233{
234 void **conf_vector = apr_palloc(p, sizeof(void *) * total_modules);
235 void **base_vector = (void **)base;
236 void **new_vector = (void **)new_conf;
237 module *modp;
238
239 for (modp = ap_top_module; modp; modp = modp->next) {
240 int i = modp->module_index;
241
242 if (!new_vector[i]) {
243 conf_vector[i] = base_vector[i];
244 }
245 else {
246 merger_func df = modp->merge_dir_config;
247 if (df && base_vector[i]) {
248 conf_vector[i] = (*df)(p, base_vector[i], new_vector[i]);
249 }
250 else
251 conf_vector[i] = new_vector[i];
252 }
253 }
254
255 return (ap_conf_vector_t *)conf_vector;
256}
257
258static ap_conf_vector_t *create_server_config(apr_pool_t *p, server_rec *s)
259{
260 void **conf_vector = apr_pcalloc(p, sizeof(void *) *
261 (total_modules + DYNAMIC_MODULE_LIMIT));
262 module *modp;
263
264 for (modp = ap_top_module; modp; modp = modp->next) {
265 if (modp->create_server_config)
266 conf_vector[modp->module_index] = (*modp->create_server_config)(p, s);
267 }
268
269 return (ap_conf_vector_t *)conf_vector;
270}
271
272static void merge_server_configs(apr_pool_t *p, ap_conf_vector_t *base,
273 ap_conf_vector_t *virt)
274{
275 /* Can reuse the 'virt' vector for the spine of it, since we don't
276 * have to deal with the moral equivalent of .htaccess files here...
277 */
278
279 void **base_vector = (void **)base;
280 void **virt_vector = (void **)virt;
281 module *modp;
282
283 for (modp = ap_top_module; modp; modp = modp->next) {
284 merger_func df = modp->merge_server_config;
285 int i = modp->module_index;
286
287 if (!virt_vector[i])
288 virt_vector[i] = base_vector[i];
289 else if (df)
290 virt_vector[i] = (*df)(p, base_vector[i], virt_vector[i]);
291 }
292}
293
294AP_CORE_DECLARE(ap_conf_vector_t *) ap_create_request_config(apr_pool_t *p)
295{
296 return create_empty_config(p);
297}
298
299AP_CORE_DECLARE(ap_conf_vector_t *) ap_create_conn_config(apr_pool_t *p)
300{
301 return create_empty_config(p);
302}
303
304AP_CORE_DECLARE(ap_conf_vector_t *) ap_create_per_dir_config(apr_pool_t *p)
305{
306 return create_empty_config(p);
307}
308
309/* Invoke the filter_init_func for all filters with FILTERS where f->r
310 * matches R. Restricting to a matching R avoids re-running init
311 * functions for filters configured for r->main where r is a
312 * subrequest. */
313static int invoke_filter_init(request_rec *r, ap_filter_t *filters)
314{
315 while (filters) {
316 if (filters->frec->filter_init_func && filters->r == r) {
317 int result = filters->frec->filter_init_func(filters);
318 if (result != OK) {
319 return result;
320 }
321 }
322 filters = filters->next;
323 }
324 return OK;
325}
326
327AP_CORE_DECLARE(int) ap_invoke_handler(request_rec *r)
328{
329 const char *handler;
330 const char *p;
331 int result;
332 const char *old_handler = r->handler;
333 const char *ignore;
334
335 /*
336 * The new insert_filter stage makes the most sense here. We only use
337 * it when we are going to run the request, so we must insert filters
338 * if any are available. Since the goal of this phase is to allow all
339 * modules to insert a filter if they want to, this filter returns
340 * void. I just can't see any way that this filter can reasonably
341 * fail, either your modules inserts something or it doesn't. rbb
342 */
343 ap_run_insert_filter(r);
344
345 /* Before continuing, allow each filter that is in the two chains to
346 * run their init function to let them do any magic before we could
347 * start generating data.
348 */
349 result = invoke_filter_init(r, r->input_filters);
350 if (result != OK) {
351 return result;
352 }
353 result = invoke_filter_init(r, r->output_filters);
354 if (result != OK) {
355 return result;
356 }
357
358 if (!r->handler) {
359 handler = r->content_type ? r->content_type : ap_default_type(r);
360 if ((p=ap_strchr_c(handler, ';')) != NULL) {
361 char *new_handler = (char *)apr_pmemdup(r->pool, handler,
362 p - handler + 1);
363 char *p2 = new_handler + (p - handler);
364 handler = new_handler;
365
366 /* MIME type arguments */
367 while (p2 > handler && p2[-1] == ' ')
368 --p2; /* strip trailing spaces */
369
370 *p2='\0';
371 }
372
373 r->handler = handler;
374 }
375
376 result = ap_run_handler(r);
377
378 r->handler = old_handler;
379
380 if (result == DECLINED && r->handler && r->filename) {
381 ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
382 "handler \"%s\" not found for: %s", r->handler, r->filename);
383 }
384 if ((result != OK) && (result != DONE) && (result != DECLINED)
385 && (result != AP_FILTER_ERROR)
386 && !ap_is_HTTP_VALID_RESPONSE(result)) {
387 /* If a module is deliberately returning something else
388 * (request_rec in non-HTTP or proprietary extension?)
389 * let it set a note to allow it explicitly.
390 * Otherwise, a return code that is neither reserved nor HTTP
391 * is a bug, as in PR#31759.
392 */
393 ignore = apr_table_get(r->notes, "HTTP_IGNORE_RANGE");
394 if (!ignore) {
395 ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
396 "Handler for %s returned invalid result code %d",
397 r->handler, result);
398 result = HTTP_INTERNAL_SERVER_ERROR;
399 }
400 }
401
402 return result == DECLINED ? HTTP_INTERNAL_SERVER_ERROR : result;
403}
404
405AP_DECLARE(int) ap_method_is_limited(cmd_parms *cmd, const char *method)
406{
407 int methnum;
408
409 methnum = ap_method_number_of(method);
410
411 /*
412 * A method number either hardcoded into apache or
413 * added by a module and registered.
414 */
415 if (methnum != M_INVALID) {
416 return (cmd->limited & (AP_METHOD_BIT << methnum)) ? 1 : 0;
417 }
418
419 return 0; /* not found */
420}
421
422AP_DECLARE(void) ap_register_hooks(module *m, apr_pool_t *p)
423{
424 if (m->register_hooks) {
425 if (getenv("SHOW_HOOKS")) {
426 printf("Registering hooks for %s\n", m->name);
427 apr_hook_debug_enabled = 1;
428 }
429
430 apr_hook_debug_current = m->name;
431 m->register_hooks(p);
432 }
433}
434
435static void ap_add_module_commands(module *m, apr_pool_t *p);
436
437typedef struct ap_mod_list_struct ap_mod_list;
438struct ap_mod_list_struct {
439 struct ap_mod_list_struct *next;
440 module *m;
441 const command_rec *cmd;
442};
443
444static apr_status_t reload_conf_hash(void *baton)
445{
446 ap_config_hash = NULL;
447 return APR_SUCCESS;
448}
449
450static void rebuild_conf_hash(apr_pool_t *p, int add_prelinked)
451{
452 module **m;
453
454 ap_config_hash = apr_hash_make(p);
455
456 apr_pool_cleanup_register(p, NULL, reload_conf_hash,
457 apr_pool_cleanup_null);
458 if (add_prelinked) {
459 for (m = ap_prelinked_modules; *m != NULL; m++) {
460 ap_add_module_commands(*m, p);
461 }
462 }
463}
464
465static void ap_add_module_commands(module *m, apr_pool_t *p)
466{
467 apr_pool_t *tpool;
468 ap_mod_list *mln;
469 const command_rec *cmd;
470 char *dir;
471
472 cmd = m->cmds;
473
474 if (ap_config_hash == NULL) {
475 rebuild_conf_hash(p, 0);
476 }
477
478 tpool = apr_hash_pool_get(ap_config_hash);
479
480 while (cmd && cmd->name) {
481 mln = apr_palloc(tpool, sizeof(ap_mod_list));
482 mln->cmd = cmd;
483 mln->m = m;
484 dir = apr_pstrdup(tpool, cmd->name);
485
486 ap_str_tolower(dir);
487
488 mln->next = apr_hash_get(ap_config_hash, dir, APR_HASH_KEY_STRING);
489 apr_hash_set(ap_config_hash, dir, APR_HASH_KEY_STRING, mln);
490 ++cmd;
491 }
492}
493
494
495/* One-time setup for precompiled modules --- NOT to be done on restart */
496
497AP_DECLARE(const char *) ap_add_module(module *m, apr_pool_t *p)
498{
499 /* This could be called from a LoadModule httpd.conf command,
500 * after the file has been linked and the module structure within it
501 * teased out...
502 */
503
504 if (m->version != MODULE_MAGIC_NUMBER_MAJOR) {
505 return apr_psprintf(p, "Module \"%s\" is not compatible with this "
506 "version of Apache (found %d, need %d). Please "
507 "contact the vendor for the correct version.",
508 m->name, m->version, MODULE_MAGIC_NUMBER_MAJOR);
509 }
510
511 if (m->next == NULL) {
512 m->next = ap_top_module;
513 ap_top_module = m;
514 }
515
516 if (m->module_index == -1) {
517 m->module_index = total_modules++;
518 dynamic_modules++;
519
520 if (dynamic_modules > DYNAMIC_MODULE_LIMIT) {
521 return apr_psprintf(p, "Module \"%s\" could not be loaded, "
522 "because the dynamic module limit was "
523 "reached. Please increase "
524 "DYNAMIC_MODULE_LIMIT and recompile.", m->name);
525 }
526 }
527
528 /* Some C compilers put a complete path into __FILE__, but we want
529 * only the filename (e.g. mod_includes.c). So check for path
530 * components (Unix and DOS), and remove them.
531 */
532
533 if (ap_strrchr_c(m->name, '/'))
534 m->name = 1 + ap_strrchr_c(m->name, '/');
535
536 if (ap_strrchr_c(m->name, '\\'))
537 m->name = 1 + ap_strrchr_c(m->name, '\\');
538
539#ifdef _OSD_POSIX
540 /* __FILE__ =
541 * "*POSIX(/home/martin/apache/src/modules/standard/mod_info.c)"
542 */
543
544 /* We cannot fix the string in-place, because it's const */
545 if (m->name[strlen(m->name)-1] == ')') {
546 char *tmp = strdup(m->name); /* FIXME: memory leak, albeit a small one */
547 tmp[strlen(tmp)-1] = '\0';
548 m->name = tmp;
549 }
550#endif /*_OSD_POSIX*/
551
552 ap_add_module_commands(m, p);
553 /* FIXME: is this the right place to call this?
554 * It doesn't appear to be
555 */
556 ap_register_hooks(m, p);
557
558 return NULL;
559}
560
561/*
562 * remove_module undoes what add_module did. There are some caveats:
563 * when the module is removed, its slot is lost so all the current
564 * per-dir and per-server configurations are invalid. So we should
565 * only ever call this function when you are invalidating almost
566 * all our current data. I.e. when doing a restart.
567 */
568
569AP_DECLARE(void) ap_remove_module(module *m)
570{
571 module *modp;
572
573 modp = ap_top_module;
574 if (modp == m) {
575 /* We are the top module, special case */
576 ap_top_module = modp->next;
577 m->next = NULL;
578 }
579 else {
580 /* Not the top module, find use. When found modp will
581 * point to the module _before_ us in the list
582 */
583
584 while (modp && modp->next != m) {
585 modp = modp->next;
586 }
587
588 if (!modp) {
589 /* Uh-oh, this module doesn't exist */
590 ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
591 "Cannot remove module %s: not found in module list",
592 m->name);
593 return;
594 }
595
596 /* Eliminate us from the module list */
597 modp->next = modp->next->next;
598 }
599
600 m->module_index = -1; /* simulate being unloaded, should
601 * be unnecessary */
602 dynamic_modules--;
603 total_modules--;
604}
605
606AP_DECLARE(const char *) ap_add_loaded_module(module *mod, apr_pool_t *p)
607{
608 module **m;
609 const char *error;
610
611 /*
612 * Add module pointer to top of chained module list
613 */
614 error = ap_add_module(mod, p);
615 if (error) {
616 return error;
617 }
618
619 /*
620 * And module pointer to list of loaded modules
621 *
622 * Notes: 1. ap_add_module() would already complain if no more space
623 * exists for adding a dynamically loaded module
624 * 2. ap_add_module() accepts double inclusion, so we have
625 * to accept this, too.
626 */
627 for (m = ap_loaded_modules; *m != NULL; m++)
628 ;
629 *m++ = mod;
630 *m = NULL;
631
632 return NULL;
633}
634
635AP_DECLARE(void) ap_remove_loaded_module(module *mod)
636{
637 module **m;
638 module **m2;
639 int done;
640
641 /*
642 * Remove module pointer from chained module list
643 */
644 ap_remove_module(mod);
645
646 /*
647 * Remove module pointer from list of loaded modules
648 *
649 * Note: 1. We cannot determine if the module was successfully
650 * removed by ap_remove_module().
651 * 2. We have not to complain explicity when the module
652 * is not found because ap_remove_module() did it
653 * for us already.
654 */
655 for (m = m2 = ap_loaded_modules, done = 0; *m2 != NULL; m2++) {
656 if (*m2 == mod && done == 0)
657 done = 1;
658 else
659 *m++ = *m2;
660 }
661
662 *m = NULL;
663}
664
665AP_DECLARE(const char *) ap_setup_prelinked_modules(process_rec *process)
666{
667 module **m;
668 module **m2;
669 const char *error;
670
671 apr_hook_global_pool=process->pconf;
672
673 rebuild_conf_hash(process->pconf, 0);
674
675 /*
676 * Initialise total_modules variable and module indices
677 */
678 total_modules = 0;
679 for (m = ap_preloaded_modules; *m != NULL; m++)
680 (*m)->module_index = total_modules++;
681
682 /*
683 * Initialise list of loaded modules
684 */
685 ap_loaded_modules = (module **)apr_palloc(process->pool,
686 sizeof(module *) * (total_modules + DYNAMIC_MODULE_LIMIT + 1));
687
688 if (ap_loaded_modules == NULL) {
689 return "Ouch! Out of memory in ap_setup_prelinked_modules()!";
690 }
691
692 for (m = ap_preloaded_modules, m2 = ap_loaded_modules; *m != NULL; )
693 *m2++ = *m++;
694
695 *m2 = NULL;
696
697 /*
698 * Initialize chain of linked (=activate) modules
699 */
700 for (m = ap_prelinked_modules; *m != NULL; m++) {
701 error = ap_add_module(*m, process->pconf);
702 if (error) {
703 return error;
704 }
705 }
706
707 apr_hook_sort_all();
708
709 return NULL;
710}
711
712AP_DECLARE(const char *) ap_find_module_name(module *m)
713{
714 return m->name;
715}
716
717AP_DECLARE(module *) ap_find_linked_module(const char *name)
718{
719 module *modp;
720
721 for (modp = ap_top_module; modp; modp = modp->next) {
722 if (strcmp(modp->name, name) == 0)
723 return modp;
724 }
725
726 return NULL;
727}
728
729/*****************************************************************
730 *
731 * Resource, access, and .htaccess config files now parsed by a common
732 * command loop.
733 *
734 * Let's begin with the basics; parsing the line and
735 * invoking the function...
736 */
737
738#define AP_MAX_ARGC 64
739
740static const char *invoke_cmd(const command_rec *cmd, cmd_parms *parms,
741 void *mconfig, const char *args)
742{
743 char *w, *w2, *w3;
744 const char *errmsg = NULL;
745
746 if ((parms->override & cmd->req_override) == 0)
747 return apr_pstrcat(parms->pool, cmd->name, " not allowed here", NULL);
748
749 parms->info = cmd->cmd_data;
750 parms->cmd = cmd;
751
752 switch (cmd->args_how) {
753 case RAW_ARGS:
754#ifdef RESOLVE_ENV_PER_TOKEN
755 args = ap_resolve_env(parms->pool,args);
756#endif
757 return cmd->AP_RAW_ARGS(parms, mconfig, args);
758
759 case TAKE_ARGV:
760 {
761 char *argv[AP_MAX_ARGC];
762 int argc = 0;
763
764 do {
765 w = ap_getword_conf(parms->pool, &args);
766 if (*w == '\0' && *args == '\0') {
767 break;
768 }
769 argv[argc] = w;
770 argc++;
771 } while (argc < AP_MAX_ARGC && *args != '\0');
772
773 return cmd->AP_TAKE_ARGV(parms, mconfig, argc, argv);
774 }
775
776 case NO_ARGS:
777 if (*args != 0)
778 return apr_pstrcat(parms->pool, cmd->name, " takes no arguments",
779 NULL);
780
781 return cmd->AP_NO_ARGS(parms, mconfig);
782
783 case TAKE1:
784 w = ap_getword_conf(parms->pool, &args);
785
786 if (*w == '\0' || *args != 0)
787 return apr_pstrcat(parms->pool, cmd->name, " takes one argument",
788 cmd->errmsg ? ", " : NULL, cmd->errmsg, NULL);
789
790 return cmd->AP_TAKE1(parms, mconfig, w);
791
792 case TAKE2:
793 w = ap_getword_conf(parms->pool, &args);
794 w2 = ap_getword_conf(parms->pool, &args);
795
796 if (*w == '\0' || *w2 == '\0' || *args != 0)
797 return apr_pstrcat(parms->pool, cmd->name, " takes two arguments",
798 cmd->errmsg ? ", " : NULL, cmd->errmsg, NULL);
799
800 return cmd->AP_TAKE2(parms, mconfig, w, w2);
801
802 case TAKE12:
803 w = ap_getword_conf(parms->pool, &args);
804 w2 = ap_getword_conf(parms->pool, &args);
805
806 if (*w == '\0' || *args != 0)
807 return apr_pstrcat(parms->pool, cmd->name, " takes 1-2 arguments",
808 cmd->errmsg ? ", " : NULL, cmd->errmsg, NULL);
809
810 return cmd->AP_TAKE2(parms, mconfig, w, *w2 ? w2 : NULL);
811
812 case TAKE3:
813 w = ap_getword_conf(parms->pool, &args);
814 w2 = ap_getword_conf(parms->pool, &args);
815 w3 = ap_getword_conf(parms->pool, &args);
816
817 if (*w == '\0' || *w2 == '\0' || *w3 == '\0' || *args != 0)
818 return apr_pstrcat(parms->pool, cmd->name, " takes three arguments",
819 cmd->errmsg ? ", " : NULL, cmd->errmsg, NULL);
820
821 return cmd->AP_TAKE3(parms, mconfig, w, w2, w3);
822
823 case TAKE23:
824 w = ap_getword_conf(parms->pool, &args);
825 w2 = ap_getword_conf(parms->pool, &args);
826 w3 = *args ? ap_getword_conf(parms->pool, &args) : NULL;
827
828 if (*w == '\0' || *w2 == '\0' || *args != 0)
829 return apr_pstrcat(parms->pool, cmd->name,
830 " takes two or three arguments",
831 cmd->errmsg ? ", " : NULL, cmd->errmsg, NULL);
832
833 return cmd->AP_TAKE3(parms, mconfig, w, w2, w3);
834
835 case TAKE123:
836 w = ap_getword_conf(parms->pool, &args);
837 w2 = *args ? ap_getword_conf(parms->pool, &args) : NULL;
838 w3 = *args ? ap_getword_conf(parms->pool, &args) : NULL;
839
840 if (*w == '\0' || *args != 0)
841 return apr_pstrcat(parms->pool, cmd->name,
842 " takes one, two or three arguments",
843 cmd->errmsg ? ", " : NULL, cmd->errmsg, NULL);
844
845 return cmd->AP_TAKE3(parms, mconfig, w, w2, w3);
846
847 case TAKE13:
848 w = ap_getword_conf(parms->pool, &args);
849 w2 = *args ? ap_getword_conf(parms->pool, &args) : NULL;
850 w3 = *args ? ap_getword_conf(parms->pool, &args) : NULL;
851
852 if (*w == '\0' || (w2 && *w2 && !w3) || *args != 0)
853 return apr_pstrcat(parms->pool, cmd->name,
854 " takes one or three arguments",
855 cmd->errmsg ? ", " : NULL, cmd->errmsg, NULL);
856
857 return cmd->AP_TAKE3(parms, mconfig, w, w2, w3);
858
859 case ITERATE:
860 while (*(w = ap_getword_conf(parms->pool, &args)) != '\0') {
861
862 errmsg = cmd->AP_TAKE1(parms, mconfig, w);
863
864 if (errmsg && strcmp(errmsg, DECLINE_CMD) != 0)
865 return errmsg;
866 }
867
868 return errmsg;
869
870 case ITERATE2:
871 w = ap_getword_conf(parms->pool, &args);
872
873 if (*w == '\0' || *args == 0)
874 return apr_pstrcat(parms->pool, cmd->name,
875 " requires at least two arguments",
876 cmd->errmsg ? ", " : NULL, cmd->errmsg, NULL);
877
878 while (*(w2 = ap_getword_conf(parms->pool, &args)) != '\0') {
879
880 errmsg = cmd->AP_TAKE2(parms, mconfig, w, w2);
881
882 if (errmsg && strcmp(errmsg, DECLINE_CMD) != 0)
883 return errmsg;
884 }
885
886 return errmsg;
887
888 case FLAG:
889 w = ap_getword_conf(parms->pool, &args);
890
891 if (*w == '\0' || (strcasecmp(w, "on") && strcasecmp(w, "off")))
892 return apr_pstrcat(parms->pool, cmd->name, " must be On or Off",
893 NULL);
894
895 return cmd->AP_FLAG(parms, mconfig, strcasecmp(w, "off") != 0);
896
897 default:
898 return apr_pstrcat(parms->pool, cmd->name,
899 " is improperly configured internally (server bug)",
900 NULL);
901 }
902}
903
904AP_CORE_DECLARE(const command_rec *) ap_find_command(const char *name,
905 const command_rec *cmds)
906{
907 while (cmds->name) {
908 if (!strcasecmp(name, cmds->name))
909 return cmds;
910
911 ++cmds;
912 }
913
914 return NULL;
915}
916
917AP_CORE_DECLARE(const command_rec *) ap_find_command_in_modules(
918 const char *cmd_name, module **mod)
919{
920 const command_rec *cmdp;
921 module *modp;
922
923 for (modp = *mod; modp; modp = modp->next) {
924 if (modp->cmds && (cmdp = ap_find_command(cmd_name, modp->cmds))) {
925 *mod = modp;
926 return cmdp;
927 }
928 }
929
930 return NULL;
931}
932
933AP_CORE_DECLARE(void *) ap_set_config_vectors(server_rec *server,
934 ap_conf_vector_t *section_vector,
935 const char *section,
936 module *mod, apr_pool_t *pconf)
937{
938 void *section_config = ap_get_module_config(section_vector, mod);
939 void *server_config = ap_get_module_config(server->module_config, mod);
940
941 if (!section_config && mod->create_dir_config) {
942 /* ### need to fix the create_dir_config functions' prototype... */
943 section_config = (*mod->create_dir_config)(pconf, (char *)section);
944 ap_set_module_config(section_vector, mod, section_config);
945 }
946
947 if (!server_config && mod->create_server_config) {
948 server_config = (*mod->create_server_config)(pconf, server);
949 ap_set_module_config(server->module_config, mod, server_config);
950 }
951
952 return section_config;
953}
954
955static const char *execute_now(char *cmd_line, const char *args,
956 cmd_parms *parms,
957 apr_pool_t *p, apr_pool_t *ptemp,
958 ap_directive_t **sub_tree,
959 ap_directive_t *parent);
960
961static const char *ap_build_config_sub(apr_pool_t *p, apr_pool_t *temp_pool,
962 const char *l, cmd_parms *parms,
963 ap_directive_t **current,
964 ap_directive_t **curr_parent,
965 ap_directive_t **conftree)
966{
967 const char *retval = NULL;
968 const char *args;
969 char *cmd_name;
970 ap_directive_t *newdir;
971 module *mod = ap_top_module;
972 const command_rec *cmd;
973
974 if (*l == '#' || *l == '\0')
975 return NULL;
976
977#if RESOLVE_ENV_PER_TOKEN
978 args = l;
979#else
980 args = ap_resolve_env(temp_pool, l);
981#endif
982
983 cmd_name = ap_getword_conf(p, &args);
984 if (*cmd_name == '\0') {
985 /* Note: this branch should not occur. An empty line should have
986 * triggered the exit further above.
987 */
988 return NULL;
989 }
990
991 if (cmd_name[1] != '/') {
992 char *lastc = cmd_name + strlen(cmd_name) - 1;
993 if (*lastc == '>') {
994 *lastc = '\0' ;
995 }
996 if (cmd_name[0] == '<' && *args == '\0') {
997 args = ">";
998 }
999 }
1000
1001 newdir = apr_pcalloc(p, sizeof(ap_directive_t));
1002 newdir->filename = parms->config_file->name;
1003 newdir->line_num = parms->config_file->line_number;
1004 newdir->directive = cmd_name;
1005 newdir->args = apr_pstrdup(p, args);
1006
1007 if ((cmd = ap_find_command_in_modules(cmd_name, &mod)) != NULL) {
1008 if (cmd->req_override & EXEC_ON_READ) {
1009 ap_directive_t *sub_tree = NULL;
1010
1011 parms->err_directive = newdir;
1012 retval = execute_now(cmd_name, args, parms, p, temp_pool,
1013 &sub_tree, *curr_parent);
1014 if (*current) {
1015 (*current)->next = sub_tree;
1016 }
1017 else {
1018 *current = sub_tree;
1019 if (*curr_parent) {
1020 (*curr_parent)->first_child = (*current);
1021 }
1022 if (*current) {
1023 (*current)->parent = (*curr_parent);
1024 }
1025 }
1026 if (*current) {
1027 if (!*conftree) {
1028 /* Before walking *current to the end of the list,
1029 * set the head to *current.
1030 */
1031 *conftree = *current;
1032 }
1033 while ((*current)->next != NULL) {
1034 (*current) = (*current)->next;
1035 (*current)->parent = (*curr_parent);
1036 }
1037 }
1038 return retval;
1039 }
1040 }
1041
1042 if (cmd_name[0] == '<') {
1043 if (cmd_name[1] != '/') {
1044 (*current) = ap_add_node(curr_parent, *current, newdir, 1);
1045 }
1046 else if (*curr_parent == NULL) {
1047 parms->err_directive = newdir;
1048 return apr_pstrcat(p, cmd_name,
1049 " without matching <", cmd_name + 2,
1050 " section", NULL);
1051 }
1052 else {
1053 char *bracket = cmd_name + strlen(cmd_name) - 1;
1054
1055 if (*bracket != '>') {
1056 parms->err_directive = newdir;
1057 return apr_pstrcat(p, cmd_name,
1058 "> directive missing closing '>'", NULL);
1059 }
1060
1061 *bracket = '\0';
1062
1063 if (strcasecmp(cmd_name + 2,
1064 (*curr_parent)->directive + 1) != 0) {
1065 parms->err_directive = newdir;
1066 return apr_pstrcat(p, "Expected </",
1067 (*curr_parent)->directive + 1, "> but saw ",
1068 cmd_name, ">", NULL);
1069 }
1070
1071 *bracket = '>';
1072
1073 /* done with this section; move up a level */
1074 *current = *curr_parent;
1075 *curr_parent = (*current)->parent;
1076 }
1077 }
1078 else {
1079 *current = ap_add_node(curr_parent, *current, newdir, 0);
1080 }
1081
1082 return retval;
1083}
1084
1085AP_DECLARE(const char *) ap_build_cont_config(apr_pool_t *p,
1086 apr_pool_t *temp_pool,
1087 cmd_parms *parms,
1088 ap_directive_t **current,
1089 ap_directive_t **curr_parent,
1090 char *orig_directive)
1091{
1092 char *l;
1093 char *bracket;
1094 const char *retval;
1095 ap_directive_t *sub_tree = NULL;
1096
1097 /* Since this function can be called recursively, allocate
1098 * the temporary 8k string buffer from the temp_pool rather
1099 * than the stack to avoid over-running a fixed length stack.
1100 */
1101 l = apr_palloc(temp_pool, MAX_STRING_LEN);
1102
1103 bracket = apr_pstrcat(p, orig_directive + 1, ">", NULL);
1104 while (!(ap_cfg_getline(l, MAX_STRING_LEN, parms->config_file))) {
1105 if (!memcmp(l, "</", 2)
1106 && (strcasecmp(l + 2, bracket) == 0)
1107 && (*curr_parent == NULL)) {
1108 break;
1109 }
1110 retval = ap_build_config_sub(p, temp_pool, l, parms, current,
1111 curr_parent, &sub_tree);
1112 if (retval != NULL)
1113 return retval;
1114
1115 if (sub_tree == NULL) {
1116 sub_tree = *curr_parent;
1117 }
1118
1119 if (sub_tree == NULL) {
1120 sub_tree = *current;
1121 }
1122 }
1123
1124 *current = sub_tree;
1125 return NULL;
1126}
1127
1128static const char *ap_walk_config_sub(const ap_directive_t *current,
1129 cmd_parms *parms,
1130 ap_conf_vector_t *section_vector)
1131{
1132 const command_rec *cmd;
1133 ap_mod_list *ml;
1134 char *dir = apr_pstrdup(parms->pool, current->directive);
1135
1136 ap_str_tolower(dir);
1137
1138 ml = apr_hash_get(ap_config_hash, dir, APR_HASH_KEY_STRING);
1139
1140 if (ml == NULL) {
1141 parms->err_directive = current;
1142 return apr_pstrcat(parms->pool, "Invalid command '",
1143 current->directive,
1144 "', perhaps misspelled or defined by a module "
1145 "not included in the server configuration",
1146 NULL);
1147 }
1148
1149 for ( ; ml != NULL; ml = ml->next) {
1150 void *dir_config = ap_set_config_vectors(parms->server,
1151 section_vector,
1152 parms->path,
1153 ml->m,
1154 parms->pool);
1155 const char *retval;
1156 cmd = ml->cmd;
1157
1158 /* Once was enough? */
1159 if (cmd->req_override & EXEC_ON_READ) {
1160 continue;
1161 }
1162
1163 retval = invoke_cmd(cmd, parms, dir_config, current->args);
1164
1165 if (retval != NULL && strcmp(retval, DECLINE_CMD) != 0) {
1166 /* If the directive in error has already been set, don't
1167 * replace it. Otherwise, an error inside a container
1168 * will be reported as occuring on the first line of the
1169 * container.
1170 */
1171 if (!parms->err_directive) {
1172 parms->err_directive = current;
1173 }
1174 return retval;
1175 }
1176 }
1177
1178 return NULL;
1179}
1180
1181AP_DECLARE(const char *) ap_walk_config(ap_directive_t *current,
1182 cmd_parms *parms,
1183 ap_conf_vector_t *section_vector)
1184{
1185 ap_conf_vector_t *oldconfig = parms->context;
1186
1187 parms->context = section_vector;
1188
1189 /* scan through all directives, executing each one */
1190 for (; current != NULL; current = current->next) {
1191 const char *errmsg;
1192
1193 parms->directive = current;
1194
1195 /* actually parse the command and execute the correct function */
1196 errmsg = ap_walk_config_sub(current, parms, section_vector);
1197 if (errmsg != NULL) {
1198 /* restore the context (just in case) */
1199 parms->context = oldconfig;
1200 return errmsg;
1201 }
1202 }
1203
1204 parms->context = oldconfig;
1205 return NULL;
1206}
1207
1208AP_DECLARE(const char *) ap_build_config(cmd_parms *parms,
1209 apr_pool_t *p, apr_pool_t *temp_pool,
1210 ap_directive_t **conftree)
1211{
1212 ap_directive_t *current = *conftree;
1213 ap_directive_t *curr_parent = NULL;
1214 char *l = apr_palloc (temp_pool, MAX_STRING_LEN);
1215 const char *errmsg;
1216
1217 if (current != NULL) {
1218 while (current->next) {
1219 current = current->next;
1220 }
1221 }
1222
1223 while (!(ap_cfg_getline(l, MAX_STRING_LEN, parms->config_file))) {
1224 errmsg = ap_build_config_sub(p, temp_pool, l, parms,
1225 &current, &curr_parent, conftree);
1226 if (errmsg != NULL)
1227 return errmsg;
1228
1229 if (*conftree == NULL && curr_parent != NULL) {
1230 *conftree = curr_parent;
1231 }
1232
1233 if (*conftree == NULL && current != NULL) {
1234 *conftree = current;
1235 }
1236 }
1237
1238 if (curr_parent != NULL) {
1239 errmsg = "";
1240
1241 while (curr_parent != NULL) {
1242 errmsg = apr_psprintf(p, "%s%s%s:%u: %s> was not closed.",
1243 errmsg,
1244 *errmsg == '\0' ? "" : APR_EOL_STR,
1245 curr_parent->filename,
1246 curr_parent->line_num,
1247 curr_parent->directive);
1248
1249 parms->err_directive = curr_parent;
1250 curr_parent = curr_parent->parent;
1251 }
1252
1253 return errmsg;
1254 }
1255
1256 return NULL;
1257}
1258
1259/*
1260 * Generic command functions...
1261 */
1262
1263AP_DECLARE_NONSTD(const char *) ap_set_string_slot(cmd_parms *cmd,
1264 void *struct_ptr,
1265 const char *arg)
1266{
1267 int offset = (int)(long)cmd->info;
1268
1269 *(const char **)((char *)struct_ptr + offset) = arg;
1270
1271 return NULL;
1272}
1273
1274AP_DECLARE_NONSTD(const char *) ap_set_int_slot(cmd_parms *cmd,
1275 void *struct_ptr,
1276 const char *arg)
1277{
1278 char *endptr;
1279 char *error_str = NULL;
1280 int offset = (int)(long)cmd->info;
1281
1282 *(int *)((char*)struct_ptr + offset) = strtol(arg, &endptr, 10);
1283
1284 if ((*arg == '\0') || (*endptr != '\0')) {
1285 error_str = apr_psprintf(cmd->pool,
1286 "Invalid value for directive %s, expected integer",
1287 cmd->directive->directive);
1288 }
1289
1290 return error_str;
1291}
1292
1293AP_DECLARE_NONSTD(const char *) ap_set_string_slot_lower(cmd_parms *cmd,
1294 void *struct_ptr,
1295 const char *arg_)
1296{
1297 char *arg = apr_pstrdup(cmd->pool,arg_);
1298 int offset = (int)(long)cmd->info;
1299
1300 ap_str_tolower(arg);
1301 *(char **)((char *)struct_ptr + offset) = arg;
1302
1303 return NULL;
1304}
1305
1306AP_DECLARE_NONSTD(const char *) ap_set_flag_slot(cmd_parms *cmd,
1307 void *struct_ptr_v, int arg)
1308{
1309 int offset = (int)(long)cmd->info;
1310 char *struct_ptr = (char *)struct_ptr_v;
1311
1312 *(int *)(struct_ptr + offset) = arg ? 1 : 0;
1313
1314 return NULL;
1315}
1316
1317AP_DECLARE_NONSTD(const char *) ap_set_file_slot(cmd_parms *cmd, void *struct_ptr,
1318 const char *arg)
1319{
1320 /* Prepend server_root to relative arg.
1321 * This allows most args to be independent of server_root,
1322 * so the server can be moved or mirrored with less pain.
1323 */
1324 const char *path;
1325 int offset = (int)(long)cmd->info;
1326
1327 path = ap_server_root_relative(cmd->pool, arg);
1328
1329 if (!path) {
1330 return apr_pstrcat(cmd->pool, "Invalid file path ",
1331 arg, NULL);
1332 }
1333
1334 *(const char **) ((char*)struct_ptr + offset) = path;
1335
1336 return NULL;
1337}
1338
1339AP_DECLARE_NONSTD(const char *) ap_set_deprecated(cmd_parms *cmd,
1340 void *struct_ptr,
1341 const char *arg)
1342{
1343 return cmd->cmd->errmsg;
1344}
1345
1346/*****************************************************************
1347 *
1348 * Reading whole config files...
1349 */
1350
1351static cmd_parms default_parms =
1352{NULL, 0, -1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
1353
1354AP_DECLARE(char *) ap_server_root_relative(apr_pool_t *p, const char *file)
1355{
1356 char *newpath = NULL;
1357 apr_status_t rv;
1358 rv = apr_filepath_merge(&newpath, ap_server_root, file,
1359 APR_FILEPATH_TRUENAME, p);
1360 if (newpath && (rv == APR_SUCCESS || APR_STATUS_IS_EPATHWILD(rv)
1361 || APR_STATUS_IS_ENOENT(rv)
1362 || APR_STATUS_IS_ENOTDIR(rv))) {
1363 return newpath;
1364 }
1365 else {
1366 return NULL;
1367 }
1368}
1369
1370AP_DECLARE(const char *) ap_soak_end_container(cmd_parms *cmd, char *directive)
1371{
1372 char l[MAX_STRING_LEN];
1373 const char *args;
1374 char *cmd_name;
1375
1376 while(!(ap_cfg_getline(l, MAX_STRING_LEN, cmd->config_file))) {
1377#if RESOLVE_ENV_PER_TOKEN
1378 args = l;
1379#else
1380 args = ap_resolve_env(cmd->temp_pool, l);
1381#endif
1382
1383 cmd_name = ap_getword_conf(cmd->pool, &args);
1384 if (cmd_name[0] == '<') {
1385 if (cmd_name[1] == '/') {
1386 cmd_name[strlen(cmd_name) - 1] = '\0';
1387
1388 if (strcasecmp(cmd_name + 2, directive + 1) != 0) {
1389 return apr_pstrcat(cmd->pool, "Expected </",
1390 directive + 1, "> but saw ",
1391 cmd_name, ">", NULL);
1392 }
1393
1394 return NULL; /* found end of container */
1395 }
1396 else {
1397 const char *msg;
1398
1399 if (*args == '\0' && cmd_name[strlen(cmd_name) - 1] == '>') {
1400 cmd_name[strlen(cmd_name) - 1] = '\0';
1401 }
1402
1403 if ((msg = ap_soak_end_container(cmd, cmd_name)) != NULL) {
1404 return msg;
1405 }
1406 }
1407 }
1408 }
1409
1410 return apr_pstrcat(cmd->pool, "Expected </",
1411 directive + 1, "> before end of configuration",
1412 NULL);
1413}
1414
1415static const char *execute_now(char *cmd_line, const char *args,
1416 cmd_parms *parms,
1417 apr_pool_t *p, apr_pool_t *ptemp,
1418 ap_directive_t **sub_tree,
1419 ap_directive_t *parent)
1420{
1421 const command_rec *cmd;
1422 ap_mod_list *ml;
1423 char *dir = apr_pstrdup(parms->pool, cmd_line);
1424
1425 ap_str_tolower(dir);
1426
1427 ml = apr_hash_get(ap_config_hash, dir, APR_HASH_KEY_STRING);
1428
1429 if (ml == NULL) {
1430 return apr_pstrcat(parms->pool, "Invalid command '",
1431 cmd_line,
1432 "', perhaps misspelled or defined by a module "
1433 "not included in the server configuration",
1434 NULL);
1435 }
1436
1437 for ( ; ml != NULL; ml = ml->next) {
1438 const char *retval;
1439 cmd = ml->cmd;
1440
1441 retval = invoke_cmd(cmd, parms, sub_tree, args);
1442
1443 if (retval != NULL) {
1444 return retval;
1445 }
1446 }
1447
1448 return NULL;
1449}
1450
1451/* This structure and the following functions are needed for the
1452 * table-based config file reading. They are passed to the
1453 * cfg_open_custom() routine.
1454 */
1455
1456/* Structure to be passed to cfg_open_custom(): it contains an
1457 * index which is incremented from 0 to nelts on each call to
1458 * cfg_getline() (which in turn calls arr_elts_getstr())
1459 * and an apr_array_header_t pointer for the string array.
1460 */
1461typedef struct {
1462 apr_array_header_t *array;
1463 int curr_idx;
1464} arr_elts_param_t;
1465
1466
1467/* arr_elts_getstr() returns the next line from the string array. */
1468static void *arr_elts_getstr(void *buf, size_t bufsiz, void *param)
1469{
1470 arr_elts_param_t *arr_param = (arr_elts_param_t *)param;
1471
1472 /* End of array reached? */
1473 if (++arr_param->curr_idx > arr_param->array->nelts)
1474 return NULL;
1475
1476 /* return the line */
1477 apr_cpystrn(buf,
1478 ((char **)arr_param->array->elts)[arr_param->curr_idx - 1],
1479 bufsiz);
1480
1481 return buf;
1482}
1483
1484
1485/* arr_elts_close(): dummy close routine (makes sure no more lines can be read) */
1486static int arr_elts_close(void *param)
1487{
1488 arr_elts_param_t *arr_param = (arr_elts_param_t *)param;
1489
1490 arr_param->curr_idx = arr_param->array->nelts;
1491
1492 return 0;
1493}
1494
1495static const char *process_command_config(server_rec *s,
1496 apr_array_header_t *arr,
1497 ap_directive_t **conftree,
1498 apr_pool_t *p,
1499 apr_pool_t *ptemp)
1500{
1501 const char *errmsg;
1502 cmd_parms parms;
1503 arr_elts_param_t arr_parms;
1504
1505 arr_parms.curr_idx = 0;
1506 arr_parms.array = arr;
1507
1508 if (ap_config_hash == NULL) {
1509 rebuild_conf_hash(s->process->pconf, 1);
1510 }
1511
1512 parms = default_parms;
1513 parms.pool = p;
1514 parms.temp_pool = ptemp;
1515 parms.server = s;
1516 parms.override = (RSRC_CONF | OR_ALL) & ~(OR_AUTHCFG | OR_LIMIT);
1517 parms.override_opts = OPT_ALL | OPT_SYM_OWNER | OPT_MULTI;
1518
1519 parms.config_file = ap_pcfg_open_custom(p, "-c/-C directives",
1520 &arr_parms, NULL,
1521 arr_elts_getstr, arr_elts_close);
1522
1523 errmsg = ap_build_config(&parms, p, ptemp, conftree);
1524 ap_cfg_closefile(parms.config_file);
1525
1526 if (errmsg) {
1527 return apr_pstrcat(p, "Syntax error in -C/-c directive: ", errmsg,
1528 NULL);
1529 }
1530
1531 return NULL;
1532}
1533
1534typedef struct {
1535 char *fname;
1536} fnames;
1537
1538static int fname_alphasort(const void *fn1, const void *fn2)
1539{
1540 const fnames *f1 = fn1;
1541 const fnames *f2 = fn2;
1542
1543 return strcmp(f1->fname,f2->fname);
1544}
1545
1546static const char *process_resource_config_nofnmatch(server_rec *s,
1547 const char *fname,
1548 ap_directive_t **conftree,
1549 apr_pool_t *p,
1550 apr_pool_t *ptemp,
1551 unsigned depth)
1552{
1553 cmd_parms parms;
1554 ap_configfile_t *cfp;
1555 const char *error;
1556 apr_status_t rv;
1557
1558 if (ap_is_directory(p, fname)) {
1559 apr_dir_t *dirp;
1560 apr_finfo_t dirent;
1561 int current;
1562 apr_array_header_t *candidates = NULL;
1563 fnames *fnew;
1564 char *path = apr_pstrdup(p, fname);
1565
1566 if (++depth > AP_MAX_INCLUDE_DIR_DEPTH) {
1567 return apr_psprintf(p, "Directory %s exceeds the maximum include "
1568 "directory nesting level of %u. You have "
1569 "probably a recursion somewhere.", path,
1570 AP_MAX_INCLUDE_DIR_DEPTH);
1571 }
1572
1573 /*
1574 * first course of business is to grok all the directory
1575 * entries here and store 'em away. Recall we need full pathnames
1576 * for this.
1577 */
1578 rv = apr_dir_open(&dirp, path, p);
1579 if (rv != APR_SUCCESS) {
1580 char errmsg[120];
1581 return apr_psprintf(p, "Could not open config directory %s: %s",
1582 path, apr_strerror(rv, errmsg, sizeof errmsg));
1583 }
1584
1585 candidates = apr_array_make(p, 1, sizeof(fnames));
1586 while (apr_dir_read(&dirent, APR_FINFO_DIRENT, dirp) == APR_SUCCESS) {
1587 /* strip out '.' and '..' */
1588 if (strcmp(dirent.name, ".")
1589 && strcmp(dirent.name, "..")) {
1590 fnew = (fnames *) apr_array_push(candidates);
1591 fnew->fname = ap_make_full_path(p, path, dirent.name);
1592 }
1593 }
1594
1595 apr_dir_close(dirp);
1596 if (candidates->nelts != 0) {
1597 qsort((void *) candidates->elts, candidates->nelts,
1598 sizeof(fnames), fname_alphasort);
1599
1600 /*
1601 * Now recurse these... we handle errors and subdirectories
1602 * via the recursion, which is nice
1603 */
1604 for (current = 0; current < candidates->nelts; ++current) {
1605 fnew = &((fnames *) candidates->elts)[current];
1606 error = process_resource_config_nofnmatch(s, fnew->fname,
1607 conftree, p, ptemp,
1608 depth);
1609 if (error) {
1610 return error;
1611 }
1612 }
1613 }
1614
1615 return NULL;
1616 }
1617
1618 /* GCC's initialization extensions are soooo nice here... */
1619 parms = default_parms;
1620 parms.pool = p;
1621 parms.temp_pool = ptemp;
1622 parms.server = s;
1623 parms.override = (RSRC_CONF | OR_ALL) & ~(OR_AUTHCFG | OR_LIMIT);
1624 parms.override_opts = OPT_ALL | OPT_SYM_OWNER | OPT_MULTI;
1625
1626 rv = ap_pcfg_openfile(&cfp, p, fname);
1627 if (rv != APR_SUCCESS) {
1628 char errmsg[120];
1629 return apr_psprintf(p, "Could not open configuration file %s: %s",
1630 fname, apr_strerror(rv, errmsg, sizeof errmsg));
1631 }
1632
1633 parms.config_file = cfp;
1634 error = ap_build_config(&parms, p, ptemp, conftree);
1635 ap_cfg_closefile(cfp);
1636
1637 if (error) {
1638 return apr_psprintf(p, "Syntax error on line %d of %s: %s",
1639 parms.err_directive->line_num,
1640 parms.err_directive->filename, error);
1641 }
1642
1643 return NULL;
1644}
1645
1646AP_DECLARE(const char *) ap_process_resource_config(server_rec *s,
1647 const char *fname,
1648 ap_directive_t **conftree,
1649 apr_pool_t *p,
1650 apr_pool_t *ptemp)
1651{
1652 /* XXX: lstat() won't work on the wildcard pattern...
1653 */
1654
1655 /* don't require conf/httpd.conf if we have a -C or -c switch */
1656 if ((ap_server_pre_read_config->nelts
1657 || ap_server_post_read_config->nelts)
1658 && !(strcmp(fname, ap_server_root_relative(p, SERVER_CONFIG_FILE)))) {
1659 apr_finfo_t finfo;
1660
1661 if (apr_stat(&finfo, fname, APR_FINFO_LINK | APR_FINFO_TYPE, p) != APR_SUCCESS)
1662 return NULL;
1663 }
1664
1665 if (!apr_fnmatch_test(fname)) {
1666 return process_resource_config_nofnmatch(s, fname, conftree, p, ptemp,
1667 0);
1668 }
1669 else {
1670 apr_dir_t *dirp;
1671 apr_finfo_t dirent;
1672 int current;
1673 apr_array_header_t *candidates = NULL;
1674 fnames *fnew;
1675 apr_status_t rv;
1676 char *path = apr_pstrdup(p, fname), *pattern = NULL;
1677
1678 pattern = ap_strrchr(path, '/');
1679
1680 AP_DEBUG_ASSERT(pattern != NULL); /* path must be absolute. */
1681
1682 *pattern++ = '\0';
1683
1684 if (apr_fnmatch_test(path)) {
1685 return apr_pstrcat(p, "Wildcard patterns not allowed in Include ",
1686 fname, NULL);
1687 }
1688
1689 if (!ap_is_directory(p, path)){
1690 return apr_pstrcat(p, "Include directory '", path, "' not found",
1691 NULL);
1692 }
1693
1694 if (!apr_fnmatch_test(pattern)) {
1695 return apr_pstrcat(p, "Must include a wildcard pattern for "
1696 "Include ", fname, NULL);
1697 }
1698
1699 /*
1700 * first course of business is to grok all the directory
1701 * entries here and store 'em away. Recall we need full pathnames
1702 * for this.
1703 */
1704 rv = apr_dir_open(&dirp, path, p);
1705 if (rv != APR_SUCCESS) {
1706 char errmsg[120];
1707 return apr_psprintf(p, "Could not open config directory %s: %s",
1708 path, apr_strerror(rv, errmsg, sizeof errmsg));
1709 }
1710
1711 candidates = apr_array_make(p, 1, sizeof(fnames));
1712 while (apr_dir_read(&dirent, APR_FINFO_DIRENT, dirp) == APR_SUCCESS) {
1713 /* strip out '.' and '..' */
1714 if (strcmp(dirent.name, ".")
1715 && strcmp(dirent.name, "..")
1716 && (apr_fnmatch(pattern, dirent.name,
1717 APR_FNM_PERIOD) == APR_SUCCESS)) {
1718 fnew = (fnames *) apr_array_push(candidates);
1719 fnew->fname = ap_make_full_path(p, path, dirent.name);
1720 }
1721 }
1722
1723 apr_dir_close(dirp);
1724 if (candidates->nelts != 0) {
1725 const char *error;
1726
1727 qsort((void *) candidates->elts, candidates->nelts,
1728 sizeof(fnames), fname_alphasort);
1729
1730 /*
1731 * Now recurse these... we handle errors and subdirectories
1732 * via the recursion, which is nice
1733 */
1734 for (current = 0; current < candidates->nelts; ++current) {
1735 fnew = &((fnames *) candidates->elts)[current];
1736 error = process_resource_config_nofnmatch(s, fnew->fname,
1737 conftree, p,
1738 ptemp, 0);
1739 if (error) {
1740 return error;
1741 }
1742 }
1743 }
1744 }
1745
1746 return NULL;
1747}
1748
1749AP_DECLARE(int) ap_process_config_tree(server_rec *s,
1750 ap_directive_t *conftree,
1751 apr_pool_t *p,
1752 apr_pool_t *ptemp)
1753{
1754 const char *errmsg;
1755 cmd_parms parms;
1756
1757 parms = default_parms;
1758 parms.pool = p;
1759 parms.temp_pool = ptemp;
1760 parms.server = s;
1761 parms.override = (RSRC_CONF | OR_ALL) & ~(OR_AUTHCFG | OR_LIMIT);
1762 parms.override_opts = OPT_ALL | OPT_SYM_OWNER | OPT_MULTI;
1763 parms.limited = -1;
1764
1765 errmsg = ap_walk_config(conftree, &parms, s->lookup_defaults);
1766 if (errmsg) {
1767 ap_log_perror(APLOG_MARK, APLOG_STARTUP, 0, p,
1768 "Syntax error on line %d of %s:",
1769 parms.err_directive->line_num,
1770 parms.err_directive->filename);
1771 ap_log_perror(APLOG_MARK, APLOG_STARTUP, 0, p,
1772 "%s", errmsg);
1773 return HTTP_INTERNAL_SERVER_ERROR;
1774 }
1775
1776 return OK;
1777}
1778
1779AP_CORE_DECLARE(int) ap_parse_htaccess(ap_conf_vector_t **result,
1780 request_rec *r, int override,
1781 int override_opts,
1782 const char *d, const char *access_name)
1783{
1784 ap_configfile_t *f = NULL;
1785 cmd_parms parms;
1786 char *filename = NULL;
1787 const struct htaccess_result *cache;
1788 struct htaccess_result *new;
1789 ap_conf_vector_t *dc = NULL;
1790 apr_status_t status;
1791
1792 /* firstly, search cache */
1793 for (cache = r->htaccess; cache != NULL; cache = cache->next) {
1794 if (cache->override == override && strcmp(cache->dir, d) == 0) {
1795 *result = cache->htaccess;
1796 return OK;
1797 }
1798 }
1799
1800 parms = default_parms;
1801 parms.override = override;
1802 parms.override_opts = override_opts;
1803 parms.pool = r->pool;
1804 parms.temp_pool = r->pool;
1805 parms.server = r->server;
1806 parms.path = apr_pstrdup(r->pool, d);
1807
1808 /* loop through the access names and find the first one */
1809 while (access_name[0]) {
1810 /* AFAICT; there is no use of the actual 'filename' against
1811 * any canonicalization, so we will simply take the given
1812 * name, ignoring case sensitivity and aliases
1813 */
1814 filename = ap_make_full_path(r->pool, d,
1815 ap_getword_conf(r->pool, &access_name));
1816 status = ap_pcfg_openfile(&f, r->pool, filename);
1817
1818 if (status == APR_SUCCESS) {
1819 const char *errmsg;
1820 ap_directive_t *temptree = NULL;
1821
1822 dc = ap_create_per_dir_config(r->pool);
1823
1824 parms.config_file = f;
1825 errmsg = ap_build_config(&parms, r->pool, r->pool, &temptree);
1826 if (errmsg == NULL)
1827 errmsg = ap_walk_config(temptree, &parms, dc);
1828
1829 ap_cfg_closefile(f);
1830
1831 if (errmsg) {
1832 ap_log_rerror(APLOG_MARK, APLOG_ALERT, 0, r,
1833 "%s: %s", filename, errmsg);
1834 return HTTP_INTERNAL_SERVER_ERROR;
1835 }
1836
1837 *result = dc;
1838 break;
1839 }
1840 else {
1841 if (!APR_STATUS_IS_ENOENT(status)
1842 && !APR_STATUS_IS_ENOTDIR(status)) {
1843 ap_log_rerror(APLOG_MARK, APLOG_CRIT, status, r,
1844 "%s pcfg_openfile: unable to check htaccess file, "
1845 "ensure it is readable",
1846 filename);
1847 apr_table_setn(r->notes, "error-notes",
1848 "Server unable to read htaccess file, denying "
1849 "access to be safe");
1850 return HTTP_FORBIDDEN;
1851 }
1852 }
1853 }
1854
1855 /* cache it */
1856 new = apr_palloc(r->pool, sizeof(struct htaccess_result));
1857 new->dir = parms.path;
1858 new->override = override;
1859 new->override_opts = override_opts;
1860 new->htaccess = dc;
1861
1862 /* add to head of list */
1863 new->next = r->htaccess;
1864 r->htaccess = new;
1865
1866 return OK;
1867}
1868
1869AP_CORE_DECLARE(const char *) ap_init_virtual_host(apr_pool_t *p,
1870 const char *hostname,
1871 server_rec *main_server,
1872 server_rec **ps)
1873{
1874 server_rec *s = (server_rec *) apr_pcalloc(p, sizeof(server_rec));
1875
1876 /* TODO: this crap belongs in http_core */
1877 s->process = main_server->process;
1878 s->server_admin = NULL;
1879 s->server_hostname = NULL;
1880 s->server_scheme = NULL;
1881 s->error_fname = NULL;
1882 s->timeout = 0;
1883 s->keep_alive_timeout = 0;
1884 s->keep_alive = -1;
1885 s->keep_alive_max = -1;
1886 s->error_log = main_server->error_log;
1887 s->loglevel = main_server->loglevel;
1888 /* useful default, otherwise we get a port of 0 on redirects */
1889 s->port = main_server->port;
1890 s->next = NULL;
1891
1892 s->is_virtual = 1;
1893 s->names = apr_array_make(p, 4, sizeof(char **));
1894 s->wild_names = apr_array_make(p, 4, sizeof(char **));
1895
1896 s->module_config = create_empty_config(p);
1897 s->lookup_defaults = ap_create_per_dir_config(p);
1898
1899 s->limit_req_line = main_server->limit_req_line;
1900 s->limit_req_fieldsize = main_server->limit_req_fieldsize;
1901 s->limit_req_fields = main_server->limit_req_fields;
1902
1903 *ps = s;
1904
1905 return ap_parse_vhost_addrs(p, hostname, s);
1906}
1907
1908
1909AP_DECLARE(void) ap_fixup_virtual_hosts(apr_pool_t *p, server_rec *main_server)
1910{
1911 server_rec *virt;
1912
1913 for (virt = main_server->next; virt; virt = virt->next) {
1914 merge_server_configs(p, main_server->module_config,
1915 virt->module_config);
1916
1917 virt->lookup_defaults =
1918 ap_merge_per_dir_configs(p, main_server->lookup_defaults,
1919 virt->lookup_defaults);
1920
1921 if (virt->server_admin == NULL)
1922 virt->server_admin = main_server->server_admin;
1923
1924 if (virt->timeout == 0)
1925 virt->timeout = main_server->timeout;
1926
1927 if (virt->keep_alive_timeout == 0)
1928 virt->keep_alive_timeout = main_server->keep_alive_timeout;
1929
1930 if (virt->keep_alive == -1)
1931 virt->keep_alive = main_server->keep_alive;
1932
1933 if (virt->keep_alive_max == -1)
1934 virt->keep_alive_max = main_server->keep_alive_max;
1935
1936 /* XXX: this is really something that should be dealt with by a
1937 * post-config api phase
1938 */
1939 ap_core_reorder_directories(p, virt);
1940 }
1941
1942 ap_core_reorder_directories(p, main_server);
1943}
1944
1945/*****************************************************************
1946 *
1947 * Getting *everything* configured...
1948 */
1949
1950static void init_config_globals(apr_pool_t *p)
1951{
1952 /* Global virtual host hash bucket pointers. Init to null. */
1953 ap_init_vhost_config(p);
1954}
1955
1956static server_rec *init_server_config(process_rec *process, apr_pool_t *p)
1957{
1958 apr_status_t rv;
1959 server_rec *s = (server_rec *) apr_pcalloc(p, sizeof(server_rec));
1960
1961 apr_file_open_stderr(&s->error_log, p);
1962 s->process = process;
1963 s->port = 0;
1964 s->server_admin = DEFAULT_ADMIN;
1965 s->server_hostname = NULL;
1966 s->server_scheme = NULL;
1967 s->error_fname = DEFAULT_ERRORLOG;
1968 s->loglevel = DEFAULT_LOGLEVEL;
1969 s->limit_req_line = DEFAULT_LIMIT_REQUEST_LINE;
1970 s->limit_req_fieldsize = DEFAULT_LIMIT_REQUEST_FIELDSIZE;
1971 s->limit_req_fields = DEFAULT_LIMIT_REQUEST_FIELDS;
1972 s->timeout = apr_time_from_sec(DEFAULT_TIMEOUT);
1973 s->keep_alive_timeout = apr_time_from_sec(DEFAULT_KEEPALIVE_TIMEOUT);
1974 s->keep_alive_max = DEFAULT_KEEPALIVE;
1975 s->keep_alive = 1;
1976 s->next = NULL;
1977 s->addrs = apr_pcalloc(p, sizeof(server_addr_rec));
1978
1979 /* NOT virtual host; don't match any real network interface */
1980 rv = apr_sockaddr_info_get(&s->addrs->host_addr,
1981 NULL, APR_INET, 0, 0, p);
1982 ap_assert(rv == APR_SUCCESS); /* otherwise: bug or no storage */
1983
1984 s->addrs->host_port = 0; /* matches any port */
1985 s->addrs->virthost = ""; /* must be non-NULL */
1986 s->names = s->wild_names = NULL;
1987
1988 s->module_config = create_server_config(p, s);
1989 s->lookup_defaults = create_default_per_dir_config(p);
1990
1991 return s;
1992}
1993
1994
1995AP_DECLARE(server_rec*) ap_read_config(process_rec *process, apr_pool_t *ptemp,
1996 const char *filename,
1997 ap_directive_t **conftree)
1998{
1999 const char *confname, *error;
2000 apr_pool_t *p = process->pconf;
2001 server_rec *s = init_server_config(process, p);
2002
2003 init_config_globals(p);
2004
2005 /* All server-wide config files now have the SAME syntax... */
2006 error = process_command_config(s, ap_server_pre_read_config, conftree,
2007 p, ptemp);
2008 if (error) {
2009 ap_log_error(APLOG_MARK, APLOG_STARTUP|APLOG_CRIT, 0, NULL, "%s: %s",
2010 ap_server_argv0, error);
2011 return NULL;
2012 }
2013
2014 /* process_command_config may change the ServerRoot so
2015 * compute this config file name afterwards.
2016 */
2017 confname = ap_server_root_relative(p, filename);
2018
2019 if (!confname) {
2020 ap_log_error(APLOG_MARK, APLOG_STARTUP|APLOG_CRIT,
2021 APR_EBADPATH, NULL, "Invalid config file path %s",
2022 filename);
2023 return NULL;
2024 }
2025
2026 error = ap_process_resource_config(s, confname, conftree, p, ptemp);
2027 if (error) {
2028 ap_log_error(APLOG_MARK, APLOG_STARTUP|APLOG_CRIT, 0, NULL,
2029 "%s: %s", ap_server_argv0, error);
2030 return NULL;
2031 }
2032
2033 error = process_command_config(s, ap_server_post_read_config, conftree,
2034 p, ptemp);
2035
2036 if (error) {
2037 ap_log_error(APLOG_MARK, APLOG_STARTUP|APLOG_CRIT, 0, NULL, "%s: %s",
2038 ap_server_argv0, error);
2039 return NULL;
2040 }
2041
2042 return s;
2043}
2044
2045AP_DECLARE(void) ap_single_module_configure(apr_pool_t *p, server_rec *s,
2046 module *m)
2047{
2048 if (m->create_server_config)
2049 ap_set_module_config(s->module_config, m,
2050 (*m->create_server_config)(p, s));
2051
2052 if (m->create_dir_config)
2053 ap_set_module_config(s->lookup_defaults, m,
2054 (*m->create_dir_config)(p, NULL));
2055}
2056
2057AP_DECLARE(void) ap_run_rewrite_args(process_rec *process)
2058{
2059 module *m;
2060
2061 for (m = ap_top_module; m; m = m->next) {
2062 if (m->rewrite_args) {
2063 (*m->rewrite_args)(process);
2064 }
2065 }
2066}
2067
2068/********************************************************************
2069 * Configuration directives are restricted in terms of where they may
2070 * appear in the main configuration files and/or .htaccess files according
2071 * to the bitmask req_override in the command_rec structure.
2072 * If any of the overrides set in req_override are also allowed in the
2073 * context in which the command is read, then the command is allowed.
2074 * The context is determined as follows:
2075 *
2076 * inside *.conf --> override = (RSRC_CONF|OR_ALL)&~(OR_AUTHCFG|OR_LIMIT);
2077 * within <Directory> or <Location> --> override = OR_ALL|ACCESS_CONF;
2078 * within .htaccess --> override = AllowOverride for current directory;
2079 *
2080 * the result is, well, a rather confusing set of possibilities for when
2081 * a particular directive is allowed to be used. This procedure prints
2082 * in English where the given (pc) directive can be used.
2083 */
2084static void show_overrides(const command_rec *pc, module *pm)
2085{
2086 int n = 0;
2087
2088 printf("\tAllowed in *.conf ");
2089 if ((pc->req_override & (OR_OPTIONS | OR_FILEINFO | OR_INDEXES))
2090 || ((pc->req_override & RSRC_CONF)
2091 && ((pc->req_override & (ACCESS_CONF | OR_AUTHCFG | OR_LIMIT))))) {
2092 printf("anywhere");
2093 }
2094 else if (pc->req_override & RSRC_CONF) {
2095 printf("only outside <Directory>, <Files> or <Location>");
2096 }
2097 else {
2098 printf("only inside <Directory>, <Files> or <Location>");
2099 }
2100
2101 /* Warn if the directive is allowed inside <Directory> or .htaccess
2102 * but module doesn't support per-dir configuration
2103 */
2104 if ((pc->req_override & (OR_ALL | ACCESS_CONF)) && !pm->create_dir_config)
2105 printf(" [no per-dir config]");
2106
2107 if (pc->req_override & OR_ALL) {
2108 printf(" and in .htaccess\n\twhen AllowOverride");
2109
2110 if ((pc->req_override & OR_ALL) == OR_ALL) {
2111 printf(" isn't None");
2112 }
2113 else {
2114 printf(" includes ");
2115
2116 if (pc->req_override & OR_AUTHCFG) {
2117 if (n++)
2118 printf(" or ");
2119
2120 printf("AuthConfig");
2121 }
2122
2123 if (pc->req_override & OR_LIMIT) {
2124 if (n++)
2125 printf(" or ");
2126
2127 printf("Limit");
2128 }
2129
2130 if (pc->req_override & OR_OPTIONS) {
2131 if (n++)
2132 printf(" or ");
2133
2134 printf("Options");
2135 }
2136
2137 if (pc->req_override & OR_FILEINFO) {
2138 if (n++)
2139 printf(" or ");
2140
2141 printf("FileInfo");
2142 }
2143
2144 if (pc->req_override & OR_INDEXES) {
2145 if (n++)
2146 printf(" or ");
2147
2148 printf("Indexes");
2149 }
2150 }
2151 }
2152
2153 printf("\n");
2154}
2155
2156/* Show the preloaded configuration directives, the help string explaining
2157 * the directive arguments, in what module they are handled, and in
2158 * what parts of the configuration they are allowed. Used for httpd -L.
2159 */
2160AP_DECLARE(void) ap_show_directives(void)
2161{
2162 const command_rec *pc;
2163 int n;
2164
2165 for (n = 0; ap_loaded_modules[n]; ++n) {
2166 for (pc = ap_loaded_modules[n]->cmds; pc && pc->name; ++pc) {
2167 printf("%s (%s)\n", pc->name, ap_loaded_modules[n]->name);
2168
2169 if (pc->errmsg)
2170 printf("\t%s\n", pc->errmsg);
2171
2172 show_overrides(pc, ap_loaded_modules[n]);
2173 }
2174 }
2175}
2176
2177/* Show the preloaded module names. Used for httpd -l. */
2178AP_DECLARE(void) ap_show_modules(void)
2179{
2180 int n;
2181
2182 printf("Compiled in modules:\n");
2183 for (n = 0; ap_loaded_modules[n]; ++n)
2184 printf(" %s\n", ap_loaded_modules[n]->name);
2185}
2186
2187AP_DECLARE(const char *) ap_show_mpm(void)
2188{
2189 return MPM_NAME;
2190}
21910
=== removed directory '.pc/009_apache2_has_dso'
=== removed directory '.pc/009_apache2_has_dso/support'
=== removed file '.pc/009_apache2_has_dso/support/apxs.in'
--- .pc/009_apache2_has_dso/support/apxs.in 2011-12-29 12:09:14 +0000
+++ .pc/009_apache2_has_dso/support/apxs.in 1970-01-01 00:00:00 +0000
@@ -1,768 +0,0 @@
1#!@perlbin@ -w
2#
3# Licensed to the Apache Software Foundation (ASF) under one or more
4# contributor license agreements. See the NOTICE file distributed with
5# this work for additional information regarding copyright ownership.
6# The ASF licenses this file to You under the Apache License, Version 2.0
7# (the "License"); you may not use this file except in compliance with
8# the License. You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
17
18require 5.004;
19use strict;
20package apxs;
21
22##
23## Configuration
24##
25
26my %config_vars = ();
27
28my $installbuilddir = "@exp_installbuilddir@";
29get_config_vars("$installbuilddir/config_vars.mk",\%config_vars);
30
31# read the configuration variables once
32
33my $prefix = get_vars("prefix");
34my $CFG_PREFIX = $prefix;
35my $exec_prefix = get_vars("exec_prefix");
36my $datadir = get_vars("datadir");
37my $localstatedir = get_vars("localstatedir");
38my $CFG_TARGET = get_vars("progname");
39my $CFG_SYSCONFDIR = get_vars("sysconfdir");
40my $CFG_CFLAGS = join ' ', map { get_vars($_) }
41 qw(SHLTCFLAGS CFLAGS NOTEST_CPPFLAGS EXTRA_CPPFLAGS EXTRA_CFLAGS);
42my $includedir = get_vars("includedir");
43my $CFG_INCLUDEDIR = eval qq("$includedir");
44my $CFG_CC = get_vars("CC");
45my $libexecdir = get_vars("libexecdir");
46my $CFG_LIBEXECDIR = eval qq("$libexecdir");
47my $sbindir = get_vars("sbindir");
48my $CFG_SBINDIR = eval qq("$sbindir");
49my $ltflags = $ENV{'LTFLAGS'};
50$ltflags or $ltflags = "--silent";
51
52my %internal_vars = map {$_ => 1}
53 qw(TARGET CC CFLAGS CFLAGS_SHLIB LD_SHLIB LDFLAGS_SHLIB LIBS_SHLIB
54 PREFIX SBINDIR INCLUDEDIR LIBEXECDIR SYSCONFDIR);
55
56##
57## parse argument line
58##
59
60# defaults for parameters
61my $opt_n = '';
62my $opt_g = '';
63my $opt_c = 0;
64my $opt_o = '';
65my @opt_D = ();
66my @opt_I = ();
67my @opt_L = ();
68my @opt_l = ();
69my @opt_W = ();
70my @opt_S = ();
71my $opt_e = 0;
72my $opt_i = 0;
73my $opt_a = 0;
74my $opt_A = 0;
75my $opt_q = 0;
76my $opt_h = 0;
77my $opt_p = 0;
78
79# this subroutine is derived from Perl's getopts.pl with the enhancement of
80# the "+" metacharacter at the format string to allow a list to be built by
81# subsequent occurrences of the same option.
82sub Getopts {
83 my ($argumentative, @ARGV) = @_;
84 my $errs = 0;
85 local $_;
86
87 my @args = split / */, $argumentative;
88 while (@ARGV && ($_ = $ARGV[0]) =~ /^-(.)(.*)/) {
89 my ($first, $rest) = ($1,$2);
90 if ($_ =~ m|^--$|) {
91 shift @ARGV;
92 last;
93 }
94 my $pos = index($argumentative,$first);
95 if ($pos >= 0) {
96 if ($pos < $#args && $args[$pos+1] eq ':') {
97 shift @ARGV;
98 if ($rest eq '') {
99 unless (@ARGV) {
100 error("Incomplete option: $first (needs an argument)");
101 $errs++;
102 }
103 $rest = shift(@ARGV);
104 }
105 eval "\$opt_$first = \$rest;";
106 }
107 elsif ($pos < $#args && $args[$pos+1] eq '+') {
108 shift @ARGV;
109 if ($rest eq '') {
110 unless (@ARGV) {
111 error("Incomplete option: $first (needs an argument)");
112 $errs++;
113 }
114 $rest = shift(@ARGV);
115 }
116 eval "push(\@opt_$first, \$rest);";
117 }
118 else {
119 eval "\$opt_$first = 1";
120 if ($rest eq '') {
121 shift(@ARGV);
122 }
123 else {
124 $ARGV[0] = "-$rest";
125 }
126 }
127 }
128 else {
129 error("Unknown option: $first");
130 $errs++;
131 if ($rest ne '') {
132 $ARGV[0] = "-$rest";
133 }
134 else {
135 shift(@ARGV);
136 }
137 }
138 }
139 return ($errs == 0, @ARGV);
140}
141
142sub usage {
143 print STDERR "Usage: apxs -g [-S <var>=<val>] -n <modname>\n";
144 print STDERR " apxs -q [-S <var>=<val>] <query> ...\n";
145 print STDERR " apxs -c [-S <var>=<val>] [-o <dsofile>] [-D <name>[=<value>]]\n";
146 print STDERR " [-I <incdir>] [-L <libdir>] [-l <libname>] [-Wc,<flags>]\n";
147 print STDERR " [-Wl,<flags>] [-p] <files> ...\n";
148 print STDERR " apxs -i [-S <var>=<val>] [-a] [-A] [-n <modname>] <dsofile> ...\n";
149 print STDERR " apxs -e [-S <var>=<val>] [-a] [-A] [-n <modname>] <dsofile> ...\n";
150 exit(1);
151}
152
153# option handling
154my $rc;
155($rc, @ARGV) = &Getopts("qn:gco:I+D+L+l+W+S+eiaAp", @ARGV);
156&usage if ($rc == 0);
157&usage if ($#ARGV == -1 and not $opt_g);
158&usage if (not $opt_q and not ($opt_g and $opt_n) and not $opt_i and not $opt_c and not $opt_e);
159
160# argument handling
161my @args = @ARGV;
162my $name = 'unknown';
163$name = $opt_n if ($opt_n ne '');
164
165if (@opt_S) {
166 my ($opt_S);
167 foreach $opt_S (@opt_S) {
168 if ($opt_S =~ m/^([^=]+)=(.*)$/) {
169 my ($var) = $1;
170 my ($val) = $2;
171 my $oldval = eval "\$CFG_$var";
172
173 unless ($var and $oldval) {
174 print STDERR "apxs:Error: no config variable $var\n";
175 &usage;
176 }
177
178 eval "\$CFG_${var}=\"${val}\"";
179 } else {
180 print STDERR "apxs:Error: malformatted -S option\n";
181 &usage;
182 }
183 }
184}
185
186##
187## Initial shared object support check
188##
189my $httpd = get_vars("sbindir") . "/" . get_vars("progname");
190$httpd = eval qq("$httpd");
191$httpd = eval qq("$httpd");
192my $envvars = get_vars("sbindir") . "/envvars";
193$envvars = eval qq("$envvars");
194$envvars = eval qq("$envvars");
195
196#allow apxs to be run from the source tree, before installation
197if ($0 =~ m:support/apxs$:) {
198 ($httpd = $0) =~ s:support/apxs$::;
199}
200
201unless (-x "$httpd") {
202 error("$httpd not found or not executable");
203 exit 1;
204}
205
206unless (grep /mod_so/, `. $envvars && $httpd -l`) {
207 error("Sorry, no shared object support for Apache");
208 error("available under your platform. Make sure");
209 error("the Apache module mod_so is compiled into");
210 error("your server binary `$httpd'.");
211 exit 1;
212}
213
214sub get_config_vars{
215 my ($file, $rh_config) = @_;
216
217 open IN, $file or die "cannot open $file: $!";
218 while (<IN>){
219 if (/^\s*(.*?)\s*=\s*(.*)$/){
220 $rh_config->{$1} = $2;
221 }
222 }
223 close IN;
224}
225
226sub get_vars {
227 my $result = '';
228 my $ok = 0;
229 my $arg;
230 foreach $arg (@_) {
231 if (exists $config_vars{$arg} or exists $config_vars{lc $arg}) {
232 my $val = exists $config_vars{$arg}
233 ? $config_vars{$arg}
234 : $config_vars{lc $arg};
235 $val =~ s/[()]//g;
236 $result .= eval "qq($val)" if defined $val;
237 $result .= ";;";
238 $ok = 1;
239 }
240 if (not $ok) {
241 if (exists $internal_vars{$arg} or exists $internal_vars{lc $arg}) {
242 my $val = exists $internal_vars{$arg} ? $arg : lc $arg;
243 $val = eval "\$CFG_$val";
244 $result .= eval "qq($val)" if defined $val;
245 $result .= ";;";
246 $ok = 1;
247 }
248 if (not $ok) {
249 error("Invalid query string `$arg'");
250 exit(1);
251 }
252 }
253 }
254 $result =~ s|;;$||;
255 $result =~ s|:| |;
256 return $result;
257}
258
259##
260## Operation
261##
262
263# helper function for executing a list of
264# system command with return code checks
265sub execute_cmds {
266 my (@cmds) = @_;
267 my ($cmd, $rc);
268
269 foreach $cmd (@cmds) {
270 notice($cmd);
271 $rc = system $cmd;
272 if ($rc) {
273 error(sprintf "Command failed with rc=%d\n", $rc << 8);
274 exit 1 ;
275 }
276 }
277}
278
279if ($opt_g) {
280 ##
281 ## SAMPLE MODULE SOURCE GENERATION
282 ##
283
284 if (-d $name) {
285 error("Directory `$name' already exists. Remove first");
286 exit(1);
287 }
288
289 my $data = join('', <DATA>);
290 $data =~ s|%NAME%|$name|sg;
291 $data =~ s|%TARGET%|$CFG_TARGET|sg;
292 $data =~ s|%PREFIX%|$prefix|sg;
293 $data =~ s|%INSTALLBUILDDIR%|$installbuilddir|sg;
294
295 my ($mkf, $mods, $src) = ($data =~ m|^(.+)-=#=-\n(.+)-=#=-\n(.+)|s);
296
297 notice("Creating [DIR] $name");
298 system("mkdir $name");
299 notice("Creating [FILE] $name/Makefile");
300 open(FP, ">${name}/Makefile") || die;
301 print FP $mkf;
302 close(FP);
303 notice("Creating [FILE] $name/modules.mk");
304 open(FP, ">${name}/modules.mk") || die;
305 print FP $mods;
306 close(FP);
307 notice("Creating [FILE] $name/mod_$name.c");
308 open(FP, ">${name}/mod_${name}.c") || die;
309 print FP $src;
310 close(FP);
311 notice("Creating [FILE] $name/.deps");
312 system("touch ${name}/.deps");
313
314 exit(0);
315}
316
317
318if ($opt_q) {
319 ##
320 ## QUERY INFORMATION
321 ##
322 my $result = get_vars(@args);
323 print "$result\n";
324}
325
326my $apr_config = get_vars("APR_CONFIG");
327
328if (! -x "$apr_config") {
329 error("$apr_config not found!");
330 exit(1);
331}
332
333my $apu_config = get_vars("APU_CONFIG");
334
335if (! -x "$apu_config") {
336 error("$apu_config not found!");
337 exit(1);
338}
339
340my $libtool = `$apr_config --apr-libtool`;
341chomp($libtool);
342
343my $apr_includedir = `$apr_config --includes`;
344chomp($apr_includedir);
345my $apu_includedir = `$apu_config --includes`;
346chomp($apu_includedir);
347
348if ($opt_c) {
349 ##
350 ## SHARED OBJECT COMPILATION
351 ##
352
353 # split files into sources and objects
354 my @srcs = ();
355 my @objs = ();
356 my $f;
357 foreach $f (@args) {
358 if ($f =~ m|\.c$|) {
359 push(@srcs, $f);
360 }
361 else {
362 push(@objs, $f);
363 }
364 }
365
366 # determine output file
367 my $dso_file;
368 if ($opt_o eq '') {
369 if ($#srcs > -1) {
370 $dso_file = $srcs[0];
371 $dso_file =~ s|\.[^.]+$|.la|;
372 }
373 elsif ($#objs > -1) {
374 $dso_file = $objs[0];
375 $dso_file =~ s|\.[^.]+$|.la|;
376 }
377 else {
378 $dso_file = "mod_unknown.la";
379 }
380 }
381 else {
382 $dso_file = $opt_o;
383 $dso_file =~ s|\.[^.]+$|.la|;
384 }
385
386 # create compilation commands
387 my @cmds = ();
388 my $opt = '';
389 my ($opt_Wc, $opt_I, $opt_D);
390 foreach $opt_Wc (@opt_W) {
391 $opt .= "$1 " if ($opt_Wc =~ m|^\s*c,(.*)$|);
392 }
393 foreach $opt_I (@opt_I) {
394 $opt .= "-I$opt_I ";
395 }
396 foreach $opt_D (@opt_D) {
397 $opt .= "-D$opt_D ";
398 }
399 my $cflags = "$CFG_CFLAGS";
400 my $s;
401 my $mod;
402 foreach $s (@srcs) {
403 my $slo = $s;
404 $slo =~ s|\.c$|.slo|;
405 my $lo = $s;
406 $lo =~ s|\.c$|.lo|;
407 my $la = $s;
408 $la =~ s|\.c$|.la|;
409 my $o = $s;
410 $o =~ s|\.c$|.o|;
411 push(@cmds, "$libtool $ltflags --mode=compile $CFG_CC $cflags -I$CFG_INCLUDEDIR $apr_includedir $apu_includedir $opt -c -o $lo $s && touch $slo");
412 unshift(@objs, $lo);
413 }
414
415 # create link command
416 my $o;
417 my $lo;
418 foreach $o (@objs) {
419 $lo .= " $o";
420 }
421 my ($opt_Wl, $opt_L, $opt_l);
422 $opt = '';
423 foreach $opt_Wl (@opt_W) {
424 $opt .= "$1 " if ($opt_Wl =~ m|^\s*l,(.*)$|);
425 }
426 foreach $opt_L (@opt_L) {
427 $opt .= " -L$opt_L";
428 }
429 foreach $opt_l (@opt_l) {
430 $opt .= " -l$opt_l";
431 }
432
433 if ($opt_p == 1) {
434
435 my $apr_libs=`$apr_config --cflags --ldflags --link-libtool --libs`;
436 chomp($apr_libs);
437 my $apu_libs=`$apu_config --ldflags --link-libtool --libs`;
438 chomp($apu_libs);
439
440 $opt .= " ".$apu_libs." ".$apr_libs;
441 }
442 else {
443 my $apr_ldflags=`$apr_config --ldflags`;
444 chomp($apr_ldflags);
445 $opt .= " -rpath $CFG_LIBEXECDIR -module -avoid-version $apr_ldflags";
446 }
447
448 push(@cmds, "$libtool $ltflags --mode=link $CFG_CC -o $dso_file $opt $lo");
449
450 # execute the commands
451 &execute_cmds(@cmds);
452
453 # allow one-step compilation and installation
454 if ($opt_i or $opt_e) {
455 @args = ( $dso_file );
456 }
457}
458
459if ($opt_i or $opt_e) {
460 ##
461 ## SHARED OBJECT INSTALLATION
462 ##
463
464 # determine installation commands
465 # and corresponding LoadModule directive
466 my @lmd = ();
467 my @cmds = ();
468 my $f;
469 foreach $f (@args) {
470 # ack all potential gcc, hp/ux, win32+os2+aix and os/x extensions
471 if ($f !~ m#(\.so$|\.la$|\.sl$|\.dll$|\.dylib$|)#) {
472 error("file $f is not a shared object");
473 exit(1);
474 }
475 my $t = $f;
476 $t =~ s|^.+/([^/]+)$|$1|;
477 # use .so unambigiously for installed shared library modules
478 $t =~ s|\.[^./\\]+$|\.so|;
479 if ($opt_i) {
480 push(@cmds, "$installbuilddir/instdso.sh SH_LIBTOOL='" .
481 "$libtool' $f $CFG_LIBEXECDIR");
482 push(@cmds, "chmod 755 $CFG_LIBEXECDIR/$t");
483 }
484
485 # determine module symbolname and filename
486 my $filename = '';
487 if ($name eq 'unknown') {
488 $name = '';
489 my $base = $f;
490 $base =~ s|\.[^.]+$||;
491 if (-f "$base.c") {
492 open(FP, "<$base.c");
493 my $content = join('', <FP>);
494 close(FP);
495 if ($content =~ m|.*module\s+(?:AP_MODULE_DECLARE_DATA\s+)?([a-zA-Z0-9_]+)_module\s*=\s*.*|s) {
496 $name = "$1";
497 $filename = "$base.c";
498 $filename =~ s|^[^/]+/||;
499 }
500 }
501 if ($name eq '') {
502 if ($base =~ m|.*mod_([a-zA-Z0-9_]+)\..+|) {
503 $name = "$1";
504 $filename = $base;
505 $filename =~ s|^[^/]+/||;
506 }
507 }
508 if ($name eq '') {
509 error("Sorry, cannot determine bootstrap symbol name");
510 error("Please specify one with option `-n'");
511 exit(1);
512 }
513 }
514 if ($filename eq '') {
515 $filename = "mod_${name}.c";
516 }
517 my $dir = $CFG_LIBEXECDIR;
518 $dir =~ s|^$CFG_PREFIX/?||;
519 $dir =~ s|(.)$|$1/|;
520 $t =~ s|\.la$|.so|;
521 push(@lmd, sprintf("LoadModule %-18s %s", "${name}_module", "$dir$t"));
522 }
523
524 # execute the commands
525 &execute_cmds(@cmds);
526
527 # activate module via LoadModule/AddModule directive
528 if ($opt_a or $opt_A) {
529 if (not -f "$CFG_SYSCONFDIR/$CFG_TARGET.conf") {
530 error("Config file $CFG_SYSCONFDIR/$CFG_TARGET.conf not found");
531 exit(1);
532 }
533
534 open(FP, "<$CFG_SYSCONFDIR/$CFG_TARGET.conf") || die;
535 my $content = join('', <FP>);
536 close(FP);
537
538 if ($content !~ m|\n#?\s*LoadModule\s+|) {
539 error("Activation failed for custom $CFG_SYSCONFDIR/$CFG_TARGET.conf file.");
540 error("At least one `LoadModule' directive already has to exist.");
541 exit(1);
542 }
543
544 my $lmd;
545 my $c = '';
546 $c = '#' if ($opt_A);
547 foreach $lmd (@lmd) {
548 my $what = $opt_A ? "preparing" : "activating";
549 my $lmd_re = $lmd;
550 $lmd_re =~ s/\s+/\\s+/g;
551
552 if ($content !~ m|\n#?\s*$lmd_re|) {
553 # check for open <containers>, so that the new LoadModule
554 # directive always appears *outside* of an <container>.
555
556 my $before = ($content =~ m|^(.*\n)#?\s*LoadModule\s+[^\n]+\n|s)[0];
557
558 # the '()=' trick forces list context and the scalar
559 # assignment counts the number of list members (aka number
560 # of matches) then
561 my $cntopen = () = ($before =~ m|^\s*<[^/].*$|mg);
562 my $cntclose = () = ($before =~ m|^\s*</.*$|mg);
563
564 if ($cntopen == $cntclose) {
565 # fine. Last LoadModule is contextless.
566 $content =~ s|^(.*\n#?\s*LoadModule\s+[^\n]+\n)|$1$c$lmd\n|s;
567 }
568 elsif ($cntopen < $cntclose) {
569 error('Configuration file is not valid. There are sections'
570 . ' closed before opened.');
571 exit(1);
572 }
573 else {
574 # put our cmd after the section containing the last
575 # LoadModule.
576 my $found =
577 $content =~ s!\A ( # string and capture start
578 (?:(?:
579 ^\s* # start of conf line with a
580 (?:[^<]|<[^/]) # directive which does not
581 # start with '</'
582
583 .*(?:$)\n # rest of the line.
584 # the '$' is in parentheses
585 # to avoid misinterpreting
586 # the string "$\" as
587 # perl variable.
588
589 )* # catch as much as possible
590 # of such lines. (including
591 # zero)
592
593 ^\s*</.*(?:$)\n? # after the above, we
594 # expect a config line with
595 # a closing container (</)
596
597 ) {$cntopen} # the whole pattern (bunch
598 # of lines that end up with
599 # a closing directive) must
600 # be repeated $cntopen
601 # times. That's it.
602 # Simple, eh? ;-)
603
604 ) # capture end
605 !$1$c$lmd\n!mx;
606
607 unless ($found) {
608 error('Configuration file is not valid. There are '
609 . 'sections opened and not closed.');
610 exit(1);
611 }
612 }
613 } else {
614 # replace already existing LoadModule line
615 $content =~ s|^(.*\n)#?\s*$lmd_re[^\n]*\n|$1$c$lmd\n|s;
616 }
617 $lmd =~ m|LoadModule\s+(.+?)_module.*|;
618 notice("[$what module `$1' in $CFG_SYSCONFDIR/$CFG_TARGET.conf]");
619 }
620 if (@lmd) {
621 if (open(FP, ">$CFG_SYSCONFDIR/$CFG_TARGET.conf.new")) {
622 print FP $content;
623 close(FP);
624 system("cp $CFG_SYSCONFDIR/$CFG_TARGET.conf $CFG_SYSCONFDIR/$CFG_TARGET.conf.bak && " .
625 "cp $CFG_SYSCONFDIR/$CFG_TARGET.conf.new $CFG_SYSCONFDIR/$CFG_TARGET.conf && " .
626 "rm $CFG_SYSCONFDIR/$CFG_TARGET.conf.new");
627 } else {
628 notice("unable to open configuration file");
629 }
630 }
631 }
632}
633
634sub error{
635 print STDERR "apxs:Error: $_[0].\n";
636}
637
638sub notice{
639 print STDERR "$_[0]\n";
640}
641
642##EOF##
643__DATA__
644##
645## Makefile -- Build procedure for sample %NAME% Apache module
646## Autogenerated via ``apxs -n %NAME% -g''.
647##
648
649builddir=.
650top_srcdir=%PREFIX%
651top_builddir=%PREFIX%
652include %INSTALLBUILDDIR%/special.mk
653
654# the used tools
655APXS=apxs
656APACHECTL=apachectl
657
658# additional defines, includes and libraries
659#DEFS=-Dmy_define=my_value
660#INCLUDES=-Imy/include/dir
661#LIBS=-Lmy/lib/dir -lmylib
662
663# the default target
664all: local-shared-build
665
666# install the shared object file into Apache
667install: install-modules-yes
668
669# cleanup
670clean:
671 -rm -f mod_%NAME%.o mod_%NAME%.lo mod_%NAME%.slo mod_%NAME%.la
672
673# simple test
674test: reload
675 lynx -mime_header http://localhost/%NAME%
676
677# install and activate shared object by reloading Apache to
678# force a reload of the shared object file
679reload: install restart
680
681# the general Apache start/restart/stop
682# procedures
683start:
684 $(APACHECTL) start
685restart:
686 $(APACHECTL) restart
687stop:
688 $(APACHECTL) stop
689
690-=#=-
691mod_%NAME%.la: mod_%NAME%.slo
692 $(SH_LINK) -rpath $(libexecdir) -module -avoid-version mod_%NAME%.lo
693DISTCLEAN_TARGETS = modules.mk
694shared = mod_%NAME%.la
695-=#=-
696/*
697** mod_%NAME%.c -- Apache sample %NAME% module
698** [Autogenerated via ``apxs -n %NAME% -g'']
699**
700** To play with this sample module first compile it into a
701** DSO file and install it into Apache's modules directory
702** by running:
703**
704** $ apxs -c -i mod_%NAME%.c
705**
706** Then activate it in Apache's %TARGET%.conf file for instance
707** for the URL /%NAME% in as follows:
708**
709** # %TARGET%.conf
710** LoadModule %NAME%_module modules/mod_%NAME%.so
711** <Location /%NAME%>
712** SetHandler %NAME%
713** </Location>
714**
715** Then after restarting Apache via
716**
717** $ apachectl restart
718**
719** you immediately can request the URL /%NAME% and watch for the
720** output of this module. This can be achieved for instance via:
721**
722** $ lynx -mime_header http://localhost/%NAME%
723**
724** The output should be similar to the following one:
725**
726** HTTP/1.1 200 OK
727** Date: Tue, 31 Mar 1998 14:42:22 GMT
728** Server: Apache/1.3.4 (Unix)
729** Connection: close
730** Content-Type: text/html
731**
732** The sample page from mod_%NAME%.c
733*/
734
735#include "httpd.h"
736#include "http_config.h"
737#include "http_protocol.h"
738#include "ap_config.h"
739
740/* The sample content handler */
741static int %NAME%_handler(request_rec *r)
742{
743 if (strcmp(r->handler, "%NAME%")) {
744 return DECLINED;
745 }
746 r->content_type = "text/html";
747
748 if (!r->header_only)
749 ap_rputs("The sample page from mod_%NAME%.c\n", r);
750 return OK;
751}
752
753static void %NAME%_register_hooks(apr_pool_t *p)
754{
755 ap_hook_handler(%NAME%_handler, NULL, NULL, APR_HOOK_MIDDLE);
756}
757
758/* Dispatch list for API hooks */
759module AP_MODULE_DECLARE_DATA %NAME%_module = {
760 STANDARD20_MODULE_STUFF,
761 NULL, /* create per-dir config structures */
762 NULL, /* merge per-dir config structures */
763 NULL, /* create per-server config structures */
764 NULL, /* merge per-server config structures */
765 NULL, /* table of config file commands */
766 %NAME%_register_hooks /* register hooks */
767};
768
7690
=== removed directory '.pc/010_fhs_compliance'
=== removed file '.pc/010_fhs_compliance/config.layout'
--- .pc/010_fhs_compliance/config.layout 2011-12-29 12:09:14 +0000
+++ .pc/010_fhs_compliance/config.layout 1970-01-01 00:00:00 +0000
@@ -1,324 +0,0 @@
1##
2## config.layout -- Pre-defined Installation Path Layouts
3##
4## Hints:
5## - layouts can be loaded with configure's --enable-layout=ID option
6## - when no --enable-layout option is given, the default layout is `Apache'
7## - a trailing plus character (`+') on paths is replaced with a
8## `/<target>' suffix where <target> is currently hardcoded to 'apache2'.
9## (This may become a configurable parameter at some point.)
10##
11
12# Classical Apache path layout.
13<Layout Apache>
14 prefix: /usr/local/apache2
15 exec_prefix: ${prefix}
16 bindir: ${exec_prefix}/bin
17 sbindir: ${exec_prefix}/bin
18 libdir: ${exec_prefix}/lib
19 libexecdir: ${exec_prefix}/modules
20 mandir: ${prefix}/man
21 sysconfdir: ${prefix}/conf
22 datadir: ${prefix}
23 installbuilddir: ${datadir}/build
24 errordir: ${datadir}/error
25 iconsdir: ${datadir}/icons
26 htdocsdir: ${datadir}/htdocs
27 manualdir: ${datadir}/manual
28 cgidir: ${datadir}/cgi-bin
29 includedir: ${prefix}/include
30 localstatedir: ${prefix}
31 runtimedir: ${localstatedir}/logs
32 logfiledir: ${localstatedir}/logs
33 proxycachedir: ${localstatedir}/proxy
34</Layout>
35
36# GNU standards conforming path layout.
37# See FSF's GNU project `make-stds' document for details.
38<Layout GNU>
39 prefix: /usr/local
40 exec_prefix: ${prefix}
41 bindir: ${exec_prefix}/bin
42 sbindir: ${exec_prefix}/sbin
43 libdir: ${exec_prefix}/lib
44 libexecdir: ${exec_prefix}/libexec
45 mandir: ${prefix}/man
46 sysconfdir: ${prefix}/etc+
47 datadir: ${prefix}/share+
48 installbuilddir: ${datadir}/build
49 errordir: ${datadir}/error
50 iconsdir: ${datadir}/icons
51 htdocsdir: ${datadir}/htdocs
52 manualdir: ${datadir}/manual
53 cgidir: ${datadir}/cgi-bin
54 includedir: ${prefix}/include+
55 localstatedir: ${prefix}/var+
56 runtimedir: ${localstatedir}/run
57 logfiledir: ${localstatedir}/log
58 proxycachedir: ${localstatedir}/proxy
59</Layout>
60
61# Mac OS X Server (Rhapsody)
62<Layout Mac OS X Server>
63 prefix: /Local/Library/WebServer
64 exec_prefix: /usr
65 bindir: ${exec_prefix}/bin
66 sbindir: ${exec_prefix}/sbin
67 libdir: ${exec_prefix}/lib
68 libexecdir: /System/Library/Apache/Modules
69 mandir: ${exec_prefix}/share/man
70 sysconfdir: ${prefix}/Configuration
71 datadir: ${prefix}
72 installbuilddir: /System/Library/Apache/Build
73 errordir: /System/Library/Apache/Error
74 iconsdir: /System/Library/Apache/Icons
75 manualdir: /System/Library/Apache/Manual
76 htdocsdir: ${datadir}/Documents
77 cgidir: ${datadir}/CGI-Executables
78 includedir: /System/Library/Frameworks/Apache.framework/Versions/2.0/Headers
79 localstatedir: /var
80 runtimedir: ${prefix}/Logs
81 logfiledir: ${prefix}/Logs
82 proxycachedir: ${prefix}/ProxyCache
83</Layout>
84
85# Darwin/Mac OS Layout
86<Layout Darwin>
87 prefix: /usr
88 exec_prefix: ${prefix}
89 bindir: ${exec_prefix}/bin
90 sbindir: ${exec_prefix}/sbin
91 libdir: ${exec_prefix}/lib
92 libexecdir: ${exec_prefix}/libexec+
93 mandir: ${prefix}/share/man
94 datadir: /Library/WebServer
95 sysconfdir: /etc+
96 installbuilddir: ${prefix}/share/httpd/build
97 errordir: ${prefix}/share/httpd/error
98 iconsdir: ${prefix}/share/httpd/icons
99 htdocsdir: ${datadir}/Documents
100 manualdir: ${datadir}/share/httpd/manual
101 cgidir: ${datadir}/CGI-Executables
102 includedir: ${prefix}/include+
103 localstatedir: /var
104 runtimedir: ${localstatedir}/run
105 logfiledir: ${localstatedir}/log+
106 proxycachedir: ${runtimedir}/proxy
107</Layout>
108
109# Red Hat Linux 7.x layout
110<Layout RedHat>
111 prefix: /usr
112 exec_prefix: ${prefix}
113 bindir: ${prefix}/bin
114 sbindir: ${prefix}/sbin
115 libdir: ${prefix}/lib
116 libexecdir: ${prefix}/lib/apache
117 mandir: ${prefix}/man
118 sysconfdir: /etc/httpd/conf
119 datadir: /var/www
120 installbuilddir: ${datadir}/build
121 errordir: ${datadir}/error
122 iconsdir: ${datadir}/icons
123 htdocsdir: ${datadir}/html
124 manualdir: ${datadir}/manual
125 cgidir: ${datadir}/cgi-bin
126 includedir: ${prefix}/include/apache
127 localstatedir: /var
128 runtimedir: ${localstatedir}/run
129 logfiledir: ${localstatedir}/log/httpd
130 proxycachedir: ${localstatedir}/cache/httpd
131</Layout>
132
133# According to the /opt filesystem conventions
134<Layout opt>
135 prefix: /opt/apache
136 exec_prefix: ${prefix}
137 bindir: ${exec_prefix}/bin
138 sbindir: ${exec_prefix}/sbin
139 libdir: ${exec_prefix}/lib
140 libexecdir: ${exec_prefix}/libexec
141 mandir: ${prefix}/man
142 sysconfdir: /etc${prefix}
143 datadir: ${prefix}/share
144 installbuilddir: ${datadir}/build
145 errordir: ${datadir}/error
146 iconsdir: ${datadir}/icons
147 htdocsdir: ${datadir}/htdocs
148 manualdir: ${datadir}/manual
149 cgidir: ${datadir}/cgi-bin
150 includedir: ${prefix}/include
151 localstatedir: /var${prefix}
152 runtimedir: ${localstatedir}/run
153 logfiledir: ${localstatedir}/logs
154 proxycachedir: ${localstatedir}/proxy
155</Layout>
156
157# BeOS layout...
158<Layout beos>
159 prefix: /boot/home/apache
160 exec_prefix: ${prefix}
161 bindir: ${exec_prefix}/bin
162 sbindir: ${exec_prefix}/bin
163 libdir: ${exec_prefix}/lib
164 libexecdir: ${exec_prefix}/libexec
165 mandir: ${prefix}/man
166 sysconfdir: ${prefix}/conf
167 datadir: ${prefix}
168 installbuilddir: ${datadir}/build
169 errordir: ${datadir}/error
170 iconsdir: ${datadir}/icons
171 htdocsdir: ${datadir}/htdocs
172 manualdir: ${datadir}/manual
173 cgidir: ${datadir}/cgi-bin
174 includedir: ${prefix}/include
175 localstatedir: ${prefix}
176 runtimedir: ${localstatedir}/logs
177 logfiledir: ${localstatedir}/logs
178 proxycachedir: ${localstatedir}/proxy
179</Layout>
180
181# SuSE 6.x layout
182<Layout SuSE>
183 prefix: /usr
184 exec_prefix: ${prefix}
185 bindir: ${prefix}/bin
186 sbindir: ${prefix}/sbin
187 libdir: ${prefix}/lib
188 libexecdir: ${prefix}/lib/apache
189 mandir: ${prefix}/share/man
190 sysconfdir: /etc/httpd
191 datadir: /usr/local/httpd
192 installbuilddir: ${datadir}/build
193 errordir: ${datadir}/error
194 iconsdir: ${datadir}/icons
195 htdocsdir: ${datadir}/htdocs
196 manualdir: ${datadir}/manual
197 cgidir: ${datadir}/cgi-bin
198 includedir: ${prefix}/include/apache
199 localstatedir: /var/lib/httpd
200 runtimedir: /var/run
201 logfiledir: /var/log/httpd
202 proxycachedir: /var/cache/httpd
203</Layout>
204
205# BSD/OS layout
206<Layout BSDI>
207 prefix: /var/www
208 exec_prefix: /usr/contrib
209 bindir: ${exec_prefix}/bin
210 sbindir: ${exec_prefix}/bin
211 libdir: ${exec_prefix}/lib
212 libexecdir: ${exec_prefix}/libexec/apache
213 mandir: ${exec_prefix}/man
214 sysconfdir: ${prefix}/conf
215 datadir: ${prefix}
216 installbuilddir: ${datadir}/build
217 errordir: ${datadir}/error
218 iconsdir: ${datadir}/icons
219 htdocsdir: ${datadir}/htdocs
220 manualdir: ${datadir}/manual
221 cgidir: ${datadir}/cgi-bin
222 includedir: ${exec_prefix}/include/apache
223 localstatedir: /var
224 runtimedir: ${localstatedir}/run
225 logfiledir: ${localstatedir}/log/httpd
226 proxycachedir: ${localstatedir}/proxy
227</Layout>
228
229# Solaris 8 Layout
230<Layout Solaris>
231 prefix: /usr/apache
232 exec_prefix: ${prefix}
233 bindir: ${exec_prefix}/bin
234 sbindir: ${exec_prefix}/bin
235 libdir: ${exec_prefix}/lib
236 libexecdir: ${exec_prefix}/libexec
237 mandir: ${exec_prefix}/man
238 sysconfdir: /etc/apache
239 datadir: /var/apache
240 installbuilddir: ${datadir}/build
241 errordir: ${datadir}/error
242 iconsdir: ${datadir}/icons
243 htdocsdir: ${datadir}/htdocs
244 manualdir: ${datadir}/manual
245 cgidir: ${datadir}/cgi-bin
246 includedir: ${exec_prefix}/include
247 localstatedir: ${prefix}
248 runtimedir: /var/run
249 logfiledir: ${datadir}/logs
250 proxycachedir: ${datadir}/proxy
251</Layout>
252
253# OpenBSD Layout
254<Layout OpenBSD>
255 prefix: /var/www
256 exec_prefix: /usr
257 bindir: ${exec_prefix}/bin
258 sbindir: ${exec_prefix}/sbin
259 libdir: ${exec_prefix}/lib
260 libexecdir: ${exec_prefix}/lib/apache/modules
261 mandir: ${exec_prefix}/share/man
262 sysconfdir: ${prefix}/conf
263 datadir: ${prefix}
264 installbuilddir: ${prefix}/build
265 errordir: ${prefix}/error
266 iconsdir: ${prefix}/icons
267 htdocsdir: ${prefix}/htdocs
268 manualdir: ${datadir}/manual
269 cgidir: ${prefix}/cgi-bin
270 includedir: ${exec_prefix}/lib/apache/include
271 localstatedir: ${prefix}
272 runtimedir: ${prefix}/logs
273 logfiledir: ${prefix}/logs
274 proxycachedir: ${prefix}/proxy
275</Layout>
276
277# FreeBSD Layout
278<Layout FreeBSD>
279 prefix: /usr/local
280 exec_prefix: ${prefix}
281 bindir: ${exec_prefix}/bin
282 sbindir: ${exec_prefix}/sbin
283 libdir: ${exec_prefix}/lib
284 libexecdir: ${exec_prefix}/libexec/apache2
285 mandir: ${prefix}/man
286 sysconfdir: ${prefix}/etc/apache2
287 datadir: ${prefix}/www
288 installbuilddir: ${prefix}/share/apache2/build
289 errordir: ${datadir}/error
290 iconsdir: ${datadir}/icons
291 htdocsdir: ${datadir}/data
292 manualdir: ${prefix}/share/doc/apache2
293 cgidir: ${datadir}/cgi-bin
294 includedir: ${prefix}/include/apache2
295 localstatedir: /var
296 runtimedir: ${localstatedir}/run
297 logfiledir: ${localstatedir}/log
298 proxycachedir: ${datadir}/proxy
299</Layout>
300
301# Debian layout
302<Layout Debian>
303 prefix:
304 exec_prefix: ${prefix}/usr
305 bindir: ${exec_prefix}/bin
306 sbindir: ${exec_prefix}/sbin
307 libdir: ${exec_prefix}/lib
308 libexecdir: ${exec_prefix}/lib/apache2/modules
309 mandir: ${exec_prefix}/share/man
310 sysconfdir: ${prefix}/etc/apache2
311 datadir: ${exec_prefix}/share/apache2
312 iconsdir: ${datadir}/icons
313 htdocsdir: ${prefix}/usr/share/apache2/default-site/htdocs
314 manualdir: ${htdocsdir}/manual
315 cgidir: ${prefix}/usr/lib/cgi-bin
316 includedir: ${exec_prefix}/include/apache2
317 localstatedir: ${prefix}/var/run
318 runtimedir: ${prefix}/var/run
319 logfiledir: ${prefix}/var/log/apache2
320 proxycachedir: ${prefix}/var/cache/apache2/proxy
321 infodir: ${exec_prefix}/share/info
322 installbuilddir: ${prefix}/etc/apache2/build
323 errordir: ${datadir}/error
324</Layout>
3250
=== removed file '.pc/010_fhs_compliance/configure'
--- .pc/010_fhs_compliance/configure 2011-12-29 12:09:14 +0000
+++ .pc/010_fhs_compliance/configure 1970-01-01 00:00:00 +0000
@@ -1,20482 +0,0 @@
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.64.
4#
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
7# Foundation, Inc.
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
14
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18 emulate sh
19 NULLCMD=:
20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
31fi
32
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
79fi
80
81
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
90case $0 in #((
91 *[\\/]* ) as_myself=$0 ;;
92 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
93for as_dir in $PATH
94do
95 IFS=$as_save_IFS
96 test -z "$as_dir" && as_dir=.
97 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
98 done
99IFS=$as_save_IFS
100
101 ;;
102esac
103# We did not find ourselves, most probably we were run as `sh COMMAND'
104# in which case we are not to be found in the path.
105if test "x$as_myself" = x; then
106 as_myself=$0
107fi
108if test ! -f "$as_myself"; then
109 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
110 exit 1
111fi
112
113# Unset variables that we do not need and which cause bugs (e.g. in
114# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
115# suppresses any "Segmentation fault" message there. '((' could
116# trigger a bug in pdksh 5.2.14.
117for as_var in BASH_ENV ENV MAIL MAILPATH
118do eval test x\${$as_var+set} = xset \
119 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
120done
121PS1='$ '
122PS2='> '
123PS4='+ '
124
125# NLS nuisances.
126LC_ALL=C
127export LC_ALL
128LANGUAGE=C
129export LANGUAGE
130
131# CDPATH.
132(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
133
134if test "x$CONFIG_SHELL" = x; then
135 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
136 emulate sh
137 NULLCMD=:
138 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
139 # is contrary to our usage. Disable this feature.
140 alias -g '\${1+\"\$@\"}'='\"\$@\"'
141 setopt NO_GLOB_SUBST
142else
143 case \`(set -o) 2>/dev/null\` in #(
144 *posix*) :
145 set -o posix ;; #(
146 *) :
147 ;;
148esac
149fi
150"
151 as_required="as_fn_return () { (exit \$1); }
152as_fn_success () { as_fn_return 0; }
153as_fn_failure () { as_fn_return 1; }
154as_fn_ret_success () { return 0; }
155as_fn_ret_failure () { return 1; }
156
157exitcode=0
158as_fn_success || { exitcode=1; echo as_fn_success failed.; }
159as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
160as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
161as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
162if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
163
164else
165 exitcode=1; echo positional parameters were not saved.
166fi
167test x\$exitcode = x0 || exit 1"
168 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
169 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
170 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
171 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
172test \$(( 1 + 1 )) = 2 || exit 1"
173 if (eval "$as_required") 2>/dev/null; then :
174 as_have_required=yes
175else
176 as_have_required=no
177fi
178 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
179
180else
181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
182as_found=false
183for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
184do
185 IFS=$as_save_IFS
186 test -z "$as_dir" && as_dir=.
187 as_found=:
188 case $as_dir in #(
189 /*)
190 for as_base in sh bash ksh sh5; do
191 # Try only shells that exist, to save several forks.
192 as_shell=$as_dir/$as_base
193 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
194 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
195 CONFIG_SHELL=$as_shell as_have_required=yes
196 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
197 break 2
198fi
199fi
200 done;;
201 esac
202 as_found=false
203done
204$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
205 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
206 CONFIG_SHELL=$SHELL as_have_required=yes
207fi; }
208IFS=$as_save_IFS
209
210
211 if test "x$CONFIG_SHELL" != x; then :
212 # We cannot yet assume a decent shell, so we have to provide a
213 # neutralization value for shells without unset; and this also
214 # works around shells that cannot unset nonexistent variables.
215 BASH_ENV=/dev/null
216 ENV=/dev/null
217 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
218 export CONFIG_SHELL
219 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
220fi
221
222 if test x$as_have_required = xno; then :
223 $as_echo "$0: This script requires a shell more modern than all"
224 $as_echo "$0: the shells that I found on your system."
225 if test x${ZSH_VERSION+set} = xset ; then
226 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
227 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
228 else
229 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
230$0: including any error possibly output before this
231$0: message. Then install a modern shell, or manually run
232$0: the script under such a shell if you do have one."
233 fi
234 exit 1
235fi
236fi
237fi
238SHELL=${CONFIG_SHELL-/bin/sh}
239export SHELL
240# Unset more variables known to interfere with behavior of common tools.
241CLICOLOR_FORCE= GREP_OPTIONS=
242unset CLICOLOR_FORCE GREP_OPTIONS
243
244## --------------------- ##
245## M4sh Shell Functions. ##
246## --------------------- ##
247# as_fn_unset VAR
248# ---------------
249# Portably unset VAR.
250as_fn_unset ()
251{
252 { eval $1=; unset $1;}
253}
254as_unset=as_fn_unset
255
256# as_fn_set_status STATUS
257# -----------------------
258# Set $? to STATUS, without forking.
259as_fn_set_status ()
260{
261 return $1
262} # as_fn_set_status
263
264# as_fn_exit STATUS
265# -----------------
266# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
267as_fn_exit ()
268{
269 set +e
270 as_fn_set_status $1
271 exit $1
272} # as_fn_exit
273
274# as_fn_mkdir_p
275# -------------
276# Create "$as_dir" as a directory, including parents if necessary.
277as_fn_mkdir_p ()
278{
279
280 case $as_dir in #(
281 -*) as_dir=./$as_dir;;
282 esac
283 test -d "$as_dir" || eval $as_mkdir_p || {
284 as_dirs=
285 while :; do
286 case $as_dir in #(
287 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
288 *) as_qdir=$as_dir;;
289 esac
290 as_dirs="'$as_qdir' $as_dirs"
291 as_dir=`$as_dirname -- "$as_dir" ||
292$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
293 X"$as_dir" : 'X\(//\)[^/]' \| \
294 X"$as_dir" : 'X\(//\)$' \| \
295 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
296$as_echo X"$as_dir" |
297 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
298 s//\1/
299 q
300 }
301 /^X\(\/\/\)[^/].*/{
302 s//\1/
303 q
304 }
305 /^X\(\/\/\)$/{
306 s//\1/
307 q
308 }
309 /^X\(\/\).*/{
310 s//\1/
311 q
312 }
313 s/.*/./; q'`
314 test -d "$as_dir" && break
315 done
316 test -z "$as_dirs" || eval "mkdir $as_dirs"
317 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
318
319
320} # as_fn_mkdir_p
321# as_fn_append VAR VALUE
322# ----------------------
323# Append the text in VALUE to the end of the definition contained in VAR. Take
324# advantage of any shell optimizations that allow amortized linear growth over
325# repeated appends, instead of the typical quadratic growth present in naive
326# implementations.
327if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
328 eval 'as_fn_append ()
329 {
330 eval $1+=\$2
331 }'
332else
333 as_fn_append ()
334 {
335 eval $1=\$$1\$2
336 }
337fi # as_fn_append
338
339# as_fn_arith ARG...
340# ------------------
341# Perform arithmetic evaluation on the ARGs, and store the result in the
342# global $as_val. Take advantage of shells that can avoid forks. The arguments
343# must be portable across $(()) and expr.
344if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
345 eval 'as_fn_arith ()
346 {
347 as_val=$(( $* ))
348 }'
349else
350 as_fn_arith ()
351 {
352 as_val=`expr "$@" || test $? -eq 1`
353 }
354fi # as_fn_arith
355
356
357# as_fn_error ERROR [LINENO LOG_FD]
358# ---------------------------------
359# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
360# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
361# script with status $?, using 1 if that was 0.
362as_fn_error ()
363{
364 as_status=$?; test $as_status -eq 0 && as_status=1
365 if test "$3"; then
366 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
367 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
368 fi
369 $as_echo "$as_me: error: $1" >&2
370 as_fn_exit $as_status
371} # as_fn_error
372
373if expr a : '\(a\)' >/dev/null 2>&1 &&
374 test "X`expr 00001 : '.*\(...\)'`" = X001; then
375 as_expr=expr
376else
377 as_expr=false
378fi
379
380if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
381 as_basename=basename
382else
383 as_basename=false
384fi
385
386if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
387 as_dirname=dirname
388else
389 as_dirname=false
390fi
391
392as_me=`$as_basename -- "$0" ||
393$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
394 X"$0" : 'X\(//\)$' \| \
395 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
396$as_echo X/"$0" |
397 sed '/^.*\/\([^/][^/]*\)\/*$/{
398 s//\1/
399 q
400 }
401 /^X\/\(\/\/\)$/{
402 s//\1/
403 q
404 }
405 /^X\/\(\/\).*/{
406 s//\1/
407 q
408 }
409 s/.*/./; q'`
410
411# Avoid depending upon Character Ranges.
412as_cr_letters='abcdefghijklmnopqrstuvwxyz'
413as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
414as_cr_Letters=$as_cr_letters$as_cr_LETTERS
415as_cr_digits='0123456789'
416as_cr_alnum=$as_cr_Letters$as_cr_digits
417
418
419 as_lineno_1=$LINENO as_lineno_1a=$LINENO
420 as_lineno_2=$LINENO as_lineno_2a=$LINENO
421 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
422 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
423 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
424 sed -n '
425 p
426 /[$]LINENO/=
427 ' <$as_myself |
428 sed '
429 s/[$]LINENO.*/&-/
430 t lineno
431 b
432 :lineno
433 N
434 :loop
435 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
436 t loop
437 s/-\n.*//
438 ' >$as_me.lineno &&
439 chmod +x "$as_me.lineno" ||
440 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
441
442 # Don't try to exec as it changes $[0], causing all sort of problems
443 # (the dirname of $[0] is not the place where we might find the
444 # original and so on. Autoconf is especially sensitive to this).
445 . "./$as_me.lineno"
446 # Exit status is that of the last command.
447 exit
448}
449
450ECHO_C= ECHO_N= ECHO_T=
451case `echo -n x` in #(((((
452-n*)
453 case `echo 'xy\c'` in
454 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
455 xy) ECHO_C='\c';;
456 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
457 ECHO_T=' ';;
458 esac;;
459*)
460 ECHO_N='-n';;
461esac
462
463rm -f conf$$ conf$$.exe conf$$.file
464if test -d conf$$.dir; then
465 rm -f conf$$.dir/conf$$.file
466else
467 rm -f conf$$.dir
468 mkdir conf$$.dir 2>/dev/null
469fi
470if (echo >conf$$.file) 2>/dev/null; then
471 if ln -s conf$$.file conf$$ 2>/dev/null; then
472 as_ln_s='ln -s'
473 # ... but there are two gotchas:
474 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
475 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
476 # In both cases, we have to default to `cp -p'.
477 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
478 as_ln_s='cp -p'
479 elif ln conf$$.file conf$$ 2>/dev/null; then
480 as_ln_s=ln
481 else
482 as_ln_s='cp -p'
483 fi
484else
485 as_ln_s='cp -p'
486fi
487rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
488rmdir conf$$.dir 2>/dev/null
489
490if mkdir -p . 2>/dev/null; then
491 as_mkdir_p='mkdir -p "$as_dir"'
492else
493 test -d ./-p && rmdir ./-p
494 as_mkdir_p=false
495fi
496
497if test -x / >/dev/null 2>&1; then
498 as_test_x='test -x'
499else
500 if ls -dL / >/dev/null 2>&1; then
501 as_ls_L_option=L
502 else
503 as_ls_L_option=
504 fi
505 as_test_x='
506 eval sh -c '\''
507 if test -d "$1"; then
508 test -d "$1/.";
509 else
510 case $1 in #(
511 -*)set "./$1";;
512 esac;
513 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
514 ???[sx]*):;;*)false;;esac;fi
515 '\'' sh
516 '
517fi
518as_executable_p=$as_test_x
519
520# Sed expression to map a string onto a valid CPP name.
521as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
522
523# Sed expression to map a string onto a valid variable name.
524as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
525
526
527exec 7<&0 </dev/null 6>&1
528
529# Name of the host.
530# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
531# so uname gets run too.
532ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
533
534#
535# Initializations.
536#
537ac_default_prefix=/usr/local
538ac_clean_files=
539ac_config_libobj_dir=.
540LIBOBJS=
541cross_compiling=no
542subdirs=
543MFLAGS=
544MAKEFLAGS=
545
546# Identity of this package.
547PACKAGE_NAME=
548PACKAGE_TARNAME=
549PACKAGE_VERSION=
550PACKAGE_STRING=
551PACKAGE_BUGREPORT=
552PACKAGE_URL=
553
554ac_unique_file="ABOUT_APACHE"
555enable_option_checking=no
556ac_default_prefix=/usr/local/apache2
557# Factoring default headers for most tests.
558ac_includes_default="\
559#include <stdio.h>
560#ifdef HAVE_SYS_TYPES_H
561# include <sys/types.h>
562#endif
563#ifdef HAVE_SYS_STAT_H
564# include <sys/stat.h>
565#endif
566#ifdef STDC_HEADERS
567# include <stdlib.h>
568# include <stddef.h>
569#else
570# ifdef HAVE_STDLIB_H
571# include <stdlib.h>
572# endif
573#endif
574#ifdef HAVE_STRING_H
575# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
576# include <memory.h>
577# endif
578# include <string.h>
579#endif
580#ifdef HAVE_STRINGS_H
581# include <strings.h>
582#endif
583#ifdef HAVE_INTTYPES_H
584# include <inttypes.h>
585#endif
586#ifdef HAVE_STDINT_H
587# include <stdint.h>
588#endif
589#ifdef HAVE_UNISTD_H
590# include <unistd.h>
591#endif"
592
593ac_subst_vars='LTLIBOBJS
594LIBOBJS
595HTTPD_VERSION
596ap_make_delimiter
597ap_make_include
598perlbin
599APU_CONFIG
600APU_VERSION
601APU_INCLUDEDIR
602APU_BINDIR
603APR_CONFIG
604APR_VERSION
605APR_INCLUDEDIR
606APR_BINDIR
607DSO_MODULES
608INSTALL_PROG_FLAGS
609MK_IMPLIB
610SH_LIBTOOL
611SH_LIBS
612CORE_IMPLIB
613CORE_IMPLIB_FILE
614nonssl_listen_stmt_2
615nonssl_listen_stmt_1
616SSLPORT
617PORT
618MODULE_CLEANDIRS
619MODULE_DIRS
620LIBTOOL
621NOTEST_LIBS
622NOTEST_LDFLAGS
623NOTEST_CXXFLAGS
624NOTEST_CFLAGS
625NOTEST_CPPFLAGS
626INCLUDES
627UTIL_LDFLAGS
628HTTPD_LDFLAGS
629SH_LDFLAGS
630LT_LDFLAGS
631LTFLAGS
632CXXFLAGS
633CXX
634other_targets
635proxycachedir
636runtimedir
637installbuilddir
638iconsdir
639errordir
640manualdir
641htdocsdir
642logfiledir
643cgidir
644abs_srcdir
645EXTRA_INCLUDES
646EXTRA_LIBS
647EXTRA_LDFLAGS
648EXTRA_CXXFLAGS
649EXTRA_CFLAGS
650EXTRA_CPPFLAGS
651AP_CLEAN_SRCLIB_DIRS
652AP_BUILD_SRCLIB_DIRS
653AP_LIBS
654shared_build
655POST_SHARED_CMDS
656PRE_SHARED_CMDS
657OS_SPECIFIC_VARS
658SHLIBPATH_VAR
659BUILTIN_LIBS
660OS_DIR
661OS
662MPM_LIB
663progname
664MOD_SO_LDADD
665INSTALL_DSO
666MOD_REWRITE_LDADD
667MOD_ALIAS_LDADD
668MOD_USERDIR_LDADD
669MOD_SPELING_LDADD
670MOD_ACTIONS_LDADD
671MOD_IMAGEMAP_LDADD
672MOD_DIR_LDADD
673MOD_NEGOTIATION_LDADD
674MOD_VHOST_ALIAS_LDADD
675MOD_DAV_LOCK_LDADD
676MOD_DAV_FS_LDADD
677MOD_CGI_LDADD
678MOD_CGID_LDADD
679MOD_SUEXEC_LDADD
680MOD_INFO_LDADD
681MOD_ASIS_LDADD
682MOD_AUTOINDEX_LDADD
683MOD_STATUS_LDADD
684MOD_DAV_LDADD
685MOD_MIME_LDADD
686MOD_HTTP_LDADD
687APACHECTL_ULIMIT
688NONPORTABLE_SUPPORT
689httxt2dbm_LTFLAGS
690htcacheclean_LTFLAGS
691checkgid_LTFLAGS
692ab_LTFLAGS
693htdbm_LTFLAGS
694logresolve_LTFLAGS
695rotatelogs_LTFLAGS
696htdigest_LTFLAGS
697htpasswd_LTFLAGS
698MPM_SUBDIR_NAME
699MPM_NAME
700MOD_OPTIONAL_FN_EXPORT_LDADD
701MOD_OPTIONAL_FN_IMPORT_LDADD
702MOD_OPTIONAL_HOOK_IMPORT_LDADD
703MOD_OPTIONAL_HOOK_EXPORT_LDADD
704MOD_SSL_LDADD
705SSL_LIBS
706MOD_PROXY_BALANCER_LDADD
707MOD_PROXY_AJP_LDADD
708MOD_PROXY_SCGI_LDADD
709MOD_PROXY_HTTP_LDADD
710MOD_PROXY_FTP_LDADD
711MOD_PROXY_CONNECT_LDADD
712MOD_PROXY_LDADD
713MOD_VERSION_LDADD
714MOD_SETENVIF_LDADD
715MOD_UNIQUE_ID_LDADD
716MOD_USERTRACK_LDADD
717MOD_IDENT_LDADD
718MOD_HEADERS_LDADD
719MOD_EXPIRES_LDADD
720MOD_CERN_META_LDADD
721MOD_MIME_MAGIC_LDADD
722MOD_ENV_LDADD
723MOD_LOGIO_LDADD
724MOD_LOG_FORENSIC_LDADD
725MOD_LOG_CONFIG_LDADD
726MOD_LDAP_LDADD
727MOD_DEFLATE_LDADD
728MOD_CHARSET_LITE_LDADD
729MOD_SUBSTITUTE_LDADD
730MOD_FILTER_LDADD
731MOD_INCLUDE_LDADD
732MOD_EXT_FILTER_LDADD
733MOD_REQTIMEOUT_LDADD
734MOD_CASE_FILTER_IN_LDADD
735MOD_CASE_FILTER_LDADD
736MOD_EXAMPLE_LDADD
737MOD_ECHO_LDADD
738MOD_DUMPIO_LDADD
739MOD_BUCKETEER_LDADD
740MOD_DBD_LDADD
741MOD_MEM_CACHE_LDADD
742MOD_DISK_CACHE_LDADD
743MOD_CACHE_LDADD
744MOD_FILE_CACHE_LDADD
745MOD_ISAPI_LDADD
746MOD_AUTH_DIGEST_LDADD
747MOD_AUTH_BASIC_LDADD
748MOD_AUTHZ_DEFAULT_LDADD
749MOD_AUTHNZ_LDAP_LDADD
750MOD_AUTHZ_OWNER_LDADD
751MOD_AUTHZ_DBM_LDADD
752MOD_AUTHZ_USER_LDADD
753MOD_AUTHZ_GROUPFILE_LDADD
754MOD_AUTHZ_HOST_LDADD
755MOD_AUTHN_ALIAS_LDADD
756MOD_AUTHN_DEFAULT_LDADD
757MOD_AUTHN_DBD_LDADD
758MOD_AUTHN_ANON_LDADD
759MOD_AUTHN_DBM_LDADD
760MOD_AUTHN_FILE_LDADD
761PILDFLAGS
762PICFLAGS
763CRYPT_LIBS
764MKDEP
765EGREP
766GREP
767INSTALL
768MKINSTALLDIRS
769LYNX_PATH
770RANLIB
771LN_S
772AWK
773RSYNC
774PKGCONFIG
775RM
776LTCFLAGS
777SHLTCFLAGS
778PCRE_CONFIG
779CPP
780OBJEXT
781EXEEXT
782ac_ct_CC
783CPPFLAGS
784LDFLAGS
785CFLAGS
786CC
787target_os
788target_vendor
789target_cpu
790target
791host_os
792host_vendor
793host_cpu
794host
795build_os
796build_vendor
797build_cpu
798build
799rel_proxycachedir
800exp_proxycachedir
801rel_logfiledir
802exp_logfiledir
803rel_runtimedir
804exp_runtimedir
805rel_localstatedir
806exp_localstatedir
807rel_includedir
808exp_includedir
809rel_cgidir
810exp_cgidir
811rel_manualdir
812exp_manualdir
813rel_htdocsdir
814exp_htdocsdir
815rel_iconsdir
816exp_iconsdir
817rel_errordir
818exp_errordir
819rel_installbuilddir
820exp_installbuilddir
821rel_datadir
822exp_datadir
823rel_sysconfdir
824exp_sysconfdir
825rel_mandir
826exp_mandir
827rel_libexecdir
828exp_libexecdir
829rel_libdir
830exp_libdir
831rel_sbindir
832exp_sbindir
833rel_bindir
834exp_bindir
835rel_exec_prefix
836exp_exec_prefix
837target_alias
838host_alias
839build_alias
840LIBS
841ECHO_T
842ECHO_N
843ECHO_C
844DEFS
845mandir
846localedir
847libdir
848psdir
849pdfdir
850dvidir
851htmldir
852infodir
853docdir
854oldincludedir
855includedir
856localstatedir
857sharedstatedir
858sysconfdir
859datadir
860datarootdir
861libexecdir
862sbindir
863bindir
864program_transform_name
865prefix
866exec_prefix
867PACKAGE_URL
868PACKAGE_BUGREPORT
869PACKAGE_STRING
870PACKAGE_VERSION
871PACKAGE_TARNAME
872PACKAGE_NAME
873PATH_SEPARATOR
874SHELL'
875ac_subst_files=''
876ac_user_opts='
877enable_option_checking
878enable_layout
879with_included_apr
880with_apr
881with_apr_util
882with_pcre
883with_port
884with_sslport
885enable_v4_mapped
886enable_exception_hook
887enable_maintainer_mode
888enable_pie
889enable_modules
890enable_mods_shared
891enable_authn_file
892enable_authn_dbm
893enable_authn_anon
894enable_authn_dbd
895enable_authn_default
896enable_authn_alias
897enable_authz_host
898enable_authz_groupfile
899enable_authz_user
900enable_authz_dbm
901enable_authz_owner
902enable_authnz_ldap
903enable_authz_default
904enable_auth_basic
905enable_auth_digest
906enable_isapi
907enable_file_cache
908enable_cache
909enable_disk_cache
910enable_mem_cache
911enable_dbd
912enable_bucketeer
913enable_dumpio
914enable_echo
915enable_example
916enable_case_filter
917enable_case_filter_in
918enable_reqtimeout
919enable_ext_filter
920enable_include
921enable_filter
922enable_substitute
923enable_charset_lite
924enable_deflate
925with_z
926enable_ldap
927enable_log_config
928enable_log_forensic
929enable_logio
930enable_env
931enable_mime_magic
932enable_cern_meta
933enable_expires
934enable_headers
935enable_ident
936enable_usertrack
937enable_unique_id
938enable_setenvif
939enable_version
940enable_proxy
941enable_proxy_connect
942enable_proxy_ftp
943enable_proxy_http
944enable_proxy_scgi
945enable_proxy_ajp
946enable_proxy_balancer
947enable_ssl
948with_sslc
949with_ssl
950enable_distcache
951enable_optional_hook_export
952enable_optional_hook_import
953enable_optional_fn_import
954enable_optional_fn_export
955with_mpm
956enable_static_support
957enable_static_htpasswd
958enable_static_htdigest
959enable_static_rotatelogs
960enable_static_logresolve
961enable_static_htdbm
962enable_static_ab
963enable_static_checkgid
964enable_static_htcacheclean
965enable_static_httxt2dbm
966enable_http
967enable_mime
968with_module
969enable_dav
970enable_status
971enable_autoindex
972enable_asis
973enable_info
974enable_suexec
975enable_cgid
976enable_cgi
977enable_dav_fs
978enable_dav_lock
979enable_vhost_alias
980enable_negotiation
981enable_dir
982enable_imagemap
983enable_actions
984enable_speling
985enable_userdir
986enable_alias
987enable_rewrite
988enable_so
989with_program_name
990with_suexec_bin
991with_suexec_caller
992with_suexec_userdir
993with_suexec_docroot
994with_suexec_uidmin
995with_suexec_gidmin
996with_suexec_logfile
997with_suexec_safepath
998with_suexec_umask
999'
1000 ac_precious_vars='build_alias
1001host_alias
1002target_alias
1003CC
1004CFLAGS
1005LDFLAGS
1006LIBS
1007CPPFLAGS
1008CPP'
1009
1010
1011# Initialize some variables set by options.
1012ac_init_help=
1013ac_init_version=false
1014ac_unrecognized_opts=
1015ac_unrecognized_sep=
1016# The variables have the same names as the options, with
1017# dashes changed to underlines.
1018cache_file=/dev/null
1019exec_prefix=NONE
1020no_create=
1021no_recursion=
1022prefix=NONE
1023program_prefix=NONE
1024program_suffix=NONE
1025program_transform_name=s,x,x,
1026silent=
1027site=
1028srcdir=
1029verbose=
1030x_includes=NONE
1031x_libraries=NONE
1032
1033# Installation directory options.
1034# These are left unexpanded so users can "make install exec_prefix=/foo"
1035# and all the variables that are supposed to be based on exec_prefix
1036# by default will actually change.
1037# Use braces instead of parens because sh, perl, etc. also accept them.
1038# (The list follows the same order as the GNU Coding Standards.)
1039bindir='${exec_prefix}/bin'
1040sbindir='${exec_prefix}/sbin'
1041libexecdir='${exec_prefix}/libexec'
1042datarootdir='${prefix}/share'
1043datadir='${datarootdir}'
1044sysconfdir='${prefix}/etc'
1045sharedstatedir='${prefix}/com'
1046localstatedir='${prefix}/var'
1047includedir='${prefix}/include'
1048oldincludedir='/usr/include'
1049docdir='${datarootdir}/doc/${PACKAGE}'
1050infodir='${datarootdir}/info'
1051htmldir='${docdir}'
1052dvidir='${docdir}'
1053pdfdir='${docdir}'
1054psdir='${docdir}'
1055libdir='${exec_prefix}/lib'
1056localedir='${datarootdir}/locale'
1057mandir='${datarootdir}/man'
1058
1059ac_prev=
1060ac_dashdash=
1061for ac_option
1062do
1063 # If the previous option needs an argument, assign it.
1064 if test -n "$ac_prev"; then
1065 eval $ac_prev=\$ac_option
1066 ac_prev=
1067 continue
1068 fi
1069
1070 case $ac_option in
1071 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1072 *) ac_optarg=yes ;;
1073 esac
1074
1075 # Accept the important Cygnus configure options, so we can diagnose typos.
1076
1077 case $ac_dashdash$ac_option in
1078 --)
1079 ac_dashdash=yes ;;
1080
1081 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1082 ac_prev=bindir ;;
1083 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1084 bindir=$ac_optarg ;;
1085
1086 -build | --build | --buil | --bui | --bu)
1087 ac_prev=build_alias ;;
1088 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1089 build_alias=$ac_optarg ;;
1090
1091 -cache-file | --cache-file | --cache-fil | --cache-fi \
1092 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1093 ac_prev=cache_file ;;
1094 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1095 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1096 cache_file=$ac_optarg ;;
1097
1098 --config-cache | -C)
1099 cache_file=config.cache ;;
1100
1101 -datadir | --datadir | --datadi | --datad)
1102 ac_prev=datadir ;;
1103 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1104 datadir=$ac_optarg ;;
1105
1106 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1107 | --dataroo | --dataro | --datar)
1108 ac_prev=datarootdir ;;
1109 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1110 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1111 datarootdir=$ac_optarg ;;
1112
1113 -disable-* | --disable-*)
1114 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1115 # Reject names that are not valid shell variable names.
1116 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1117 as_fn_error "invalid feature name: $ac_useropt"
1118 ac_useropt_orig=$ac_useropt
1119 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1120 case $ac_user_opts in
1121 *"
1122"enable_$ac_useropt"
1123"*) ;;
1124 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1125 ac_unrecognized_sep=', ';;
1126 esac
1127 eval enable_$ac_useropt=no ;;
1128
1129 -docdir | --docdir | --docdi | --doc | --do)
1130 ac_prev=docdir ;;
1131 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1132 docdir=$ac_optarg ;;
1133
1134 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1135 ac_prev=dvidir ;;
1136 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1137 dvidir=$ac_optarg ;;
1138
1139 -enable-* | --enable-*)
1140 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1141 # Reject names that are not valid shell variable names.
1142 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1143 as_fn_error "invalid feature name: $ac_useropt"
1144 ac_useropt_orig=$ac_useropt
1145 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1146 case $ac_user_opts in
1147 *"
1148"enable_$ac_useropt"
1149"*) ;;
1150 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1151 ac_unrecognized_sep=', ';;
1152 esac
1153 eval enable_$ac_useropt=\$ac_optarg ;;
1154
1155 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1156 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1157 | --exec | --exe | --ex)
1158 ac_prev=exec_prefix ;;
1159 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1160 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1161 | --exec=* | --exe=* | --ex=*)
1162 exec_prefix=$ac_optarg ;;
1163
1164 -gas | --gas | --ga | --g)
1165 # Obsolete; use --with-gas.
1166 with_gas=yes ;;
1167
1168 -help | --help | --hel | --he | -h)
1169 ac_init_help=long ;;
1170 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1171 ac_init_help=recursive ;;
1172 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1173 ac_init_help=short ;;
1174
1175 -host | --host | --hos | --ho)
1176 ac_prev=host_alias ;;
1177 -host=* | --host=* | --hos=* | --ho=*)
1178 host_alias=$ac_optarg ;;
1179
1180 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1181 ac_prev=htmldir ;;
1182 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1183 | --ht=*)
1184 htmldir=$ac_optarg ;;
1185
1186 -includedir | --includedir | --includedi | --included | --include \
1187 | --includ | --inclu | --incl | --inc)
1188 ac_prev=includedir ;;
1189 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1190 | --includ=* | --inclu=* | --incl=* | --inc=*)
1191 includedir=$ac_optarg ;;
1192
1193 -infodir | --infodir | --infodi | --infod | --info | --inf)
1194 ac_prev=infodir ;;
1195 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1196 infodir=$ac_optarg ;;
1197
1198 -libdir | --libdir | --libdi | --libd)
1199 ac_prev=libdir ;;
1200 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1201 libdir=$ac_optarg ;;
1202
1203 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1204 | --libexe | --libex | --libe)
1205 ac_prev=libexecdir ;;
1206 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1207 | --libexe=* | --libex=* | --libe=*)
1208 libexecdir=$ac_optarg ;;
1209
1210 -localedir | --localedir | --localedi | --localed | --locale)
1211 ac_prev=localedir ;;
1212 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1213 localedir=$ac_optarg ;;
1214
1215 -localstatedir | --localstatedir | --localstatedi | --localstated \
1216 | --localstate | --localstat | --localsta | --localst | --locals)
1217 ac_prev=localstatedir ;;
1218 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1219 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1220 localstatedir=$ac_optarg ;;
1221
1222 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1223 ac_prev=mandir ;;
1224 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1225 mandir=$ac_optarg ;;
1226
1227 -nfp | --nfp | --nf)
1228 # Obsolete; use --without-fp.
1229 with_fp=no ;;
1230
1231 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1232 | --no-cr | --no-c | -n)
1233 no_create=yes ;;
1234
1235 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1236 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1237 no_recursion=yes ;;
1238
1239 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1240 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1241 | --oldin | --oldi | --old | --ol | --o)
1242 ac_prev=oldincludedir ;;
1243 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1244 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1245 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1246 oldincludedir=$ac_optarg ;;
1247
1248 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1249 ac_prev=prefix ;;
1250 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1251 prefix=$ac_optarg ;;
1252
1253 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1254 | --program-pre | --program-pr | --program-p)
1255 ac_prev=program_prefix ;;
1256 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1257 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1258 program_prefix=$ac_optarg ;;
1259
1260 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1261 | --program-suf | --program-su | --program-s)
1262 ac_prev=program_suffix ;;
1263 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1264 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1265 program_suffix=$ac_optarg ;;
1266
1267 -program-transform-name | --program-transform-name \
1268 | --program-transform-nam | --program-transform-na \
1269 | --program-transform-n | --program-transform- \
1270 | --program-transform | --program-transfor \
1271 | --program-transfo | --program-transf \
1272 | --program-trans | --program-tran \
1273 | --progr-tra | --program-tr | --program-t)
1274 ac_prev=program_transform_name ;;
1275 -program-transform-name=* | --program-transform-name=* \
1276 | --program-transform-nam=* | --program-transform-na=* \
1277 | --program-transform-n=* | --program-transform-=* \
1278 | --program-transform=* | --program-transfor=* \
1279 | --program-transfo=* | --program-transf=* \
1280 | --program-trans=* | --program-tran=* \
1281 | --progr-tra=* | --program-tr=* | --program-t=*)
1282 program_transform_name=$ac_optarg ;;
1283
1284 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1285 ac_prev=pdfdir ;;
1286 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1287 pdfdir=$ac_optarg ;;
1288
1289 -psdir | --psdir | --psdi | --psd | --ps)
1290 ac_prev=psdir ;;
1291 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1292 psdir=$ac_optarg ;;
1293
1294 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1295 | -silent | --silent | --silen | --sile | --sil)
1296 silent=yes ;;
1297
1298 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1299 ac_prev=sbindir ;;
1300 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1301 | --sbi=* | --sb=*)
1302 sbindir=$ac_optarg ;;
1303
1304 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1305 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1306 | --sharedst | --shareds | --shared | --share | --shar \
1307 | --sha | --sh)
1308 ac_prev=sharedstatedir ;;
1309 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1310 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1311 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1312 | --sha=* | --sh=*)
1313 sharedstatedir=$ac_optarg ;;
1314
1315 -site | --site | --sit)
1316 ac_prev=site ;;
1317 -site=* | --site=* | --sit=*)
1318 site=$ac_optarg ;;
1319
1320 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1321 ac_prev=srcdir ;;
1322 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1323 srcdir=$ac_optarg ;;
1324
1325 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1326 | --syscon | --sysco | --sysc | --sys | --sy)
1327 ac_prev=sysconfdir ;;
1328 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1329 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1330 sysconfdir=$ac_optarg ;;
1331
1332 -target | --target | --targe | --targ | --tar | --ta | --t)
1333 ac_prev=target_alias ;;
1334 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1335 target_alias=$ac_optarg ;;
1336
1337 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1338 verbose=yes ;;
1339
1340 -version | --version | --versio | --versi | --vers | -V)
1341 ac_init_version=: ;;
1342
1343 -with-* | --with-*)
1344 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1345 # Reject names that are not valid shell variable names.
1346 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1347 as_fn_error "invalid package name: $ac_useropt"
1348 ac_useropt_orig=$ac_useropt
1349 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1350 case $ac_user_opts in
1351 *"
1352"with_$ac_useropt"
1353"*) ;;
1354 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1355 ac_unrecognized_sep=', ';;
1356 esac
1357 eval with_$ac_useropt=\$ac_optarg ;;
1358
1359 -without-* | --without-*)
1360 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1361 # Reject names that are not valid shell variable names.
1362 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1363 as_fn_error "invalid package name: $ac_useropt"
1364 ac_useropt_orig=$ac_useropt
1365 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1366 case $ac_user_opts in
1367 *"
1368"with_$ac_useropt"
1369"*) ;;
1370 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1371 ac_unrecognized_sep=', ';;
1372 esac
1373 eval with_$ac_useropt=no ;;
1374
1375 --x)
1376 # Obsolete; use --with-x.
1377 with_x=yes ;;
1378
1379 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1380 | --x-incl | --x-inc | --x-in | --x-i)
1381 ac_prev=x_includes ;;
1382 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1383 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1384 x_includes=$ac_optarg ;;
1385
1386 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1387 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1388 ac_prev=x_libraries ;;
1389 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1390 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1391 x_libraries=$ac_optarg ;;
1392
1393 -*) as_fn_error "unrecognized option: \`$ac_option'
1394Try \`$0 --help' for more information."
1395 ;;
1396
1397 *=*)
1398 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1399 # Reject names that are not valid shell variable names.
1400 case $ac_envvar in #(
1401 '' | [0-9]* | *[!_$as_cr_alnum]* )
1402 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1403 esac
1404 eval $ac_envvar=\$ac_optarg
1405 export $ac_envvar ;;
1406
1407 *)
1408 # FIXME: should be removed in autoconf 3.0.
1409 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1410 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1411 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1412 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1413 ;;
1414
1415 esac
1416done
1417
1418if test -n "$ac_prev"; then
1419 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1420 as_fn_error "missing argument to $ac_option"
1421fi
1422
1423if test -n "$ac_unrecognized_opts"; then
1424 case $enable_option_checking in
1425 no) ;;
1426 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1427 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1428 esac
1429fi
1430
1431# Check all directory arguments for consistency.
1432for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1433 datadir sysconfdir sharedstatedir localstatedir includedir \
1434 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1435 libdir localedir mandir
1436do
1437 eval ac_val=\$$ac_var
1438 # Remove trailing slashes.
1439 case $ac_val in
1440 */ )
1441 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1442 eval $ac_var=\$ac_val;;
1443 esac
1444 # Be sure to have absolute directory names.
1445 case $ac_val in
1446 [\\/$]* | ?:[\\/]* ) continue;;
1447 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1448 esac
1449 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
1450done
1451
1452# There might be people who depend on the old broken behavior: `$host'
1453# used to hold the argument of --host etc.
1454# FIXME: To remove some day.
1455build=$build_alias
1456host=$host_alias
1457target=$target_alias
1458
1459# FIXME: To remove some day.
1460if test "x$host_alias" != x; then
1461 if test "x$build_alias" = x; then
1462 cross_compiling=maybe
1463 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1464 If a cross compiler is detected then cross compile mode will be used." >&2
1465 elif test "x$build_alias" != "x$host_alias"; then
1466 cross_compiling=yes
1467 fi
1468fi
1469
1470ac_tool_prefix=
1471test -n "$host_alias" && ac_tool_prefix=$host_alias-
1472
1473test "$silent" = yes && exec 6>/dev/null
1474
1475
1476ac_pwd=`pwd` && test -n "$ac_pwd" &&
1477ac_ls_di=`ls -di .` &&
1478ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1479 as_fn_error "working directory cannot be determined"
1480test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1481 as_fn_error "pwd does not report name of working directory"
1482
1483
1484# Find the source files, if location was not specified.
1485if test -z "$srcdir"; then
1486 ac_srcdir_defaulted=yes
1487 # Try the directory containing this script, then the parent directory.
1488 ac_confdir=`$as_dirname -- "$as_myself" ||
1489$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1490 X"$as_myself" : 'X\(//\)[^/]' \| \
1491 X"$as_myself" : 'X\(//\)$' \| \
1492 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1493$as_echo X"$as_myself" |
1494 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1495 s//\1/
1496 q
1497 }
1498 /^X\(\/\/\)[^/].*/{
1499 s//\1/
1500 q
1501 }
1502 /^X\(\/\/\)$/{
1503 s//\1/
1504 q
1505 }
1506 /^X\(\/\).*/{
1507 s//\1/
1508 q
1509 }
1510 s/.*/./; q'`
1511 srcdir=$ac_confdir
1512 if test ! -r "$srcdir/$ac_unique_file"; then
1513 srcdir=..
1514 fi
1515else
1516 ac_srcdir_defaulted=no
1517fi
1518if test ! -r "$srcdir/$ac_unique_file"; then
1519 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1520 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1521fi
1522ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1523ac_abs_confdir=`(
1524 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1525 pwd)`
1526# When building in place, set srcdir=.
1527if test "$ac_abs_confdir" = "$ac_pwd"; then
1528 srcdir=.
1529fi
1530# Remove unnecessary trailing slashes from srcdir.
1531# Double slashes in file names in object file debugging info
1532# mess up M-x gdb in Emacs.
1533case $srcdir in
1534*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1535esac
1536for ac_var in $ac_precious_vars; do
1537 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1538 eval ac_env_${ac_var}_value=\$${ac_var}
1539 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1540 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1541done
1542
1543#
1544# Report the --help message.
1545#
1546if test "$ac_init_help" = "long"; then
1547 # Omit some internal or obsolete options to make the list less imposing.
1548 # This message is too long to be a string in the A/UX 3.1 sh.
1549 cat <<_ACEOF
1550\`configure' configures this package to adapt to many kinds of systems.
1551
1552Usage: $0 [OPTION]... [VAR=VALUE]...
1553
1554To assign environment variables (e.g., CC, CFLAGS...), specify them as
1555VAR=VALUE. See below for descriptions of some of the useful variables.
1556
1557Defaults for the options are specified in brackets.
1558
1559Configuration:
1560 -h, --help display this help and exit
1561 --help=short display options specific to this package
1562 --help=recursive display the short help of all the included packages
1563 -V, --version display version information and exit
1564 -q, --quiet, --silent do not print \`checking...' messages
1565 --cache-file=FILE cache test results in FILE [disabled]
1566 -C, --config-cache alias for \`--cache-file=config.cache'
1567 -n, --no-create do not create output files
1568 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1569
1570Installation directories:
1571 --prefix=PREFIX install architecture-independent files in PREFIX
1572 [$ac_default_prefix]
1573 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1574 [PREFIX]
1575
1576By default, \`make install' will install all the files in
1577\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1578an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1579for instance \`--prefix=\$HOME'.
1580
1581For better control, use the options below.
1582
1583Fine tuning of the installation directories:
1584 --bindir=DIR user executables [EPREFIX/bin]
1585 --sbindir=DIR system admin executables [EPREFIX/sbin]
1586 --libexecdir=DIR program executables [EPREFIX/libexec]
1587 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1588 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1589 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1590 --libdir=DIR object code libraries [EPREFIX/lib]
1591 --includedir=DIR C header files [PREFIX/include]
1592 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1593 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1594 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1595 --infodir=DIR info documentation [DATAROOTDIR/info]
1596 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1597 --mandir=DIR man documentation [DATAROOTDIR/man]
1598 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1599 --htmldir=DIR html documentation [DOCDIR]
1600 --dvidir=DIR dvi documentation [DOCDIR]
1601 --pdfdir=DIR pdf documentation [DOCDIR]
1602 --psdir=DIR ps documentation [DOCDIR]
1603_ACEOF
1604
1605 cat <<\_ACEOF
1606
1607System types:
1608 --build=BUILD configure for building on BUILD [guessed]
1609 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1610 --target=TARGET configure for building compilers for TARGET [HOST]
1611_ACEOF
1612fi
1613
1614if test -n "$ac_init_help"; then
1615
1616 cat <<\_ACEOF
1617
1618Optional Features:
1619 --disable-option-checking ignore unrecognized --enable/--with options
1620 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1621 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1622 --enable-layout=LAYOUT
1623 --enable-v4-mapped Allow IPv6 sockets to handle IPv4 connections
1624 --enable-exception-hook Enable fatal exception hook
1625 --enable-maintainer-mode
1626 Turn on debugging and compile time warnings
1627 --enable-pie Build httpd as a Position Independent Executable
1628 --enable-modules=MODULE-LIST
1629 Space-separated list of modules to enable | "all" |
1630 "most"
1631 --enable-mods-shared=MODULE-LIST
1632 Space-separated list of shared modules to enable |
1633 "all" | "most"
1634 --disable-authn-file file-based authentication control
1635 --enable-authn-dbm DBM-based authentication control
1636 --enable-authn-anon anonymous user authentication control
1637 --enable-authn-dbd SQL-based authentication control
1638 --disable-authn-default authentication backstopper
1639 --enable-authn-alias auth provider alias
1640 --disable-authz-host host-based authorization control
1641 --disable-authz-groupfile
1642 'require group' authorization control
1643 --disable-authz-user 'require user' authorization control
1644 --enable-authz-dbm DBM-based authorization control
1645 --enable-authz-owner 'require file-owner' authorization control
1646 --enable-authnz-ldap LDAP based authentication
1647 --disable-authz-default authorization control backstopper
1648 --disable-auth-basic basic authentication
1649 --enable-auth-digest RFC2617 Digest authentication
1650 --enable-isapi isapi extension support
1651 --enable-file-cache File cache
1652 --enable-cache dynamic file caching
1653 --enable-disk-cache disk caching module
1654 --enable-mem-cache memory caching module
1655 --enable-dbd Apache DBD Framework
1656 --enable-bucketeer buckets manipulation filter
1657 --enable-dumpio I/O dump filter
1658 --enable-echo ECHO server
1659 --enable-example example and demo module
1660 --enable-case-filter example uppercase conversion filter
1661 --enable-case-filter-in example uppercase conversion input filter
1662 --enable-reqtimeout Limit time waiting for request from client
1663 --enable-ext-filter external filter module
1664 --disable-include Server Side Includes
1665 --disable-filter Smart Filtering
1666 --enable-substitute response content rewrite-like filtering
1667 --disable-charset-lite character set translation
1668 --enable-charset-lite character set translation
1669 --enable-deflate Deflate transfer encoding support
1670 --enable-ldap LDAP caching and connection pooling services
1671 --disable-log-config logging configuration
1672 --enable-log-forensic forensic logging
1673 --enable-logio input and output logging
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: