# progtest.m4 serial 3 (gettext-0.12)dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.dnl This file is free software, distributed under the terms of the GNUdnl General Public License. As a special exception to the GNU Generaldnl Public License, this file may be distributed as part of a programdnl that contains a configuration script generated by Autoconf, underdnl the same distribution terms as the rest of that program.dnldnl This file can can be used in projects which are not available underdnl the GNU General Public License or the GNU Library General Publicdnl License but which still want to provide support for the GNU gettextdnl functionality.dnl Please note that the actual code of the GNU gettext library is covereddnl by the GNU Library General Public License, and the rest of the GNUdnl gettext package package is covered by the GNU General Public License.dnl They are *not* in the public domain.dnl Authors:dnl Ulrich Drepper <drepper@cygnus.com>, 1996.# Search path for a program which passes the given test.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],[# Prepare PATH_SEPARATOR.# The user is always right.if test "${PATH_SEPARATOR+set}" != set; thenecho "#! /bin/sh" >conf$$.shecho "exit 0" >>conf$$.shchmod +x conf$$.shif (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; thenPATH_SEPARATOR=';'elsePATH_SEPARATOR=:firm -f conf$$.shfi# Find out how to test for executable files. Don't use a zero-byte file,# as systems may use methods other than mode bits to determine executability.cat >conf$$.file <<_ASEOF#! /bin/shexit 0_ASEOFchmod +x conf$$.fileif test -x conf$$.file >/dev/null 2>&1; thenac_executable_p="test -x"elseac_executable_p="test -f"firm -f conf$$.file# Extract the first word of "$2", so it can be a program name with args.set dummy $2; ac_word=[$]2AC_MSG_CHECKING([for $ac_word])AC_CACHE_VAL(ac_cv_path_$1,[case "[$]$1" in[[\\/]]* | ?:[[\\/]]*)ac_cv_path_$1="[$]$1" # Let the user override the test with a path.;;*)ac_save_IFS="$IFS"; IFS=$PATH_SEPARATORfor ac_dir in ifelse([$5], , $PATH, [$5]); doIFS="$ac_save_IFS"test -z "$ac_dir" && ac_dir=.for ac_exec_ext in '' $ac_executable_extensions; doif $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; thenif [$3]; thenac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"break 2fifidonedoneIFS="$ac_save_IFS"dnl If no 4th arg is given, leave the cache variable unset,dnl so AC_PATH_PROGS will keep looking.ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"])dnl;;esac])dnl$1="$ac_cv_path_$1"if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); thenAC_MSG_RESULT([$]$1)elseAC_MSG_RESULT(no)fiAC_SUBST($1)dnl])