esac
-dnl Initialize machine and opsys from $canonical if not in our database above.
+dnl Initialize machine from $canonical if not in our database above.
test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
-test -z "$opsys" && opsys=`echo $canonical | sed 's/^[^-]*-[^-]*-//'`
+
+dnl Initialize opsys from `uname -s` if not in our database above.
+test -z "$opsys" && opsys=`uname -s | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
dnl Use configure-time autodetection if s&m not available
if test -r "${srcdir}/src/m/${machine}.h"; then
test "$need_kalloca" = "yes" && XE_APPEND(-Kalloca,c_switch_system)
fi
-dnl Calculalate value of CFLAGS:
+dnl Calculate value of CFLAGS:
dnl Use either command line flag, environment var, or autodetection
if test "$cflags_specified" = "no"; then
dnl Following values of CFLAGS are known to work well.
dnl Should we take debugging options into consideration?
if test "$GCC" = "yes"; then
CFLAGS="-g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes -Wshadow"
+ dnl Yuck, bad compares have been worth at least 3 crashes!
+ CFLAGS="$CFLAGS -Wsign-compare"
dnl glibc is intentionally not `-Wpointer-arith'-clean.
dnl Ulrich Drepper has rejected patches to fix the glibc header files.
test "$have_glibc" != "yes" && CFLAGS="$CFLAGS -Wpointer-arith"
cd ..
rm -fr conftestdir
for word in $xmkmf_defines; do
- case "$word" in -D* )
+ case "$word" in
+ -D__STDC__*) ;;
+ -D* )
sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
case "$word" in
-D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
esac
fi
+ dnl Win32 Native uses native sound
+ if test -z "$sound_found"; then
+ if test "$with_msw" = "yes"; then
+ sound_found=yes
+ native_sound_lib=
+ fi
+ fi
+
dnl Check for Linux/BSD native sound
if test -z "$sound_found"; then
for dir in "machine" "sys" "linux"; do
done
fi
- dnl Win32 Native uses native sound
- if test -z "$sound_found"; then
- if test "$with_msw" = "yes"; then
- sound_found=yes
- native_sound_lib=
- fi
- fi
-
test "$sound_found" = "yes" && with_native_sound=yes
fi