This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Remove configure checks for and automatic running of autoconf


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]