Changeset 3162 for trunk


Ignore:
Timestamp:
Apr 22, 2007, 3:23:31 AM (18 years ago)
Author:
bird
Message:

Ported to ash.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/essentials/sys-devel/autoconf-wrapper/ac-wrapper-4.sh

    r3161 r3162  
    1 #!/bin/bash
     1#!sh.exe
    22# Copyright 1999-2006 Gentoo Foundation
    33# Distributed under the terms of the GNU General Public License v2
     
    1717#   - `configure' is already present and was generated by autoconf 2.13
    1818
    19 if [[ ${0##*/} == "ac-wrapper.sh" ]] ; then
     19if [ "${0##*/}" = "ac-wrapper.sh" ] ; then
    2020        echo "Don't call this script directly" >&2
    2121        exit 1
    2222fi
    2323
    24 if [[ ${WANT_AUTOCONF} == "2.1" && ${0##*/} == "autom4te" ]] ; then
     24if [ "${WANT_AUTOCONF}" = "2.1"  -a  "${0##*/}" = "autom4te" ] ; then
    2525        echo "ac-wrapper: Autoconf 2.13 doesn't contain autom4te." >&2
    2626        echo "            Either unset WANT_AUTOCONF or don't execute anything" >&2
     
    103103# autodetect routine
    104104#
    105 if [[ ${WANT_AUTOCONF} == "2.1" ]] && [ -f "configure.ac" ] ; then
     105if [ "${WANT_AUTOCONF}" = "2.1"  -a -f "configure.ac" ] ; then
    106106        echo "ac-wrapper: Since configure.ac is present, aclocal always use" >&2
    107107        echo "            autoconf 2.59+, which conflicts with your choice and" >&2
     
    112112fi
    113113
    114 if [[ ${WANT_AUTOCONF} != "2.5" ]] && [[ -n ${WANT_AUTOMAKE} ]] ; then
     114if [ "${WANT_AUTOCONF}" != "2.5"  -a  -n "${WANT_AUTOMAKE}" ] ; then
    115115        # Automake-1.7 and better require autoconf-2.5x so if WANT_AUTOMAKE
    116116        # is set to an older version, let's do some sanity checks.
     
    118118        1.[456])
    119119                acfiles=$(ls ac{local,include}.m4 configure.{in,ac} 2>/dev/null)
    120                 [[ -n ${acfiles} ]] && confversion=$(acprereq_version ${acfiles})
     120                [ -n "${acfiles}" ] && confversion=$(acprereq_version ${acfiles})
    121121               
    122                 [[ -z ${confversion} && -r "configure" ]] \
     122                [ -z "${confversion}"  -a  -r "configure" ] \
    123123                        && confversion=$(generated_version configure)
    124124
    125                 if [[ ${confversion} == "2.1" && ! -f "configure.ac" ]] ; then
     125                if [ "${confversion}" = "2.1"  -a  ! -f "configure.ac" ] ; then
    126126                        binary="${0}-2.13"
    127127                fi
     
    129129fi
    130130
    131 if [[ -n ${WANT_ACWRAPPER_DEBUG} ]] ; then
    132         if [[ -n ${WANT_AUTOCONF} ]] ; then
     131if [ -n "${WANT_ACWRAPPER_DEBUG}" ] ; then
     132        if [ -n "${WANT_AUTOCONF}" ] ; then
    133133                echo "ac-wrapper: DEBUG: WANT_AUTOCONF is set to ${WANT_AUTOCONF}" >&2
    134134        fi
     
    150150# Now try to run the binary
    151151#
    152 if [[ ! -x ${binary} ]] ; then
     152if [ ! -x "${binary}" ] ; then
    153153        # this shouldn't happen
    154154        echo "ac-wrapper: ${binary} is missing or not executable." >&2
Note: See TracChangeset for help on using the changeset viewer.