check if we need -ldl to get dlopen

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@864 152afb58-edef-0310-8abb-c4023f1b3aa9
This commit is contained in:
Jan Kneschke 2005-11-18 13:27:17 +00:00
parent 971dc42657
commit 230e670078
2 changed files with 8 additions and 5 deletions

View File

@ -92,13 +92,13 @@ opts.AddOptions(
env = Environment(
env = os.environ,
options = opts,
CCFLAGS = Split('-Wall -O2 -g -W -pedantic -Wunused -Wshadow'),
CPPPATH = Split('#/build'),
# LIBS = [ 'dl' ]
CPPPATH = Split('#/build')
)
env['package'] = package
env['version'] = version
if env['CC'] == 'gcc':
env.Append(CCFLAGS = Split('-Wall -O2 -g -W -pedantic -Wunused -Wshadow -std=gnu99'))
# cache configure checks
if 1:
@ -153,7 +153,7 @@ if 1:
autoconf.env.Append( LIBSQLITE3 = '', LIBXML2 = '', LIBMYSQL = '', LIBZ = '',
LIBBZ2 = '', LIBCRYPT = '', LIBMEMCACHE = '', LIBFCGI = '',
LIBLDAP = '', LIBLBER = '', LIBLUA = '')
LIBLDAP = '', LIBLBER = '', LIBLUA = '', LIBDL = '')
if env['with_fam']:
if autoconf.CheckLibWithHeader('fam', 'fam.h', 'C'):
@ -195,6 +195,9 @@ if 1:
if autoconf.CheckLibWithHeader('fcgi', 'fastcgi.h', 'C'):
autoconf.env.Append(LIBFCGI = 'fcgi')
if autoconf.CheckLibWithHeader('dl', 'dlfcn.h', 'C'):
autoconf.env.Append(LIBDL = 'dl')
if autoconf.CheckType('socklen_t', '#include <unistd.h>\n#include <sys/socket.h>\n#include <sys/types.h>'):
autoconf.env.Append(CPPFLAGS = [ '-DHAVE_SOCKLEN_T' ])

View File

@ -45,7 +45,7 @@ else:
else:
bin_linkflags += [ '-Wl,--export-dynamic' ]
instbin = env.Program(bin_targets, src, LINKFLAGS = bin_linkflags, LIBS= [ env['LIBS'], common_lib ])
instbin = env.Program(bin_targets, src, LINKFLAGS = bin_linkflags, LIBS= [ env['LIBS'], common_lib, env['LIBDL'] ])
env.Depends(instbin, configparser)
spawn_fcgi = env.Program("spawn-fcgi", "spawn-fcgi.c")