Compilando módulos do apache --enable-mods-shared vs --enable-modules

1

Um fragmento do Apache httpd-2.4 configura o documento:

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

Isso significa que, se você usar --enable-modules , vinculará automaticamente no tempo de execução, sem precisar usar a diretiva LoadModule ? Qual é o benefício disso? Eu entendo a diferença entre uma biblioteca estática e dinâmica, mas isso me confundiu.

    
por ansichart 29.06.2016 / 21:01

2 respostas

1

Não, a opção --enable-modules existe com a finalidade de poder definir --enable-module=none . O comportamento específico de autoconf está em 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 não permite um argumento none .

A única diferença extra é que --enable-modules não define module_default . module_default é estimado próximo ao início do script e definido como shared , se possível, ou static , se os objetos compartilhados dinâmicos não forem suportados no sistema.

Posteriormente, se os nomes dos módulos estiverem definidos como most , all ou reallyall , esses módulos serão criados de acordo com o que module_default está definido.

    
por 29.06.2016 / 22:23
0

Aqui, na documentação link

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

Espero que isso esclareça que eles estão vinculados dinamicamente.

    
por 29.06.2016 / 22:22