/[gentoo-x86]/eclass/autotools.eclass
Gentoo

Diff of /eclass/autotools.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.76 Revision 1.77
1# Copyright 1999-2008 Gentoo Foundation 1# Copyright 1999-2008 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.76 2008/06/01 01:43:06 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.77 2008/06/09 09:09:58 vapier Exp $
4 4
5# @ECLASS: autotools.eclass 5# @ECLASS: autotools.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# base-system@gentoo.org 7# base-system@gentoo.org
8# @BLURB: Regenerates auto* build scripts 8# @BLURB: Regenerates auto* build scripts
156# @DESCRIPTION: 156# @DESCRIPTION:
157# Runs libtoolize. Note the '_' prefix .. to not collide with elibtoolize() from 157# Runs libtoolize. Note the '_' prefix .. to not collide with elibtoolize() from
158# libtool.eclass. 158# libtool.eclass.
159_elibtoolize() { 159_elibtoolize() {
160 local opts 160 local opts
161 local lttest
162 161
163 # Check if we should run libtoolize (AM_PROG_LIBTOOL is an older macro, 162 # Check if we should run libtoolize (AM_PROG_LIBTOOL is an older macro,
164 # check for both it and the current AC_PROG_LIBTOOL) 163 # check for both it and the current AC_PROG_LIBTOOL)
165 lttest="$(autotools_check_macro "AC_PROG_LIBTOOL")$(autotools_check_macro "AM_PROG_LIBTOOL")" 164 [[ -n $(autotools_check_macro AC_PROG_LIBTOOL AM_PROG_LIBTOOL LT_INIT) ]] || return 0
166 [[ -n $lttest ]] || return 0
167 165
168 [[ -f GNUmakefile.am || -f Makefile.am ]] && opts="--automake" 166 [[ -f GNUmakefile.am || -f Makefile.am ]] && opts="--automake"
169 167
170 [[ "${USERLAND}" == "Darwin" ]] && LIBTOOLIZE="glibtoolize" 168 [[ "${USERLAND}" == "Darwin" ]] && LIBTOOLIZE="glibtoolize"
171 autotools_run_tool ${LIBTOOLIZE:-libtoolize} "$@" ${opts} 169 autotools_run_tool ${LIBTOOLIZE:-libtoolize} "$@" ${opts}
264 fi 262 fi
265} 263}
266 264
267# Internal function to check for support 265# Internal function to check for support
268autotools_check_macro() { 266autotools_check_macro() {
269 [[ -f configure.ac || -f configure.in ]] && \ 267 [[ -f configure.ac || -f configure.in ]] || return 0
268 local macro
269 for macro ; do
270 WANT_AUTOCONF="2.5" autoconf --trace=$1 2>/dev/null 270 WANT_AUTOCONF="2.5" autoconf --trace="${macro}" 2>/dev/null
271 done
271 return 0 272 return 0
272} 273}
273 274
274# Internal function to get additional subdirs to configure 275# Internal function to get additional subdirs to configure
275autotools_get_subdirs() { 276autotools_get_subdirs() {

Legend:
Removed from v.1.76  
changed lines
  Added in v.1.77

  ViewVC Help
Powered by ViewVC 1.1.20