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

Diff of /eclass/autotools-utils.eclass

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

Revision 1.40 Revision 1.44
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2012 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-utils.eclass,v 1.40 2012/01/14 18:53:56 mgorny Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/autotools-utils.eclass,v 1.44 2012/01/19 21:49:38 mgorny Exp $
4 4
5# @ECLASS: autotools-utils.eclass 5# @ECLASS: autotools-utils.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Maciej Mrozowski <reavertm@gentoo.org> 7# Maciej Mrozowski <reavertm@gentoo.org>
8# Michał Górny <mgorny@gentoo.org> 8# Michał Górny <mgorny@gentoo.org>
282 # Override this func to not require unnecessary eaclocal calls. 282 # Override this func to not require unnecessary eaclocal calls.
283 autotools_check_macro() { 283 autotools_check_macro() {
284 local x 284 local x
285 285
286 # Add a few additional variants as we don't get expansions. 286 # Add a few additional variants as we don't get expansions.
287 [[ ${1} = AC_CONFIG_HEADERS ]] && set -- "${@}" AC_CONFIG_HEADER 287 [[ ${1} = AC_CONFIG_HEADERS ]] && set -- "${@}" \
288 AC_CONFIG_HEADER AM_CONFIG_HEADER
288 289
289 for x; do 290 for x; do
290 grep -h "^${x}" configure.{ac,in} 2>/dev/null 291 grep -h "^${x}" configure.{ac,in} 2>/dev/null
291 done 292 done
292 } 293 }
393 || die 'autotools-utils.eclass: myeconfargs has to be an array.' 394 || die 'autotools-utils.eclass: myeconfargs has to be an array.'
394 395
395 [[ ${EAPI} == 2 ]] && ! use prefix && EPREFIX= 396 [[ ${EAPI} == 2 ]] && ! use prefix && EPREFIX=
396 397
397 # Common args 398 # Common args
398 local econfargs=( 399 local econfargs=()
400
401 _check_build_dir
402 if "${ECONF_SOURCE}"/configure --help 2>&1 | grep -q '^ *--docdir='; then
403 econfargs+=(
399 --docdir="${EPREFIX}/usr/share/doc/${PF}" 404 --docdir="${EPREFIX}"/usr/share/doc/${PF}
400 ) 405 )
406 fi
401 407
402 # Handle static-libs found in IUSE, disable them by default 408 # Handle static-libs found in IUSE, disable them by default
403 if in_iuse static-libs; then 409 if in_iuse static-libs; then
404 econfargs+=( 410 econfargs+=(
405 --enable-shared 411 --enable-shared
408 fi 414 fi
409 415
410 # Append user args 416 # Append user args
411 econfargs+=("${myeconfargs[@]}") 417 econfargs+=("${myeconfargs[@]}")
412 418
413 _check_build_dir
414 mkdir -p "${AUTOTOOLS_BUILD_DIR}" || die "mkdir '${AUTOTOOLS_BUILD_DIR}' failed" 419 mkdir -p "${AUTOTOOLS_BUILD_DIR}" || die "mkdir '${AUTOTOOLS_BUILD_DIR}' failed"
415 pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null 420 pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null
416 econf "${econfargs[@]}" "$@" 421 econf "${econfargs[@]}" "$@"
417 popd > /dev/null 422 popd > /dev/null
418} 423}

Legend:
Removed from v.1.40  
changed lines
  Added in v.1.44

  ViewVC Help
Powered by ViewVC 1.1.20