diff options
author | Matt Messier <mmessier@grapetv.org> | 2007-05-03 01:07:22 -0400 |
---|---|---|
committer | Matt Messier <mmessier@grapetv.org> | 2007-05-03 01:07:22 -0400 |
commit | b23f5e4c4eaa751c45f3e09390bb3b4b364b20c8 (patch) | |
tree | 3fdd3ee560ce7eac87ab41d0424b315c16d82b16 /m4/gettext/progtest.m4 | |
parent | b6925d5a22a9915e2cc338c476d0c6830036fa4c (diff) | |
download | xine-lib-b23f5e4c4eaa751c45f3e09390bb3b4b364b20c8.tar.gz xine-lib-b23f5e4c4eaa751c45f3e09390bb3b4b364b20c8.tar.bz2 |
Move autoconf macros that come from gettext from m4 to m4/gettext to make it
easier to update them when necessary (they're out of date at present--the
versions here are from 0.14.5, but 0.16.1 is current).
--HG--
rename : m4/codeset.m4 => m4/gettext/codeset.m4
rename : m4/gettext.m4 => m4/gettext/gettext.m4
rename : m4/glibc2.m4 => m4/gettext/glibc2.m4
rename : m4/glibc21.m4 => m4/gettext/glibc21.m4
rename : m4/iconv.m4 => m4/gettext/iconv.m4
rename : m4/intdiv0.m4 => m4/gettext/intdiv0.m4
rename : m4/intmax.m4 => m4/gettext/intmax.m4
rename : m4/inttypes-pri.m4 => m4/gettext/inttypes-pri.m4
rename : m4/inttypes.m4 => m4/gettext/inttypes.m4
rename : m4/inttypes_h.m4 => m4/gettext/inttypes_h.m4
rename : m4/isc-posix.m4 => m4/gettext/isc-posix.m4
rename : m4/lcmessage.m4 => m4/gettext/lcmessage.m4
rename : m4/lib-ld.m4 => m4/gettext/lib-ld.m4
rename : m4/lib-link.m4 => m4/gettext/lib-link.m4
rename : m4/lib-prefix.m4 => m4/gettext/lib-prefix.m4
rename : m4/longdouble.m4 => m4/gettext/longdouble.m4
rename : m4/longlong.m4 => m4/gettext/longlong.m4
rename : m4/nls.m4 => m4/gettext/nls.m4
rename : m4/po.m4 => m4/gettext/po.m4
rename : m4/printf-posix.m4 => m4/gettext/printf-posix.m4
rename : m4/progtest.m4 => m4/gettext/progtest.m4
rename : m4/signed.m4 => m4/gettext/signed.m4
rename : m4/size_max.m4 => m4/gettext/size_max.m4
rename : m4/stdint_h.m4 => m4/gettext/stdint_h.m4
rename : m4/uintmax_t.m4 => m4/gettext/uintmax_t.m4
rename : m4/ulonglong.m4 => m4/gettext/ulonglong.m4
rename : m4/wchar_t.m4 => m4/gettext/wchar_t.m4
rename : m4/wint_t.m4 => m4/gettext/wint_t.m4
rename : m4/xsize.m4 => m4/gettext/xsize.m4
Diffstat (limited to 'm4/gettext/progtest.m4')
-rw-r--r-- | m4/gettext/progtest.m4 | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/m4/gettext/progtest.m4 b/m4/gettext/progtest.m4 new file mode 100644 index 000000000..a56365cd3 --- /dev/null +++ b/m4/gettext/progtest.m4 @@ -0,0 +1,92 @@ +# progtest.m4 serial 4 (gettext-0.14.2) +dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl 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. + +AC_PREREQ(2.50) + +# 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; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# 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/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# 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]) +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_SEPARATOR + for ac_dir in ifelse([$5], , $PATH, [$5]); do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD + if [$3]; then + ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$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"]); then + AC_MSG_RESULT([$]$1) +else + AC_MSG_RESULT(no) +fi +AC_SUBST($1)dnl +]) |