]> granicus.if.org Git - apache/commitdiff
Move any load library path environment variables out of
authorJeff Trawick <trawick@apache.org>
Sat, 15 Dec 2001 13:56:36 +0000 (13:56 +0000)
committerJeff Trawick <trawick@apache.org>
Sat, 15 Dec 2001 13:56:36 +0000 (13:56 +0000)
apachectl and into a separate environment variable file which
can be more easily tailored by the admin.  The environment
variable file as built by Apache may have additional system-
specific settings.  For example, on OS/390 we tailor the heap
settings to allow lots of threads.

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

CHANGES
Makefile.in
configure.in
support/.cvsignore
support/Makefile.in
support/apachectl.in
support/envvars-std.in [new file with mode: 0644]

diff --git a/CHANGES b/CHANGES
index 202f2f0c2e8d574dab61f3e8c2ce9037b5c66f3c..2cab29bdebb0521b27debf0c4ed86884a413cbef 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,12 @@
 Changes with Apache 2.0.30-dev
 
+  *) Move any load library path environment variables out of 
+     apachectl and into a separate environment variable file which
+     can be more easily tailored by the admin.  The environment
+     variable file as built by Apache may have additional system-
+     specific settings.  For example, on OS/390 we tailor the heap
+     settings to allow lots of threads.  [Jeff Trawick]
+    
   *) Use the new APR pool code to reduce pool-related lock
      contention in the worker MPM.  [Sander Striker]
 
index b04fed64d0df02c9e4e5c5ce0c7eae8547db8ff9..4a9ec2cad64aefea46bfb764497ae806e2f2be89 100644 (file)
@@ -76,6 +76,12 @@ install-conf:
                        $(INSTALL_DATA) $(sysconfdir)/$$i $(sysconfdir)/$$file; \
                fi; \
        done
+       @if test -f "$(builddir)/envvars-std"; then \
+           cp -p envvars-std $(sbindir); \
+           if test ! -f $(sbindir)/envvars; then \
+               cp -p envvars-std $(sbindir)/envvars ; \
+           fi ; \
+       fi
 
 install-build:
        @echo Installing build system files 
index 1cb32b5bd9ae96bff232fd64da4bd787c1321731..806b60eb313b2874dcf84d5fdf1446a97f903c3d 100644 (file)
@@ -240,6 +240,19 @@ initgroups \
 bindprocessor \
 )
 
+dnl ## Set up any appropriate OS-specific environment variables for apachectl
+
+case $host in
+    *aix*)
+        OS_SPECIFIC_VARS="set LDR_CNTRL=\"MAXDATA=0x80000000\" ; export LDR_CNTRL ; set AIXTHREAD_SCOPE=S ; export AIXTHREAD_SCOPE"
+        ;;
+    *os390*)
+        OS_SPECIFIC_VARS="export _CEE_RUNOPTS=\"(STACK(,,ANY))\" ; export _EDC_ADD_ERRNO2=1"
+        ;;
+    *)
+        OS_SPECIFIC_VARS=""
+esac
+      
 AC_ARG_WITH(port,APACHE_HELP_STRING(--with-port=PORT,Port on which to listen (default is 80)),
         [if test "$withval" = "yes"; then AC_MSG_ERROR('option --with-port requires a value (the TCP port number)'); else PORT="$withval"; fi],
        [PORT=80])
@@ -262,6 +275,7 @@ APACHE_SUBST(OS)
 APACHE_SUBST(OS_DIR)
 APACHE_SUBST(BUILTIN_LIBS)
 APACHE_SUBST(SHLIBPATH_VAR)
+APACHE_SUBST(OS_SPECIFIC_VARS)
 
 PRE_SHARED_CMDS='echo ""'
 POST_SHARED_CMDS='echo ""'
@@ -437,7 +451,7 @@ case $host in
     ;;
 esac
 
-AC_OUTPUT($APACHE_OUTPUT_FILES support/apxs support/apachectl support/dbmmanage support/log_server_status support/logresolve.pl support/phf_abuse_log.cgi support/split-logfile build/rules.mk,,[
+AC_OUTPUT($APACHE_OUTPUT_FILES support/apxs support/apachectl support/dbmmanage support/envvars-std support/log_server_status support/logresolve.pl support/phf_abuse_log.cgi support/split-logfile build/rules.mk,,[
   APACHE_GEN_MAKEFILES
 ])
 
index 8913cde7714d3585120a1cfa59d48eab3d386de4..0743b4f5e03da4c32fac7019b446686d83d962c1 100644 (file)
@@ -18,6 +18,7 @@ Release
 apachectl
 checkgid
 dbmmanage
+envvars-std
 log_server_status
 logresolve.pl
 split-logfile
index c3475bf1fa92b800af780d1a4bcdb655d1e0b955..8f34369d24d238fd3b4f04246713fe8253a9ee0d 100644 (file)
@@ -21,6 +21,12 @@ install:
                chmod 755 $(sbindir)/$$i; \
            fi ; \
        done
+       @if test -f "$(builddir)/envvars-std"; then \
+           cp -p envvars-std $(sbindir); \
+           if test ! -f $(sbindir)/envvars; then \
+               cp -p envvars-std $(sbindir)/envvars ; \
+           fi ; \
+       fi
 
 htpasswd_OBJECTS = htpasswd.lo
 htpasswd: $(htpasswd_OBJECTS)
index e948f917128f8af38c03003bc23ab563508fb04e..b1cbb51be0db77b1660a57a61bddd348e8ac7175 100644 (file)
@@ -20,6 +20,7 @@
 # When multiple arguments are given, only the error from the _last_
 # one is reported.  Run "apachectl help" for usage info
 #
+ARGV="$@"
 #
 # |||||||||||||||||||| START CONFIGURATION SECTION  ||||||||||||||||||||
 # --------------------                              --------------------
@@ -30,10 +31,10 @@ PIDFILE=@prefix@/logs/@progname@.pid
 # the path to your httpd binary, including options if necessary
 HTTPD='@prefix@/bin/@progname@'
 #
-# the following lines are automatically uncommented for
-# binary builds
-#binbuild @SHLIBPATH_VAR@='@prefix@/lib/:$@SHLIBPATH_VAR@'
-#binbuild export @SHLIBPATH_VAR@
+# pick up any necessary environment variables
+if test -f @prefix@/bin/envvars; then
+  . @prefix@/bin/envvars
+fi
 #
 # a command that outputs a formatted text version of the HTML at the
 # url given on the command line.  Designed for lynx, however other
@@ -48,12 +49,11 @@ STATUSURL="http://localhost:@PORT@/server-status"
 # ||||||||||||||||||||   END CONFIGURATION SECTION  ||||||||||||||||||||
 
 ERROR=0
-ARGV="$@"
 if [ "x$ARGV" = "x" ] ; then 
     ARGS="help"
 fi
 
-for ARG in $@ $ARGS
+for ARG in $ARGV $ARGS
 do
     # check for pidfile
     if [ -f $PIDFILE ] ; then
diff --git a/support/envvars-std.in b/support/envvars-std.in
new file mode 100644 (file)
index 0000000..37a8606
--- /dev/null
@@ -0,0 +1,10 @@
+# envvars-std - default environment variables for apachectl
+#
+# This file is generated from envvars-std.in
+#
+# the following lines are automatically uncommented for
+# binary builds
+#binbuild @SHLIBPATH_VAR@='@prefix@/lib/:$@SHLIBPATH_VAR@'
+#binbuild export @SHLIBPATH_VAR@
+#
+@OS_SPECIFIC_VARS@