Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: xz/m4/posix-shell.m4

Issue 2869016: Add an unpatched version of xz, XZ Utils, to /trunk/deps/third_party (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/
Patch Set: Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « xz/m4/getopt.m4 ('k') | xz/m4/tuklib_common.m4 » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 # Find a POSIX-conforming shell.
2
3 # Copyright (C) 2007-2008 Free Software Foundation, Inc.
4
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # Written by Paul Eggert.
10
11 # If a POSIX-conforming shell can be found, set POSIX_SHELL and
12 # PREFERABLY_POSIX_SHELL to it. If not, set POSIX_SHELL to the
13 # empty string and PREFERABLY_POSIX_SHELL to '/bin/sh'.
14
15 AC_DEFUN([gl_POSIX_SHELL],
16 [
17 AC_CACHE_CHECK([for a shell that conforms to POSIX], [gl_cv_posix_shell],
18 [gl_test_posix_shell_script='
19 func_return () {
20 (exit [$]1)
21 }
22 func_success () {
23 func_return 0
24 }
25 func_failure () {
26 func_return 1
27 }
28 func_ret_success () {
29 return 0
30 }
31 func_ret_failure () {
32 return 1
33 }
34 subshell_umask_sanity () {
35 (umask 22; (umask 0); test $(umask) -eq 22)
36 }
37 test "[$](echo foo)" = foo &&
38 func_success &&
39 ! func_failure &&
40 func_ret_success &&
41 ! func_ret_failure &&
42 (set x && func_ret_success y && test x = "[$]1") &&
43 subshell_umask_sanity
44 '
45 for gl_cv_posix_shell in \
46 "$CONFIG_SHELL" "$SHELL" /bin/sh /bin/bash /bin/ksh /bin/sh5 no; do
47 case $gl_cv_posix_shell in
48 /*)
49 "$gl_cv_posix_shell" -c "$gl_test_posix_shell_script" 2>/dev/null \
50 && break;;
51 esac
52 done])
53
54 if test "$gl_cv_posix_shell" != no; then
55 POSIX_SHELL=$gl_cv_posix_shell
56 PREFERABLY_POSIX_SHELL=$POSIX_SHELL
57 else
58 POSIX_SHELL=
59 PREFERABLY_POSIX_SHELL=/bin/sh
60 fi
61 AC_SUBST([POSIX_SHELL])
62 AC_SUBST([PREFERABLY_POSIX_SHELL])
63 ])
OLDNEW
« no previous file with comments | « xz/m4/getopt.m4 ('k') | xz/m4/tuklib_common.m4 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698