summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-10-16 01:49:41 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-10-16 01:32:06 +0000
commit6852cc4a7a5601261ba31ee05388a4078e69c77c (patch)
treea4dc4dd64278ae87780b56351923ad6edd461b5a /source4
parent2e038a78fdcc9dc8a9f65de48176323ad68a3420 (diff)
downloadsamba-6852cc4a7a5601261ba31ee05388a4078e69c77c.tar.gz
samba-6852cc4a7a5601261ba31ee05388a4078e69c77c.tar.bz2
samba-6852cc4a7a5601261ba31ee05388a4078e69c77c.zip
heimdal_build: Put version objects in a separate subsystem.
Diffstat (limited to 'source4')
-rw-r--r--source4/heimdal_build/replace.c4
-rw-r--r--source4/heimdal_build/version.c27
-rw-r--r--source4/heimdal_build/wscript_build31
-rw-r--r--source4/heimdal_build/wscript_configure16
4 files changed, 57 insertions, 21 deletions
diff --git a/source4/heimdal_build/replace.c b/source4/heimdal_build/replace.c
index 8c3def7dca..51393f6e68 100644
--- a/source4/heimdal_build/replace.c
+++ b/source4/heimdal_build/replace.c
@@ -83,7 +83,3 @@
return -1;
}
#endif
-
-const char *heimdal_version = "samba-internal-heimdal";
-const char *heimdal_long_version = "samba-interal-heimdal";
-
diff --git a/source4/heimdal_build/version.c b/source4/heimdal_build/version.c
new file mode 100644
index 0000000000..8cceff142f
--- /dev/null
+++ b/source4/heimdal_build/version.c
@@ -0,0 +1,27 @@
+/*
+ Unix SMB/CIFS implementation.
+
+ some replacement functions for parts of roken that don't fit easily into
+ our build system
+
+ Copyright (C) Andrew Tridgell 2005
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+const char *heimdal_version = "samba-internal-heimdal";
+const char *heimdal_long_version = "samba-interal-heimdal";
+
diff --git a/source4/heimdal_build/wscript_build b/source4/heimdal_build/wscript_build
index c01af72dd5..06bb3706ff 100644
--- a/source4/heimdal_build/wscript_build
+++ b/source4/heimdal_build/wscript_build
@@ -540,9 +540,6 @@ if not bld.CONFIG_SET('USING_SYSTEM_ROKEN'):
cflags='-DPACKAGE="Samba"',
install=False
)
-else:
- HEIMDAL_SUBSYSTEM('ROKEN_HOSTCC', '', use_hostcc=True, use_global_deps=False, deps='roken',
- group='compiler_libraries')
HEIMDAL_LIBRARY('kdc',
source='../heimdal/kdc/default_config.c ../heimdal/kdc/kerberos5.c ../heimdal/kdc/krb5tgs.c ../heimdal/kdc/pkinit.c ../heimdal/kdc/log.c ../heimdal/kdc/misc.c ../heimdal/kdc/kaserver.c ../heimdal/kdc/digest.c ../heimdal/kdc/process.c ../heimdal/kdc/windc.c ../heimdal/kdc/kx509.c',
@@ -768,42 +765,54 @@ if not bld.CONFIG_SET('USING_SYSTEM_COM_ERR'):
vnum='0.25',
)
+HEIMDAL_SUBSYSTEM('HEIMDAL_VERS_HOSTCC',
+ '../heimdal/lib/vers/print_version.c ../heimdal_build/version.c',
+ group='build_compilers',
+ deps='LIBREPLACE_HOSTCC ROKEN_HOSTCC',
+ use_global_deps=False,
+ use_hostcc=True)
+
+HEIMDAL_SUBSYSTEM('HEIMDAL_VERS',
+ '../heimdal/lib/vers/print_version.c ../heimdal_build/version.c',
+ group='build_compilers',
+ deps='roken')
+
# here is the asn1 compiler build rule
HEIMDAL_BINARY('asn1_compile',
- '../heimdal/lib/asn1/main.c ../heimdal/lib/asn1/gen.c ../heimdal/lib/asn1/gen_copy.c ../heimdal/lib/asn1/gen_decode.c ../heimdal/lib/asn1/gen_encode.c ../heimdal/lib/asn1/gen_free.c ../heimdal/lib/asn1/gen_glue.c ../heimdal/lib/asn1/gen_length.c ../heimdal/lib/asn1/gen_seq.c ../heimdal/lib/asn1/gen_template.c ../heimdal/lib/asn1/hash.c ../heimdal/lib/asn1/symbol.c ../heimdal/lib/asn1/asn1parse.c ../heimdal/lib/asn1/lex.c ../heimdal/lib/vers/print_version.c',
+ '../heimdal/lib/asn1/main.c ../heimdal/lib/asn1/gen.c ../heimdal/lib/asn1/gen_copy.c ../heimdal/lib/asn1/gen_decode.c ../heimdal/lib/asn1/gen_encode.c ../heimdal/lib/asn1/gen_free.c ../heimdal/lib/asn1/gen_glue.c ../heimdal/lib/asn1/gen_length.c ../heimdal/lib/asn1/gen_seq.c ../heimdal/lib/asn1/gen_template.c ../heimdal/lib/asn1/hash.c ../heimdal/lib/asn1/symbol.c ../heimdal/lib/asn1/asn1parse.c ../heimdal/lib/asn1/lex.c',
use_hostcc=True,
use_global_deps=False,
cflags='-DSOCKET_WRAPPER_DISABLE=1 -DNSS_WRAPPER_DISABLE=1 -D_SAMBA_HOSTCC_',
includes='../heimdal/lib/asn1',
group='build_compilers',
- deps='ROKEN_HOSTCC LIBREPLACE_HOSTCC',
+ deps='ROKEN_HOSTCC LIBREPLACE_HOSTCC HEIMDAL_VERS_HOSTCC',
install=False
)
if not bld.CONFIG_SET('USING_SYSTEM_COMPILE_ET'):
HEIMDAL_BINARY('compile_et',
- '../heimdal/lib/vers/print_version.c ../heimdal/lib/com_err/parse.c ../heimdal/lib/com_err/lex.c ../heimdal/lib/com_err/compile_et.c',
+ '../heimdal/lib/com_err/parse.c ../heimdal/lib/com_err/lex.c ../heimdal/lib/com_err/compile_et.c',
use_hostcc=True,
use_global_deps=False,
includes='../heimdal/lib/com_err',
group='build_compilers',
cflags='-DSOCKET_WRAPPER_DISABLE=1 -DNSS_WRAPPER_DISABLE=1 -D_SAMBA_HOSTCC_',
- deps='ROKEN_HOSTCC LIBREPLACE_HOSTCC',
+ deps='ROKEN_HOSTCC LIBREPLACE_HOSTCC HEIMDAL_VERS_HOSTCC',
install=False
)
bld.env['COMPILE_ET'] = os.path.join(bld.env['BUILD_DIRECTORY'], 'compile_et')
HEIMDAL_BINARY('samba4kinit',
- '../heimdal/kuser/kinit.c ../heimdal/lib/vers/print_version.c',
- deps='krb5 heimntlm roken',
+ '../heimdal/kuser/kinit.c',
+ deps='krb5 heimntlm roken HEIMDAL_VERS',
install=False
)
HEIMDAL_BINARY('samba4kpasswd',
- '../heimdal/kpasswd/kpasswd.c ../heimdal/lib/vers/print_version.c',
- deps='krb5 heimntlm roken',
+ '../heimdal/kpasswd/kpasswd.c',
+ deps='krb5 heimntlm roken HEIMDAL_VERS',
install=False
)
diff --git a/source4/heimdal_build/wscript_configure b/source4/heimdal_build/wscript_configure
index b51bc71661..e8f50841c6 100644
--- a/source4/heimdal_build/wscript_configure
+++ b/source4/heimdal_build/wscript_configure
@@ -65,19 +65,23 @@ conf.DEFINE('SAMBA4_INTERNAL_HEIMDAL', 1)
if conf.CHECK_BUNDLED_SYSTEM('com_err', checkfunctions='com_right_r com_err', headers='com_err.h'):
conf.define('USING_SYSTEM_COM_ERR', 1)
-def check_bundled_heimdal_lib(name, functions='', headers='', onlyif=None):
+def check_system_heimdal_lib(name, functions='', headers='', onlyif=None):
# Only use system library if the user requested the bundled one not be used.
if conf.LIB_MAY_BE_BUNDLED(name):
- return
+ return False
setattr(conf.env, "CPPPATH_%s" % name.upper(), ["/usr/include/heimdal"])
setattr(conf.env, "LIBPATH_%s" % name.upper(), ["/usr/lib/heimdal"])
conf.CHECK_BUNDLED_SYSTEM(name, checkfunctions=functions, headers=headers,
onlyif=onlyif)
conf.define('USING_SYSTEM_%s' % name.upper(), 1)
-
-
-check_bundled_heimdal_lib("roken")
-check_bundled_heimdal_lib("wind", "wind_stringprep", "wind.h", onlyif="roken")
+ return True
+
+if check_system_heimdal_lib("roken"):
+ conf.env.CPPPATH_ROKEN_HOSTCC = conf.env.CPPPATH_ROKEN
+ conf.env.LIBPATH_ROKEN_HOSTCC = conf.env.LIBPATH_ROKEN
+ conf.env.LIB_ROKEN_HOSTCC = "roken"
+ conf.SET_TARGET_TYPE("ROKEN_HOSTCC", 'SYSLIB')
+check_system_heimdal_lib("wind", "wind_stringprep", "wind.h", onlyif="roken")
# disable trying to use an external compile_et until we have a configure
# test that checks that the system one actually works. On some systems it