Apacheモジュール --enable-mods-shared および --enable-modules コンパイル

Apacheモジュール --enable-mods-shared および --enable-modules コンパイル

Apache 構成ドキュメントの一部httpd-2.4:

--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.

--enable-modulesこれは、そのディレクティブを使用せずに実行時に自動的に接続されることを意味しますかLoadModule?これにはどのような利点がありますか?私は静的ライブラリと動的ライブラリの違いを理解していますが、これは私を混乱させます。

ベストアンサー1

いいえ、この--enable-modulesオプションは設定できるように存在します--enable-module=none。具体的なautoconf行動は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引数は許可されていませんnone

唯一の追加の違いは、.guessをスクリプトの先頭に近づけずに--enable-modules(可能な場合)に設定するか、システムが動的共有オブジェクトをサポートしていない場合です。module_defaultmodule_defaultsharedstatic

後でモジュール名がmostallまたはに設定されると、reallyallこれらのモジュールはmodule_default設定された内容に従って構築されます。

おすすめ記事