X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=config%2Fprogtest.m4;h=391bd31f6aa7368eb52fc48bf326feac03833fad;hb=dab43e77955e5b21fa556f53143d42e09e439f40;hp=2482d4a9bfde61980eab6bf9f81538b62693a7b7;hpb=53b464c5e95ed708e9464db0499826894be450fd;p=lyx.git diff --git a/config/progtest.m4 b/config/progtest.m4 index 2482d4a9bf..391bd31f6a 100644 --- a/config/progtest.m4 +++ b/config/progtest.m4 @@ -2,15 +2,32 @@ # Ulrich Drepper , 1996. # # This file can be copied and used freely without restrictions. It can -# be used in projects which are not available under the GNU Public License -# but which still want to provide support for the GNU gettext functionality. -# Please note that the actual code is *not* freely available. +# be used in projects which are not available under the GNU General Public +# License or the GNU Library General Public License but which still want +# to provide support for the GNU gettext functionality. +# Please note that the actual code of the GNU gettext library is covered +# by the GNU Library General Public License, and the rest of the GNU +# gettext package package is covered by the GNU General Public License. +# They are *not* in the public domain. -# serial 1 +# serial 2 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) -AC_DEFUN(AM_PATH_PROG_WITH_TEST, +AC_DEFUN([AM_PATH_PROG_WITH_TEST], +[case "`uname -s 2> /dev/null`" in +OS/2) + PATH=`echo -E "$PATH" | sed 's+\\\\+/+g'` + PATH_IFS=';' + EXE_EXT='.exe' + CMD_EXT='.cmd' + ;; +*) + PATH_IFS=':' + EXE_EXT='' + CMD_EXT='' + ;; +esac] [# Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) @@ -20,10 +37,12 @@ AC_CACHE_VAL(ac_cv_path_$1, ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}$PATH_IFS" for ac_dir in ifelse([$5], , $PATH, [$5]); do test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then + if test -f $ac_dir/$ac_word \ + -o -f $ac_dir/$ac_word$EXE_EXT \ + -o -f $ac_dir/$ac_word$CMD_EXT; then if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word" break @@ -38,7 +57,7 @@ ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ;; esac])dnl $1="$ac_cv_path_$1" -if test -n "[$]$1"; then +if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then AC_MSG_RESULT([$]$1) else AC_MSG_RESULT(no)