summaryrefslogtreecommitdiff
path: root/m4
AgeCommit message (Collapse)AuthorFilesLines
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.
2009-10-04build: Properly escape DPKG_CHECK_DECL and DPKG_CHECK_DEFINE argumentsGuillem Jover1-8/+9
Use AS_TR_SH for shell variables and AS_TR_CPP for variables used in headers or Makefiles.
2009-10-04build: Fix DPKG_CHECK_DEFINE to properly check for dpkg_cv_define_$1Guillem Jover1-1/+1
The macro was checking for the dpkg_cv_define variable, which implied always doing an AC_DEFINE to 0. As a consequence now start-stop-deaemon will use TIOCNOTTY when available.
2009-09-30build: Abort if there is no support for the required C99 extensionsGuillem Jover1-1/+2
2009-09-30build: Add more options to try to get support for C99 extensionsGuillem Jover1-1/+2
Taken from autoconf.
2009-09-30build: Check for C99 snprintf family of functionsGuillem Jover1-1/+46
We need the new semantics that allow passing NULL and 0 size to retrieve the full size of the formatted string. Add a new DPKG_FUNC_C99_SNPRINTF macro and remove the simple compat checks for snprintf and vsnprintf.
2009-09-30build: Use memcpy instead of assignment to copy va_listGuillem Jover1-10/+1
It's more portable that way. Remove now unneeded check for working assignment.
2009-09-30build: Add an explicit return type to main in DPKG_FUNC_VA_COPYGuillem Jover1-1/+2
2009-09-30build: Do not test for C99 for-loop variable declaration supportGuillem Jover1-4/+0
This extension is not going to be used in the code base anyway.
2009-09-30build: Add test for 'trailing comma in enum' C99 supportGuillem Jover1-0/+3
2009-09-26build: Update compiler-warnings flagsGuillem Jover1-1/+1
Do not use -Werror for now (at leasat until ncurses is fixed). And add -Wextra -Wno-unused-parameter -Wno-missing-field-initializers.
2009-09-26build: Refactor warning flags into a new WFLAGS variableGuillem Jover1-3/+4
2009-09-26build: Wrap perl expression in PERL_LIBDIR assignmentGuillem Jover1-1/+3
2009-09-26build: Properly escape $( inside perl regexGuillem Jover1-1/+1
Use one back slash instead of two, otherwise perl was replacing it with the $( (aka $GID). Broken due to commit 02f1f8a50af58b9d1f61dd9258cf1d26fe2f0d21.
2009-09-24build: Do not use backticks on m4 macrosGuillem Jover7-12/+12
Use single quotes for strings, angle brackets for headers, and $() for command subsitution. This should pacify syntax highlighters.
2009-09-24build: Add new DPKG_CHECK_DECL m4 macroGuillem Jover1-0/+13
Used to check if something is declared in a header.
2009-08-26Change dpkg specific m4 macros prefix from SJR_ to DPKG_Guillem Jover2-7/+7
2009-08-16Use AC_*_IFELSE instead of obsolete AC_TRY_* macrosGuillem Jover3-20/+19
2009-08-15Check for host system instead of target at build timeGuillem Jover1-9/+9
Using AC_CANONICAL_TARGET is needed when wanting to support building cross-compiling software. But there's too many assumptions in dpkg that the host system in dpkg-dev is going to match the build system.
2009-08-15Use AC_CANONICAL_TARGET instead of deprecated AC_CANONICAL_SYSTEMGuillem Jover1-1/+1
2009-04-13Detect the curses headers to use instead of hardcoding themGuillem Jover1-0/+2
Wrap the curses headers to use and select them through the config.h macros detected at configure time. This way we can also cleanly detect the path needed by mkcurkeys.pl w/o duplicating the selection logic.
2008-02-19Link dselect against libncurseswFrank Lichtenheld1-3/+4
* m4/libs.m4 (DPKG_LIB_CURSES): Use libncursesw if available. * debian/control: Change build-dependency from libncurses5-dev to libncursesw5-dev.
2008-02-04Use functions from libcompat when those are not provided by the systemGuillem Jover1-0/+14
2008-01-18Do not use backticks inside double quotes in m4 filesGuillem Jover2-4/+4
Fix portability issues with ancient shells on HP-UX. Closes: #24514
2007-10-11Use shipped perl modules when calling perl programs at build timeGuillem Jover1-1/+2
2007-09-23perl.m4: Fix PERL_LIBDIR for prefix != defaultFrank Lichtenheld1-1/+1
Replace the default prefix (vendorprefixexp) with $(prefix) in vendorlibexp. Detected by distcheck