forces Apache to link in all of the APR functions whether they are used
by any static modules or not.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86770
13f79535-47bb-0310-9956-
ffa450edef68
STAMP = buildmk.stamp
-all: $(STAMP) generated_lists
+all: $(STAMP) generated_lists export_lists
@$(MAKE) AMFLAGS=$(AMFLAGS) -s -f build/build2.mk
generated_lists:
@echo config_m4_files = `find . -name config.m4` > $@
@n=`helpers/PrintPath libtoolize`; echo libtool_prefix = `dirname $$n`/.. >> $@
+export_lists:
+ @build/buildexports.sh main/exports.c support/httpd.exp
+
$(STAMP): build/buildcheck.sh
@build/buildcheck.sh && touch $(STAMP)
--- /dev/null
+#! /bin/sh
+
+exec >$1
+exec <$2
+
+echo "/* This is an ugly hack that needs to be here, so that libtool will"
+echo " * link all of the APR functions into server regardless of whether"
+echo " * the base server uses them."
+echo " */"
+echo ""
+
+cd lib/apr/include
+for file in *.h
+do
+ echo "#include \"$file\""
+done
+cd ../../../
+echo ""
+echo ""
+
+while read LINE
+do
+ if [ "x`echo $LINE | egrep '^[:space:]*apr_'`" != "x" ]; then
+ newline=`echo "$LINE" |\
+ sed -e 's%^\(.*\)%void *ap_hack_\1 = \1\;%'`
+ echo $newline
+ fi
+done
+
+echo "void *ap_ugly_hack;"
+exit 0
* effect the server based on command line options */
extern AP_DECLARE_DATA apr_array_header_t *ap_server_config_defines;
+extern void *ap_ugly_hack;
+
#ifdef __cplusplus
}
#endif
util_script.c util_uri.c util_md5.c util_cfgtree.c util_ebcdic.c \
rfc1413.c http_connection.c listen.c \
mpm_common.c util_charset.c util_debug.c util_xml.c \
- util_filter.c
+ util_filter.c exports.c
include $(top_srcdir)/build/ltlib.mk
const char *optarg;
apr_initialize();
+
+ /* This ugly little hack pulls any function referenced in exports.c into
+ * the web server. exports.c is generated by buildconf, and it
+ * has all of the apr functions specified by httpd.exp.
+ */
+ ap_ugly_hack = apr_initialize;
+
process = create_process(argc, argv);
pglobal = process->pool;
pconf = process->pconf;
apr_snprintf
apr_socket_from_file
apr_stat
+apr_strnatcmp
+apr_strnatcasecmp
apr_table_add
apr_table_addn
apr_table_do