Browse Source

[build] only mod_openssl depends on -lssl

some other modules depend only on -lcrypto, when available,
for SHA1, HMAC, MD5, etc
personal/stbuehler/mod-csrf
Glenn Strauss 5 years ago
parent
commit
86d0396761
  1. 4
      SConstruct
  2. 3
      src/CMakeLists.txt
  3. 10
      src/Makefile.am
  4. 4
      src/SConscript

4
SConstruct

@ -253,7 +253,7 @@ if 1:
if env['with_openssl']:
if autoconf.CheckLibWithHeader('ssl', 'openssl/ssl.h', 'C'):
autoconf.env.Append(CPPFLAGS = [ '-DHAVE_OPENSSL_SSL_H', '-DHAVE_LIBSSL'] , LIBSSL = 'ssl', LIBCRYPTO = 'crypto', LIBS = [ 'ssl', 'crypto' ])
autoconf.env.Append(CPPFLAGS = [ '-DHAVE_OPENSSL_SSL_H', '-DHAVE_LIBSSL'] , LIBSSL = 'ssl', LIBCRYPTO = 'crypto', LIBS = [ 'crypto' ])
if env['with_gzip']:
if autoconf.CheckLibWithHeader('z', 'zlib.h', 'C'):
@ -362,7 +362,7 @@ if env['with_mysql']:
env.Append(CPPFLAGS = [ '-DHAVE_MYSQL_H', '-DHAVE_LIBMYSQL' ], LIBMYSQL = 'mysqlclient')
env['LIBS'] = oldlib
if re.compile("cygwin|mingw").search(env['PLATFORM']):
if re.compile("cygwin|mingw|midipix").search(env['PLATFORM']):
env.Append(COMMON_LIB = 'bin')
elif re.compile("darwin|aix").search(env['PLATFORM']):
env.Append(COMMON_LIB = 'lib')

3
src/CMakeLists.txt

@ -776,6 +776,9 @@ if(HAVE_LIBSSL AND HAVE_LIBCRYPTO)
add_and_install_library(mod_openssl "mod_openssl.c")
set(L_MOD_OPENSSL ${L_MOD_OPENSSL} ssl crypto)
target_link_libraries(mod_openssl ${L_MOD_OPENSSL})
set(L_MOD_AUTHN_FILE ${L_MOD_AUTHN_FILE} crypto)
target_link_libraries(mod_authn_file ${L_MOD_AUTHN_FILE})
target_link_libraries(mod_secdownload crypto)
endif()
if(WITH_LIBEV)

10
src/Makefile.am

@ -95,7 +95,7 @@ lib_LTLIBRARIES += liblightcomp.la
liblightcomp_la_SOURCES=$(common_src)
liblightcomp_la_CFLAGS=$(AM_CFLAGS) $(LIBEV_CFLAGS)
liblightcomp_la_LDFLAGS = $(common_ldflags)
liblightcomp_la_LIBADD = $(PCRE_LIB) $(SSL_LIB) $(FAM_LIBS) $(LIBEV_LIBS) $(ATTR_LIB)
liblightcomp_la_LIBADD = $(PCRE_LIB) $(CRYPTO_LIB) $(FAM_LIBS) $(LIBEV_LIBS) $(ATTR_LIB)
common_libadd = liblightcomp.la
else
src += $(common_src)
@ -221,7 +221,7 @@ mod_ssi_la_LIBADD = $(common_libadd)
lib_LTLIBRARIES += mod_secdownload.la
mod_secdownload_la_SOURCES = mod_secdownload.c
mod_secdownload_la_LDFLAGS = $(common_module_ldflags)
mod_secdownload_la_LIBADD = $(common_libadd)
mod_secdownload_la_LIBADD = $(common_libadd) $(CRYPTO_LIB)
#lib_LTLIBRARIES += mod_httptls.la
#mod_httptls_la_SOURCES = mod_httptls.c
@ -276,7 +276,7 @@ mod_auth_la_LIBADD = $(common_libadd)
lib_LTLIBRARIES += mod_authn_file.la
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)
mod_authn_file_la_LIBADD = $(CRYPT_LIB) $(CRYPTO_LIB) $(common_libadd)
if BUILD_WITH_KRB5
lib_LTLIBRARIES += mod_authn_gssapi.la
@ -394,7 +394,7 @@ lighttpd_CPPFLAGS = \
$(FAM_CFLAGS) $(LIBEV_CFLAGS) $(LIBUNWIND_CFLAGS)
lighttpd_LDADD = \
$(common_libadd) \
$(CRYPT_LIB) $(SSL_LIB) \
$(CRYPT_LIB) $(CRYPTO_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)
@ -443,7 +443,7 @@ else
## default lighttpd server
lighttpd_SOURCES = $(src)
lighttpd_CPPFLAGS = $(FAM_CFLAGS) $(LIBEV_CFLAGS)
lighttpd_LDADD = $(PCRE_LIB) $(DL_LIB) $(SENDFILE_LIB) $(ATTR_LIB) $(common_libadd) $(SSL_LIB) $(FAM_LIBS) $(LIBEV_LIBS) $(LIBUNWIND_LIBS)
lighttpd_LDADD = $(PCRE_LIB) $(DL_LIB) $(SENDFILE_LIB) $(ATTR_LIB) $(common_libadd) $(CRYPTO_LIB) $(FAM_LIBS) $(LIBEV_LIBS) $(LIBUNWIND_LIBS)
lighttpd_LDFLAGS = -export-dynamic
endif

4
src/SConscript

@ -105,7 +105,7 @@ modules = {
'mod_usertrack' : { 'src' : [ 'mod_usertrack.c' ] },
'mod_proxy' : { 'src' : [ 'mod_proxy.c' ] },
'mod_userdir' : { 'src' : [ 'mod_userdir.c' ] },
'mod_secdownload' : { 'src' : [ 'mod_secdownload.c' ] },
'mod_secdownload' : { 'src' : [ 'mod_secdownload.c' ], 'lib' : [ env['LIBCRYPTO'] ] },
'mod_accesslog' : { 'src' : [ 'mod_accesslog.c' ] },
'mod_simple_vhost' : { 'src' : [ 'mod_simple_vhost.c' ] },
'mod_evhost' : { 'src' : [ 'mod_evhost.c' ] },
@ -116,7 +116,7 @@ modules = {
'mod_redirect' : { 'src' : [ 'mod_redirect.c' ], 'lib' : [ env['LIBPCRE'] ] },
'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_file' : { 'src' : [ 'mod_authn_file.c' ], 'lib' : [ env['LIBCRYPT'], env['LIBCRYPTO'] ] },
'mod_webdav' : { 'src' : [ 'mod_webdav.c' ], 'lib' : [ env['LIBXML2'], env['LIBSQLITE3'], env['LIBUUID'] ] },
'mod_uploadprogress' : { 'src' : [ 'mod_uploadprogress.c' ] },
'mod_evasive' : { 'src' : [ 'mod_evasive.c' ] },

Loading…
Cancel
Save