summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rwxr-xr-xconfigure15
2 files changed, 18 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index f977e3bf..ac69d95f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2014-06-04 Kaz Kylheku <kaz@kylheku.com>
+ * 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 <kaz@kylheku.com>
+
* configure: Defend against legacy, non-POSIX /bin/sh implementations.
We boostrap using #!/bin/sh, but try to detect a better shell
and re-execute the script with that shell. Furthermore, we now
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.