From c073a31f6921496ef194ba3a68a11ee03c07554d Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Mon, 17 Oct 2016 12:14:55 -0400 Subject: [PATCH] [autobuild] omit module stubs when missing deps do not build any module (containing module stubs) when the dependencies for a given module are not present. --- SConstruct | 7 +++++- configure.ac | 44 ++++++++++++++++++++++++---------- src/CMakeLists.txt | 48 +++++++++++++++++++++++-------------- src/Makefile.am | 69 ++++++++++++++++++++++++++++++++++++++++-------------- src/SConscript | 30 ++++++++++++++---------- 5 files changed, 137 insertions(+), 61 deletions(-) diff --git a/SConstruct b/SConstruct index c70e857a..cda2f7d3 100644 --- a/SConstruct +++ b/SConstruct @@ -123,6 +123,7 @@ vars.AddVariables( BoolVariable('build_fullstatic', 'enable fullstatic build', 'no'), BoolVariable('with_sqlite3', 'enable sqlite3 support', 'no'), BoolVariable('with_memcached', 'enable memcached support', 'no'), + BoolVariable('with_gdbm', 'enable gdbm support', 'no'), BoolVariable('with_fam', 'enable FAM/gamin support', 'no'), BoolVariable('with_openssl', 'enable openssl support', 'no'), BoolVariable('with_gzip', 'enable gzip compression', 'no'), @@ -228,7 +229,7 @@ if 1: autoconf.env.Append( LIBSQLITE3 = '', LIBXML2 = '', LIBMYSQL = '', LIBZ = '', LIBBZ2 = '', LIBCRYPT = '', LIBMEMCACHED = '', LIBFCGI = '', LIBPCRE = '', LIBLDAP = '', LIBLBER = '', LIBLUA = '', LIBDL = '', LIBUUID = '', - LIBKRB5 = '', LIBGSSAPI_KRB5 = '') + LIBKRB5 = '', LIBGSSAPI_KRB5 = '', LIBGDBM = '') if env['with_fam']: if autoconf.CheckLibWithHeader('fam', 'fam.h', 'C'): @@ -278,6 +279,10 @@ if 1: if autoconf.CheckLibWithHeader('memcached', 'libmemcached/memcached.h', 'C'): autoconf.env.Append(CPPFLAGS = [ '-DUSE_MEMCACHED' ], LIBMEMCACHED = 'memcached') + if env['with_gdbm']: + if autoconf.CheckLibWithHeader('gdbm', 'gdbm.h', 'C'): + autoconf.env.Append(CPPFLAGS = [ '-DHAVE_GDBM_H', '-DHAVE_GDBM' ], LIBGDBM = 'gdbm') + if env['with_sqlite3']: if autoconf.CheckLibWithHeader('sqlite3', 'sqlite3.h', 'C'): autoconf.env.Append(CPPFLAGS = [ '-DHAVE_SQLITE3_H', '-DHAVE_LIBSQLITE3' ], LIBSQLITE3 = 'sqlite3') diff --git a/configure.ac b/configure.ac index ca9919ca..189e26ce 100644 --- a/configure.ac +++ b/configure.ac @@ -177,6 +177,7 @@ fi AC_SUBST(LIBEV_CFLAGS) AC_SUBST(LIBEV_LIBS) +AC_MSG_RESULT([$WITH_LIBEV]) dnl Checks for database. MYSQL_INCLUDE="" @@ -224,6 +225,7 @@ dnl check for errmsg.h, which isn't installed by some versions of 3.21 else AC_MSG_RESULT(no) fi +AM_CONDITIONAL(BUILD_WITH_MYSQL, test ! $WITH_MYSQL = no) AC_SUBST(MYSQL_LIBS) AC_SUBST(MYSQL_INCLUDE) @@ -252,6 +254,7 @@ if test "$WITH_LDAP" != "no"; then ]) AC_SUBST(LBER_LIB) fi +AM_CONDITIONAL(BUILD_WITH_LDAP, test ! $WITH_LDAP = no) dnl Check for xattr AC_MSG_CHECKING(for extended attributes support) @@ -338,6 +341,7 @@ else use_krb5=no fi AC_MSG_RESULT([$use_krb5]) +AM_CONDITIONAL(BUILD_WITH_KRB5, test ! $WITH_KRB5 = no) AC_ARG_WITH(krb5-includes, AC_HELP_STRING([--with-krb5-includes=DIR],[Kerberos includes]), @@ -623,6 +627,7 @@ if test "$WITH_GDBM" != "no"; then AC_MSG_ERROR([gdbm headers and/or libs were not found, install them or build with --without-gdbm]) fi fi +AM_CONDITIONAL(BUILD_WITH_GDBM, test ! $WITH_GDBM = no) dnl Check for GeoIP AC_MSG_CHECKING(for GeoIP) @@ -648,6 +653,7 @@ if test "$WITH_GEOIP" != "no"; then AC_MSG_ERROR([GeoIP headers and/or libs were not found, install them or build with --without-geoip]) fi fi +AM_CONDITIONAL(BUILD_WITH_GEOIP, test ! $WITH_GEOIP = no) dnl Check for memcached AC_MSG_CHECKING(for memcached) @@ -674,6 +680,9 @@ if test "$WITH_MEMCACHED" != "no"; then AC_MSG_ERROR([memcached headers and/or libs were not found, install them or build with --without-memcached]) fi fi +AM_CONDITIONAL(BUILD_WITH_MEMCACHED, test ! $WITH_MEMCACHED = no) + +AM_CONDITIONAL(BUILD_MOD_TRIGGER_B4_DL, test ! $WITH_MEMCACHED = no || test ! $WITH_GDBM = no) dnl Check for lua AC_MSG_CHECKING(if lua-support is requested) @@ -717,6 +726,7 @@ if test "$WITH_LUA" != "no"; then AC_MSG_ERROR([lua headers and/or libs were not found, install them or build with --without-lua]) fi fi +AM_CONDITIONAL(BUILD_WITH_LUA, test ! $WITH_LUA = no) dnl search for crypt_r and (fallback) for crypt save_LIBS=$LIBS @@ -908,10 +918,10 @@ AC_CONFIG_FILES([Makefile src/Makefile AC_OUTPUT -do_build="mod_cgi mod_fastcgi mod_extforward mod_proxy mod_evhost mod_simple_vhost mod_access mod_alias mod_setenv mod_usertrack mod_auth mod_authn_file mod_authn_ldap mod_authn_mysql mod_status mod_accesslog" +do_build="mod_cgi mod_fastcgi mod_extforward mod_proxy mod_evhost mod_simple_vhost mod_access mod_alias mod_setenv mod_usertrack mod_auth mod_authn_file mod_status mod_accesslog" do_build="$do_build mod_rrdtool mod_secdownload mod_expire mod_compress mod_dirlisting mod_indexfile mod_userdir mod_webdav mod_staticfile mod_scgi mod_flv_streaming mod_ssi mod_deflate" -plugins="mod_rewrite mod_redirect mod_trigger_b4_dl" +plugins="mod_rewrite mod_redirect" features="regex-conditionals" if test ! "x$PCRE_LIB" = x; then do_build="$do_build $plugins" @@ -921,14 +931,20 @@ else disable_feature="$features" fi -features="auth-mysql" -plugins="mod_mysql_vhost" +plugins="mod_trigger_b4_dl" +if test ! "x$PCRE_LIB" = x; then +if test ! "x$WITH_MEMCACHED" = xno || test ! "x$WITH_GDBM" = xno; then + do_build="$do_build $plugins" +else + no_build="$no_build $plugins" +fi +fi + +plugins="mod_authn_mysql mod_mysql_vhost" if test ! "x$MYSQL_LIBS" = x; then do_build="$do_build $plugins" - enable_feature="$enable_feature $features" else no_build="$no_build $plugins" - disable_feature="$disable_feature $features" fi plugins="mod_cml mod_magnet" @@ -938,6 +954,13 @@ else no_build="$no_build $plugins" fi +plugins="mod_geoip" +if test ! "x$GEOIP_LIB" = x; then + do_build="$do_build $plugins" +else + no_build="$no_build $plugins" +fi + features="storage-gdbm" if test ! "x$GDBM_LIB" = x; then enable_feature="$enable_feature $features" @@ -966,21 +989,18 @@ else disable_feature="$disable_feature $features" fi -features="auth-krb5" plugins="mod_authn_gssapi" if test ! "x$KRB5_LIB" = x; then do_build="$do_build $plugins" - enable_feature="$enable_feature $features" else no_build="$no_build $plugins" - disable_feature="$disable_feature $features" fi -features="auth-ldap" +plugins="mod_authn_ldap" if test ! "x$LDAP_LIB" = x; then - enable_feature="$enable_feature $features" + do_build="$do_build $plugins" else - disable_feature="$disable_feature $features" + no_build="$no_build $plugins" fi features="network-openssl" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8a0137ad..55e72365 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -32,6 +32,7 @@ option(WITH_GDBM "gdbm storage for mod_trigger_b4_dl [default: off]") option(WITH_MEMCACHED "memcached storage for mod_trigger_b4_dl [default: off]") option(WITH_LIBEV "libev support for fdevent handlers [default: off]") option(WITH_LIBUNWIND "with libunwind to print backtraces in asserts [default: off]") +option(WITH_GEOIP "with GeoIP-support mod_geoip [default: off]") if(CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_C_COMPILER_ID MATCHES "Clang") option(BUILD_EXTRA_WARNINGS "extra warnings") @@ -467,6 +468,10 @@ if(WITH_MEMCACHED) endif() endif() +if(WITH_GEOIP) + check_library_exists(geoip GeoIP_country_name_by_addr "" HAVE_GEOIP) +endif() + if(NOT BUILD_STATIC) check_include_files(dlfcn.h HAVE_DLFCN_H) else() @@ -567,12 +572,9 @@ add_and_install_library(mod_accesslog mod_accesslog.c) add_and_install_library(mod_alias mod_alias.c) add_and_install_library(mod_auth "mod_auth.c") add_and_install_library(mod_authn_file "mod_authn_file.c") -add_and_install_library(mod_authn_ldap "mod_authn_ldap.c") -add_and_install_library(mod_authn_mysql "mod_authn_mysql.c") if(NOT WIN32) add_and_install_library(mod_cgi mod_cgi.c) endif() -add_and_install_library(mod_cml "mod_cml.c;mod_cml_lua.c;mod_cml_funcs.c") add_and_install_library(mod_compress mod_compress.c) add_and_install_library(mod_deflate mod_deflate.c) add_and_install_library(mod_dirlisting mod_dirlisting.c) @@ -582,10 +584,7 @@ add_and_install_library(mod_expire mod_expire.c) add_and_install_library(mod_extforward mod_extforward.c) add_and_install_library(mod_fastcgi mod_fastcgi.c) add_and_install_library(mod_flv_streaming mod_flv_streaming.c) -add_and_install_library(mod_geoip mod_geoip.c) add_and_install_library(mod_indexfile mod_indexfile.c) -add_and_install_library(mod_magnet "mod_magnet.c;mod_magnet_cache.c") -add_and_install_library(mod_mysql_vhost mod_mysql_vhost.c) add_and_install_library(mod_proxy mod_proxy.c) add_and_install_library(mod_redirect mod_redirect.c) add_and_install_library(mod_rewrite mod_rewrite.c) @@ -597,7 +596,6 @@ add_and_install_library(mod_simple_vhost mod_simple_vhost.c) add_and_install_library(mod_ssi "mod_ssi_exprparser.c;mod_ssi_expr.c;mod_ssi.c") add_and_install_library(mod_staticfile mod_staticfile.c) add_and_install_library(mod_status mod_status.c) -add_and_install_library(mod_trigger_b4_dl mod_trigger_b4_dl.c) add_and_install_library(mod_uploadprogress mod_uploadprogress.c) add_and_install_library(mod_userdir mod_userdir.c) add_and_install_library(mod_usertrack mod_usertrack.c) @@ -622,6 +620,7 @@ add_executable(test_configfile array.c data_string.c keyvalue.c + vector.c log.c ) add_test(NAME test_configfile COMMAND test_configfile) @@ -635,26 +634,37 @@ if(HAVE_PCRE_H) add_target_properties(mod_dirlisting COMPILE_FLAGS ${PCRE_CFLAGS}) target_link_libraries(mod_redirect ${PCRE_LDFLAGS}) add_target_properties(mod_redirect COMPILE_FLAGS ${PCRE_CFLAGS}) - target_link_libraries(mod_trigger_b4_dl ${PCRE_LDFLAGS}) - add_target_properties(mod_trigger_b4_dl COMPILE_FLAGS ${PCRE_CFLAGS}) target_link_libraries(test_configfile ${PCRE_LDFLAGS}) add_target_properties(test_configfile COMPILE_FLAGS ${PCRE_CFLAGS}) endif() -target_link_libraries(mod_magnet ${LUA_LDFLAGS}) -add_target_properties(mod_magnet COMPILE_FLAGS ${LUA_CFLAGS}) +if(WITH_PCRE AND (WITH_MEMCACHED OR WITH_GDBM)) + add_and_install_library(mod_trigger_b4_dl mod_trigger_b4_dl.c) + target_link_libraries(mod_trigger_b4_dl ${PCRE_LDFLAGS}) + add_target_properties(mod_trigger_b4_dl COMPILE_FLAGS ${PCRE_CFLAGS}) +endif() + +if(WITH_LUA) + add_and_install_library(mod_magnet "mod_magnet.c;mod_magnet_cache.c") + target_link_libraries(mod_magnet ${LUA_LDFLAGS}) + add_target_properties(mod_magnet COMPILE_FLAGS ${LUA_CFLAGS}) -target_link_libraries(mod_cml ${LUA_LDFLAGS}) -add_target_properties(mod_cml COMPILE_FLAGS ${LUA_CFLAGS}) + add_and_install_library(mod_cml "mod_cml.c;mod_cml_lua.c;mod_cml_funcs.c") + target_link_libraries(mod_cml ${LUA_LDFLAGS}) + add_target_properties(mod_cml COMPILE_FLAGS ${LUA_CFLAGS}) +endif() -if(HAVE_GEOIP) +if(WITH_GEOIP) + add_and_install_library(mod_geoip mod_geoip.c) target_link_libraries(mod_geoip GeoIP) endif() if(HAVE_MYSQL_H AND HAVE_MYSQL) + add_and_install_library(mod_mysql_vhost "mod_mysql_vhost.c") target_link_libraries(mod_mysql_vhost mysqlclient) include_directories(/usr/include/mysql) + add_and_install_library(mod_authn_mysql "mod_authn_mysql.c") set(L_MOD_AUTHN_MYSQL) if(HAVE_LIBCRYPT) set(L_MOD_AUTHN_MYSQL ${L_MOD_AUTHN_MYSQL} crypt) @@ -683,16 +693,18 @@ if(HAVE_LIBCRYPT) endif() target_link_libraries(mod_authn_file ${L_MOD_AUTHN_FILE}) -if(HAVE_KRB5) - set(L_MOD_AUTHN_GSSAPI ${L_MOD_AUTHN_GSSAPI} krb5 gssapi_krb5) +if(WITH_KRB5) + check_library_exists(krb5 krb5_init_context "" HAVE_KRB5) add_and_install_library(mod_authn_gssapi "mod_authn_gssapi.c") + set(L_MOD_AUTHN_GSSAPI ${L_MOD_AUTHN_GSSAPI} krb5 gssapi_krb5) target_link_libraries(mod_authn_gssapi ${L_MOD_AUTHN_GSSAPI}) endif() -if(HAVE_LDAP_H) +if(WITH_LDAP) + add_and_install_library(mod_authn_ldap "mod_authn_ldap.c") set(L_MOD_AUTHN_LDAP ${L_MOD_AUTHN_LDAP} ldap lber) + target_link_libraries(mod_authn_ldap ${L_MOD_AUTHN_LDAP}) endif() -target_link_libraries(mod_authn_ldap ${L_MOD_AUTHN_LDAP}) if(HAVE_ZLIB_H) if(HAVE_BZLIB_H) diff --git a/src/Makefile.am b/src/Makefile.am index 5efa0347..4759f1e9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -114,10 +114,12 @@ mod_flv_streaming_la_SOURCES = mod_flv_streaming.c mod_flv_streaming_la_LDFLAGS = $(common_module_ldflags) mod_flv_streaming_la_LIBADD = $(common_libadd) +if BUILD_WITH_GEOIP lib_LTLIBRARIES += mod_geoip.la mod_geoip_la_SOURCES = mod_geoip.c mod_geoip_la_LDFLAGS = $(common_module_ldflags) mod_geoip_la_LIBADD = $(common_libadd) $(GEOIP_LIB) +endif lib_LTLIBRARIES += mod_evasive.la mod_evasive_la_SOURCES = mod_evasive.c @@ -130,28 +132,36 @@ mod_webdav_la_CFLAGS = $(AM_CFLAGS) $(XML_CFLAGS) $(SQLITE_CFLAGS) mod_webdav_la_LDFLAGS = $(common_module_ldflags) mod_webdav_la_LIBADD = $(common_libadd) $(XML_LIBS) $(SQLITE_LIBS) $(UUID_LIBS) +if BUILD_WITH_LUA lib_LTLIBRARIES += mod_magnet.la mod_magnet_la_SOURCES = mod_magnet.c mod_magnet_cache.c mod_magnet_la_CFLAGS = $(AM_CFLAGS) $(LUA_CFLAGS) mod_magnet_la_LDFLAGS = $(common_module_ldflags) mod_magnet_la_LIBADD = $(common_libadd) $(LUA_LIBS) -lm +endif +if BUILD_WITH_LUA lib_LTLIBRARIES += mod_cml.la mod_cml_la_SOURCES = mod_cml.c mod_cml_lua.c mod_cml_funcs.c mod_cml_la_CFLAGS = $(AM_CFLAGS) $(LUA_CFLAGS) mod_cml_la_LDFLAGS = $(common_module_ldflags) mod_cml_la_LIBADD = $(MEMCACHED_LIB) $(common_libadd) $(LUA_LIBS) -lm +endif +if BUILD_MOD_TRIGGER_B4_DL lib_LTLIBRARIES += mod_trigger_b4_dl.la mod_trigger_b4_dl_la_SOURCES = mod_trigger_b4_dl.c mod_trigger_b4_dl_la_LDFLAGS = $(common_module_ldflags) mod_trigger_b4_dl_la_LIBADD = $(GDBM_LIB) $(MEMCACHED_LIB) $(PCRE_LIB) $(common_libadd) +endif +if BUILD_WITH_MYSQL lib_LTLIBRARIES += mod_mysql_vhost.la mod_mysql_vhost_la_SOURCES = mod_mysql_vhost.c mod_mysql_vhost_la_LDFLAGS = $(common_module_ldflags) mod_mysql_vhost_la_LIBADD = $(MYSQL_LIBS) $(common_libadd) mod_mysql_vhost_la_CPPFLAGS = $(MYSQL_INCLUDE) +endif lib_LTLIBRARIES += mod_cgi.la mod_cgi_la_SOURCES = mod_cgi.c @@ -273,21 +283,27 @@ mod_authn_file_la_SOURCES = mod_authn_file.c mod_authn_file_la_LDFLAGS = $(common_module_ldflags) mod_authn_file_la_LIBADD = $(CRYPT_LIB) $(SSL_LIB) $(common_libadd) +if BUILD_WITH_KRB5 lib_LTLIBRARIES += mod_authn_gssapi.la mod_authn_gssapi_la_SOURCES = mod_authn_gssapi.c mod_authn_gssapi_la_LDFLAGS = $(common_module_ldflags) mod_authn_gssapi_la_LIBADD = $(KRB5_LIB) $(common_libadd) +endif +if BUILD_WITH_LDAP lib_LTLIBRARIES += mod_authn_ldap.la mod_authn_ldap_la_SOURCES = mod_authn_ldap.c mod_authn_ldap_la_LDFLAGS = $(common_module_ldflags) mod_authn_ldap_la_LIBADD = $(LDAP_LIB) $(LBER_LIB) $(common_libadd) +endif +if BUILD_WITH_MYSQL lib_LTLIBRARIES += mod_authn_mysql.la mod_authn_mysql_la_SOURCES = mod_authn_mysql.c mod_authn_mysql_la_LDFLAGS = $(common_module_ldflags) mod_authn_mysql_la_LIBADD = $(CRYPT_LIB) $(MYSQL_LIBS) $(common_libadd) mod_authn_mysql_la_CPPFLAGS = $(MYSQL_INCLUDE) +endif lib_LTLIBRARIES += mod_rewrite.la mod_rewrite_la_SOURCES = mod_rewrite.c @@ -345,11 +361,7 @@ lighttpd_SOURCES = \ mod_alias.c \ mod_auth.c \ mod_authn_file.c \ - mod_authn_gssapi.c \ - mod_authn_ldap.c \ - mod_authn_mysql.c \ mod_cgi.c \ - mod_cml.c mod_cml_lua.c mod_cml_funcs.c \ mod_compress.c \ mod_deflate.c \ mod_dirlisting.c \ @@ -358,10 +370,7 @@ lighttpd_SOURCES = \ mod_extforward.c \ mod_fastcgi.c \ mod_flv_streaming.c \ - mod_geoip.c \ mod_indexfile.c \ - mod_magnet.c mod_magnet_cache.c \ - mod_mysql_vhost.c \ mod_proxy.c \ mod_redirect.c \ mod_rewrite.c \ @@ -373,32 +382,56 @@ lighttpd_SOURCES = \ mod_ssi_exprparser.c mod_ssi_expr.c mod_ssi.c \ mod_staticfile.c \ mod_status.c \ - mod_trigger_b4_dl.c \ mod_uploadprogress.c \ mod_userdir.c \ mod_usertrack.c \ mod_webdav.c lighttpd_CPPFLAGS = \ -DLIGHTTPD_STATIC \ - $(LUA_CFLAGS) \ - $(MYSQL_INCLUDE) \ - $(MEMCACHED_CFLAGS) \ $(XML_CFLAGS) $(SQLITE_CFLAGS) \ $(FAM_CFLAGS) $(LIBEV_CFLAGS) $(LIBUNWIND_CFLAGS) lighttpd_LDADD = \ $(common_libadd) \ - $(CRYPT_LIB) $(SSL_LIB) $(LDAP_LIB) $(LBER_LIB) \ - $(KRB5_LIB) \ - $(LUA_LIBS) -lm \ - $(MYSQL_LIBS) \ - $(MEMCACHED_LIB) \ - $(GDBM_LIB) \ - $(GEOIP_LIB) \ + $(CRYPT_LIB) $(SSL_LIB) \ $(XML_LIBS) $(SQLITE_LIBS) $(UUID_LIBS) \ $(PCRE_LIB) $(Z_LIB) $(BZ_LIB) $(DL_LIB) $(SENDFILE_LIB) $(ATTR_LIB) \ $(FAM_LIBS) $(LIBEV_LIBS) $(LIBUNWIND_LIBS) lighttpd_LDFLAGS = -export-dynamic +if BUILD_WITH_GEOIP +lighttpd_SOURCES += mod_geoip.c +lighttpd_LDADD += $(GEOIP_LIB) +endif +if BUILD_WITH_LUA +lighttpd_SOURCES += mod_cml.c mod_cml_lua.c mod_cml_funcs.c \ + mod_magnet.c mod_magnet_cache.c +lighttpd_CPPFLAGS += $(LUA_CFLAGS) +lighttpd_LDADD += $(LUA_LIBS) -lm +endif +if BUILD_WITH_KRB5 +lighttpd_SOURCES += mod_authn_gssapi.c +lighttpd_LDADD += $(KRB5_LIB) +endif +if BUILD_WITH_LDAP +lighttpd_SOURCES += mod_authn_ldap.c +lighttpd_LDADD += $(LDAP_LIB) $(LBER_LIB) +endif +if BUILD_WITH_MYSQL +lighttpd_SOURCES += mod_authn_mysql.c mod_mysql_vhost.c +lighttpd_CPPFLAGS += $(MYSQL_INCLUDE) +lighttpd_LDADD += $(MYSQL_LIBS) +endif +if BUILD_WITH_MEMCACHED +lighttpd_CPPFLAGS += $(MEMCACHED_CFLAGS) +lighttpd_LDADD += $(MEMCACHED_LIB) +endif +if BUILD_WITH_GDBM +lighttpd_LDADD += $(GDBM_LIB) +endif +if BUILD_MOD_TRIGGER_B4_DL +lighttpd_SOURCES += mod_trigger_b4_dl.c +endif + else ## default lighttpd server diff --git a/src/SConscript b/src/SConscript index a279eb94..eabee41a 100644 --- a/src/SConscript +++ b/src/SConscript @@ -104,29 +104,35 @@ modules = { 'mod_rewrite' : { 'src' : [ 'mod_rewrite.c' ], 'lib' : [ env['LIBPCRE'] ] }, 'mod_auth' : { 'src' : [ 'mod_auth.c' ] }, 'mod_authn_file' : { 'src' : [ 'mod_authn_file.c' ], 'lib' : [ env['LIBCRYPT'] ] }, - 'mod_authn_gssapi' : { 'src' : [ 'mod_authn_gssapi.c' ], 'lib' : [ env['LIBKRB5'], env['LIBGSSAPI_KRB5'] ] }, - 'mod_authn_ldap' : { 'src' : [ 'mod_authn_ldap.c' ], 'lib' : [ env['LIBLDAP'], env['LIBLBER'] ] }, - 'mod_authn_mysql' : { 'src' : [ 'mod_authn_mysql.c' ], 'lib' : [ env['LIBCRYPT'], env['LIBMYSQL'] ] }, 'mod_webdav' : { 'src' : [ 'mod_webdav.c' ], 'lib' : [ env['LIBXML2'], env['LIBSQLITE3'], env['LIBUUID'] ] }, - 'mod_mysql_vhost' : { 'src' : [ 'mod_mysql_vhost.c' ], 'lib' : [ env['LIBMYSQL'] ] }, 'mod_uploadprogress' : { 'src' : [ 'mod_uploadprogress.c' ] }, 'mod_evasive' : { 'src' : [ 'mod_evasive.c' ] }, 'mod_ssi' : { 'src' : [ 'mod_ssi_exprparser.c', 'mod_ssi_expr.c', 'mod_ssi.c' ] }, 'mod_flv_streaming' : { 'src' : [ 'mod_flv_streaming.c' ] }, - 'mod_cml': { - 'src' : [ 'mod_cml_lua.c', 'mod_cml.c', 'mod_cml_funcs.c' ], - 'lib' : [ env['LIBPCRE'], env['LIBMEMCACHED'], env['LIBLUA'] ] - }, } -if env['with_memcached']: - modules['mod_trigger_b4_dl'] = { 'src' : [ 'mod_trigger_b4_dl.c' ], 'lib' : [ env['LIBPCRE'], env['LIBMEMCACHED'] ] } +if env['with_geoip']: + modules['mod_geoip'] = { 'src' : [ 'mod_geoip.c' ], 'lib' : [ env['LIBGEOIP'] ] } + +if env['with_krb5']: + modules['mod_authn_gssapi'] = { 'src' : [ 'mod_authn_gssapi.c' ], 'lib' : [ env['LIBKRB5'], env['LIBGSSAPI_KRB5'] ] } + +if env['with_ldap']: + modules['mod_authn_ldap'] = { 'src' : [ 'mod_authn_ldap.c' ], 'lib' : [ env['LIBLDAP'], env['LIBLBER'] ] } if env['with_lua']: modules['mod_magnet'] = { 'src' : [ 'mod_magnet.c', 'mod_magnet_cache.c' ], 'lib' : [ env['LIBLUA'] ] } + modules['mod_cml'] = { + 'src' : [ 'mod_cml_lua.c', 'mod_cml.c', 'mod_cml_funcs.c' ], + 'lib' : [ env['LIBPCRE'], env['LIBMEMCACHED'], env['LIBLUA'] ] + } -if env['with_geoip']: - modules['mod_geoip'] = { 'src' : [ 'mod_geoip.c' ], 'lib' : [ env['LIBGEOIP'] ] }, +if env['with_pcre'] and (env['with_memcached'] or env['with_gdbm']): + modules['mod_trigger_b4_dl'] = { 'src' : [ 'mod_trigger_b4_dl.c' ], 'lib' : [ env['LIBPCRE'], env['LIBMEMCACHED'] ] } + +if env['with_mysql']: + modules['mod_authn_mysql'] = { 'src' : [ 'mod_authn_mysql.c' ], 'lib' : [ env['LIBCRYPT'], env['LIBMYSQL'] ] } + modules['mod_mysql_vhost'] = { 'src' : [ 'mod_mysql_vhost.c' ], 'lib' : [ env['LIBMYSQL'] ] } staticenv = env.Clone(CPPFLAGS=[ env['CPPFLAGS'], '-DLIGHTTPD_STATIC' ]) -- 2.11.4.GIT