config5.m4 revision c8794ec1e4c474ae101ce3835080f638136e7860
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesAC_MSG_CHECKING(for extra modules)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesAC_ARG_WITH(module,
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes APACHE_HELP_STRING(--with-module=module-type:module-file,
28141ccf4644e2f75835d9ad1b21fa9a66856712bnicholes Enable module-file in the modules/<module-type> directory.),
28141ccf4644e2f75835d9ad1b21fa9a66856712bnicholes [
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes as_save_IFS="$IFS"; IFS=","
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes for mod in $withval
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes do
8b96b30e820f9bf092944b15cf1d696a6c0d7f1abnicholes modtype=`echo $mod | sed -e's/\(.*\):.*/\1/'`
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes pkg=`echo $mod | sed -e's/.*:\(.*\)/\1/'`
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes modfilec=`echo $pkg | sed -e 's;^.*/;;'`
420bfee669b4ac21320f24c5d92e9857866b710ebnicholes modfileo=`echo $pkg | sed -e 's;^.*/;;' -e 's;\.c$;.o;'`
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes modpath_current="modules/$modtype"
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes if test "x$mod" != "x$modpath_current/$modfilec"; then
c9ce2b84cc0bf2caa39be615eb06f7a9b68378d5bnicholes if test ! -d "$modpath_current"; then
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes mkdir $modpath_current
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes echo 'include $(top_srcdir)/build/special.mk' > $modpath_current/Makefile.in
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes fi
b2c35a9228d0e6124aec1ed434cee3cb1ef107c3bnicholes cp $pkg $modpath_current/$modfilec
574a3e83dacc1e5bd4390203a7f7df038bccf65dbnicholes fi
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes module=`echo $pkg | sed -e 's;\(.*/\)*mod_\(.*\).c;\2;'`
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes objects="mod_$module.lo"
b0827492bc89f04870db952fa9b940e76c975489bnicholes # The filename of a convenience library must have a "lib" prefix:
b0827492bc89f04870db952fa9b940e76c975489bnicholes libname="lib$module.la"
b0827492bc89f04870db952fa9b940e76c975489bnicholes BUILTIN_LIBS="$BUILTIN_LIBS $modpath_current/$libname"
b0827492bc89f04870db952fa9b940e76c975489bnicholes if test ! -s "$modpath_current/modules.mk"; then
b0827492bc89f04870db952fa9b940e76c975489bnicholes cat >>$modpath_current/modules.mk<<EOF
b0827492bc89f04870db952fa9b940e76c975489bnicholes$libname: $objects
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes \$(MOD_LINK) $objects
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholesDISTCLEAN_TARGETS = modules.mk
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholesstatic = $libname
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholesshared =
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholesEOF
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes else
e76fdcdfb8994ad70776526f50fa013b3e9a6033bnicholes cat >>$modpath_current/modules.mk.tmp<<EOF
b0827492bc89f04870db952fa9b940e76c975489bnicholes$libname: $objects
4ffe9d32f1047646da859855061c8d43819f6bd2bnicholes \$(MOD_LINK) $objects
4ffe9d32f1047646da859855061c8d43819f6bd2bnicholesEOF
4ffe9d32f1047646da859855061c8d43819f6bd2bnicholes cat $modpath_current/modules.mk >> $modpath_current/modules.mk.tmp
4ffe9d32f1047646da859855061c8d43819f6bd2bnicholes rm $modpath_current/modules.mk
4ffe9d32f1047646da859855061c8d43819f6bd2bnicholes mv $modpath_current/modules.mk.tmp $modpath_current/modules.mk
4ffe9d32f1047646da859855061c8d43819f6bd2bnicholes sed -e "s/\(static =.*\)/\1 $libname/" $modpath_current/modules.mk > $modpath_current/modules.mk.tmp
9343665552d0106c3296addc95552f44c496c6eebnicholes rm $modpath_current/modules.mk
58608d1d2acd188b5f04e256618a341416e086cdbnicholes mv $modpath_current/modules.mk.tmp $modpath_current/modules.mk
58608d1d2acd188b5f04e256618a341416e086cdbnicholes fi
58608d1d2acd188b5f04e256618a341416e086cdbnicholes MODLIST="$MODLIST $module"
58608d1d2acd188b5f04e256618a341416e086cdbnicholes EXTRA_MODLIST="$EXTRA_MODLIST $modtype:$modfilec"
58608d1d2acd188b5f04e256618a341416e086cdbnicholes MODULE_DIRS="$MODULE_DIRS $modtype"
28870faaa28b18fbd520eae339925a0334521d5fbnicholes APACHE_FAST_OUTPUT($modpath_current/Makefile)
28870faaa28b18fbd520eae339925a0334521d5fbnicholes done
28870faaa28b18fbd520eae339925a0334521d5fbnicholes if test ! -z "$EXTRA_MODLIST"; then
28870faaa28b18fbd520eae339925a0334521d5fbnicholes AC_MSG_RESULT(added:$EXTRA_MODLIST)
28870faaa28b18fbd520eae339925a0334521d5fbnicholes fi
28870faaa28b18fbd520eae339925a0334521d5fbnicholes IFS="$as_save_IFS"
58608d1d2acd188b5f04e256618a341416e086cdbnicholes ],
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes [ AC_MSG_RESULT(none)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes ])
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes