summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIra Cooper <ira@samba.org>2014-07-17 18:04:35 -0400
committerIra Cooper <ira@samba.org>2014-08-09 18:26:16 +0200
commitf46b79bdb8824c7c95dee0a282b2c852091bcfce (patch)
treea6c9d893923f8d7b5a83c1e8585a30b6b969a85a
parentcdbcb7bb4b2363d459e0228f8a7a5457a736b007 (diff)
downloadsamba-f46b79bdb8824c7c95dee0a282b2c852091bcfce.tar.gz
samba-f46b79bdb8824c7c95dee0a282b2c852091bcfce.tar.xz
samba-f46b79bdb8824c7c95dee0a282b2c852091bcfce.zip
third_party/iniparser: Initial support for iniparser.
This is the initial support for iniparser, as well the basic third_party framework. Signed-off-by: Ira Cooper <ira@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r--buildtools/wafsamba/samba_third_party.py15
-rw-r--r--buildtools/wafsamba/wafsamba.py1
-rw-r--r--third_party/iniparser/src/wscript2
-rw-r--r--wscript10
-rw-r--r--wscript_build3
5 files changed, 28 insertions, 3 deletions
diff --git a/buildtools/wafsamba/samba_third_party.py b/buildtools/wafsamba/samba_third_party.py
new file mode 100644
index 0000000000..2c50ad4a8b
--- /dev/null
+++ b/buildtools/wafsamba/samba_third_party.py
@@ -0,0 +1,15 @@
+# functions to support third party libraries
+
+from Configure import conf
+import sys, Logs, os
+from samba_bundled import *
+
+@conf
+def CHECK_FOR_THIRD_PARTY(conf):
+ return os.path.exists('third_party')
+
+Build.BuildContext.CHECK_FOR_THIRD_PARTY = CHECK_FOR_THIRD_PARTY
+
+@conf
+def CHECK_INIPARSER(conf):
+ return conf.CHECK_BUNDLED_SYSTEM('iniparser', checkfunctions='iniparser_load', headers='iniparser.h')
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index 8ec4cb8086..a2b8eea8e3 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -18,6 +18,7 @@ from samba_autoproto import *
from samba_python import *
from samba_deps import *
from samba_bundled import *
+from samba_third_party import *
import samba_install
import samba_conftests
import samba_abi
diff --git a/third_party/iniparser/src/wscript b/third_party/iniparser/src/wscript
index c66f298048..df9f60dc40 100644
--- a/third_party/iniparser/src/wscript
+++ b/third_party/iniparser/src/wscript
@@ -5,7 +5,7 @@ import Options
def configure(conf):
conf.CHECK_HEADERS('float.h')
- if conf.CHECK_BUNDLED_SYSTEM('iniparser', checkfunctions='iniparser_load', headers='iniparser.h'):
+ if conf.CHECK_INIPARSER():
conf.define('USING_SYSTEM_INIPARSER', 1)
def build(bld):
diff --git a/wscript b/wscript
index cf4e93b1c0..92e060f36f 100644
--- a/wscript
+++ b/wscript
@@ -120,6 +120,15 @@ def configure(conf):
raise Utils.WafError('Python version 3.x is not supported by Samba yet')
conf.RECURSE('dynconfig')
+
+ if conf.CHECK_FOR_THIRD_PARTY():
+ conf.RECURSE('third_party/iniparser/src')
+ else:
+ if not conf.CHECK_INIPARSER():
+ raise Utils.WafError('iniparser development packages have not been found.\nIf third_party is installed, check that it is in the proper place.')
+ else:
+ conf.define('USING_SYSTEM_INIPARSER', 1)
+
conf.RECURSE('lib/ldb')
if Options.options.with_system_mitkrb5:
@@ -146,7 +155,6 @@ def configure(conf):
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')
diff --git a/wscript_build b/wscript_build
index 59ba354d48..c2956ea5ed 100644
--- a/wscript_build
+++ b/wscript_build
@@ -71,8 +71,9 @@ bld.RECURSE('source4/lib/cmdline')
bld.RECURSE('lib/socket_wrapper')
bld.RECURSE('lib/nss_wrapper')
bld.RECURSE('lib/uid_wrapper')
+if bld.CHECK_FOR_THIRD_PARTY():
+ bld.RECURSE('third_party/iniparser/src')
bld.RECURSE('lib/popt')
-bld.RECURSE('lib/iniparser/src')
bld.RECURSE('source4/lib/stream')
bld.RECURSE('lib/afs')
bld.RECURSE('lib/util')