From e1ba0057258d37a7c78e268809d71d1d24a18059 Mon Sep 17 00:00:00 2001 From: jan Date: Fri, 31 May 2002 09:42:03 +0000 Subject: [PATCH] Fix for ash as /bin/sh. --- ChangeLog | 4 ++++ aclocal.m4 | 11 ++++++++++- stepmake/aclocal.m4 | 8 +++++++- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e6181c0f4a..8f67e14163 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2002-05-31 Jan Nieuwenhuizen + + * stepmake/aclocal.m4: Fix for ash as /bin/sh. + 2002-05-31 Han-Wen * scripts/musedata2ly.py (Parser.parse_note_line): add dots. Add diff --git a/aclocal.m4 b/aclocal.m4 index 2aca44bed3..13de08358c 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,4 +1,7 @@ dnl aclocal.m4 -*-shell-script-*- +dnl WARNING WARNING WARNING +dnl do not edit! this is aclocal.m4, generated from stepmake/aclocal.m4 +dnl aclocal.m4 -*-shell-script-*- dnl StepMake subroutines for configure.in @@ -6,7 +9,12 @@ dnl StepMake subroutines for configure.in # Get full path of executable ($1) AC_DEFUN(STEPMAKE_GET_EXECUTABLE, [ - type -p "$1" 2>&1 | awk '{print $NF}' + ## which doesn't work in ash, if /usr/bin/which isn't installed + ## type -p doesn't work in ash + ## command -v doesn't work in zsh + ## command -v "$1" 2>&1 + ## this test should work in ash, bash, pdksh (ksh), zsh + type -p "$1" 2>/dev/null | tail -1 | awk '{print $NF}' ]) @@ -70,6 +78,7 @@ AC_DEFUN(STEPMAKE_CHECK_SEARCH_RESULT, [ AC_DEFUN(STEPMAKE_CHECK_VERSION, [ r="`eval echo '$'"$1"`" AC_MSG_CHECKING("$r version") + #exe=`STEPMAKE_GET_EXECUTABLE($r)` exe=`STEPMAKE_GET_EXECUTABLE($r)` ver=`STEPMAKE_GET_VERSION($exe)` num=`STEPMAKE_NUMERIC_VERSION($ver)` diff --git a/stepmake/aclocal.m4 b/stepmake/aclocal.m4 index 2aca44bed3..b63198794a 100644 --- a/stepmake/aclocal.m4 +++ b/stepmake/aclocal.m4 @@ -6,7 +6,12 @@ dnl StepMake subroutines for configure.in # Get full path of executable ($1) AC_DEFUN(STEPMAKE_GET_EXECUTABLE, [ - type -p "$1" 2>&1 | awk '{print $NF}' + ## which doesn't work in ash, if /usr/bin/which isn't installed + ## type -p doesn't work in ash + ## command -v doesn't work in zsh + ## command -v "$1" 2>&1 + ## this test should work in ash, bash, pdksh (ksh), zsh + type -p "$1" 2>/dev/null | tail -1 | awk '{print $NF}' ]) @@ -70,6 +75,7 @@ AC_DEFUN(STEPMAKE_CHECK_SEARCH_RESULT, [ AC_DEFUN(STEPMAKE_CHECK_VERSION, [ r="`eval echo '$'"$1"`" AC_MSG_CHECKING("$r version") + #exe=`STEPMAKE_GET_EXECUTABLE($r)` exe=`STEPMAKE_GET_EXECUTABLE($r)` ver=`STEPMAKE_GET_VERSION($exe)` num=`STEPMAKE_NUMERIC_VERSION($ver)` -- 2.39.5