summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-02-21 13:55:58 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:26:34 +1000
commit04aa584c02cdbad4b8bc23d3108953120b226a69 (patch)
tree8d132da0bd619ba3702d4fc798bef498d3be07cc /lib
parent8f062f4a0f781b351e361ce07d0701f312069851 (diff)
downloadsamba-04aa584c02cdbad4b8bc23d3108953120b226a69.tar.gz
samba-04aa584c02cdbad4b8bc23d3108953120b226a69.tar.bz2
samba-04aa584c02cdbad4b8bc23d3108953120b226a69.zip
build: added target directory options
Diffstat (limited to 'lib')
-rw-r--r--lib/replace/wafsamba.py9
-rw-r--r--lib/replace/wscript13
2 files changed, 22 insertions, 0 deletions
diff --git a/lib/replace/wafsamba.py b/lib/replace/wafsamba.py
index f0f4910d15..9ec905d316 100644
--- a/lib/replace/wafsamba.py
+++ b/lib/replace/wafsamba.py
@@ -55,6 +55,15 @@ def SAMBA_CONFIG_H(conf):
conf.write_config_header('config.h')
+##############################################################
+# setup a configurable path
+@conf
+def CONFIG_PATH(conf, name, default):
+ if not name in conf.env:
+ conf.env[name] = conf.env['PREFIX'] + default
+ conf.define(name, conf.env[name], quote=True)
+
+
################################################################
# magic rpath handling
#
diff --git a/lib/replace/wscript b/lib/replace/wscript
index e4eebdf6de..dfeaab895b 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -5,6 +5,15 @@ import Options, os, wafsamba
def set_options(opt):
opt.tool_options('compiler_cc')
+ opt.add_option('--libdir',
+ help=("object code libraries [PREFIX/lib]"),
+ action="store", dest='LIBDIR', default=None)
+ opt.add_option('--bindir',
+ help=("user executables [PREFIX/bin]"),
+ action="store", dest='BINDIR', default=None)
+ opt.add_option('--sbindir',
+ help=("system admin executables [PREFIX/sbin]"),
+ action="store", dest='SBINDIR', default=None)
opt.add_option('--disable-rpath',
help=("Disable use of rpath"),
action="store_true", dest='disable_rpath', default=False)
@@ -16,6 +25,10 @@ def configure(conf):
# load our local waf extensions
conf.check_tool('wafsamba', tooldir=conf.curdir)
+ conf.CONFIG_PATH('LIBDIR', '/lib')
+ conf.CONFIG_PATH('BINDIR', '/bin')
+ conf.CONFIG_PATH('SBINDIR', '/sbin')
+
conf.check_tool('compiler_cc')
conf.DEFUN('_GNU_SOURCE', 1)
conf.DEFUN('_XOPEN_SOURCE_EXTENDED', 1)