annotate m4/progtest.m4 @ 17476:6057744acd2c default tip master

autoupdate
author Karl Berry <karl@freefriends.org>
date Fri, 16 Aug 2013 06:32:22 -0700
parents e542fd46ad6f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13626
af42f5b6232d Set PATH_SEPARATOR the same way autoconf does.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
1 # progtest.m4 serial 7 (gettext-0.18.2)
17249
e542fd46ad6f maint: update all copyright year number ranges
Eric Blake <eblake@redhat.com>
parents: 16201
diff changeset
2 dnl Copyright (C) 1996-2003, 2005, 2008-2013 Free Software Foundation, Inc.
5659
be44f23226e0 Update from GNU gettext 0.14.2.
Bruno Haible <bruno@clisp.org>
parents: 4536
diff changeset
3 dnl This file is free software; the Free Software Foundation
be44f23226e0 Update from GNU gettext 0.14.2.
Bruno Haible <bruno@clisp.org>
parents: 4536
diff changeset
4 dnl gives unlimited permission to copy and/or distribute it,
be44f23226e0 Update from GNU gettext 0.14.2.
Bruno Haible <bruno@clisp.org>
parents: 4536
diff changeset
5 dnl with or without modifications, as long as this notice is preserved.
4107
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6 dnl
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 dnl This file can can be used in projects which are not available under
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8 dnl the GNU General Public License or the GNU Library General Public
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9 dnl License but which still want to provide support for the GNU gettext
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 dnl functionality.
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 dnl Please note that the actual code of the GNU gettext library is covered
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 dnl by the GNU Library General Public License, and the rest of the GNU
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13 dnl gettext package package is covered by the GNU General Public License.
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14 dnl They are *not* in the public domain.
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
15
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16 dnl Authors:
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17 dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18
11007
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 10979
diff changeset
19 AC_PREREQ([2.50])
5659
be44f23226e0 Update from GNU gettext 0.14.2.
Bruno Haible <bruno@clisp.org>
parents: 4536
diff changeset
20
4107
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
21 # Search path for a program which passes the given test.
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
22
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
23 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
25 AC_DEFUN([AM_PATH_PROG_WITH_TEST],
4335
3cb468809e1f Upgrade to gettext-0.12.1.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
26 [
3cb468809e1f Upgrade to gettext-0.12.1.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
27 # Prepare PATH_SEPARATOR.
3cb468809e1f Upgrade to gettext-0.12.1.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
28 # The user is always right.
3cb468809e1f Upgrade to gettext-0.12.1.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
29 if test "${PATH_SEPARATOR+set}" != set; then
13626
af42f5b6232d Set PATH_SEPARATOR the same way autoconf does.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
30 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
af42f5b6232d Set PATH_SEPARATOR the same way autoconf does.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
31 # contains only /bin. Note that ksh looks also at the FPATH variable,
af42f5b6232d Set PATH_SEPARATOR the same way autoconf does.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
32 # so we have to set that as well for the test.
af42f5b6232d Set PATH_SEPARATOR the same way autoconf does.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
33 PATH_SEPARATOR=:
af42f5b6232d Set PATH_SEPARATOR the same way autoconf does.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
34 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
af42f5b6232d Set PATH_SEPARATOR the same way autoconf does.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
35 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
af42f5b6232d Set PATH_SEPARATOR the same way autoconf does.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
36 || PATH_SEPARATOR=';'
af42f5b6232d Set PATH_SEPARATOR the same way autoconf does.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
37 }
4335
3cb468809e1f Upgrade to gettext-0.12.1.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
38 fi
3cb468809e1f Upgrade to gettext-0.12.1.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
39
3cb468809e1f Upgrade to gettext-0.12.1.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
40 # Find out how to test for executable files. Don't use a zero-byte file,
3cb468809e1f Upgrade to gettext-0.12.1.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
41 # as systems may use methods other than mode bits to determine executability.
3cb468809e1f Upgrade to gettext-0.12.1.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
42 cat >conf$$.file <<_ASEOF
3cb468809e1f Upgrade to gettext-0.12.1.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
43 #! /bin/sh
3cb468809e1f Upgrade to gettext-0.12.1.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
44 exit 0
3cb468809e1f Upgrade to gettext-0.12.1.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
45 _ASEOF
3cb468809e1f Upgrade to gettext-0.12.1.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
46 chmod +x conf$$.file
3cb468809e1f Upgrade to gettext-0.12.1.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
47 if test -x conf$$.file >/dev/null 2>&1; then
3cb468809e1f Upgrade to gettext-0.12.1.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
48 ac_executable_p="test -x"
3cb468809e1f Upgrade to gettext-0.12.1.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
49 else
3cb468809e1f Upgrade to gettext-0.12.1.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
50 ac_executable_p="test -f"
3cb468809e1f Upgrade to gettext-0.12.1.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
51 fi
3cb468809e1f Upgrade to gettext-0.12.1.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
52 rm -f conf$$.file
3cb468809e1f Upgrade to gettext-0.12.1.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
53
3cb468809e1f Upgrade to gettext-0.12.1.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
54 # Extract the first word of "$2", so it can be a program name with args.
4107
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
55 set dummy $2; ac_word=[$]2
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
56 AC_MSG_CHECKING([for $ac_word])
10979
03e819eea554 More systematic m4 argument quoting.
Bruno Haible <bruno@clisp.org>
parents: 5659
diff changeset
57 AC_CACHE_VAL([ac_cv_path_$1],
4107
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
58 [case "[$]$1" in
4335
3cb468809e1f Upgrade to gettext-0.12.1.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
59 [[\\/]]* | ?:[[\\/]]*)
3cb468809e1f Upgrade to gettext-0.12.1.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
60 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
3cb468809e1f Upgrade to gettext-0.12.1.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
61 ;;
4107
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
62 *)
4335
3cb468809e1f Upgrade to gettext-0.12.1.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
63 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
3cb468809e1f Upgrade to gettext-0.12.1.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
64 for ac_dir in ifelse([$5], , $PATH, [$5]); do
3cb468809e1f Upgrade to gettext-0.12.1.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
65 IFS="$ac_save_IFS"
3cb468809e1f Upgrade to gettext-0.12.1.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
66 test -z "$ac_dir" && ac_dir=.
3cb468809e1f Upgrade to gettext-0.12.1.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
67 for ac_exec_ext in '' $ac_executable_extensions; do
4536
3358eb550c86 Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents: 4533
diff changeset
68 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
5659
be44f23226e0 Update from GNU gettext 0.14.2.
Bruno Haible <bruno@clisp.org>
parents: 4536
diff changeset
69 echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
4536
3358eb550c86 Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents: 4533
diff changeset
70 if [$3]; then
3358eb550c86 Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents: 4533
diff changeset
71 ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
3358eb550c86 Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents: 4533
diff changeset
72 break 2
3358eb550c86 Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents: 4533
diff changeset
73 fi
3358eb550c86 Leave whitespace alone when importing, undoing that part of yesterday's
Paul Eggert <eggert@cs.ucla.edu>
parents: 4533
diff changeset
74 fi
4335
3cb468809e1f Upgrade to gettext-0.12.1.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
75 done
3cb468809e1f Upgrade to gettext-0.12.1.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
76 done
3cb468809e1f Upgrade to gettext-0.12.1.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
77 IFS="$ac_save_IFS"
4107
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
78 dnl If no 4th arg is given, leave the cache variable unset,
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
79 dnl so AC_PATH_PROGS will keep looking.
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
80 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
81 ])dnl
4335
3cb468809e1f Upgrade to gettext-0.12.1.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
82 ;;
4107
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
83 esac])dnl
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
84 $1="$ac_cv_path_$1"
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
85 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
10979
03e819eea554 More systematic m4 argument quoting.
Bruno Haible <bruno@clisp.org>
parents: 5659
diff changeset
86 AC_MSG_RESULT([$][$1])
4107
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
87 else
10979
03e819eea554 More systematic m4 argument quoting.
Bruno Haible <bruno@clisp.org>
parents: 5659
diff changeset
88 AC_MSG_RESULT([no])
4107
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
89 fi
11007
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 10979
diff changeset
90 AC_SUBST([$1])dnl
4107
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
91 ])