Browse Source

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
svn/tags/lighttpd-1.4.12
Jan Kneschke 15 years ago
parent
commit
9b10531f79
  1. 13
      SConstruct

13
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')

Loading…
Cancel
Save