1

A snippet from the Apache httpd-2.4 configure document:

--enable-mods-shared=MODULE-LIST

Defines a list of modules to be enabled and build as dynamic shared modules. This mean, these module have to be loaded dynamically by using the LoadModule directive.

--enable-mods-static=MODULE-LIST

This option behaves similar to --enable-mods-shared, but will link the given modules statically. This mean, these modules will always be present while running `httpd`. They need not be loaded with LoadModule.

--enable-modules=MODULE-LIST

This option behaves similar to --enable-mods-shared, and will also link the given modules dynamically. The special keyword none disables the build of all modules.

Does this mean that if using --enable-modules, it will automatically link at run time, without having to use the LoadModule directive? What's the benefit of this? I understand the difference between a static and dynamic library, but this just confused me.

1

Nope, the --enable-modules option exist for the purpose of being able to set --enable-module=none. The specific autoconf behaviour is in acinclude.m4.

AC_ARG_ENABLE(modules,
APACHE_HELP_STRING(--enable-modules=MODULE-LIST,Space-separated list of modules to enable | "all" | "most" | "few" | "none" | "reallyall"),[
  if test "$enableval" = "none"; then
     module_default=no
     module_selection=none
  else
    for i in $enableval; do
      if test "$i" = "all" -o "$i" = "most" -o "$i" = "few" -o "$i" = "reallyall"
      then
        module_selection=$i
      else
        i=`echo $i | sed 's/-/_/g'`
        eval "enable_$i=shared"
      fi
    done
  fi
])

AC_ARG_ENABLE(mods-shared,
APACHE_HELP_STRING(--enable-mods-shared=MODULE-LIST,Space-separated list of shared modules to enable | "all" | "most" | "few" | "reallyall"),[
  for i in $enableval; do
    if test "$i" = "all" -o "$i" = "most" -o "$i" = "few" -o "$i" = "reallyall"
    then
      module_selection=$i
      module_default=shared
    else
      i=`echo $i | sed 's/-/_/g'`
      eval "enable_$i=shared"
    fi
  done
])

--enable-mods-shared does not allow a none argument.

The only extra difference is that --enable-modules does not set module_default. module_default is guessed close to the beginning of the script and set to shared if possible, or static if dynamic shared objects are not supported on the system.

Later, if the module names are set to most, all or reallyall, these modules will be built according to what module_default is set to.

0

Here from the documentation https://httpd.apache.org/docs/trunk/programs/configure.html

--enable-modules=MODULE-LIST
    This option behaves like to --enable-mods-shared, and will also link the given modules dynamically. The special keyword none disables the build of all modules.

I hope this clarifies that they are linked dynamically.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.