1 # --- T2-COPYRIGHT-BEGIN ---
2 # t2/package/*/apache/apache.conf
3 # Copyright (C) 2004 - 2025 The T2 SDE Project
4 # Copyright (C) 1998 - 2004 ROCK Linux Project
5 # SPDX-License-Identifier: GPL-2.0
6 # --- T2-COPYRIGHT-END ---
8 if [ $prefix_auto = 1 ]; then
9 if [ "$SDECFG_PKG_APACHE_PREFIX" ]; then
10 prefix="$SDECFG_PKG_APACHE_PREFIX"
16 [ "$sysconfdir" == "/etc" ] && sysconfdir=/etc/apache
17 [ "$datadir" == "/var/lib" ] && datadir=/var/lib/apache
19 if atstage "cross"; then
20 hook_add preconf 5 "echo 'ap_cv_void_ptr_lt_long=no' >> config.cache"
21 var_append makeopt ' ' 'LIBTOOL=$root/usr/bin/libtool'
24 # APR is mandatory, so no additional test needed.
26 var_append extraconfopt " " "--with-apr=$root/$(pkgprefix apr)"
28 var_append extraconfopt " " "--with-apr-util=$root/$(pkgprefix apr-util)"
30 pkginstalled nghttp2 && var_append extraconfopt " " "--enable-http2"
32 pkginstalled pcre && var_append extraconfopt " " "--with-pcre=$root/$(pkgprefix pcre)"
34 if [ $pkg = "apache" ]; then
35 datadir="$localstatedir/lib"
36 # or maybe www would be nicer than lib ?!? ...
38 if [ "$SDECFG_PKG_APACHE_SUEXEC" == "1" ]; then
39 if [ "${SDECFG_PKG_APACHE_DOCROOT:0:1}" == "/" ]; then
40 docroot="$SDECFG_PKG_APACHE_DOCROOT"
42 docroot="$localstatedir/$SDECFG_PKG_APACHE_DOCROOT"
45 var_append extraconfopt ' ' \
46 "--with-suexec-docroot=${docroot#$root}"
47 # var_append extraconfopt ' ' \
48 # "--with-suexec-userdir=$SDECFG_PKG_APACHE_USERDIR"
49 var_append extraconfopt ' ' "--with-suexec-caller=http \
51 hook_add postmake 5 "mv -vf $sbindir/suexec $bindir/"
54 var_append extraconfopt ' ' "--enable-cgi"
56 [ "$SDECFG_PKG_APACHE_MOD_SO" == 1 ] &&
57 var_append extraconfopt " " "--enable-so"
59 [ "$SDECFG_PKG_APACHE_MOD_AUTH_ANON" == 1 ] &&
60 var_append extraconfopt " " "--enable-mod-auth-anon"
62 [ "$SDECFG_PKG_APACHE_MOD_AUTH_DBM" == 1 ] &&
63 var_append extraconfopt " " "--enable-mod-auth-dbm"
65 [ "$SDECFG_PKG_APACHE_MOD_AUTH_DIGEST" == 1 ] &&
66 var_append extraconfopt " " "--enable-auth-digest"
68 if [ "$SDECFG_PKG_APACHE_MOD_AUTH_LDAP" == 1 ]; then
70 var_append extraconfopt " " "--with-ldap"
71 var_append extraconfopt " " "--enable-ldap"
72 var_append extraconfopt " " "--enable-auth-ldap"
73 var_append CFLAGS ' ' "-I$(pkgprefix includedir openldap)"
74 var_append CPPFLAGS ' ' "-I$(pkgprefix includedir openldap)"
75 var_append LDFLAGS ' ' "-L$(pkgprefix libdir openldap)"
76 export CPPFLAGS CFLAGS LDFLAGS
78 var_append extraconfopt " " "--enable-ssl"
80 [ "$SDECFG_PKG_APACHE_MOD_DAV" == 1 ] &&
81 var_append extraconfopt " " "--enable-dav"
83 [ "$SDECFG_PKG_APACHE_MOD_PROXY" == 1 ] &&
84 var_append extraconfopt " " "--enable-proxy"
86 [ "$SDECFG_PKG_APACHE_MOD_REWRITE" == 1 ] &&
87 var_append extraconfopt " " "--enable-rewrite"
89 [ "$SDECFG_PKG_APACHE_MOD_CACHE" == 1 ] &&
90 var_append extraconfopt " " "--enable-cache"
92 [ "$SDECFG_PKG_APACHE_MOD_DISK_CACHE" == 1 ] &&
93 var_append extraconfopt " " "--enable-disk-cache"
95 [ "$SDECFG_PKG_APACHE_MOD_DEFLATE" == 1 ] &&
96 var_append extraconfopt " " "--enable-deflate"
98 [ "$SDECFG_PKG_APACHE_MOD_INFO" == 1 ] &&
99 var_append extraconfopt " " "--enable-info"
101 [ "$SDECFG_PKG_APACHE_MOD_SPELLING" == 1 ] &&
102 var_append extraconfopt " " "--enable-spelling"
106 var_append extraconfopt " " "--with-berkeley-db=$(pkgprefix includedir bdb)"
108 [[ $libdir = *lib64 ]] && hook_add premake 3 "sed -i 's/usr\/lib$/usr\/lib64/' build/config_vars.mk"