summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/ldb/SConscript13
-rw-r--r--source4/lib/popt/SConscript10
-rw-r--r--source4/lib/replace/SConscript13
-rw-r--r--source4/lib/tls/SConscript7
4 files changed, 25 insertions, 18 deletions
diff --git a/source4/lib/ldb/SConscript b/source4/lib/ldb/SConscript
index 1079a441d8..b726d0ebc9 100644
--- a/source4/lib/ldb/SConscript
+++ b/source4/lib/ldb/SConscript
@@ -1,5 +1,6 @@
Import('hostenv')
Import('talloc')
+Import('defines')
hostenv.StaticLibrary('modules/timestamps.c')
hostenv.StaticLibrary('modules/rdn_name.c')
@@ -7,12 +8,14 @@ hostenv.StaticLibrary('modules/schema.c')
hostenv.StaticLibrary('ldb_ildap/ldb_ildap.c')
hostenv.StaticLibrary('modules/ldb_map.c')
-conf = Configure(hostenv)
-have_sqlite3 = conf.CheckLibWithHeader("sqlite3","sqlite3.h",'c',"sqlite3_open()")
-have_popt = conf.CheckLibWithHeader("popt","popt.h",'c',"poptGetArgs(NULL);")
-conf.Finish()
+if hostenv['configure']:
+ conf = Configure(hostenv)
+ if conf.CheckLibWithHeader("sqlite3","sqlite3.h",'c',"sqlite3_open()"):
+ defines['HAVE_SQLITE3'] = 1
+ conf.CheckLibWithHeader("popt","popt.h",'c',"poptGetArgs(NULL);")
+ conf.Finish()
-if have_sqlite3:
+if defines.has_key('HAVE_SQLITE3'):
hostenv.StaticLibrary('ldb_sqlite3/ldb_sqlite3.c')
hostenv.StaticLibrary('ldb_tdb',
diff --git a/source4/lib/popt/SConscript b/source4/lib/popt/SConscript
index 78496e7e1a..85f9c9b7e0 100644
--- a/source4/lib/popt/SConscript
+++ b/source4/lib/popt/SConscript
@@ -1,9 +1,11 @@
-Import('hostenv')
# tastes like -*- python -*-
+Import('hostenv')
+
-conf = hostenv.Configure()
-conf.env['HAVE_EXTERNAL_POPT'] = conf.CheckLibWithHeader('popt', 'popt.h', 'c', 'poptGetArgs(NULL);')
-conf.Finish()
+if hostenv['configure']:
+ conf = hostenv.Configure()
+ conf.env['HAVE_EXTERNAL_POPT'] = conf.CheckLibWithHeader('popt', 'popt.h', 'c', 'poptGetArgs(NULL);')
+ conf.Finish()
popt = hostenv.StaticLibrary('popt', ['findme.c','popt.c','poptconfig.c','popthelp.c','poptparse.c'])
Export('popt')
diff --git a/source4/lib/replace/SConscript b/source4/lib/replace/SConscript
index b63b544f8a..84088db162 100644
--- a/source4/lib/replace/SConscript
+++ b/source4/lib/replace/SConscript
@@ -1,11 +1,12 @@
Import('hostenv')
-conf = Configure(hostenv)
-#FIXME: conf.CheckBrokenInetNtoa()
-for f in ['strtoull','__strtoull','strtouq','strtoll','__strtoll','strtoq',
- 'seteuid','setresuid','setegid','setresgid']:
- conf.CheckFunc(f,'c')
-conf.Finish()
+if hostenv['configure']:
+ conf = Configure(hostenv)
+ #FIXME: conf.CheckBrokenInetNtoa()
+ for f in ['strtoull','__strtoull','strtouq','strtoll','__strtoll','strtoq',
+ 'seteuid','setresuid','setegid','setresgid']:
+ conf.CheckFunc(f,'c')
+ conf.Finish()
hostenv.StaticLibrary('repdir', ['repdir/repdir.c'])
hostenv.StaticLibrary('replace', ['replace.c', 'snprintf.c'])
diff --git a/source4/lib/tls/SConscript b/source4/lib/tls/SConscript
index 3b1a1d7d4e..941955e9e3 100644
--- a/source4/lib/tls/SConscript
+++ b/source4/lib/tls/SConscript
@@ -1,6 +1,7 @@
Import('hostenv')
hostenv.StaticLibrary('tls', ['tls.c', 'tlscert.c'])
-conf = hostenv.Configure()
-conf.CheckLibWithHeader('gnutls', 'gnutls/gnutls.h', 'c', 'gnutls_global_init()')
-conf.Finish()
+if hostenv['configure']:
+ conf = hostenv.Configure()
+ conf.CheckLibWithHeader('gnutls', 'gnutls/gnutls.h', 'c', 'gnutls_global_init()')
+ conf.Finish()