This patch solves a release showstopper by allowing the support binaries to be built statically against apr/apr-util/etc. It also adds static support for the htdbm tool.
This does _not_ add support for a static httpd, since that issue is not yet decided, but it should solve 7 of the 8 binaries that Ken was worried about. The "should httpd also be static" discussion can happen independently of this patch. -aaron Index: support/config.m4 =================================================================== RCS file: /home/cvs/httpd-2.0/support/config.m4,v retrieving revision 1.3 diff -u -u -r1.3 config.m4 --- support/config.m4 2 Feb 2002 21:33:03 -0000 1.3 +++ support/config.m4 7 Feb 2002 21:21:03 -0000 @@ -1,52 +1,83 @@ - - htpasswd_LTFLAGS="" htdigest_LTFLAGS="" rotatelogs_LTFLAGS="" logresolve_LTFLAGS="" +htdbm_LTFLAGS="" ab_LTFLAGS="" +checkgid_LTFLAGS="" -dnl XXX Should we change the foo_LTFLAGS="-static" settings below -dnl to something like APR_ADDTO? -aaron +AC_ARG_ENABLE(static-support,APACHE_HELP_STRING(--enable-static-support,Build a +statically linked version the support binaries),[ +if test "$enableval" = "yes" ; then + APR_ADDTO(htpasswd_LTFLAGS, [-static]) + APR_ADDTO(htdigest_LTFLAGS, [-static]) + APR_ADDTO(rotatelogs_LTFLAGS, [-static]) + APR_ADDTO(logresolve_LTFLAGS, [-static]) + APR_ADDTO(htdbm_LTFLAGS, [-static]) + APR_ADDTO(ab_LTFLAGS, [-static]) + APR_ADDTO(checkgid_LTFLAGS, [-static]) +fi +]) AC_ARG_ENABLE(static-htpasswd,APACHE_HELP_STRING(--enable-static-htpasswd,Build a statically linked version of htpasswd),[ if test "$enableval" = "yes" ; then - htpasswd_LTFLAGS="-static" + APR_ADDTO(htpasswd_LTFLAGS, [-static]) +else + APR_REMOVEFROM(htpasswd_LTFLAGS, [-static]) fi ]) APACHE_SUBST(htpasswd_LTFLAGS) AC_ARG_ENABLE(static-htdigest,APACHE_HELP_STRING(--enable-static-htdigest,Build a statically linked version of htdigest),[ if test "$enableval" = "yes" ; then - htdigest_LTFLAGS="-static" + APR_ADDTO(htdigest_LTFLAGS, [-static]) +else + APR_REMOVEFROM(htdigest_LTFLAGS, [-static]) fi ]) APACHE_SUBST(htdigest_LTFLAGS) AC_ARG_ENABLE(static-rotatelogs,APACHE_HELP_STRING(--enable-static-rotatelogs,Build a statically linked version of rotatelogs),[ if test "$enableval" = "yes" ; then - rotatelogs_LTFLAGS="-static" + APR_ADDTO(rotatelogs_LTFLAGS, [-static]) +else + APR_REMOVEFROM(rotatelogs_LTFLAGS, [-static]) fi ]) APACHE_SUBST(rotatelogs_LTFLAGS) AC_ARG_ENABLE(static-logresolve,APACHE_HELP_STRING(--enable-static-logresolve,Build a statically linked version of logresolve),[ if test "$enableval" = "yes" ; then - logresolve_LTFLAGS="-static" + APR_ADDTO(logresolve_LTFLAGS, [-static]) +else + APR_REMOVEFROM(logresolve_LTFLAGS, [-static]) fi ]) APACHE_SUBST(logresolve_LTFLAGS) +AC_ARG_ENABLE(static-htdbm,APACHE_HELP_STRING(--enable-static-htdbm,Build a +statically linked version of htdbm),[ +if test "$enableval" = "yes" ; then + APR_ADDTO(htdbm_LTFLAGS, [-static]) +else + APR_REMOVEFROM(htdbm_LTFLAGS, [-static]) +fi +]) +APACHE_SUBST(htdbm_LTFLAGS) + AC_ARG_ENABLE(static-ab,APACHE_HELP_STRING(--enable-static-ab,Build a statically linked version of ab),[ if test "$enableval" = "yes" ; then - ab_LTFLAGS="-static" + APR_ADDTO(ab_LTFLAGS, [-static]) +else + APR_REMOVEFROM(ab_LTFLAGS, [-static]) fi ]) APACHE_SUBST(ab_LTFLAGS) AC_ARG_ENABLE(static-checkgid,APACHE_HELP_STRING(--enable-static-checkgid,Build a statically linked version of checkgid),[ if test "$enableval" = "yes" ; then - checkgid_LTFLAGS="-static" + APR_ADDTO(checkgid_LTFLAGS, [-static]) +else + APR_REMOVEFROM(checkgid_LTFLAGS, [-static]) fi ]) APACHE_SUBST(checkgid_LTFLAGS) + Index: build/binbuild.sh =================================================================== RCS file: /home/cvs/httpd-2.0/build/binbuild.sh,v retrieving revision 1.34 diff -u -u -r1.34 binbuild.sh --- build/binbuild.sh 2 Feb 2002 20:30:03 -0000 1.34 +++ build/binbuild.sh 7 Feb 2002 21:21:03 -0000 @@ -12,7 +12,7 @@ APDIR=`pwd` APDIR=`basename $APDIR` APFULLDIR=`pwd` -CONFIGPARAM="--with-layout=BinaryDistribution --prefix=$BUILD_DIR --enable-mods-shared=most --with-expat=$APFULLDIR/srclib/apr-util/xml/expat" +CONFIGPARAM="--with-layout=BinaryDistribution --prefix=$BUILD_DIR +--enable-mods-shared=most --with-expat=$APFULLDIR/srclib/apr-util/xml/expat +--enable-static-support" VER=`echo $APDIR |sed s/httpd-//` TAR="`srclib/apr/build/PrintPath tar`" GTAR="`srclib/apr/build/PrintPath gtar`"