summaryrefslogtreecommitdiff
path: root/m4
AgeCommit message (Collapse)AuthorFilesLines
2013-12-05build: Check availability of warning flags at build timeGuillem Jover1-14/+78
This fixes a build failure with old g++ compilers not accepting -Wc++11-compat.
2013-10-27build: Add -Wc++11-compat and -Wlogical-op to the dafault warningsGuillem Jover1-2/+2
2013-10-27build: Remove -Wno-unused-value from default CXXFLAGSGuillem Jover1-2/+1
The ncurses bug (#542031) has long been fixed.
2013-07-18build: Allow changing the default dpkg-deb compressor on configureGuillem Jover1-0/+17
This will allow downstreams to choose something better than gzip as their default compressor, for example xz. Or when xz becomes the default to revert back to something else.
2013-03-18build: Use AC_MSG_ERROR instead of obsolete AC_ERRORGuillem Jover1-1/+1
2012-06-08libdpkg: Add liblzma compression supportGuillem Jover1-0/+7
Use liblzma if available instead of external commands to handle .xz and .lzma compressed files. Among other things, this means the xz-utils package no longer has to be part of the base system. Based-on-patch-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Guillem Jover <guillem@debian.org>
2012-06-06build: Add new run-script to run local scriptsGuillem Jover1-2/+1
This sets up the environment to be able to run the local scripts using local modules and data files.
2012-04-14build: Switch from --without- to --disable- for programs to be builtGuillem Jover1-11/+11
The standard way to select if a specific component of the build is to be enabled or disabled is through --enable-foo and --disable-foo options, --with-foo and --without-foo are used for selecting external modules to be used.
2011-11-22build: Report feedback on program, directory and coverage supportGuillem Jover2-0/+5
2011-11-16build: Map the BSD u_intN_t types to C99 uintN_t if not definedGuillem Jover1-1/+22
The md5 module imported from OpenBSD is using these BSD types, but those are not present on at least Solaris. Define them to their corresponding C99 types, so that the imported code has to be modified as less as possible. Reported-by: Andrew Stormont <andrew.stormont@nexenta.com>
2011-10-13build: Check for needed programs when configuring for distributionGuillem Jover1-0/+9
When building a distribution tarball, the full gettext suite is required because the *.gmo files are shipped in there. A lex program is also required because the tarball ships the pre-generated *.c files. Reported-by: Cyril Brulebois <kibi@debian.org>
2011-10-13build: Error out if the pkg-config m4 macros are missing on autoreconfGuillem Jover1-0/+1
Reported-by: Cyril Brulebois <kibi@debian.org>
2011-09-29build: Let the user override PERL_LIBDIR at configure timeGuillem Jover1-1/+4
The variable is declared as precious via AC_ARG_VAR, but assigned to unconditionally.
2011-09-29build: Abort if the perl interpreter is not found or usableGuillem Jover1-2/+5
The build system requires a perl interpreter to retrieve its library directory path and to execute dpkg-architecture.pl.
2011-07-30build: Error out if the host dpkg architecture cannot be determinedGuillem Jover1-1/+5
Continuing will only produce a buggy dpkg.
2011-07-30build: Use the detected perl to invoke dpkg-architecture.plGuillem Jover1-1/+2
This will help building dpkg on systems where perl is not at /usr/bin/perl, which we were already taking into consideration for the resulting scripts but not during build.
2011-07-07libdpkg: Add new progname module handling functionsGuillem Jover1-0/+23
2011-03-14build: Check for %j and %z format modifiers supportGuillem Jover1-0/+12
We use those to create binary output, so we require them to be working.
2011-03-14build: Add -Wformat-security and -Wpointer-arith to default warningsGuillem Jover1-0/+1
2011-01-16Remove --enable-sync-sync codepathJonathan Nieder1-28/+0
Using sync() on unpack causes _all_ filesystems to be sync'd, which is not so great when one of those is a thumb drive, mounted over a network, or otherwise slow. Remove the sync-instead-of-fsync codepath due to those side-effects and to simplify maintenance. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Guillem Jover <guillem@debian.org>
2011-01-08build: Fail configure if curses is needed but no headers are presentGuillem Jover1-2/+7
Reported-by: Raphael Geissert <geissert@debian.org> Tested-by: Raphael Geissert <geissert@debian.org> Signed-off-by: Guillem Jover <guillem@debian.org>
2010-11-25Merge branch 'sid' (through tag '1.15.8.6')Guillem Jover1-11/+23
Conflicts: debian/changelog m4/dpkg-funcs.m4 man/dpkg.1
2010-11-25build: Disable usage of synchronous sync(2) by defaultGuillem Jover1-11/+23
It causes undesired I/O on unrelated file systems. It also makes the code behave differently on Linux systems. Allow the possibility to enable it again for the benefit of downstreams, which might want to use it regardless of its problems. Although this code path will most probably be removed in the near future. Closes: #588339, #595927, #600075
2010-11-19Cleanup white spacesGuillem Jover2-2/+0
Remove trailing spaces. Remove blank lines not separating different code blocks. Remove blank lines at the end of the file.
2010-11-19Cleanup and improve source code commentsGuillem Jover1-6/+6
Global review, which includes the following changes to try to increase consistency, update and improve the source code comments: - Spelling fixes. - Use American English forms. - Uppercase NULL, NUL and ASCII. - Use “Note: ” instead of the slightly cryptic “NB: ” form. - Write comments as proper sentences, including capitalizations and ending dots. - Move comments before the code, function or variable they refer to. - Move general function comments outside the body. - Convert function and variable description comments to doxygen. - Use one space before dot, exclamation and question marks. - Use ‘’ or “” instead of `' style quoting. - Remove author names from comments, already visible from “git blame”. - Mark strings for translators with “TRANSLATORS: ”. - Remove useless or outdated comments. - Fix comment indentation. - Standardize comment format: /* Short text comment. */ /* Long text, * comment. */ /* * Section text. */
2010-11-19build: Use AC_REQUIRE for AC_CANONICAL_HOST in DPKG_FUNC_ASYNC_SYNCGuillem Jover1-1/+1
2010-11-19build: Refactor --with/out options into DPKG_WITH_PROG and DPKG_WITH_DIRGuillem Jover1-0/+33
2010-11-19build: Unify and fix AC_ARG_ENABLE usageGuillem Jover3-15/+22
The current code was executing code in the action arguments, instead of just setting boolean flags and processing them afterwards. This poses several problems, it implies jugling code around in case the the default changes, it might also duplicate code, and it might leave the ACTION-IF-NOT-GIVEN argument empty which could turn into an empty “then fi” shell block which is a syntax error on POSIX shell. Leaving the ACTION-IF-GIVEN argument empty is fine as it's always used by autoconf to set $enableval to the specific enable variable, and setting that variable from $enableval is redundant and might be wrong depending on the order they are set, which could empty it. Reported-by: Michael Schmidt <michael.schmidt.dangel@gmail.com>
2010-11-19build: Add missing m4 quotes around AM_CONDITIONAL argumentGuillem Jover1-1/+1
2010-11-19build: Add missing m4 quotes to sed regexGuillem Jover2-2/+2
This was making the regex non-functional, as the square brackets were being removed when generating the output file, thus making the --disable-compiler-optimisations and --disable-linker-optimisations non-functional.
2010-11-19build: Break if ncurses is requested but unavailableCyril Brulebois1-1/+1
If building dselect is requested (the default), ncurses is requested through DPKG_LIB_CURSES, but if it isn't found, only AC_MSG_WARN is used, leading to a successful configure and a failure to build dselect/*. Use AC_MSG_ERROR instead to make configure bail out. Reported-by: Michael Schmidt <michael.schmidt.dangel@gmail.com> Signed-off-by: Guillem Jover <guillem@debian.org>
2010-07-16build: Add -Wshadow to default warningsGuillem Jover1-1/+1
2010-07-11build: Add optional code coverage supportGuillem Jover1-0/+51
Enable code coverage support with 'configure --enable-coverage'. Use gcov and lcov for C code coverage, and Devel::Cover and cover for Perl code coverage.
2010-06-07Unify naming of va_list variables to args or args_copyGuillem Jover1-4/+4
2010-06-07build: Enable additional warnings by defaultGuillem Jover1-6/+8
The set of default warnings is quite safe, and should point out real problems or stylistic ones. It's easy to forget, so let's enable them by default. This will also not interfere with user settings as those will override the defaults.
2010-06-01build: Use DPKG_CHECK_DECL instead of DPKG_CHECK_DEFINE for TIOCNOTTYGuillem Jover1-16/+0
DPKG_CHECK_DEFINE defines the HAVE_symbol to 1 if found, and to 0 otherwise. But the only current user is doing “#ifdef TIOCNOTTY”, which defeats the test as it's always going to be true, regardless of the value. Switch to the simplified DPKG_CHECK_DECL, which does not define the symbol if not found, and remove now unused DPKG_CHECK_DEFINE.
2010-05-26build: Only use mmap in parser if explicitly requestedGuillem Jover1-0/+16
The current mmap code is not reliable, as it does not handle SIGBUS, which can happen on I/O errors (among others). Switch the code to check for USE_MMAP instead of HAVE_MMAP so that it can be explicitly enabled on build, to produce consistent results by making sure it does not get reactivated accidentally. Disable it by default due to the above, in addition to not having been used by released tarballs since 1.14.15.
2010-05-19Ignore all foreign m4 filesGuillem Jover1-33/+2
Now that the dpkg m4 files are namespaced, we can ignore all foreign ones safely.
2010-05-17dpkg: On Linux use sync() instead of an fsync() per fileGuillem Jover1-0/+16
Due to the performance degradation on ext4 file systems, as a workaround on Linux, we use sync() which is synchronous, before rename() to make sure it's truly atomic. Closes: #578635
2010-03-13libdpkg: Use __attribute__ keyword depending on compiler supportGuillem Jover1-17/+0
Check for compiler support from preprocessor macros and selectively enable specific __attribute__ specifications. We avoid exposing the configure variable HAVE_C_ATTRIBUTE, which was never defined for the installed headers. Remove the now unused DPKG_C_ATTRIBUTE autoconf macro.
2010-03-12build: Allow disabling Unicode supportGuillem Jover2-8/+44
This affects only dselect ncurses support for now. Based-on-patch-by: Yuri Vasilevski <yvasilev@gentoo.org>
2010-02-26Generate manual pages for perl modules with pod2manRaphaël Hertzog1-0/+7
2010-02-19build: Add more warnings to --enable-compiler-warningsGuillem Jover1-3/+9
2010-01-01Add missing copyright statementsGuillem Jover6-1/+15
2009-12-31build: Refactor compression library check m4 macroGuillem Jover1-50/+37
2009-10-30build: Use pkg-config m4 macros to detect selinux libraryGuillem Jover1-7/+8
Use PKG_PROG_PKG_CONFIG to detect and allow overriding the pkg-config binary to use, for example in case of cross-compilation. Suggested-by: Tollef Fog Heen <tfheen@err.no>
2009-10-30build: If there's no libselinux.pc file fallback to hardcoded listFelipe Contreras1-3/+11
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Guillem Jover <guillem@debian.org>
2009-10-29build: Only use po4a if present and if NLS is enabledGuillem Jover1-0/+14
Use the po4a command found when doing the availability checks. Reported-by: Felipe Contreras <felipe.contreras@gmail.com>
2009-10-29build: Rename and namespace dpkg m4 filesGuillem Jover7-0/+0
This avoids possible future collisions and makes it easier to see what's coming from dpkg and what each file is for.
2009-10-26Sort order of header includesGuillem Jover1-3/+2
Place first <config.h> and <compat.h>, then all <sys/*.h> sorted by complexity, followed by the rest of the system headers, then <dpkg/*.h> and finally the local "*.h" ones. Move <dpkg/i18n.h> inclusion into libdpkg inclusion block, as the <gettext.h> compatibility header already takes care of including <locale.h> before <libintl.h> on environments were its probamatic. Removed duplicated inclusions.