Blame glm4/progtest.m4

rpm-build 858c0f
# progtest.m4 serial 7 (gettext-0.18.2)
rpm-build 858c0f
dnl Copyright (C) 1996-2003, 2005, 2008-2016 Free Software Foundation, Inc.
rpm-build 858c0f
dnl This file is free software; the Free Software Foundation
rpm-build 858c0f
dnl gives unlimited permission to copy and/or distribute it,
rpm-build 858c0f
dnl with or without modifications, as long as this notice is preserved.
rpm-build 858c0f
dnl
rpm-build 858c0f
dnl This file can be used in projects which are not available under
rpm-build 858c0f
dnl the GNU General Public License or the GNU Library General Public
rpm-build 858c0f
dnl License but which still want to provide support for the GNU gettext
rpm-build 858c0f
dnl functionality.
rpm-build 858c0f
dnl Please note that the actual code of the GNU gettext library is covered
rpm-build 858c0f
dnl by the GNU Library General Public License, and the rest of the GNU
rpm-build 858c0f
dnl gettext package is covered by the GNU General Public License.
rpm-build 858c0f
dnl They are *not* in the public domain.
rpm-build 858c0f
rpm-build 858c0f
dnl Authors:
rpm-build 858c0f
dnl   Ulrich Drepper <drepper@cygnus.com>, 1996.
rpm-build 858c0f
rpm-build 858c0f
AC_PREREQ([2.50])
rpm-build 858c0f
rpm-build 858c0f
# Search path for a program which passes the given test.
rpm-build 858c0f
rpm-build 858c0f
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
rpm-build 858c0f
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
rpm-build 858c0f
AC_DEFUN([AM_PATH_PROG_WITH_TEST],
rpm-build 858c0f
[
rpm-build 858c0f
# Prepare PATH_SEPARATOR.
rpm-build 858c0f
# The user is always right.
rpm-build 858c0f
if test "${PATH_SEPARATOR+set}" != set; then
rpm-build 858c0f
  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
rpm-build 858c0f
  # contains only /bin. Note that ksh looks also at the FPATH variable,
rpm-build 858c0f
  # so we have to set that as well for the test.
rpm-build 858c0f
  PATH_SEPARATOR=:
rpm-build 858c0f
  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
rpm-build 858c0f
    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
rpm-build 858c0f
           || PATH_SEPARATOR=';'
rpm-build 858c0f
       }
rpm-build 858c0f
fi
rpm-build 858c0f
rpm-build 858c0f
# Find out how to test for executable files. Don't use a zero-byte file,
rpm-build 858c0f
# as systems may use methods other than mode bits to determine executability.
rpm-build 858c0f
cat >conf$$.file <<_ASEOF
rpm-build 858c0f
#! /bin/sh
rpm-build 858c0f
exit 0
rpm-build 858c0f
_ASEOF
rpm-build 858c0f
chmod +x conf$$.file
rpm-build 858c0f
if test -x conf$$.file >/dev/null 2>&1; then
rpm-build 858c0f
  ac_executable_p="test -x"
rpm-build 858c0f
else
rpm-build 858c0f
  ac_executable_p="test -f"
rpm-build 858c0f
fi
rpm-build 858c0f
rm -f conf$$.file
rpm-build 858c0f
rpm-build 858c0f
# Extract the first word of "$2", so it can be a program name with args.
rpm-build 858c0f
set dummy $2; ac_word=[$]2
rpm-build 858c0f
AC_MSG_CHECKING([for $ac_word])
rpm-build 858c0f
AC_CACHE_VAL([ac_cv_path_$1],
rpm-build 858c0f
[case "[$]$1" in
rpm-build 858c0f
  [[\\/]]* | ?:[[\\/]]*)
rpm-build 858c0f
    ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
rpm-build 858c0f
    ;;
rpm-build 858c0f
  *)
rpm-build 858c0f
    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
rpm-build 858c0f
    for ac_dir in ifelse([$5], , $PATH, [$5]); do
rpm-build 858c0f
      IFS="$ac_save_IFS"
rpm-build 858c0f
      test -z "$ac_dir" && ac_dir=.
rpm-build 858c0f
      for ac_exec_ext in '' $ac_executable_extensions; do
rpm-build 858c0f
        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
rpm-build 858c0f
          echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
rpm-build 858c0f
          if [$3]; then
rpm-build 858c0f
            ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
rpm-build 858c0f
            break 2
rpm-build 858c0f
          fi
rpm-build 858c0f
        fi
rpm-build 858c0f
      done
rpm-build 858c0f
    done
rpm-build 858c0f
    IFS="$ac_save_IFS"
rpm-build 858c0f
dnl If no 4th arg is given, leave the cache variable unset,
rpm-build 858c0f
dnl so AC_PATH_PROGS will keep looking.
rpm-build 858c0f
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
rpm-build 858c0f
])dnl
rpm-build 858c0f
    ;;
rpm-build 858c0f
esac])dnl
rpm-build 858c0f
$1="$ac_cv_path_$1"
rpm-build 858c0f
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
rpm-build 858c0f
  AC_MSG_RESULT([$][$1])
rpm-build 858c0f
else
rpm-build 858c0f
  AC_MSG_RESULT([no])
rpm-build 858c0f
fi
rpm-build 858c0f
AC_SUBST([$1])dnl
rpm-build 858c0f
])