rse         98/03/09 08:47:10

  Modified:    src      CHANGES Configuration.tmpl Configure
  Log:
  Various Enhancements to the Shared Object support
  -------------------------------------------------
  
  1. Shared object support is compiler-dependend, so we have to
     move the XXX_SHLIB stuff _after_ the compiler checks in
     the Configure script.
  
  3. Added entries for manual/custom shared object support to
     Configuration.tmpl file, so the user knows what he has to do.
     Configure already supported this in the past but nothing was
     documented here.
  
  3. Added initial support for Solaris 2.x.
  
  4. I've now tested shared object support under the following
     platform/compiler combinations:
        - FreeBSD 2.1.5 with gcc 2.8.0
        - Debian 1.3.1  with gcc 2.7.2
        - Solaris 2.6   with gcc 2.7.2
        - Solaris 2.5.1 with gcc 2.7.2
        - Solaris 2.5.1 with WorkShop Compilers 4.2 30 Oct 1996 C 4.2
  
     All ran out-the-box with my test procedure:
     [Yes, I really would like to see my configure stuff added...]
        $ gunzip <apache-1.3b6-dev.tar.gz
        $ cd apache-1.3b6-dev
        $ ./configure --prefix=/tmp/apache --enable-shared=max
        $ make
        $ make install
        $ /tmp/apache/sbin/apachectl start
        $ lynx -mime_header -source http://localhost:80/
        $ /tmp/apache/sbin/apachectl stop
        $ cd ..
        $ rm -rf apache-1.3b6-dev
  
  Revision  Changes    Path
  1.694     +6 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.693
  retrieving revision 1.694
  diff -u -r1.693 -r1.694
  --- CHANGES   1998/03/08 04:25:53     1.693
  +++ CHANGES   1998/03/09 16:47:06     1.694
  @@ -1,5 +1,11 @@
   Changes with Apache 1.3b6
   
  +  *) Various improvements to the configuration and build support for 
compiling
  +     modules as shared objects. Especially Solaris 2.x support with GCC and
  +     WorkShop Compilers 4.2 was added. This way shared object support is now
  +     provided out-of-the-box for FreeBSD, Linux and Solaris.  
  +     [Ralf S. Engelschall]
  +
     *) Minor cleanup in http_main -- split QNX and OS2 specific "mmap"
        scoreboard code into separate #defines -- USE_POSIX_SCOREBOARD
        and USE_OS2_SCOREBOARD.  [Dean Gaudet]
  
  
  
  1.82      +20 -0     apache-1.3/src/Configuration.tmpl
  
  Index: Configuration.tmpl
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/Configuration.tmpl,v
  retrieving revision 1.81
  retrieving revision 1.82
  diff -u -r1.81 -r1.82
  --- Configuration.tmpl        1998/03/01 03:19:49     1.81
  +++ Configuration.tmpl        1998/03/09 16:47:08     1.82
  @@ -51,6 +51,26 @@
   #RANLIB=
   
   ################################################################
  +# Makefile configuration (Shared Object support)
  +#
  +# There is experimental support for compiling Apache Modules as
  +# shared objects. This feature can be enabled for each module
  +# individually by replacing the `AddModule' command of the
  +# corresponding module line below with `SharedModule' and
  +# changing the filename extension from `.o' to `.so'.
  +#
  +# The Configure script currently has only limited built-in
  +# knowledge on how to compile shared objects because this is
  +# heavily platform-dependend. Currently only Linux, FreeBSD and
  +# Solaris are supported out-of-the-box. For other platforms where
  +# you want to use the `SharedModule' directive you have to
  +# provide the appropriate flags here.
  +#
  +#CFLAGS_SHLIB=
  +#LDFLAGS_SHLIB=
  +#LDFLAGS_SHLIB_EXPORT=
  +
  +################################################################
   # Rules configuration
   #
   # These are used to let Configure know that we want certain
  
  
  
  1.198     +60 -17    apache-1.3/src/Configure
  
  Index: Configure
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/Configure,v
  retrieving revision 1.197
  retrieving revision 1.198
  diff -u -r1.197 -r1.198
  --- Configure 1998/03/09 12:52:05     1.197
  +++ Configure 1998/03/09 16:47:08     1.198
  @@ -324,15 +324,11 @@
        OS='Linux'
        CFLAGS="$CFLAGS -DLINUX=2"
        LIBS="$LIBS -lm"
  -     CFLAGS_SHLIB="-fpic"
  -     LDFLAGS_SHLIB="-Bshareable"
        ;;
       *-linux1)
        DEF_WANTHSREGEX=yes
        OS='Linux'
        CFLAGS="$CFLAGS -DLINUX=1"
  -     CFLAGS_SHLIB="-fpic"
  -     LDFLAGS_SHLIB="-Bshareable"
        ;;
       *-lynx-lynxos)
        OS='LynxOS 2.x'
  @@ -371,8 +367,6 @@
        LIBS="$LIBS -lcrypt"
        DBM_LIB=""
        DB_LIB=""
  -     CFLAGS_SHLIB="-fpic"
  -     LDFLAGS_SHLIB="-Bshareable"
        ;;
       *-openbsd*)
        OS='OpenBSD'
  @@ -648,12 +642,10 @@
       echo " + setting C compiler to $CC"
   fi
   
  -#
  +####################################################################
   # Look for OPTIM and save for later
   #
   TOPTIM=`egrep '^OPTIM=' Makefile.config | tail -1 | awk -F= '{print $2}'`
  -TLDFLAGS_SHLIB=`egrep '^LDFLAGS_SHLIB=' Makefile.config | tail -1 | awk -F= 
'{print $2}'`
  -TCFLAGS_SHLIB=`egrep '^CFLAGS_SHLIB=' Makefile.config | tail -1 | awk -F= 
'{print $2}'`
   
   ####################################################################
   # Set the value of CC if need be
  @@ -662,11 +654,66 @@
       echo "CC=$CC" >> Makefile.config
   fi
   
  +####################################################################
  +# Check for user provided flags for shared object support
  +#
  +TLDFLAGS_SHLIB=`egrep '^LDFLAGS_SHLIB=' Makefile.config | tail -1 | awk -F= 
'{print $2}'`
  +TCFLAGS_SHLIB=`egrep '^CFLAGS_SHLIB=' Makefile.config | tail -1 | awk -F= 
'{print $2}'`
  +
  +####################################################################
  +# We adjust now CFLAGS_SHLIB, LDFLAGS_SHLIB and LDFLAGS_SHLIB_EXPORT as
  +# required.  For more PLATFORMs just add the required lines below.
  +#
  +if [ "x$using_shlib" = "x1" ] ; then
  +    case "$PLAT" in
  +     *-linux1)
  +         CFLAGS_SHLIB="-fpic"
  +         LDFLAGS_SHLIB="-Bshareable"
  +         LDFLAGS_SHLIB_EXPORT="-rdynamic"
  +         ;;
  +     *-linux2)
  +         CFLAGS_SHLIB="-fpic"
  +         LDFLAGS_SHLIB="-Bshareable"
  +         LDFLAGS_SHLIB_EXPORT="-rdynamic"
  +         ;;
  +     *-freebsd*)
  +         CFLAGS_SHLIB="-fpic"
  +         LDFLAGS_SHLIB="-Bshareable"
  +         LDFLAGS_SHLIB_EXPORT=""
  +         ;;
  +     *-solaris2*)
  +         case $CC in
  +                 */gcc|gcc ) CFLAGS_SHLIB="-fpic" ;;
  +                   */cc|cc ) CFLAGS_SHLIB="-KPIC" ;;
  +         esac
  +         LDFLAGS_SHLIB="-G"
  +         LDFLAGS_SHLIB_EXPORT=""
  +         ;;
  +    esac
  +fi
  +
  +####################################################################
  +#  Check if we really have some information to compile
  +#  the shared objects if SharedModule was used.
  +#
  +if [ "x$using_shlib" = "x1" ] ; then
  +    if [ "x$TCFLAGS_SHLIB"  = x -a "x$CFLAGS_SHLIB"  = x  -a \
  +         "x$TLDFLAGS_SHLIB" = x -a "x$LDFLAGS_SHLIB" = x ]; then
  +        echo "Sorry, no shared object support available."
  +        echo "Either compile all modules statically (use AddModule instead"
  +        echo "of SharedModule in the Configuration file) or at least provide"
  +        echo "us with the apropriate compiler and linker flags via the"
  +        echo "CFLAGS_SHLIB, LDFLAGS_SHLIB and LDFLAGS_SHLIB_EXPORT entries"
  +        echo "in the configuration file."
  +        exit 1
  +    fi
  +fi
  +
  +####################################################################
  +# Set the value of the shared libary flags, if they aren't explicitly
  +# set in the configuration file
  +#
   if [ "x$using_shlib" = "x1" ] ; then
  -    #
  -    # Set the value of the shared libary flags, if they aren't explicitly
  -    # set in the configuration file
  -    #
       if [ "x$TCFLAGS_SHLIB" = "x" ]; then
           echo "CFLAGS_SHLIB=$CFLAGS_SHLIB -DSHARED_MODULE" >> Makefile.config
       fi
  @@ -674,10 +721,6 @@
           echo "LDFLAGS_SHLIB=$LDFLAGS_SHLIB" >> Makefile.config
       fi
       if [ "x$TLDFLAGS_SHLIB_EXPORT" = "x" ]; then
  -        if [ "x$TCC" = "xgcc" ] ||
  -     [ "x$TCC" = "x" -a "x$CC" = "xgcc" ] ; then
  -     LDFLAGS_SHLIB_EXPORT=-rdynamic
  -        fi
           echo "LDFLAGS_SHLIB_EXPORT=$LDFLAGS_SHLIB_EXPORT" >> Makefile.config
       fi
   fi   # end of $using_shlib section
  
  
  

Reply via email to