]> granicus.if.org Git - apache/blob - build/config_vars.sh.in
Follow up to r1847232.
[apache] / build / config_vars.sh.in
1 #! @SHELL@
2 # -*- sh -*-
3 #
4 # Licensed to the Apache Software Foundation (ASF) under one or more
5 # contributor license agreements.  See the NOTICE file distributed with
6 # this work for additional information regarding copyright ownership.
7 # The ASF licenses this file to You under the Apache License, Version 2.0
8 # (the "License"); you may not use this file except in compliance with
9 # the License.  You may obtain a copy of the License at
10 #
11 #     http://www.apache.org/licenses/LICENSE-2.0
12 #
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
18
19 # config_vars.sh is generated by configure, and is run by the "install-build"
20 # target to generate a version of config_vars.mk which is suitable to be
21 # installed.  Such a file cannot be generated at configure-time, since it
22 # requires the output of the *installed* ap*-config scripts.
23
24 # For a DESTDIR=... installation using the bundled copies of 
25 # apr/apr-util, the installed ap?-config scripts must be found 
26 # in the DESTDIR-relocated install tree.  For a DESTDIR=... 
27 # installation when using *external* copies of apr/apr-util,
28 # the absolute path must be used, not DESTDIR-relocated.
29
30 if test -f ${DESTDIR}@APR_CONFIG@; then
31    APR_CONFIG=${DESTDIR}@APR_CONFIG@
32    APU_CONFIG=${DESTDIR}@APU_CONFIG@
33 else
34    APR_CONFIG=@APR_CONFIG@
35    APU_CONFIG=@APU_CONFIG@
36 fi
37
38 APR_LIBTOOL="`${APR_CONFIG} --apr-libtool`"
39 APR_INCLUDEDIR="`${APR_CONFIG} --includedir`"
40 test -n "@APU_CONFIG@" && APU_INCLUDEDIR="`${APU_CONFIG} --includedir`"
41
42 installbuilddir="@exp_installbuilddir@"
43
44 ### this might be better as a whitelist.
45 exec sed "
46 /^[A-Z0-9_]*_LDADD/d
47 /MPM_LIB/d
48 /APACHECTL_ULIMIT/d
49 /[a-z]*_LTFLAGS/d
50 /^MPM_MODULES/d
51 /^ENABLED_MPM_MODULE/d
52 /^DSO_MODULES/d
53 /^ENABLED_DSO_MODULES/d
54 /^LOAD_ALL_MODULES/d
55 /^NONPORTABLE_SUPPORT/d
56 /_SRCLIB_DIRS/d
57 /^UNITTEST_/d
58 /^davlockdb/d
59 /^other_targets/d
60 /^MODULE_/d
61 /^PORT/d
62 /^SSLPORT/d
63 /^nonssl_/d
64 /^ab_/d
65 /^CORE_IMPLIB/d
66 /^rel_/d
67 /^abs_srcdir/d
68 /^BUILTIN_LIBS/d
69 /^[A-Z]*_SHARED_CMDS/d
70 /^shared_build/d
71 /^OS_DIR/d
72 /^AP_LIBS/d
73 /^OS_SPECIFIC_VARS/d
74 /^MPM_SUBDIRS/d
75 /^EXTRA_INCLUDES/{ 
76   s, = , = -I\$(includedir) ,
77   s, -I\$(top_srcdir)/[^ ]*,,g
78   s, -I\$(top_builddir)/[^ ]*,,g
79 }
80 /^MKINSTALLDIRS/s,\$(abs_srcdir)/build,$installbuilddir,
81 /^INSTALL /s,\$(abs_srcdir)/build,$installbuilddir,
82 /^HTTPD_LDFLAGS/d
83 /^UTIL_LDFLAGS/d
84 /^APR_INCLUDEDIR.*$/s,.*,APR_INCLUDEDIR = ${APR_INCLUDEDIR},
85 /^APU_INCLUDEDIR.*$/s,.*,APU_INCLUDEDIR = ${APU_INCLUDEDIR},
86 /^LIBTOOL.*$/s,/[^ ]*/libtool \(.*\),${APR_LIBTOOL} @LTFLAGS@,
87 "