1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/apache/apache.conf
3 # Copyright (C) 2004 - 2021 The T2 SDE Project
4 # Copyright (C) 1998 - 2004 ROCK Linux Project
6 # This Copyright note is generated by scripts/Create-CopyPatch,
7 # more information can be found in the files COPYING and README.
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License version 2.
11 # --- T2-COPYRIGHT-NOTE-END ---
13 if [ $prefix_auto = 1 ]; then
14 if [ "$SDECFG_PKG_APACHE_PREFIX" ]; then
15 prefix="$SDECFG_PKG_APACHE_PREFIX"
21 [ "$sysconfdir" == "/etc" ] && sysconfdir=/etc/apache
22 [ "$datadir" == "/var/lib" ] && datadir=/var/lib/apache
24 if atstage "cross"; then
25 hook_add preconf 5 "echo 'ap_cv_void_ptr_lt_long=no' >> config.cache"
26 var_append makeopt ' ' 'LIBTOOL=$root/usr/bin/libtool'
29 # APR is mandatory, so no additional test needed.
31 var_append extraconfopt " " "--with-apr=$root/$( pkgprefix apr )"
33 var_append extraconfopt " " "--with-apr-util=$root/$( pkgprefix apr-util )"
35 pkginstalled nghttp2 && var_append extraconfopt " " "--enable-http2"
37 pkginstalled pcre && var_append extraconfopt " " "--with-pcre=$root/$( pkgprefix pcre )"
39 if [ $pkg = "apache" ]; then
40 datadir="$localstatedir/lib"
41 # or maybe www would be nicer than lib ?!? ...
43 if [ "$SDECFG_PKG_APACHE_SUEXEC" == "1" ]; then
44 if [ "${SDECFG_PKG_APACHE_DOCROOT:0:1}" == "/" ]; then
45 docroot="$SDECFG_PKG_APACHE_DOCROOT"
47 docroot="$localstatedir/$SDECFG_PKG_APACHE_DOCROOT"
50 var_append extraconfopt ' ' \
51 "--with-suexec-docroot=${docroot#$root}"
52 # var_append extraconfopt ' ' \
53 # "--with-suexec-userdir=$SDECFG_PKG_APACHE_USERDIR"
54 var_append extraconfopt ' ' "--with-suexec-caller=http \
56 hook_add postmake 5 "mv -vf $sbindir/suexec $bindir/"
59 var_append extraconfopt ' ' "--enable-cgi"
61 [ "$SDECFG_PKG_APACHE_MOD_SO" == 1 ] &&
62 var_append extraconfopt " " "--enable-so"
64 [ "$SDECFG_PKG_APACHE_MOD_AUTH_ANON" == 1 ] &&
65 var_append extraconfopt " " "--enable-mod-auth-anon"
67 [ "$SDECFG_PKG_APACHE_MOD_AUTH_DBM" == 1 ] &&
68 var_append extraconfopt " " "--enable-mod-auth-dbm"
70 [ "$SDECFG_PKG_APACHE_MOD_AUTH_DIGEST" == 1 ] &&
71 var_append extraconfopt " " "--enable-auth-digest"
73 if [ "$SDECFG_PKG_APACHE_MOD_AUTH_LDAP" == 1 ]; then
75 var_append extraconfopt " " "--with-ldap"
76 var_append extraconfopt " " "--enable-ldap"
77 var_append extraconfopt " " "--enable-auth-ldap"
78 var_append CFLAGS ' ' "-I$( pkgprefix includedir openldap )"
79 var_append CPPFLAGS ' ' "-I$( pkgprefix includedir openldap )"
80 var_append LDFLAGS ' ' "-L$( pkgprefix libdir openldap )"
81 export CPPFLAGS CFLAGS LDFLAGS
83 var_append extraconfopt " " "--enable-ssl"
85 [ "$SDECFG_PKG_APACHE_MOD_DAV" == 1 ] &&
86 var_append extraconfopt " " "--enable-dav"
88 [ "$SDECFG_PKG_APACHE_MOD_PROXY" == 1 ] &&
89 var_append extraconfopt " " "--enable-proxy"
91 [ "$SDECFG_PKG_APACHE_MOD_REWRITE" == 1 ] &&
92 var_append extraconfopt " " "--enable-rewrite"
94 [ "$SDECFG_PKG_APACHE_MOD_CACHE" == 1 ] &&
95 var_append extraconfopt " " "--enable-cache"
97 [ "$SDECFG_PKG_APACHE_MOD_DISK_CACHE" == 1 ] &&
98 var_append extraconfopt " " "--enable-disk-cache"
100 [ "$SDECFG_PKG_APACHE_MOD_DEFLATE" == 1 ] &&
101 var_append extraconfopt " " "--enable-deflate"
103 [ "$SDECFG_PKG_APACHE_MOD_INFO" == 1 ] &&
104 var_append extraconfopt " " "--enable-info"
106 [ "$SDECFG_PKG_APACHE_MOD_SPELLING" == 1 ] &&
107 var_append extraconfopt " " "--enable-spelling"
110 if [ "$SDECFG_PKG_APACHE_BDB" ]; then
112 var_append extraconfopt " " \
113 "--with-berkeley-db=$( pkgprefix includedir bdb )"
116 [[ $libdir = *lib64 ]] && hook_add premake 3 "sed -i 's/usr\/lib$/usr\/lib64/' build/config_vars.mk"