Add and use AX_POSIX_SHELL autoconf macro, so we can rely on POSIX shell features
This commit is contained in:
1
aclocal.m4
vendored
1
aclocal.m4
vendored
@@ -289,6 +289,7 @@ AS_VAR_IF([$1], [""], [$5], [$4])dnl
|
||||
])dnl PKG_CHECK_VAR
|
||||
|
||||
m4_include([m4/ax_check_openssl.m4])
|
||||
m4_include([m4/ax_posix_shell.m4])
|
||||
m4_include([m4/ax_pthread.m4])
|
||||
m4_include([m4/libtool.m4])
|
||||
m4_include([m4/ltoptions.m4])
|
||||
|
||||
38
configure
vendored
38
configure
vendored
@@ -11697,6 +11697,44 @@ else
|
||||
$as_echo "no, using $LN_S" >&6; }
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a POSIX-compatible shell" >&5
|
||||
$as_echo_n "checking for a POSIX-compatible shell... " >&6; }
|
||||
if ${ac_cv_prog_shell+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_test_shell_script='
|
||||
test "$(expr 1 + 1)" = "2" &&
|
||||
test "$(( 1 + 1 ))" = "2"
|
||||
'
|
||||
|
||||
for ac_cv_prog_shell in \
|
||||
"$CONFIG_SHELL" "$SHELL" /bin/sh /bin/bash /bin/ksh /bin/sh5 no; do
|
||||
case $ac_cv_prog_shell in #(
|
||||
/*) :
|
||||
|
||||
if "$ac_cv_prog_shell" -c "$ac_test_shell_script" 2>/dev/null; then :
|
||||
ac_cv_path_shell=$SHELL
|
||||
fi
|
||||
;; #(
|
||||
*) :
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_shell" >&5
|
||||
$as_echo "$ac_cv_prog_shell" >&6; }
|
||||
if test "$ac_cv_prog_shell" = "no"; then :
|
||||
SHELL=/bin/sh
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using $SHELL, even though it does not conform to POSIX" >&5
|
||||
$as_echo "$as_me: WARNING: using $SHELL, even though it does not conform to POSIX" >&2;}
|
||||
|
||||
else
|
||||
SHELL="$ac_cv_prog_shell"
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ AC_PROG_MAKE_SET
|
||||
AC_PROG_LIBTOOL
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LN_S
|
||||
AX_POSIX_SHELL
|
||||
|
||||
AC_SUBST(STD_CINCLUDES)
|
||||
AC_SUBST(STD_CDEFINES)
|
||||
|
||||
28
m4/ax_posix_shell.m4
Normal file
28
m4/ax_posix_shell.m4
Normal file
@@ -0,0 +1,28 @@
|
||||
# AX_POSIX_SHELL
|
||||
# -------------
|
||||
# Check for a POSIX-compatible shell.
|
||||
#
|
||||
AC_DEFUN([AX_POSIX_SHELL],
|
||||
[AC_CACHE_CHECK([for a POSIX-compatible shell], [ac_cv_prog_shell],
|
||||
[ac_test_shell_script='
|
||||
test "$(expr 1 + 1)" = "2" &&
|
||||
test "$(( 1 + 1 ))" = "2"
|
||||
'
|
||||
|
||||
for ac_cv_prog_shell in \
|
||||
"$CONFIG_SHELL" "$SHELL" /bin/sh /bin/bash /bin/ksh /bin/sh5 no; do
|
||||
AS_CASE([$ac_cv_prog_shell],
|
||||
[/*],[
|
||||
AS_IF(["$ac_cv_prog_shell" -c "$ac_test_shell_script" 2>/dev/null],
|
||||
[ac_cv_path_shell=$SHELL])
|
||||
])
|
||||
done
|
||||
])
|
||||
AS_IF([test "$ac_cv_prog_shell" = "no"],
|
||||
[SHELL=/bin/sh
|
||||
AC_MSG_WARN([using $SHELL, even though it does not conform to POSIX])
|
||||
],
|
||||
[SHELL="$ac_cv_prog_shell"
|
||||
])
|
||||
AC_SUBST([SHELL])
|
||||
])
|
||||
@@ -3762,13 +3762,6 @@
|
||||
./lib/win32/bindevt/bindevt.vcxproj.in X 2013,2014,2015,2016,2018
|
||||
./lib/win32/bindevt/bindevt.vcxproj.user X 2013,2018
|
||||
./ltmain.sh X 1999,2000,2001,2003,2004,2006,2009,2012,2018
|
||||
./m4/ax_check_openssl.m4 X 2018
|
||||
./m4/ax_pthread.m4 X 2018
|
||||
./m4/libtool.m4 X 2012,2018
|
||||
./m4/ltoptions.m4 X 2012,2018
|
||||
./m4/ltsugar.m4 X 2012,2018
|
||||
./m4/ltversion.m4 X 2012,2018
|
||||
./m4/lt~obsolete.m4 X 2012,2018
|
||||
./make/includes.in MAKE 1999,2000,2001,2004,2005,2007,2012,2014,2016,2017,2018
|
||||
./make/mkdep.in X 1999,2000,2001,2006,2011,2014,2018
|
||||
./make/rules.in MAKE 1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2011,2012,2013,2014,2015,2016,2017,2018
|
||||
|
||||
Reference in New Issue
Block a user