summaryrefslogtreecommitdiff
path: root/configure.ac
AgeCommit message (Collapse)Author
2017-02-09timeout: fix race possibly terminating wrong processTobias Stoeckmann
The race is unlikely, as timeout(1) needs to receive a signal in the few operations between waitpid() returning and exit(). Also the system needs to have reallocated the just released pid in this time window. Previously we never disabled the signal handler that sent the termination signal to the "child" pid. However once waitpid() has reaped the child, the system is free to allocate that pid, so we must ensure we don't process any further signals. * build-aux/gen-lists-of-programs.sh: Build timeout(1) optionally... * configure.ac: ...predicated on sigsuspend() being available. * src/timeout.c (block_cleanup): A new function to ensure the cleanup() handler is disabled after waitpid has returned. (main): Use sigsuspend() to wait with cleanup() enabled but disabled once it returns, and thus disabled for the waitpid() call. (monitored_pid): Change to the more accurate pid_t. * NEWS: Mention the fix. Fixes http://bugs.gnu.org/25624
2017-01-14maint: modernize URLsPaul Eggert
A lot of this is converting http: to https:. Also, gmane went away, so remove URLs that no longer work and are not easy to figure out what they were. Some of this stuff is so old that it no longer matters anyway.
2017-01-01maint: update all copyright year number rangesPádraig Brady
Run "make update-copyright" and then... * gnulib: Update to latest with copyright year adjusted. * tests/init.sh: Sync with gnulib to pick up copyright year. * bootstrap: Likewise. * tests/sample-test: Adjust to use the single most recent year.
2016-11-23pr: fix integer overflow in buffer size calcsPaul Eggert
Problem reported by Marcel Böhme (Bug#24996). * configure.ac (WERROR_CFLAGS): Avoid -Wtype-limits. * src/pr.c (col_sep_string): Now a const pointer. All uses changed. (integer_overflow): New function. (separator_string, main, init_parameters, init_store_cols): Check for integer overflow. (align_column, read_line, print_stored): Avoid integer overflow.
2016-01-01maint: update all copyright year number rangesPádraig Brady
Run "make update-copyright" and then... * gnulib: Update to latest with copyright year adjusted. * tests/init.sh: Sync with gnulib to pick up copyright year. * bootstrap: Likewise. * tests/sample-test: Adjust to use the single most recent year.
2015-12-03build: port to Studio C on Solaris 12Paul Eggert
Reported by Rich Burridge in: http://bugs.gnu.org/22087 * configure.ac (HAVE_UT_HOST, HAVE_C_LINE, stdbuf): Pacify picky compilers that complain about unreachable statements.
2015-11-10tests: ensure programs are built before testingPádraig Brady
programs may not be built due to missing system dependencies, or any program can be excluded at configure time with --enable-no-install-program. So ensure we're not testing the system versions in these cases. * init.cfg (print_ver_): Call require_built_ first. * tests/misc/tty-eof.pl: Skip programs not built. * tests/Coreutils.pm (run_tests): Likewise. * tests/misc/ls-misc.pl: Use 'env test' rather than abs path. * tests/misc/test-diag.pl: Likewise. * tests/local.mk: Adjust include order for dependencies. * tests/misc/arch.sh: Remove redundant calls to require_built_. * tests/misc/chroot-fail.sh: Likewise. * tests/misc/groups-dash.sh: Likewise. * tests/misc/groups-version.sh: Likewise. * tests/misc/stdbuf.sh: Likewise. * tests/cp/acl.sh: Remove problematic call to print_ver_ [gs]etfacl. * tests/mv/acl.sh: Likewise. * cfg.mk (sc_env_test_dependencies): A new syntax check to enforce specifying dependencies with print_ver_ for programs specified through the env command. * du/bigtime.sh: Add new print_ver_ dependencies. * du/max-depth.sh: Likewise. * dd/ascii.sh: Likewise. * tests/ls/capability.sh: Likewise. * tests/ls/root-rel-symlink-color.sh: Likewise. * tests/misc/chroot-fail.sh: Likewise. * tests/misc/readlink-fp-loop.sh: Likewise. * tests/misc/sort-debug-keys.sh: Likewise. * tests/readlink/can-e.sh: Likewise. * tests/readlink/can-f.sh: Likewise. * tests/readlink/can-m.sh: Likewise. * tests/tail-2/inotify-race.sh: Likewise. * tests/tail-2/inotify-race2.sh: Likewise. * tests/touch/no-create-missing.sh: Likewise. * tests/touch/no-dereference.sh: Likewise. * tests/misc/printenv.sh: Tweak to avoid syntax check trigger. * tests/misc/help-version.sh: Likewise. * tests/misc/yes.sh: Likewise. * tests/misc/printf-quote.sh: Use previously unused $prog. * configure.ac (EXTRA_MANS): Add $gl_no_install_prog to the list so that check-x-vs-1 syntax check is satisfied.
2015-06-06tests: fix false failure in recent test adjustmentPádraig Brady
* configure.ac: Comment on why we link rather than run the test, and remove the moot __ELF__ check since we never ran it anyway, and the new CFLAGS and LDFLAGS are a more direct test of support. * tests/misc/wc-parallel.sh: Fix a syntax error in the previous change. * tests/misc/md5sum-parallel.sh: Use better error checking, consistent with that used in wc-parallel.sh.
2015-06-06build: port to AIXPaul Eggert
Problems reported by Michael Felt, and and part of this fix taken from code suggested by Pádraig Brady in: http://bugs.gnu.org/20733#112 * configure.ac (stdbuf_supported): Check for warnings, and for -fPIC and -shared, for AIX. * src/stat.c (STRUCT_STATVFS): Define to struct statvfs64 if STATFS is statvfs64. * src/sync.c (sync_arg) [_AIX]: Open in write mode, since AIX fsync doesn't work on read-only file descriptors. * tests/misc/wc-parallel.sh: Skip test if xargs -P does not work.
2015-05-28build: remove workarounds for unsupported gettext versionsPádraig Brady
Now that we depend on gettext >= 0.19.2 remove the workaround for issues in autopoint 0.18.3. Note the scheme currently used in newer gettext (autopoint) to avoid these issues requires autoconf >= 2.69, therefore we update this requirement also. Note the gettext version dependence from gnulib comes from gnulib using gettext macros, and coreutils indirectly depends on the gettext module due to: http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=41dca647 bootstrap will then update m4/po.m4 and thus require a supportng gettext version. * bootstrap: Remove moot warning (resyncing with gnulib). * configure.ac (AC_PREREQ): Change to 2.69 (now 3 years old).
2015-04-27build: rely on gnulib to determine printf routines are safePádraig Brady
gnulib now only checks that the printf routines never crash, which is all coreutils currrently requires, and so we revert commit v8.23-81-gf57bfbb to let gnulib decide whether to replace the system printf routines.
2015-04-27build: reduce gettext dependency to 0.19.2Pádraig Brady
* bootstrap.conf: 0.19.2 is available on openSUSE-13.2, Debian-8.0, and Ubuntu-14.10. Given there were issues with earlier 0.19 gettext releases, set this as the new minimum. * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise. Reported by Bernhard Voelker
2015-04-26build: update gnulib submodule to latestPaul Eggert
* bootstrap.conf (gnulib_modules): Add file-has-acl. (buildreq): Bump autopoint and gettext to 0.19.4. * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.19.4. * gl/lib/tempname.c.diff, gl/lib/tempname.h.diff: Merge recent gnulib changes.
2015-01-01maint: update all copyright year number rangesPádraig Brady
Run "make update-copyright" and then... * tests/sample-test: Adjust to use the single most recent year. * tests/du/bind-mount-dir-cycle-v2.sh: Fix case in copyright message, so that year is updated automatically in future.
2014-12-10build: use the system printf routines in most casesPádraig Brady
glibc <= 2.5 would crash when passed invalid long double values, therefore internal gnulib routines were used, essentially only by od, to output such invalid values. Later glibc versions don't crash, as per https://sourceware.org/bugzilla/show_bug.cgi?id=4586 and subsequently od was adjusted to use the system printf routines through the use of the ftoastr module with commit v8.7-22-ga71c22f. Consequently our testing of this feature was moot, and use of the gnulib printf replacement for printf(1), od(1) and error(3) etc. was redundant. * configure.ac (gl_printf_safe): Unset so that we don't check that "nan" is output for these long double values. * tests/misc/od-float.sh: Adjust all existing checks to fail if od exits with failure status (like crashing for example). Add a new case for one of the problematic invalid long double values for x86_64. We only check that od exits successfully at present, which may change if https://sourceware.org/bugzilla/show_bug.cgi?id=17661 is resolved.
2014-09-19build: fix dependency issues with man page generationPádraig Brady
* .gitignore: Remove reference to no longer generated make file. * configure.ac: Don't bother generating placeholder make file. * man/local.mk: Hardcode the man page deps list for normal builds to be compatible with all make implementations and configure options. Note in SINGLE_BINARY mode, all man pages will be generated on any change to the coreutils binary, but development will generally not be done in this mode, so this shouldn't be an issue. Fixes http://bugs.gnu.org/18055
2014-09-10build: avoid name transformations on libstdbufPádraig Brady
* src/local.mk (transform): Skip the transformation for libstdbuf since that should not be subject to name clashes, and we need to reference the name directly in LD_PRELOAD etc. * configure.ac: Add a comment on the coupling of pkglibexec_PROGRAMS to $(transform). Issue reported at https://trac.macports.org/ticket/44922 Improved by Nick Bowler
2014-07-31build: avoid building stdbuf on cygwinPádraig Brady
* configure.ac: Don't add stdbuf to the list of programs to build if EXEEXT is set, as that is not handled in configure.ac for libstdbuf.so yet (see bin_PRGRAMS handling in configure.ac). Also the LD_PRELOAD mechanism will need to be adjusted to support cygwin in any case, so avoid stdbuf completely in this case for now. Problem reported by Eric Blake.
2014-07-17build: port to non-GNU makePaul Eggert
This fixes a problem with native Solaris 'make', which does not grok '-include' lines (a GNU extension to POSIX 'make'). * configure.ac (man/dynamic-deps.mk): Create it, with an old time stamp, if doing dynamic dependency tracking. * man/local.mk (DISTCLEANFILES): Put man/dynamic-deps.mk here, rather than in CLEANFILES. (man/dynamic-deps.mk): Don't create it read-only, so that we can easily touch it later. Include it with '@AMDEP_TRUE@@am__include@', not with '-include', as '-include' does not work with native Solaris 'make'.
2014-07-13build: support building all tools in a single binaryAlex Deymo
Add the --enable-single-binary option to the configure file. When enabled, this option builds a single binary file containing the selected tools. Which tool gets executed depends on the value of argv[0] which can be set implicitly through symlinks to the single program. This setup reduces significantly the size of a complete coreutils install, since code from lib/libcoreutils.a is not duplicated in every one of the more than 100 binaries. Runtime overhead is increased due to more dynamic libraries being loaded, and extra initialization being performed for all utils. Also initially a larger binary is loaded from storage, though this is usually alleviated due to caching and lazy mmaping of unused blocks, and in fact the single binary should have better caching characteristics. Comparing the size of the individual versus single binary on x86_64: $ cd src $ size coreutils $ size -t $(../build-aux/gen-lists-of-programs.sh --list-progs | grep -Ev '(coreutils|libstdbuf)') | tail -n1 text data bss dec hex filename 1097416 5388 88432 1191236 122d44 src/coreutils 4901010 124964 163768 5189742 4f306e (TOTALS) Storage requirements are reduced similarly: $ cd src $ du -h coreutils $ du -ch $(../build-aux/gen-lists-of-programs.sh --list-progs | grep -Ev '(coreutils|libstdbuf)') | tail -n1 1.2M coreutils 5.3M total When installing, the makefile will create either symlinks or shebangs based on the --enable-single-binary setting, for each configured tool. In this way, all the tools are still callable individually, but they are all implemented by the same "coreutils" binary installed on the same directory. * .gitignore: Add new generated files. * Makefile.am: New rules to generate build-aux/gen-single-binary.sh and install symlinks. * NEWS: Mention the new feature. * README: Add "coreutils" to the list of utils. * bootstrap.conf: Regenerate src/single-binary.mk * build-aux/gen-lists-of-programs.sh: New --list-progs option. * build-aux/gen-single-binary.sh: Regenerate * configure.ac: New --enable-single-binary option and other variables. Disallow --enable-single-binary=symlinks with --program-prefix et. al. * man/coreutils.x: Manpage hook. * man/local.mk: Add manpage hook and fix dependencies. * src/coreutils.c: Multicall implementation. * src/local.mk: New rules for the single binary option. * tests/local.mk: Add $single_binary_progs to support require_built_() from init.cfg * tests/misc/env.sh: Avoid the use of symlink to echo. * tests/misc/help-version.sh: Add exception for coreutils. * tests/install/basic-1.sh: Really avoid using ginstall strip functionality if there is an issue with the independent strip command. * src/kill.c: Changes to call exit() in main. * src/readlink.c: Likewise. * src/shuf.c: Likewise. * src/timeout.c: Likewise. * src/truncate.c: Likewise.
2014-06-11build: update GCC warningsPádraig Brady
* configure.ac: Remove the -Wsuggest-attribute=pure enablement on GCC >= 4.7, as that was moot since gnulib was already enabling that warning in its default set. The false positive was seen with 4.6.2, but confirmed not present in 4.6.3, so that's sufficiently old to just leave this enabled unconditionally. Remove the -Wsuggest-attribute={const,noreturn} enablement, as gnulib already has those in the default set. Enable the -Wlogical-op warning for GCC >= 4.8.0 as that is confirmed OK with coreutils at least, due to fixing: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43772 Remove the -Wno-logical-op override since the main -Wlogical-op flag is now sufficient to control this warning as of GCC 4.6.3 at least.
2014-06-02build: be more specific about .git repo before enabling warningsBen Walton
* configure.ac: When looking for a .git checkout, exclude repos that contain a .tarball-version file as these are probably releases that are imported into git for patch management.
2014-05-21stdbuf: support compilers other than __GNUC__Pádraig Brady
__SUNPRO_C >= 0x590 /*12.0*/ supports __attribute((constructor)) required by stdbuf, so use a more direct check for this. Note ensure that --libexecdir is set to the appropriate install location for libstdbuf.so so that stdbuf works when installed on the system like it does when running tests in the build directory. * configure.ac (stdbuf_supported): Use a test prog to determine support. * src/libstdbuf.c (stdbuf): Define appropriately for non GCC compilers, and provide early feedback (compilation warning) if trying to compile libstdbuf without the necessary support. * src/stdbuf.c (set_LD_PRELOAD): Add a note on having stdbuf look for libstdbuf.so in the default lib search path. * cfg.mk (sc_prohibit-gl-attributes): Adjust so we can exclude libstdbuf.so from prohibiting '__attribute', since we want this form to avoid silently eliding this required attribute on non GCC. Reported and tested by Rich Burridge.
2014-03-18stat: port birthtime to Solaris 11Paul Eggert
Problem reported by Rich Burridge. * src/stat.c [HAVE_GETATTRAT]: Include <attr.h>, <sys/nvpair.h>. (print_statfs, print_stat, print_it): Pass fd, too, for the benefit of get_birthtime. All uses changed. (get_birthtime): New function, for porting to Solaris 11. (print_stat): Use it. * configure.ac (getattrat, LIB_NVPAIR): New checks. * src/local.mk (src_stat_LDADD): Add $(LIB_NVPAIR).
2014-01-02maint: update all copyright year number rangesBernhard Voelker
Run "make update-copyright", but then also run this, perl -pi -e 's/2\d\d\d-//' tests/sample-test to make that one script use the single most recent year number.
2013-12-13build: default to avoiding openssl system librariesPádraig Brady
* configure.ac: Don't change the gnulib default of 'no' for whether to link with openssl system libraries if available. Distributions can explicitly enable this as their policy allows. * NEWS: Adjust accordingly.
2013-12-09build: update gnulib and improve --with-openssl configure helpPádraig Brady
* configure.ac: Use gl_SET_CRYPTO_CHECK_DEFAULT() to set the coreutils default for --with-openssl early, so that the help text can be provided in a standard and complete form. * gnulib: Update to incorporate a build fix on platforms with only some of md5 and sha* implemented by libcrypto.
2013-12-04md5sum, sha*sum: use libcrypto where availablePádraig Brady
libcrypto is generally available and has well optimized crypto hash routines particular to various systems. For example, testing sha1sum with openssl-1.0.0j on an i3-2310M, gives a performance boost of about 40%: $ time sha1sum.old --tag ~/test.iso SHA1 (/home/padraig/test.iso) = 3c27f7ed01965fd2b89e22128fd62dc51a3bef30 real 0m4.692s user 0m4.499s sys 0m0.162s $ time sha1sum.new --tag ~/test.iso SHA1 (/home/padraig/test.iso) = 3c27f7ed01965fd2b89e22128fd62dc51a3bef30 real 0m2.685s user 0m2.512s sys 0m0.170s * configure.ac: By default, enable use of libcrypto if available. * src/local.mk: Link with libcrypto. * NEWS: Mention the md5sum and sha*sum improvements.
2013-05-18maint: port --enable-gcc-warnings to clangPaul Eggert
* configure.ac: If clang, add -Wno-format-extra-args and -Wno-tautological-constant-out-of-range-compare. * gl/lib/rand-isaac.c (ind): * gl/lib/randread.c (readisaac): * src/ls.c (dev_ino_push, dev_ino_pop): * src/sort.c (buffer_linelim): * src/system.h (is_nul): * src/tail.c (tail_forever_inotify): Rewrite to avoid casts that clang dislikes. It's good to avoid casts anyway. * src/expr.c (integer_overflow): Declare only if it exists. (die): Remove; unused. * src/ls.c (dev_ino_push): New function, replacing ... (DEV_INO_PUSH): ... this removed macro. All uses changed. (decode_switches): Rewrite "str"+i to &str[i].
2013-01-01maint: update all copyright year number rangesJim Meyering
Run "make update-copyright", but then also run this, perl -pi -e 's/2\d\d\d-//' tests/sample-test to make that one script use the single most recent year number.
2012-12-19maint: rewrap a long line noticed by make syntax-checkPádraig Brady
* configure.ac: Wrap the recently introduced long line.
2012-12-19build: avoid --enable-gcc-warnings on GCC <= 4.5Pádraig Brady
* configure.ac: Only enable warnings automatically when on GCC >= 4.6 (and when building from a git checkout) as that was the first GCC version to support fine-grained control of warnings, allowing them to be adjusted around certain code sections. gnulib relies on this for certain warnings, so avoid auto enabling this option lest we trigger build failures on now over two year old compilers. Reported by Zartaj Majeed with GCC 4.5.3 on cygwin.
2012-10-24build: do not redefine _FORTIFY_SOURCEMike Frysinger
When _FORTIFY_SOURCE is defined by the compiler or via flags, as it is on Gentoo, do not override it. Otherwise we get many redefinition warnings. * configure.ac (FORTIFY_SOURCE): Check if _FORTIFY_SOURCE is defined. This addresses http://bugs.gnu.org/12714
2012-09-12build: fixup: correctly recognize if perl is missingStefano Lattarini
* configure.ac: Here, by adding a missing '*' to the wildcard in a 'case' construct over the contents of $PERL. Introduced in commit v8.19-41-g00f5ba1.
2012-09-11build: build lib/ using non-recursive makeJim Meyering
* bootstrap.conf (gnulib_modules): Use the new module. (bootstrap_post_import_hook): Invoke prefix-gnulib-mk. * configure.ac (AC_CONFIG_FILES): Remove lib/Makefile. * lib/Makefile.am: Renamed... * lib/local.mk: ...to this. * src/local.mk (CLEANFILES): Append, don't set. (noinst_LIBRARIES): Likewise. (AM_CPPFLAGS): Don't set this here. * Makefile.am (AM_CPPFLAGS): Define here instead. (noinst_LIBRARIES, CLEANFILES, MOSTLYCLEANDIRS, MOSTLYCLEANFILES): Initialize here, so we can append to them from each included local.mk (SUBDIRS): Remove "lib".
2012-09-10maint: allow per-directory CFLAGS settings with non-recursive makeJim Meyering
* src/local.mk (AM_CFLAGS): Don't use $(WARN_CFLAGS) here. * cfg.mk (src_CFLAGS, lib_CFLAGS, gnulib-tests_CFLAGS): Define here instead. (AM_CFLAGS): Augment using the above. * configure.ac: Note that the configure-time option, --enable-gcc-warnings now functions only when using GNU make. Well, currently it does still work in gnulib-tests, but that should soon be fixed. Improved-by: Stefano Lattarini
2012-09-06build: default to --enable-gcc-warnings for git treeEric Blake
Anyone developing on coreutils can be assumed to have a new enough environment, such that enabling gcc warnings by default will be useful. Tarballs still default to no warnings, and the defaults can still be overridden with --disable-gcc-warnings. * configure.ac (gl_gcc_warnings): Set default based on environment. Suggested by Bernhard Voelker.
2012-09-05build: don't use recursive make for tests/ subdirectoryStefano Lattarini
* Makefile.am (SUBDIRS): Remove 'tests'. (include): The '$(top_srcdir)/tests/local.mk' file. (check-root): Remove this convenience target, it's no longer needed now that the "real" check-root target once in 'tests/Makefile' will land in the top-level makefile. * configure.ac (AC_CONFIG_FILES): Remove 'tests/Makefile'. * tests/Makefile.am: Rename ... * tests/local.mk: ... like this, with a lot of adjustments. * tests/init.cfg: Move ... * init.cfg: ... here. This is necessary, for a limitation of the gnulib-provided 'tests/init.sh', which unconditionally look for 'init.cfg' in the $(srcdir) directory. * tests/*/*.sh: Adjust: expect init.sh to be in '$srcdir/tests', not in '$srcdir', and extend $PATH with './src', not with '../src'. * tests/Coreutils.pm: Adjust similarly. * tests/pr/pr-tests.pl ($pfx): Likewise.
2012-09-05maint: list of names of built programs available in the MakefilesStefano Lattarini
This is just a preparatory refactoring in view of future changes. * configure.ac (AC_SUBST): New 'built_programs'. * tests/Makefile.am (AM_TESTS_ENVIRONMENT): Simply define the exported variable 'built_programs' to the expansion of the '$(built_programs)' AC_SUBST'd make variable. (.built-programs): Remove this now-unneeded convenience target. (CLEANFILES, check_DATA): Delete, no longer needed.
2012-09-02maint: accommodate upcoming, expanded list of warnings from gnulibJim Meyering
* configure.ac: Disable a new gcc warning, -Wsuggest-attribute=format, since it triggers on copy.c (which I'm not inclined to adjust) and factor.c's use of vfprintf which would appear to require a change to stdio.h.
2012-09-01maint: simplify declaration of "libexec" programsStefano Lattarini
* configure.ac: No need to use 'gl_ADD_PROG' and an indirection variable '$optional_pkglib_progs' to declare the 'libstdbuf.so' "libexec" program; the decision to whether compile that program is not up to the user, but it only and simply depends on whether the 'stdbuf' "bin" program is to be built or not.
2012-09-01build: simplify: get rid of yet some more indirection variablesStefano Lattarini
* configure.ac: Adjust and improve few comments. (MAN): Rename ... (man1_MANS): ... to this. Ensure it isn't initialized in all Makefiles (which would lead to spurious errors), by calling AM_SUBST_NOTMAKE on it. Also call AM_SUBST_NOTMAKE on 'EXTRA_MANS', for consistency. * man/local.mk (man1_MANS): Simply define to '@man1_MANS@'.
2012-09-01build: simplify and make more portable to non-GNU makeStefano Lattarini
The AC_SUBST'd variable '$(NO_INSTALL_PROGS_DEFAULT)' is only used in makefile expressions expanding the list of manual pages that are not built by default (but might need to be when a distribution tarball is created). Such expressions exploited a feature of make variable expansion -- namely, $(VAR:%=dir/%.x) -- that, while seemingly quite portable in practice, is not POSIX-conforming, and could break on lesser vendor make implementations. So kill two birds with one stone, by getting rid of the $(NO_INSTALL_PROGS_DEFAULT) intermediate variable and improving makefile portability in the process. While at it, we also clean up some other minor naming inconsistency and useless indirection. * configure.ac (NO_INSTALL_PROGS_DEFAULT): Don't define or AC_SUBST anymore; instead ... (EXTRA_MANS): ... define and AC_SUBST these. * man/local.mk (extra_man_1): Rename ... (EXTRA_MANS): ... like this, explicitly making clear it's AC_SUBST'd. (extra_man_x): It's used only once, no need to define it; just inline its only expansion where needed. (EXTRA_DIST): Adjust. (ALL_MANS): New, union of $(EXTRA_MANS) and $(dist_man1_MANS). * cfg.mk (check-x-vs-1, sc_option_desc_uppercase): Rely on $(ALL_MANS) rather than on $(NO_INSTALL_PROGS_DEFAULT) and $(dist_man1_MANS).
2012-09-01build: simplify: get rid of some indirection variablesStefano Lattarini
The code deciding which coreutils programs to build (depending on defaults, system capabilities, and user requests) is overly complex and rather confusing. Let's begin simplifying it by removing some non-strictly-necessary indirection variables. * configure.ac: Adjust and improve few comments. (OPTIONAL_BIN_PROGS, OPTIONAL_PKGLIB_PROGS): Rename ... (bin_PROGRAMS, pkglibexec_PROGRAMS): ... like these, respectively. Ensure they aren't initialized in all Makefiles (which would lead to spurious errors), by calling AM_SUBST_NOTMAKE on them. * src/local.mk: Adjust and improve few comments. (bin_PROGRAMS, pkglibexec_PROGRAMS): Simply define to the corresponding '@substitution@'.
2012-09-01build: don't use recursive make to build the 'src' subdirectoryStefano Lattarini
* Makefile.am (SUBDIRS): Remove 'src'. Ensure '.' is listed before 'tests' and 'gnulib-tests'. (dist-hook): Adjust: we must now tweak the top-level Makefile.in in $(distdir), not the one in the 'src/' subdir (which is gone). (include): The '$(top_srcdir)/src/local.mk' file. * build-aux/gen-lists-of-programs.sh: Adjust the generation of the automake input fragment. * tests/Makefile.am (.built-programs): Adjust. * cfg.mk (all_programs): Remove this convenience rule; it's no longer needed, now that we can rely directly on the contents of $(all_programs). (sc_option_desc_uppercase, check-programs-vs-x:): Adjust lists of prerequisites accordingly. (all-progs-but-lbracket): Simplify definition accordingly. * configure.ac ($OPTIONAL_BIN_PROGS): Adjust definition. ($OPTIONAL_PKGLIB_PROGS): Likewise. ($NO_INSTALL_PROGS_DEFAULT): Tweak definition, for consistency. (AC_CONFIG_FILES): Remove 'src/Makefile'. * src/Makefile.am: Rename ... * src/local.mk: ... like this, with a lot of adjustments. In addition ... (all_programs): ... remove this now-unneeded convenience target.
2012-09-01build: refactor how lists of coreutils programs are definedStefano Lattarini
This is in preparation of future changes. Still, this patch leaves the build system in a better shape; true, with more indirections, but also with less convoluted and brittle hacks. Unfortunately, this commit also makes some rebuild rules incomplete; that will son be fixed by follow-up patches. * build-aux/gen-lists-of-programs.sh: New, generates autoconf and automake input fragments that define "lists" of all coreutils programs, with further distinctions about how and when these programs should be built (by default; if the system is capable enough; only if the user asks for them explicitly). This is useful to avoid duplicating the definitions of these lists among several files (at least 'configure.ac' 'src/Makefile.am'); such duplication had proved a source of inconsistencies and bugs in the past. And the pre-existing way to avoid such duplication, as implemented in 'configure.ac' before this patch, was overly complex and brittle. * Makefile.am (EXTRA_DIST): Distribute the new script. * bootstrap.conf (bootstrap_post_import_hook): Run the new script to generate 'm4/cu-progs.m4' and 'src/cu-progs.mk'. * .gitignore: Ignore those files. * configure.ac: Include 'm4/cu-progs.m4', and decidedly simplify most of the program lists definition and processing accordingly. * src/Makefile.am: Similarly include 'src/cu-progs.mk', containing definition of variables $(default__progs), $(no_install__progs) and $(build_if_possible__progs). Accordingly ... (no_install__progs, build_if_possible__progs): ... remove. (EXTRA_DIST): Adjust definition. Adjust a comment.
2012-08-31build: work with new glibc when not optimizingEric Blake
Starting with glibc 2.15, the system headers refuse to compile unconditional use of FORTIFY_SOURCE if optimization is disabled but -Werror is in effect. * configure.ac (FORTIFY_SOURCE): Make conditional.
2012-08-30tests: detect missing perl at configure runtimeStefano Lattarini
* configure.ac (AM_CONDITIONAL): Set the conditional 'HAVE_PERL' to true if the configure-time checks (as run by gl_PERL) have been able to find a working perl. * tests/no-perl: New script, report a diagnostic about "missing perl" and exit with status 77. * tests/Makefile.am (EXTRA_DIST): Distribute it. (TESTSUITE_PERL): New, define to '$(PERL)' if a perl interpreter has been found at configure time (i.e., if the 'HAVE_PERL' automake conditional is true), and to '$(srcdir)/no-perl' otherwise. (LOG_COMPILER): Use $(TESTSUITE_PERL) instead of $(PERL). (XPL_LOG_COMPILER): Likewise. * tests/shell-or-perl: Simplify: no need to actually check whether perl is working.
2012-08-30build: require Automake >= 1.11.2Stefano Lattarini
Now that we use AM_TESTS_ENVIRONMENT, we must require Automake >= 1.11.2. * configure.ac (AM_INIT_AUTOMAKE): Bump version requirement to 1.11.2. * bootstrap.conf ($buildreq): Likewise.
2012-08-30build: enable the 'subdir-objects' Automake option globallyStefano Lattarini
This is not strictly required now (it will be once we make more parts of the coreutils build system non-recursive), but enabling it early helps to ensure that we don't unwittingly introduce any incompatibility or subtle breakage later. * configure.ac (AM_INIT_AUTOMAKE): Add 'subdir-objects'.