| 1 | # Copyright 1999-2005 Gentoo Foundation |
1 | # Copyright 1999-2005 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.19 2005/09/02 08:23:30 azarah Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.22 2005/10/08 11:18:14 flameeyes Exp $ |
| 4 | # |
4 | # |
| 5 | # Author: Diego Pettenò <flameeyes@gentoo.org> |
5 | # Author: Diego Pettenò <flameeyes@gentoo.org> |
| 6 | # Enhancements: Martin Schlemmer <azarah@gentoo.org> |
6 | # Enhancements: Martin Schlemmer <azarah@gentoo.org> |
| 7 | # |
7 | # |
| 8 | # This eclass is for handling autotooled software packages that |
8 | # This eclass is for handling autotooled software packages that |
| … | |
… | |
| 66 | eautoheader |
66 | eautoheader |
| 67 | eautomake |
67 | eautomake |
| 68 | |
68 | |
| 69 | # Normally run by econf() |
69 | # Normally run by econf() |
| 70 | [[ ${AT_GNUCONF_UPDATE} == "yes" ]] && gnuconfig_update |
70 | [[ ${AT_GNUCONF_UPDATE} == "yes" ]] && gnuconfig_update |
|
|
71 | |
|
|
72 | return 0 |
| 71 | } |
73 | } |
| 72 | |
74 | |
| 73 | # These functions runs the autotools using autotools_run_tool with the |
75 | # These functions runs the autotools using autotools_run_tool with the |
| 74 | # specified parametes. The name of the tool run is the same of the function |
76 | # specified parametes. The name of the tool run is the same of the function |
| 75 | # without e prefix. |
77 | # without e prefix. |
| … | |
… | |
| 97 | ;; |
99 | ;; |
| 98 | esac |
100 | esac |
| 99 | done |
101 | done |
| 100 | fi |
102 | fi |
| 101 | |
103 | |
| 102 | [[ -f aclocal.m4 && -n $(grep -e 'generated.*by aclocal' aclocal.m4) ]] && \ |
104 | [[ ! -f aclocal.m4 || -n $(grep -e 'generated.*by aclocal' aclocal.m4) ]] && \ |
| 103 | autotools_run_tool aclocal "$@" ${aclocal_opts} |
105 | autotools_run_tool aclocal "$@" ${aclocal_opts} |
| 104 | } |
106 | } |
| 105 | |
107 | |
| 106 | _elibtoolize() { |
108 | _elibtoolize() { |
| 107 | local opts |
109 | local opts |
| 108 | |
110 | |
| 109 | # Check if we should run libtoolize |
111 | # Check if we should run libtoolize |
| 110 | [[ -n $(autotools_check_macro "AC_PROG_LIBTOOL") ]] || return 0 |
112 | [[ -n $(autotools_check_macro "AC_PROG_LIBTOOL") ]] || return 0 |
| 111 | |
113 | |
| 112 | [[ -f Makefile.am ]] && opts="--automake" |
114 | [[ -f Makefile.am ]] && opts="--automake" |
| 113 | |
115 | |
| 114 | [[ "${USERLAND}" == "Darwin" ]] && LIBTOOLIZE="glibtoolize" |
116 | [[ "${USERLAND}" == "Darwin" ]] && LIBTOOLIZE="glibtoolize" |
| 115 | autotools_run_tool ${LIBTOOLIZE:-libtoolize} "$@" ${opts} |
117 | autotools_run_tool ${LIBTOOLIZE:-libtoolize} "$@" ${opts} |
| 116 | |
118 | |
| 117 | # Need to rerun aclocal |
119 | # Need to rerun aclocal |
| 118 | eaclocal |
120 | eaclocal |