summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-06-04 21:41:50 -0700
committerKaz Kylheku <kaz@kylheku.com>2014-06-04 21:41:50 -0700
commitea6cb9c2ea015bfc7744c8749dbf65788d1900bc (patch)
treef11016cd3e966c7946a3c413a6ac12a6e06c6a66 /configure
parent2dc820fa7cbe09e944d7a9b407ecfa555237bfde (diff)
downloadtxr-ea6cb9c2ea015bfc7744c8749dbf65788d1900bc.tar.gz
txr-ea6cb9c2ea015bfc7744c8749dbf65788d1900bc.tar.bz2
txr-ea6cb9c2ea015bfc7744c8749dbf65788d1900bc.zip
* 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.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure15
1 files changed, 8 insertions, 7 deletions
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.