[ekg2-commit] r4252 - trunk: trunk/SConstruct
SVN commit
svn w toxygen.net
Sob, 9 Sie 2008, 02:01:32 CEST
Author: peres
Date: 2008-08-09 02:01:32 +0200 (Sat, 09 Aug 2008)
New Revision: 4252
Modified:
trunk/SConstruct
Log:
Simplify checking for dl&iconv, add libidn, don't use ekg_libs on plugins.
Modified: trunk/SConstruct
===================================================================
--- trunk/SConstruct 2008-08-08 23:39:55 UTC (rev 4251)
+++ trunk/SConstruct 2008-08-09 00:01:32 UTC (rev 4252)
@@ -3,7 +3,7 @@
# Alternate build system for EKG2, unstable and unfinished yet
# (C) 2008 Michał Górny
#
-# configure.ac ported to: iconv
+# configure.ac ported to: idn
consts = {
'VERSION': 'SVN'
@@ -110,11 +110,6 @@
ekg_libs = []
if compat:
ekg_libs.append('compat')
-if not conf.CheckFunc('dlopen'):
- if conf.CheckLib('dl', 'dlopen'):
- ekg_libs.append('dl')
- else:
- die('dlopen not found!') # XXX: on windows, we use LoadLibraryA() instead
platform_libs = {
'kvm': 'kvm_openfiles', # bsd
@@ -156,15 +151,25 @@
includes += '#include <%s>\n' % (inc)
writedef('HAVE_%s' % (type.upper()), conf.CheckType(type, includes))
-# iconv
-if conf.CheckFunc('iconv_open'):
- writedef('HAVE_ICONV', True)
-elif conf.CheckLib('iconv', 'iconv_open'):
- writedef('HAVE_ICONV', True)
- ekg_libs.append('iconv')
-else:
- writedef('HAVE_ICONV', False)
+possibly_libbized = {
+ 'dlopen': 'dl',
+ 'iconv': 'iconv'
+ }
+for func, lib in possibly_libbized.items():
+ if conf.CheckFunc(func):
+ ret = True
+ elif conf.CheckLib(lib, func):
+ ret = True
+ ekg_libs.append(lib)
+ else:
+ ret = False
+ writedef('HAVE_%s' % (func.upper()), ret)
+
+have_idn = conf.CheckLibWithHeader('idn', ['stringprep.h'], 'C', 'stringprep_check_version(NULL);')
+writedef('LIBIDN', have_idn)
+ekg_libs.append('idn')
+
conf.Finish()
definefile.close()
@@ -176,4 +181,4 @@
for plugin in env['PLUGINS']:
plugpath = 'plugins/%s' % (plugin)
Mkdir('%s/.libs' % (plugin))
- env.SharedLibrary('%s/.libs/%s' % (plugpath, plugin), Glob('%s/*.c' % (plugpath)), LIBPREFIX = '')
+ env.SharedLibrary('%s/.libs/%s' % (plugpath, plugin), Glob('%s/*.c' % (plugpath)), LIBPREFIX = '', LIBS = [])
Więcej informacji o liście dyskusyjnej ekg2-commit