httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Harris" <dhar...@drh.net>
Subject [patch] ./configure --activate-module bugfix
Date Sat, 28 Aug 1999 01:11:44 GMT

I just ran into an interesting bug in the configure script.
The --activate-module option does not work correctly with the --enable-shared
option.

In my configuration I had:

./configure \
--activate-module=src/modules/extra/mod_frontpage.c \
--enable-shared=frontpage

and mod_frontpage was built as a static module.

The code that implements --activate-module was appending "AddModule
modules/extra/mod_frontpage.c" to the $addconf file, which should really be the
same filename with an ".o" extension as evidenced by behavior --add-module
option. The problem was that the sed commands that implement
the --enable-shared option by converting the AddModule commands to SharedModule
commands don't match AddModule lines with .c extensions.

Appended is a patch to fix this by making the --activate-module option add
AddModule lines ending in .o.

 - David Harris
   Principal Engineer, DRH Internet Services


--- apache_1.3.6/configure.orig Fri Aug 27 20:50:22 1999
+++ apache_1.3.6/configure      Fri Aug 27 20:53:46 1999
@@ -634,6 +634,7 @@
                     ;;
             esac
             modfile=`echo $file | sed -e 's;^src/;;'`
+            modfileo=`echo $modfile | sed -e 's;\.c$;.o;'`
             if [ "x$addconf_created" = "x0" ]; then
                 addconf_created=1
                 rm -f $addconf 2>/dev/null
@@ -642,7 +643,7 @@
             echo "" >>$addconf
             echo "## On-the-fly activated module" >>$addconf
             echo "## (configure --activate-module=$file)" >>$addconf
-            echo "AddModule $modfile" >>$addconf
+            echo "AddModule $modfileo" >>$addconf
             module=`echo "$modfile" |\
                     sed -e 's%^.*/\(.*\)$%\1%' \
                         -e 's/\.[^.]*$//' \


Mime
View raw message