diff options
author | 2011-04-06 03:52:08 +0000 | |
---|---|---|
committer | 2011-04-06 03:52:08 +0000 | |
commit | 57dface022c8491ee1423cfe0cdb2ced90fbf60b (patch) | |
tree | 58801e70d1846a005d1523101b9e5d03525c5288 /eclass | |
parent | Fix build with gcc-4.6.0, -R is a flag of the linker, not the compiler. (diff) | |
download | historical-57dface022c8491ee1423cfe0cdb2ced90fbf60b.tar.gz historical-57dface022c8491ee1423cfe0cdb2ced90fbf60b.tar.bz2 historical-57dface022c8491ee1423cfe0cdb2ced90fbf60b.zip |
Make sure to use AT_M4DIR values for autoheader and autoconf calls as well.
This is required to re-build autotools on app-admin/sudo-1.8*
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/autotools.eclass | 44 |
1 files changed, 25 insertions, 19 deletions
diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass index d573332aedbe..e33c46e28bc6 100644 --- a/eclass/autotools.eclass +++ b/eclass/autotools.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.101 2010/08/21 19:39:52 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.102 2011/04/06 03:52:08 flameeyes Exp $ # @ECLASS: autotools.eclass # @MAINTAINER: @@ -157,22 +157,8 @@ eaclocal() { break done - if [[ -n ${AT_M4DIR} ]] ; then - for x in ${AT_M4DIR} ; do - case "${x}" in - "-I") - # We handle it below - ;; - *) - [[ ! -d ${x} ]] && ewarn "eaclocal: '${x}' does not exist" - aclocal_opts="${aclocal_opts} -I ${x}" - ;; - esac - done - fi - [[ ! -f aclocal.m4 || -n $(grep -e 'generated.*by aclocal' aclocal.m4) ]] && \ - autotools_run_tool aclocal "$@" ${aclocal_opts} + autotools_run_tool aclocal $(autotools_m4dir_include) "$@" ${aclocal_opts} } # @FUNCTION: _elibtoolize @@ -201,7 +187,7 @@ _elibtoolize() { eautoheader() { # Check if we should run autoheader [[ -n $(autotools_check_macro "AC_CONFIG_HEADERS") ]] || return 0 - NO_FAIL=1 autotools_run_tool autoheader "$@" + NO_FAIL=1 autotools_run_tool autoheader $(autotools_m4dir_include) "$@" } # @FUNCTION: eautoconf @@ -215,7 +201,7 @@ eautoconf() { die "No configure.{ac,in} present!" fi - autotools_run_tool autoconf "$@" + autotools_run_tool autoconf $(autotools_m4dir_include) "$@" } # @FUNCTION: eautomake @@ -320,7 +306,7 @@ autotools_check_macro() { [[ -f configure.ac || -f configure.in ]] || return 0 local macro for macro ; do - WANT_AUTOCONF="2.5" autoconf --trace="${macro}" 2>/dev/null + WANT_AUTOCONF="2.5" autoconf $(autotools_m4dir_include) --trace="${macro}" 2>/dev/null done return 0 } @@ -355,3 +341,23 @@ autotools_get_auxdir() { return 0 } + +autotools_m4dir_include() { + [[ -n ${AT_M4DIR} ]] || return + + local include_opts= + + for x in ${AT_M4DIR} ; do + case "${x}" in + "-I") + # We handle it below + ;; + *) + [[ ! -d ${x} ]] && ewarn "autotools.eclass: '${x}' does not exist" + include_opts="${include_opts} -I ${x}" + ;; + esac + done + + echo $include_opts +} |