distutils-r1.eclass: Ban EXAMPLES in EAPI 6
[gentoo.git] / eclass / autotools.eclass
index 7c82efcb16f52a62526b68439e91168e228869ec..3039a466b91f9eaeb22a5328ba29653234db9e9d 100644 (file)
@@ -82,7 +82,7 @@ fi
 if [[ -n ${WANT_AUTOCONF} ]] ; then
        case ${WANT_AUTOCONF} in
                none)       _autoconf_atom="" ;; # some packages don't require autoconf at all
-               2.1)        _autoconf_atom="=sys-devel/autoconf-${WANT_AUTOCONF}*" ;;
+               2.1)        _autoconf_atom="~sys-devel/autoconf-2.13" ;;
                # if you change the "latest" version here, change also autotools_env_setup
                latest|2.5) _autoconf_atom=">=sys-devel/autoconf-2.69" ;;
                *)          die "Invalid WANT_AUTOCONF value '${WANT_AUTOCONF}'" ;;
@@ -198,7 +198,7 @@ eautoreconf() {
                intltool    false "autotools_run_tool intltoolize --automake --copy --force"
                gtkdoc      false "autotools_run_tool --at-missing gtkdocize --copy"
                gnomedoc    false "autotools_run_tool --at-missing gnome-doc-prepare --copy --force"
-               libtool     false "_elibtoolize --install --copy --force"
+               libtool     false "_elibtoolize --auto-ltdl --install --copy --force"
        )
        for (( i = 0; i < ${#tools[@]}; i += 3 )) ; do
                if _at_uses_${tools[i]} ; then
@@ -258,12 +258,13 @@ _at_uses_pkg() {
 }
 _at_uses_autoheader()  { _at_uses_pkg A{C,M}_CONFIG_HEADER{S,}; }
 _at_uses_automake()    { _at_uses_pkg AM_INIT_AUTOMAKE; }
-_at_uses_gettext()     { _at_uses_pkg AM_GNU_GETTEXT_VERSION; }
+_at_uses_gettext()     { _at_uses_pkg AM_GNU_GETTEXT_{,REQUIRE_}VERSION; }
 _at_uses_glibgettext() { _at_uses_pkg AM_GLIB_GNU_GETTEXT; }
 _at_uses_intltool()    { _at_uses_pkg {AC,IT}_PROG_INTLTOOL; }
 _at_uses_gtkdoc()      { _at_uses_pkg GTK_DOC_CHECK; }
 _at_uses_gnomedoc()    { _at_uses_pkg GNOME_DOC_INIT; }
 _at_uses_libtool()     { _at_uses_pkg A{C,M}_PROG_LIBTOOL LT_INIT; }
+_at_uses_libltdl()     { _at_uses_pkg LT_CONFIG_LTDL_DIR; }
 
 # @FUNCTION: eaclocal_amflags
 # @DESCRIPTION:
@@ -313,6 +314,11 @@ eaclocal() {
 _elibtoolize() {
        local LIBTOOLIZE=${LIBTOOLIZE:-$(type -P glibtoolize > /dev/null && echo glibtoolize || echo libtoolize)}
 
+       if [[ $1 == "--auto-ltdl" ]] ; then
+               shift
+               _at_uses_libltdl && set -- "$@" --ltdl
+       fi
+
        [[ -f GNUmakefile.am || -f Makefile.am ]] && set -- "$@" --automake
 
        autotools_run_tool ${LIBTOOLIZE} "$@"
@@ -519,13 +525,13 @@ autotools_run_tool() {
 # Keep a list of all the macros we might use so that we only
 # have to run the trace code once.  Order doesn't matter.
 ALL_AUTOTOOLS_MACROS=(
-       A{C,M}_PROG_LIBTOOL LT_INIT
+       A{C,M}_PROG_LIBTOOL LT_INIT LT_CONFIG_LTDL_DIR
        A{C,M}_CONFIG_HEADER{S,}
        AC_CONFIG_SUBDIRS
        AC_CONFIG_AUX_DIR AC_CONFIG_MACRO_DIR
        AM_INIT_AUTOMAKE
        AM_GLIB_GNU_GETTEXT
-       AM_GNU_GETTEXT_VERSION
+       AM_GNU_GETTEXT_{,REQUIRE_}VERSION
        {AC,IT}_PROG_INTLTOOL
        GTK_DOC_CHECK
        GNOME_DOC_INIT