summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjan <jan@152afb58-edef-0310-8abb-c4023f1b3aa9>2006-09-16 11:27:38 +0000
committerjan <jan@152afb58-edef-0310-8abb-c4023f1b3aa9>2006-09-16 11:27:38 +0000
commite44a945871fa08859645e23b4371eaa43a3a26e8 (patch)
tree3280f68d11b1333cce98d60879255bc973e9881f
parent04358c1900a517aa6e2b7b2cf789b8d7d42c0015 (diff)
downloadlighttpd-e44a945871fa08859645e23b4371eaa43a3a26e8.tar.gz
use pkg-config to find lua via scons
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.11-ssl-fixes@1310 152afb58-edef-0310-8abb-c4023f1b3aa9
-rw-r--r--SConstruct13
1 files changed, 9 insertions, 4 deletions
diff --git a/SConstruct b/SConstruct
index a2aeddb9..ec308483 100644
--- a/SConstruct
+++ b/SConstruct
@@ -202,10 +202,6 @@ if 1:
if autoconf.CheckLibWithHeader('sqlite3', 'sqlite3.h', 'C'):
autoconf.env.Append(CPPFLAGS = [ '-DHAVE_SQLITE3_H', '-DHAVE_LIBSQLITE3' ], LIBSQLITE3 = 'sqlite3')
- if env['with_lua']:
- if autoconf.CheckLibWithHeader('lua', 'lua.h', 'C'):
- autoconf.env.Append(CPPFLAGS = [ '-DHAVE_LUA_H', '-DHAVE_LIBLUA' ], LIBLUA = 'lua', LIBLUALIB = 'lualib')
-
ol = env['LIBS']
if autoconf.CheckLibWithHeader('fcgi', 'fastcgi.h', 'C'):
autoconf.env.Append(LIBFCGI = 'fcgi')
@@ -227,6 +223,15 @@ if 1:
env = autoconf.Finish()
+ if env['with_lua']:
+ oldlibs = env['LIBS']
+ env.ParseConfig("pkg-config 'lua >= 5.0' --cflags --libs")
+ lualibs = env['LIBS'][len(oldlibs):]
+ env.Append(LIBLUA = lualibs)
+ env.Append(CPPFLAGS = [ '-DHAVE_LUA_H' ])
+ env['LIBS'] = oldlibs
+
+
if env['with_pcre']:
pcre_config = checkProgram(env, 'pcre', 'pcre-config')
env.ParseConfig(pcre_config + ' --cflags --libs')