]> granicus.if.org Git - apache/commitdiff
If a developer uses --with-program-name=foo, the config files are renamed
authorRyan Bloom <rbb@apache.org>
Tue, 25 Apr 2000 23:20:36 +0000 (23:20 +0000)
committerRyan Bloom <rbb@apache.org>
Tue, 25 Apr 2000 23:20:36 +0000 (23:20 +0000)
to match the name of the executable.  In this example, httpd.conf will be
renamed to foo.conf.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85041 13f79535-47bb-0310-9956-ffa450edef68

Makefile.in
configure.in

index 5e4396e789b8c3315d2cbb6cf9c7d1f446454df1..a1c03872a51dee3ce826f8b3bc3eae76c93526b2 100644 (file)
@@ -40,6 +40,9 @@ install-conf:
                        < $$i > $(sysconfdir)/$$i; \
                chmod 0644 $(sysconfdir)/$$i; \
                file=`echo $$i|sed s/-dist//`; \
+               if [ "$$file" = "httpd.conf" ]; then \
+                       file=`echo $$file|sed s/.*.conf/$(PROGRAM_NAME).conf/`; \
+               fi; \
                if test "$$file" != "$$i" && test ! -f $(sysconfdir)/$$file; then \
                        $(INSTALL_DATA) $(sysconfdir)/$$i $(sysconfdir)/$$file; \
                fi; \
index 3a2a4a741f786be6537429f2df5e7146be7e618e..f707238af7f1f1ecf4f1d8f50d0a647ccf9e9ec1 100644 (file)
@@ -165,12 +165,13 @@ echo $MODLIST | $AWK -f $srcdir/helpers/build-modules-c.awk > $srcdir/modules.c
 AC_ARG_WITH(program-name,
 [  --with-program-name=alternate executable name],[
   progname="$withval" ], [
-  progname='httpd'] )
+  progname="httpd"] )
 
 AC_OUTPUT_COMMANDS([
 echo '/* Generated by configure */' > ${path_h}.new
 echo "#define HTTPD_ROOT \"$prefix\"" >> ${path_h}.new
 echo "#define SUEXEC_BIN \"$bindir/suexec\"" >> ${path_h}.new
+echo "#define SERVER_CONFIG_FILE \"conf/$progname.conf\"" >> ${path_h}.new
 
 cmp ${path_h}.new ${path_h} >/dev/null 2>&1
 if test $? -ne 0 ; then
@@ -185,6 +186,7 @@ path_h=./include/ap_config_path.h
 prefix=$prefix
 exec_prefix=$exec_prefix
 bindir=$bindir
+progname=$progname
 ])
 
 AC_OUTPUT($APACHE_OUTPUT_FILES Makefile)