Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
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>
|
|
|
|
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.
|
|
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>
|
|
|
|
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.
|
|
|
|
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.
|
|
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.
|
|
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.
|
|
Now that the dpkg m4 files are namespaced, we can ignore all foreign
ones safely.
|
|
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
|
|
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.
|
|
This affects only dselect ncurses support for now.
Based-on-patch-by: Yuri Vasilevski <yvasilev@gentoo.org>
|
|
|
|
|
|
|
|
|
|
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>
|
|
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Guillem Jover <guillem@debian.org>
|
|
Use the po4a command found when doing the availability checks.
Reported-by: Felipe Contreras <felipe.contreras@gmail.com>
|
|
This avoids possible future collisions and makes it easier to see
what's coming from dpkg and what each file is for.
|
|
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.
|
|
Use AS_TR_SH for shell variables and AS_TR_CPP for variables used in
headers or Makefiles.
|
|
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.
|
|
|
|
Taken from autoconf.
|
|
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.
|
|
It's more portable that way. Remove now unneeded check for working
assignment.
|
|
|
|
This extension is not going to be used in the code base anyway.
|
|
|
|
Do not use -Werror for now (at leasat until ncurses is fixed). And add
-Wextra -Wno-unused-parameter -Wno-missing-field-initializers.
|
|
|
|
|
|
Use one back slash instead of two, otherwise perl was replacing it
with the $( (aka $GID).
Broken due to commit 02f1f8a50af58b9d1f61dd9258cf1d26fe2f0d21.
|
|
Use single quotes for strings, angle brackets for headers, and $()
for command subsitution. This should pacify syntax highlighters.
|
|
Used to check if something is declared in a header.
|
|
|
|
|
|
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.
|
|
|
|
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.
|
|
* m4/libs.m4 (DPKG_LIB_CURSES): Use libncursesw if available.
* debian/control: Change build-dependency from libncurses5-dev
to libncursesw5-dev.
|
|
|
|
Fix portability issues with ancient shells on HP-UX. Closes: #24514
|
|
|
|
Replace the default prefix (vendorprefixexp) with $(prefix)
in vendorlibexp.
Detected by distcheck
|