1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

heimdal_build: Put version objects in a separate subsystem.

This commit is contained in:
Jelmer Vernooij 2010-10-16 01:49:41 +02:00
parent 2e038a78fd
commit 6852cc4a7a
4 changed files with 56 additions and 20 deletions

View File

@ -83,7 +83,3 @@
return -1;
}
#endif
const char *heimdal_version = "samba-internal-heimdal";
const char *heimdal_long_version = "samba-interal-heimdal";

View File

@ -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";

View File

@ -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
)

View File

@ -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)
return True
check_bundled_heimdal_lib("roken")
check_bundled_heimdal_lib("wind", "wind_stringprep", "wind.h", onlyif="roken")
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