summaryrefslogtreecommitdiffstats
path: root/buildtools
Commit message (Collapse)AuthorAgeFilesLines
* wafsamba: Fail with error message if perl doesn't provide valid dirs.Stefan Metzmacher2014-05-091-19/+39
| | | | | | | | | | | | | | | | We try harder to get valid directories, we now fallback like this: vendorarch => sitearch => archlib and vendorlib => sitelib => privlib The new options are --with-perl-arch-install-dir and --with-perl-lib-install-dir. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10472 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* wafsamba: If perl can't provide defaults, define them.Andreas Schneider2014-05-081-2/+8
| | | | | | | | | | | | This should fix the installation on FreeBSD. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu May 8 13:55:50 CEST 2014 on sn-devel-104
* build: make wafsamba CHECK_SIZEOF cross-compile friendlyGustavo Zacarias2014-05-061-12/+16
| | | | | | | | | | | | | | | Use the same trick as commit 0d9bb86293c9d39298786df095c73a6251b08b7e We do the same array trick iteratively starting from 1 (byte) by powers of 2 up to 32. The new 'critical' option is used to make the invocation die or not according to each test. The default is True since normally it's expected to find a proper result and should error out if not. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* build: unify and fix endian testsGustavo Zacarias2014-05-061-3/+62
| | | | | | | | | | | | | Unify the endian tests out of lib/ccan/wscript into wafsamba since they're almost cross-compile friendly. While at it fix them to be so by moving the preprocessor directives out of main scope since that will fail. And keep the WORDS_BIGENDIAN, HAVE_LITTLE_ENDIAN and HAVE_BIG_ENDIAN defines separate because of different codebases. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* wafsamba: Add set_target to CHECK_BUNDLED_SYSTEM.Andreas Schneider2014-04-171-3/+5
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* wafsamba: replace dots in library namesRalph Boehme2014-04-081-1/+1
| | | | | | | | | | | | Certain libraries use a version number with a dot in the library name, eg libtracker-sparql-0.16. The dot is passed to the HAVE_LIBXXX macro but dots aren't allowed in C macros, compiler diagnostic: warning: missing whitespace after the macro name Signed-off-by: Ralph Boehme <rb@sernet.de> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* wafsamba: explicitly use allow_warnings=True for SAMBA_PYTHON()Stefan Metzmacher2014-04-021-0/+1
| | | | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Apr 2 11:04:36 CEST 2014 on sn-devel-104
* wafsamba: add optional allow_warnings(default=True) to ↵Stefan Metzmacher2014-04-021-3/+11
| | | | | | | SAMBA_{SUBSYSTEM,LIBRARY,MODULE}() Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* wafsamba: add an optional allow_warnings(default=True) to CURRENT_CFLAGS()Stefan Metzmacher2014-04-021-3/+6
| | | | | | | | -Werror is now remembered in PICKY_CFLAGS and only added if allow_warnings is False. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* wafsamba: split out a conf.ADD_NAMED_CFLAGS() functionStefan Metzmacher2014-04-021-4/+11
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* wafsamba: use -Werror=declaration-after-statement if availableStefan Metzmacher2014-04-021-1/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* wafsamba: use multiple conf.ADD_CFLAGS() lines for developer CFLAGSStefan Metzmacher2014-04-021-5/+20
| | | | | | | We first check for warn flags then for error flags. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* wafsamba: allow --bundled-libraries=ALL,!poptStefan Metzmacher2014-04-021-0/+2
| | | | | | | This will not bundle 'popt', but everything else. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* wafsamba: allow --bundled-libraries=NONE,poptStefan Metzmacher2014-04-021-0/+2
| | | | | | | This will bundle only 'popt'. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* wafsamba: simplify LIB_MUST_BE_BUNDLED()Stefan Metzmacher2014-04-021-2/+5
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* wafsamba: simplify LIB_MAY_BE_BUNDLED()Stefan Metzmacher2014-04-021-3/+5
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* wafsamba: allow optional 'checkcode' argument to CHECK_BUNDLED_SYSTEM()Stefan Metzmacher2014-04-021-4/+12
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* wafsamba: allow CHECK_BUNDLED_SYSTEM() to check headers without functionsStefan Metzmacher2014-04-021-4/+7
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* wafsamba: simplify CHECK_BUNDLED_SYSTEM_PKG() by just calling ↵Stefan Metzmacher2014-04-021-41/+5
| | | | | | | | | CHECK_BUNDLED_SYSTEM() If checkfunctions is not specified they are the same. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* wafsamba: port optional 'pkg' option from CHECK_BUNDLED_SYSTEM_PKG() to ↵Stefan Metzmacher2014-04-021-4/+8
| | | | | | | CHECK_BUNDLED_SYSTEM() Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* wafsamba: require a ';' after STATIC_*_MODULES_PROTOStefan Metzmacher2014-04-021-3/+6
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* wafsamba: use cluster_support_features in build_options.cStefan Metzmacher2014-03-241-0/+5
| | | | | | | | This way 'smbd -b' returns the cluster features of the currently used libsamba-cluster-support.so. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* wafsamba: add CONFIG_RESET()Stefan Metzmacher2014-03-241-0/+8
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* buildtools: Add perl vendorlib configure option.Andreas Schneider2014-03-061-0/+10
| | | | | | | | After this patch has been pushed, we need to change autobuild to compile with this option or we will not be able to install pidl. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* buildtools: Rename perl vendorarch configure option.Andreas Schneider2014-03-061-4/+9
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Revert "waf: Add option to specify perl vendor dir."Andreas Schneider2014-03-061-7/+0
| | | | | | | This reverts commit 9b200555fec2e33da9521db388d1839375aa8d83. Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* waf: Add option to specify perl vendor dir.Andreas Schneider2014-02-271-0/+7
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Kai Blin <kai@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Feb 27 11:48:54 CET 2014 on sn-devel-104
* build: allow some python variable overridesGustavo Zacarias2014-02-131-0/+13
| | | | | | | | | | | | | | | | The python variables (settings) are fetched from a running python interpreter which usually isn't the target one when cross compiling, hence libraries and flags aren't the same and can pollute the target build. Allow some of these variables to be redefined via environment variables in order to aid cross-compiling. According to testing python_LDFLAGS and python_LIBDIR should be enough. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Feb 13 06:03:26 CET 2014 on sn-devel-104
* build: warn about mixed declarations and codeDavid Disseldorp2014-02-011-1/+1
| | | | | | | | | | | Attempt to use the -Wdeclaration-after-statement cflag when building in developer mode. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Feb 1 20:20:35 CET 2014 on sn-devel-104
* docs: define and include entities for the docsGarming Sam2014-01-311-2/+4
| | | | | | | | | | This allows for dynamic default settings to be generated. Change-Id: If8b93d233fb941bc7e3073ccf4b5ec0b0a231bd9 Pair-programmed-with: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* waf:lib/replace change detection of gettextChristian Ambach2014-01-031-2/+1
| | | | | | | | | | | | convert this to an automatic check: if no option is given, try to find gettext and if found, use it if user has specified --with-gettext, then bail out if it could not be found in case of --without-gettext, skip all gettext related configure checks Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911 Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* build: test the generic md5 function after importing it from hashlibBjörn Jacke2014-01-081-1/+1
| | | | | | | | | | otherwise we used the one from md5 which lead to the following warning on SerNet-imini: the md5 module is deprecated; use hashlib instead import md5 Signed-off-by: Bjoern Jacke <bj@sernet.de> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* waf: parse LDFLAGS from pythonSteven Siloti2013-10-251-1/+2
| | | | | | | | | | | | | | | The LDFLAGS returned by get_python_variables may contain additional library search paths. These need to be parsed out and placed in LIBPATH to maintain correct ordering of search paths in the final link flags. Specifically, appending LDFLAGS directly to LINKFLAGS on my system was causing /usr/lib to be the first search path specified. This lead to linking against installed libraries rather than the versions from the current build. Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Oct 25 02:48:35 CEST 2013 on sn-devel-104
* build: fix ordering problems with lib-provided and internal RPATHsMichael Adam2013-10-251-0/+13
| | | | | | | | | | | | | | | | | | | | | When a library or system (like cups) provides an RPATH, e.g. with -Wl,-R or -Wl,-rpath, this was added by waf to the LINKFLAGS, wich was later prepended to our RPATH. But if the path by chance contains an older version of one of our internal libraries like talloc, this would lead to linking the too old talloc into our binaries. This has been observed on, e.g., FreeBSD, but it is a general problem. This patch fixes the problem by specially parsing the RPATH linker options from the pkg-config(, cups-config, ....) output and putting the paths into the RPATH_<lib> container, which is then later correctly appended to our internal RPATH. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Backport 0e97908 from WAF repository: symlink fix for OpenBSDMatthieu Patou2013-09-211-3/+6
| | | | | | | | | Author: Thomas Nagy <tnagy1024@gmail.com> Signed-off-by: Matthieu Patou <mat@matws.net> Reviewed-by: Kai Blin <kai@samba.org> Autobuild-User(master): Kai Blin <kai@samba.org> Autobuild-Date(master): Sat Sep 21 11:14:30 CEST 2013 on sn-devel-104
* waf: add --without-gettext optionChristian Ambach2013-08-091-0/+3
| | | | | Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* waf: fix build on AIX7Christian Ambach2013-08-091-1/+1
| | | | | | | the same works for AIX 5,6,7 so leave away the version specifics (as autoconf build did) Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* waf: Build with RELRO if supported by the compiler.Andreas Schneider2013-07-091-0/+2
| | | | | | | | | | | | | Make sure we create binaries with full RELocation Read-Only support. See https://isisblogs.poly.edu/2011/06/01/relro-relocation-read-only/ for more details. The default is to check if the compiler supports RELRO and then enable it. Specifying '--with-relro' will make it mandatory and '--without-relro' will disable it. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* build: Add missing new line to replaced python shebang line. (Fix bug #9909)Michael Adam2013-05-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | When configuring with a non-standard python specified in the PYTHON environment variable, the shebang lines in various python tools like samba-tool and samba_dnsupdate get replaced. This replace line for the shebang was missing a newline which joined the shebang line with the following line, rendereing those scripts with a nonempty second line unusuable, for example samba_dnsupdate. This patch fixes this bug which is bug #9909 on bugzilla. Pair-Programmed-With: Karolin Seeger <kseeger@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Karolin Seeger <kseeger@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Wed May 29 13:21:51 CEST 2013 on sn-devel-104
* build: Remove unused tool for config.h comparisonAndrew Bartlett2013-05-282-37/+0
| | | | | | Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* waf: build position independent executablesDavid Disseldorp2013-05-281-2/+9
| | | | | | | | | | | | | | This patch re-instates support for building Position Independent Executables using the '-fPIE' and '-pie' compiler and linker flags respectively. PIE builds are enabled by default, and can be explicitly disabled using the '--without-pie' configure argument. Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue May 28 02:56:36 CEST 2013 on sn-devel-104
* build: Do not always regenerate the version.h fileAndrew Bartlett2013-05-271-1/+5
| | | | Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
* build: Remove binaries and libraries build groupsAndrew Bartlett2013-05-271-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Build groups are used in Samba to ensure that even if the dependency chain for a target is not perfect, that it builds reliably. This matters most in the early build stages, where we are building the asn1 compiler and autogenerating files. Once we get to the main stage, dependencies between C files, libraries and binaries are much clearer, because the C compiler and linker takes these as inputs anyway. Groups were added to our waf build for stability during early development, as dependency information was first imported from the previous autoconf/perl based build system. I don't think we need this distinction in the main build of C files into .o, and when linking these into binaries, because the invocation of these tools is very well defined, and we will find any missing inputs very quickly. As such, I've removed the libraries and binaries targets, consolidating them with 'main' By making this change, a build of smbtorture only on a clean tree drops from 3778 to 2489 targets, and much of the expensive linker stage is skipped. The time for a null build of smbtorture only also drops from 4.673s to as low as 2.499s on my laptop. Andrew Bartlett Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
* buildtools: Fix compilation warningsMatthieu Patou2013-05-201-1/+1
| | | | | | | | | | | STATIC_%s_MODULES_PROTO is defined on the compilation command line by -DSTATIC_<something>_MODULES_PROTO which the compiler seems to turn into define STATIC_<something>_MODULES_PROTO 1 thus yielding a warning due to unused var Signed-off-by: Matthieu Patou <mat@matws.net> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* swat: Remove swat.Kai Blin2013-05-181-1/+0
| | | | | | | | Signed-off-by: Kai Blin <kai@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Kai Blin <kai@samba.org> Autobuild-Date(master): Sat May 18 16:32:38 CEST 2013 on sn-devel-104
* More generic check for OpenBSD platformVadim Zhukov2013-05-171-2/+2
| | | | | | | | | | | | | | | | OpenBSD versioning is different from many other projects, and, say, 5.0 does not differ from 4.9 more than from 5.1. So the right approach will be to check that platform name starts with "openbsd" instead. This is also the thing OpenBSD developers do when patching other software, so this patch is consistent with already existing practicies. BUG: https://bugzilla.samba.org/show_bug.cgi?id=9888 Reviewed-by: Lars Müller <lars@samba.org> Reviewed-by: Björn Jacke <bj@sernet.de> Autobuild-User(master): Björn Jacke <bj@sernet.de> Autobuild-Date(master): Fri May 17 17:58:16 CEST 2013 on sn-devel-104
* configure: print a message when docbook.xsl is missing localyMatthieu Patou2013-05-061-0/+3
| | | | | | Signed-off-by: Matthieu Patou <mat@matws.net> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* build: Raise minimum python version to 2.5.0 for samba buildAndrew Bartlett2013-04-111-2/+2
| | | | | | | | | | | | | | | | RHEL5 has a python26 package for a modern python, and was the main reason we kept python 2.5 support. However, this support never actually worked for AD DC installations, as samba-tool uses a feature only in 2.5 and above. Very few folks noticed and those were on RHEL5, and moving to 2.5 allows us to remove some other workarounds. Andrew Bartlett Reviewed-by: Matthieu Patou <mat@matws.net> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* build: Replace #!/usr/bin/env python with passed in PYTHON=Andrew Bartlett2013-04-102-1/+24
| | | | | | | | | | This means that if we were forced to use a specific python for the build, we will put that binary into the top of samba-tool, so it continues to work after the install. Andrew Bartlett Reviewed-by: Michael Adam <obnox@samba.org>
* wafsamba: fix samba_abi for default catch-all caseAlexander Bokovoy2013-04-091-1/+3
| | | | | | | | | | | | | | | | Only filter out the symbol when positive match was not found and there is negative match. ABI signature file generator worked incorrectly for cases when mixture of positive and negative matches were provided. This resulted in generating empty signature file for libpdb since there was no catch-all positive match anymore. Commit 9ba44cc610426fb558b49aa9680b5bdf55c29082 removed explicit '*' positive match and corresponding vscript generator adds '*' by default if global match list is empty, so this commit introduces feature parity into signature generator. Reviewed-by: Andreas Schneider <asn@samba.org>