]> git.lyx.org Git - lyx.git/blobdiff - config/progtest.m4
more latex conversion cases fixed, patch from Andre, more more funcs to lowercase...
[lyx.git] / config / progtest.m4
index 13a85fa08c509cf5782f637323875b23998809c3..af5bb3c87f994a4ae5f679d73576b73d0f08b305 100644 (file)
@@ -1,11 +1,29 @@
 # Search path for a program which passes the given test.
 # Ulrich Drepper <drepper@cygnus.com>, 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.
 
 # serial 1
 
 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])
@@ -15,10 +33,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