From ea6cb9c2ea015bfc7744c8749dbf65788d1900bc Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 4 Jun 2014 21:41:50 -0700 Subject: * configure: Changes for building on Solaris 10 using the /usr/bin/xpg4/sh shell. Solaris' /bin/sh does not like test -e. Adding break to the new shell existence testing loop so we use the first shell in the list. Solaris wants _XOPEN_SOURCE=500 to reveal certain functions. Fix breakage in the make utility detection, and also use the $make variable everywhere instead of make. --- ChangeLog | 10 ++++++++++ configure | 15 ++++++++------- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index f977e3bf..ac69d95f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2014-06-04 Kaz Kylheku + + * configure: Changes for building on Solaris 10 using the + /usr/bin/xpg4/sh shell. Solaris' /bin/sh does not like test + -e. Adding break to the new shell existence testing loop so we + use the first shell in the list. Solaris wants _XOPEN_SOURCE=500 + to reveal certain functions. Fix breakage in the make utility + detection, and also use the $make variable everywhere instead + of make. + 2014-06-04 Kaz Kylheku * configure: Defend against legacy, non-POSIX /bin/sh implementations. diff --git a/configure b/configure index c1b80c34..d0fd82c6 100755 --- a/configure +++ b/configure @@ -33,8 +33,9 @@ if test x$txr_shell = x ; then for shell in /usr/xpg4/bin/sh /bin/bash /usr/bin/bash ; do - if test -e $shell ; then + if test -x $shell ; then txr_shell=$shell + break fi done if test x$txr_shell = x ; then @@ -96,7 +97,7 @@ yacc='$(cross)$(tool_prefix)$(yaccname)' yacc_given= nm='$(cross)$(tool_prefix)nm' opt_flags=-O2 -lang_flags='-ansi -D_BSD_SOURCE -D_POSIX_C_SOURCE=199309L' +lang_flags='-ansi -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=199309L' diag_flags='-Wall -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=strict-prototypes' debug_flags=-g inline= @@ -437,7 +438,7 @@ if [ -z "$make" ] ; then output=$($make --version 2> /dev/null) || true set -- $output - if [ $1 != "GNU" -o $2 != "Make" ] ; then + if [ $# -lt 2 ] || [ $1 != "GNU" -o $2 != "Make" ] ; then continue fi break @@ -658,7 +659,7 @@ cat < config.h conftest() { rm -f ${exe-"conftest conftest.exe"} ${exe+"conftest$exe"} - $make conftest "$@" > conftest.err 2>&1 && [ -x conftest ] + $make conftest ${@+"$@"} > conftest.err 2>&1 && [ -x conftest ] } # @@ -667,7 +668,7 @@ conftest() conftest_o() { rm -f conftest.o - $make conftest.o "$@" > conftest.err 2>&1 + $make conftest.o ${@+"$@"} > conftest.err 2>&1 } # @@ -676,7 +677,7 @@ conftest_o() conftest_syms() { rm -f conftest.o conftest.syms - $make conftest.syms "$@" > conftest.err 2>&1 + $make conftest.syms ${@+"$@"} > conftest.err 2>&1 } @@ -1789,7 +1790,7 @@ fi # Clean up # -make conftest.clean +$make conftest.clean # # What do we have for patch management. -- cgit v1.2.3