This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Remove configure checks for and automatic running of autoconf
- From: Siddhesh Poyarekar <siddhesh dot poyarekar at gmail dot com>
- To: Allan McRae <allan at archlinux dot org>
- Cc: Roland McGrath <roland at hack dot frob dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>, GNU C Library <libc-alpha at sourceware dot org>, "Carlos O'Donell" <carlos at redhat dot com>
- Date: Mon, 16 Dec 2013 16:43:06 +0530
- Subject: Re: [PATCH] Remove configure checks for and automatic running of autoconf
- Authentication-results: sourceware.org; auth=none
- References: <1381895254-9422-1-git-send-email-allan at archlinux dot org> <Pine dot LNX dot 4 dot 64 dot 1310161204330 dot 10873 at digraph dot polyomino dot org dot uk> <526122BA dot 8090308 at archlinux dot org> <20131023231755 dot 8285074685 at topped-with-meat dot com> <526A3A67 dot 60107 at archlinux dot org>
This breaks for builds when --enable-maintainer-mode is not specified
and configure.ac is newer. Looks like the AUTOCONF macro is not set
at all with maintainer-mode is not specified and that causes the
default targets for configure in Makefile to be triggered. Maybe we
can just get rid of those default targets.
Siddhesh
On 25 October 2013 15:01, Allan McRae <allan@archlinux.org> wrote:
> On 24/10/13 09:17, Roland McGrath wrote:
>>> Can we come to some compromise here that gets rid of the autoconf check
>>> in configure but still has make rules?
>>
>> Getting rid of the old configure check is fine.
>>
>> The modern GNU norm for these sorts of things is --enable-maintainer-mode.
>> Making that toggle AUTOCONF=no vs AUTOCONF=autoconf in configure is the
>> straightforward way to keep the good aspects of the existing makefile rules.
>>
>
> Adding --enable-maintainer mode in the traditional way requires automake
> usage. Instead I have added it manually to configure. As this means
> autom4te.cache only gets generated when explicitly using this configure
> flag, I think this is enough to close BZ #14120.
>
> Note most of the patch below is one big block being indented.
>
>
> ChangeLog:
>
> 2013-10-xx Allan McRae <allan@archlinux.org>
>
> [BZ #14120]
> * configure.ac: Added --enable-maintainer-mode. Check for
> autoconf when enabled.
> * configure: Regenerated.
>
>
> diff --git a/configure.ac b/configure.ac
> index 2fab40e..57e34a5 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -231,6 +231,12 @@ AC_ARG_ENABLE([force-install],
> [force_install=yes])
> AC_SUBST(force_install)
>
> +AC_ARG_ENABLE([maintainer-mode],
> + AC_HELP_STRING([--enable-maintainer-mode],
> + [enable make rules for regenerating autoconf files]),
> + [maintainer=$enableval],
> + [maintainer=no])
> +
> dnl On some platforms we allow dropping compatibility with all kernel
> dnl versions.
> AC_ARG_ENABLE([kernel],
> @@ -1004,22 +1010,24 @@ AC_CHECK_PROG_VER(AWK, gawk, --version,
>
> AC_CHECK_TOOL(NM, nm, false)
>
> -AC_CHECK_PROGS(AUTOCONF, autoconf, no)
> -case "x$AUTOCONF" in
> -xno|x|x:) AUTOCONF=no ;;
> -*)
> - AC_CACHE_CHECK(dnl
> -whether $AUTOCONF${ACFLAGS:+ }$ACFLAGS works, libc_cv_autoconf_works, [dnl
> - if (cd $srcdir; $AUTOCONF $ACFLAGS configure.ac > /dev/null 2>&1); then
> - libc_cv_autoconf_works=yes
> - else
> - libc_cv_autoconf_works=no
> - fi])
> - test $libc_cv_autoconf_works = yes || AUTOCONF=no
> - ;;
> -esac
> -if test "x$AUTOCONF" = xno; then
> - aux_missing="$aux_missing autoconf"
> +if test "x$maintainer" = "xyes"; then
> + AC_CHECK_PROGS(AUTOCONF, autoconf, no)
> + case "x$AUTOCONF" in
> + xno|x|x:) AUTOCONF=no ;;
> + *)
> + AC_CACHE_CHECK(dnl
> + whether $AUTOCONF${ACFLAGS:+ }$ACFLAGS works, libc_cv_autoconf_works,
> [dnl
> + if (cd $srcdir; $AUTOCONF $ACFLAGS configure.ac > /dev/null 2>&1); then
> + libc_cv_autoconf_works=yes
> + else
> + libc_cv_autoconf_works=no
> + fi])
> + test $libc_cv_autoconf_works = yes || AUTOCONF=no
> + ;;
> + esac
> + if test "x$AUTOCONF" = xno; then
> + aux_missing="$aux_missing autoconf"
> + fi
> fi
>
> test -n "$critic_missing" && AC_MSG_ERROR([
>
>
>
--
http://siddhesh.in