allow to use system iniparser library.
authorGünther Deschner <gd@samba.org>
Wed, 9 May 2012 13:33:04 +0000 (15:33 +0200)
committerGünther Deschner <gd@samba.org>
Wed, 9 May 2012 15:38:33 +0000 (17:38 +0200)
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed May  9 17:38:33 CEST 2012 on sn-devel-104

buildtools/wafsamba/samba3.py
lib/iniparser/src/wscript [new file with mode: 0644]
lib/iniparser/src/wscript_build [deleted file]
nsswitch/wscript_build
source3/wscript_build
wscript
wscript_build

index 7f05ffe40d3fbbcd25ba6cf19e7e69b1196ffb23..b6a9f1bd3fe932e760ffcdfaa423018104fbc251 100644 (file)
@@ -92,6 +92,12 @@ def s3_fix_kwargs(bld, kwargs):
     else:
         extra_includes += [ '../lib/popt' ]
 
     else:
         extra_includes += [ '../lib/popt' ]
 
+    if bld.CONFIG_SET('USING_SYSTEM_INIPARSER'):
+        (iniparser_includes, iniparser_ldflags, iniparser_cpppath) = library_flags(bld, 'iniparser')
+        extra_includes += iniparser_cpppath
+    else:
+        extra_includes += [ '../lib/iniparser' ]
+
     # s3 builds assume that they will have a bunch of extra include paths
     includes = []
     for d in extra_includes:
     # s3 builds assume that they will have a bunch of extra include paths
     includes = []
     for d in extra_includes:
diff --git a/lib/iniparser/src/wscript b/lib/iniparser/src/wscript
new file mode 100644 (file)
index 0000000..c66f298
--- /dev/null
@@ -0,0 +1,21 @@
+#!/usr/bin/env python
+
+import Options
+
+def configure(conf):
+    conf.CHECK_HEADERS('float.h')
+
+    if conf.CHECK_BUNDLED_SYSTEM('iniparser', checkfunctions='iniparser_load', headers='iniparser.h'):
+        conf.define('USING_SYSTEM_INIPARSER', 1)
+
+def build(bld):
+    if bld.CONFIG_SET('USING_SYSTEM_INIPARSER'):
+        return
+
+    bld.SAMBA_LIBRARY('iniparser',
+                      source='''../../iniparser_build/iniparser.c
+                                ../../iniparser_build/dictionary.c
+                                ../../iniparser_build/strlib.c''',
+                      cflags='',
+                      deps='replace',
+                      private_library=True)
diff --git a/lib/iniparser/src/wscript_build b/lib/iniparser/src/wscript_build
deleted file mode 100644 (file)
index aa15c9f..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env python
-
-bld.SAMBA_SUBSYSTEM('LIBINIPARSER',
-                    source='../../iniparser_build/iniparser.c ../../iniparser_build/dictionary.c ../../iniparser_build/strlib.c',
-                    deps='replace',
-                    cflags=''
-                    )
index f740fdf25f0956d59f8a08cf0f96c3340024356a..0802687eebc374b3e9631d32b6099915b5b47b7e 100644 (file)
@@ -24,7 +24,7 @@ bld.SAMBA_LIBRARY('nss_winbind',
 if bld.CONFIG_SET('WITH_PAM_MODULES') and bld.CONFIG_SET('HAVE_PAM_START'):
        bld.SAMBA_LIBRARY('pamwinbind',
                source='pam_winbind.c',
 if bld.CONFIG_SET('WITH_PAM_MODULES') and bld.CONFIG_SET('HAVE_PAM_START'):
        bld.SAMBA_LIBRARY('pamwinbind',
                source='pam_winbind.c',
-               deps='intl talloc wbclient winbind-client LIBINIPARSER pam',
+               deps='intl talloc wbclient winbind-client iniparser pam',
                cflags='-DLOCALEDIR=\"%s/locale\"' % bld.env.DATADIR,
                realname='pam_winbind.so',
                install_path='${PAMMODULESDIR}'
                cflags='-DLOCALEDIR=\"%s/locale\"' % bld.env.DATADIR,
                realname='pam_winbind.so',
                install_path='${PAMMODULESDIR}'
index 5e85b790cb40571e6df33d7bc73bf2acfc956850..ad19c3390f88f47924bd40b9b7d632b77e2310a5 100755 (executable)
@@ -1527,7 +1527,7 @@ bld.SAMBA3_BINARY('ntlm_auth' + bld.env.suffix3,
                  deps='''
                  talloc
                  krb5samba
                  deps='''
                  talloc
                  krb5samba
-                 LIBINIPARSER
+                 iniparser
                  libsmb
                  popt_samba3
                  LIBNTLMSSP gse gensec''',
                  libsmb
                  popt_samba3
                  LIBNTLMSSP gse gensec''',
diff --git a/wscript b/wscript
index 337643621c945eb450cb7fd52377023dca66620c..15ac7f57c7cd681574482d60cbcc3d6e20c9c6eb 100755 (executable)
--- a/wscript
+++ b/wscript
@@ -105,6 +105,7 @@ def configure(conf):
     conf.RECURSE('lib/socket_wrapper')
     conf.RECURSE('lib/uid_wrapper')
     conf.RECURSE('lib/popt')
     conf.RECURSE('lib/socket_wrapper')
     conf.RECURSE('lib/uid_wrapper')
     conf.RECURSE('lib/popt')
+    conf.RECURSE('lib/iniparser/src')
     conf.RECURSE('lib/subunit/c')
     conf.RECURSE('libcli/smbreadline')
     conf.RECURSE('lib/crypto')
     conf.RECURSE('lib/subunit/c')
     conf.RECURSE('libcli/smbreadline')
     conf.RECURSE('lib/crypto')
index ea242d5c81283a5c909a6853b562a3d9d990dc43..e35ddaeb9ccbb5997b9e838c5b4e6935395adbbd 100755 (executable)
@@ -48,7 +48,6 @@ bld.RECURSE('source4/libnet')
 bld.RECURSE('source4/auth')
 bld.RECURSE('auth')
 bld.RECURSE('auth/kerberos')
 bld.RECURSE('source4/auth')
 bld.RECURSE('auth')
 bld.RECURSE('auth/kerberos')
-bld.RECURSE('lib/iniparser/src')
 bld.RECURSE('nsswitch')
 bld.RECURSE('nsswitch/libwbclient')
 bld.RECURSE('source4/lib/samba3')
 bld.RECURSE('nsswitch')
 bld.RECURSE('nsswitch/libwbclient')
 bld.RECURSE('source4/lib/samba3')
@@ -63,6 +62,7 @@ bld.RECURSE('lib/socket_wrapper')
 bld.RECURSE('lib/nss_wrapper')
 bld.RECURSE('lib/uid_wrapper')
 bld.RECURSE('lib/popt')
 bld.RECURSE('lib/nss_wrapper')
 bld.RECURSE('lib/uid_wrapper')
 bld.RECURSE('lib/popt')
+bld.RECURSE('lib/iniparser/src')
 bld.RECURSE('source4/lib/stream')
 bld.RECURSE('lib/util')
 bld.RECURSE('lib/tdb_wrap')
 bld.RECURSE('source4/lib/stream')
 bld.RECURSE('lib/util')
 bld.RECURSE('lib/tdb_wrap')