-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathconfigure.apxs
More file actions
executable file
·115 lines (97 loc) · 3.8 KB
/
configure.apxs
File metadata and controls
executable file
·115 lines (97 loc) · 3.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#!/bin/sh
#
# configure.apxs --- build configuration script for creating mod_bmx
# out of tree using the apxs utility and httpd build toolset
#
if test "$APXS" = ""; then
APXS=`which apxs 2>/dev/null`
fi;
if test "$APXS" = ""; then
echo $0 must be able to find apxs in your path,
echo or the environment variable APXS must provide the full path of APXS,
echo or you may specify it with:
echo
echo APXS=/path/to/apxs $0
echo
echo configuration failed
exit 1
fi
echo Configuring mod_bmx for APXS in $APXS
# top_builddir and top_srcdir are a misnomers, because build/*.mk
# scripts expect them to be the parent of the build directory
# they fail to use the $installbuilddir path.
exp_installbuilddir=`$APXS -q exp_installbuilddir`
top_installbuilddir=`cd $exp_installbuilddir/..; pwd`
top_installbuilddir=`echo $exp_installbuilddir | sed -e "s#/[^/]*\\\$##;"`
builddir=`pwd`
srcdir=$builddir
bmx_builddir=$builddir
bmx_srcdir=$builddir
# prefix is the default @@ServerRoot@@, where libexecdir/sysconfdir may
# be relative (if it is not their prefix, the rel_ paths remain unchanged
rel_fix_prefix=`$APXS -q prefix`
rel_libexecdir=`$APXS -q exp_libexecdir | sed -e "s#^$rel_fix_prefix/##;"`
rel_sysconfdir=`$APXS -q exp_sysconfdir | sed -e "s#^$rel_fix_prefix/##;"`
rel_logfiledir=`$APXS -q exp_logfiledir | sed -e "s#^$rel_fix_prefix/##;"`
httpd_conffile=`$APXS -q exp_sysconfdir`/`$APXS -q progname`.conf
if test -z "$AWK"; then
AWK=`$APXS -q AWK`
fi
for i in Makefile build/Makefile modules/bmx/Makefile modules/bmx/modules.mk; do
l_r=`echo $i|sed -e "s#/*[^/]*\\\$##;s#^\(..*\)\\\$#/\1#"`
sed -e "s#^\(exp_installbuilddir\)=.*#\1=$exp_installbuilddir#;" \
-e "s#^\(include\) \$(exp_installbuilddir)#\1 $exp_installbuilddir#;" \
-e "s#^\(top_builddir\)=.*#\1=$top_installbuilddir#;" \
-e "s#^\(top_srcdir\)=.*#\1=$top_installbuilddir#;" \
-e "s#^\(bmx_srcdir\)=.*#\1=$srcdir#;" \
-e "s#^\(bmx_builddir\)=.*#\1=$builddir#;" \
-e "s#^\(srcdir\)=.*#\1=$srcdir$l_r#;" \
-e "s#^\(builddir\)=.*#\1=$builddir$l_r#;" \
-e "s#^\(rel_libexecdir\)=.*#\1=$rel_libexecdir#;" \
-e "s#^\(rel_sysconfdir\)=.*#\1=$rel_sysconfdir#;" \
-e "s#^\(rel_logfiledir\)=.*#\1=$rel_logfiledir#;" \
-e "s#^\(httpd_conffile\)=.*#\1=$httpd_conffile#;" \
-e "s#^\(awk\)=.*#\1=$AWK#;" \
< $i.apxs > $i
done
touch .deps
touch build/.deps
touch modules/bmx/.deps
if false; then
# Requires modules/bmx/bmx_config.h.in template
# and build/Makefile.apxs feature test scripts
cd build
found_features=""
echo "Detecting features"
echo "Detecting features" > ../config.apxs.log
#test invocations follow these patterns;
if make local-clean conftest_foofn >>../config.apxs.log 2>&1; then
found_features="$found_features \
-e \"s/^#undef \(HAVE_FOOFN\)[ \t]*/#define \1 1/;\""
fi
if make local-clean conftest_sys_file_h >>../config.apxs.log 2>&1; then
found_features="$found_features \
-e \"s/^#undef \(HAVE_SYS_FILE_H\)[ \t]*/#define \1 1/;\""
fi
make local-distclean >>../config.apxs.log 2>&1
cd ..
if test "x$found_features" = "x"; then
cp modules/bmx/bmx_config.h.in modules/bmx/bmx_config.h
else
eval sed "$found_features" < modules/bmx/bmx_config.h.in \
> modules/bmx/bmx_config.h
fi
fi
echo ""
echo "Finished, run 'make' to compile mod_bmx"
echo ""
echo "Run 'make install' to install mod_bmx"
echo ""
#echo "The manual pages bmx/index.html and mod/mod_bmx.html"
#echo "will be installed to help get you started."
#echo
#echo "The conf/extra/httpd-bmx.conf will be installed as an example"
#echo "for you to work from. In your configuration file,"
#echo " `$APXS -q exp_sysconfdir`/`$APXS -q progname`.conf"
#echo "uncomment the line '#Include conf/extra/httpd-bmx.conf'"
#echo "to activate this example mod_bmx configuration."