Various autoconf/libtool fixes
authorSam Lantinga <slouken@lokigames.com>
Mon, 25 Oct 1999 14:38:12 +0000
changeset 6cb0e8db1f996
parent 5 ebdf63084644
child 7 e73da9dc4bdc
Various autoconf/libtool fixes
acinclude.m4
aclocal.m4
autogen.sh
configure
configure.in
     1.1 --- a/acinclude.m4	Sat Oct 23 03:33:09 1999 +0000
     1.2 +++ b/acinclude.m4	Mon Oct 25 14:38:12 1999 +0000
     1.3 @@ -163,3 +163,465 @@
     1.4    AC_SUBST(SDL_LIBS)
     1.5    rm -f conf.sdltest
     1.6  ])
     1.7 +## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*-
     1.8 +## Copyright (C) 1996-1999 Free Software Foundation, Inc.
     1.9 +## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
    1.10 +##
    1.11 +## This program is free software; you can redistribute it and/or modify
    1.12 +## it under the terms of the GNU General Public License as published by
    1.13 +## the Free Software Foundation; either version 2 of the License, or
    1.14 +## (at your option) any later version.
    1.15 +##
    1.16 +## This program is distributed in the hope that it will be useful, but
    1.17 +## WITHOUT ANY WARRANTY; without even the implied warranty of
    1.18 +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    1.19 +## General Public License for more details.
    1.20 +##
    1.21 +## You should have received a copy of the GNU General Public License
    1.22 +## along with this program; if not, write to the Free Software
    1.23 +## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    1.24 +##
    1.25 +## As a special exception to the GNU General Public License, if you
    1.26 +## distribute this file as part of a program that contains a
    1.27 +## configuration script generated by Autoconf, you may include it under
    1.28 +## the same distribution terms that you use for the rest of that program.
    1.29 +
    1.30 +# serial 41 AC_PROG_LIBTOOL
    1.31 +AC_DEFUN(AC_PROG_LIBTOOL,
    1.32 +[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
    1.33 +
    1.34 +# Save cache, so that ltconfig can load it
    1.35 +AC_CACHE_SAVE
    1.36 +
    1.37 +# Actually configure libtool.  ac_aux_dir is where install-sh is found.
    1.38 +CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
    1.39 +LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
    1.40 +LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
    1.41 +DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
    1.42 +${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
    1.43 +$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
    1.44 +|| AC_MSG_ERROR([libtool configure failed])
    1.45 +
    1.46 +# Reload cache, that may have been modified by ltconfig
    1.47 +AC_CACHE_LOAD
    1.48 +
    1.49 +# This can be used to rebuild libtool when needed
    1.50 +LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
    1.51 +
    1.52 +# Always use our own libtool.
    1.53 +LIBTOOL='$(SHELL) $(top_builddir)/libtool'
    1.54 +AC_SUBST(LIBTOOL)dnl
    1.55 +
    1.56 +# Redirect the config.log output again, so that the ltconfig log is not
    1.57 +# clobbered by the next message.
    1.58 +exec 5>>./config.log
    1.59 +])
    1.60 +
    1.61 +AC_DEFUN(AC_LIBTOOL_SETUP,
    1.62 +[AC_PREREQ(2.13)dnl
    1.63 +AC_REQUIRE([AC_ENABLE_SHARED])dnl
    1.64 +AC_REQUIRE([AC_ENABLE_STATIC])dnl
    1.65 +AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
    1.66 +AC_REQUIRE([AC_CANONICAL_HOST])dnl
    1.67 +AC_REQUIRE([AC_CANONICAL_BUILD])dnl
    1.68 +AC_REQUIRE([AC_PROG_CC])dnl
    1.69 +AC_REQUIRE([AC_PROG_LD])dnl
    1.70 +AC_REQUIRE([AC_PROG_NM])dnl
    1.71 +AC_REQUIRE([AC_PROG_LN_S])dnl
    1.72 +dnl
    1.73 +
    1.74 +AC_CHECK_TOOL(RANLIB, ranlib, :)
    1.75 +
    1.76 +# Check for any special flags to pass to ltconfig.
    1.77 +libtool_flags="--cache-file=$cache_file"
    1.78 +test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
    1.79 +test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
    1.80 +test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
    1.81 +test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
    1.82 +test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
    1.83 +ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
    1.84 +[libtool_flags="$libtool_flags --enable-dlopen"])
    1.85 +ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
    1.86 +[libtool_flags="$libtool_flags --enable-win32-dll"])
    1.87 +AC_ARG_ENABLE(libtool-lock,
    1.88 +  [  --disable-libtool-lock  avoid locking (might break parallel builds)])
    1.89 +test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
    1.90 +test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
    1.91 +
    1.92 +AC_ARG_WITH(pic,
    1.93 +  [  --with-pic              try to use only PIC/non-PIC objects [default=use both]],
    1.94 +     pic_mode="$withval", pic_mode=default)
    1.95 +test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
    1.96 +test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
    1.97 +
    1.98 +# Some flags need to be propagated to the compiler or linker for good
    1.99 +# libtool support.
   1.100 +case "$host" in
   1.101 +*-*-irix6*)
   1.102 +  # Find out which ABI we are using.
   1.103 +  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
   1.104 +  if AC_TRY_EVAL(ac_compile); then
   1.105 +    case "`/usr/bin/file conftest.o`" in
   1.106 +    *32-bit*)
   1.107 +      LD="${LD-ld} -32"
   1.108 +      ;;
   1.109 +    *N32*)
   1.110 +      LD="${LD-ld} -n32"
   1.111 +      ;;
   1.112 +    *64-bit*)
   1.113 +      LD="${LD-ld} -64"
   1.114 +      ;;
   1.115 +    esac
   1.116 +  fi
   1.117 +  rm -rf conftest*
   1.118 +  ;;
   1.119 +
   1.120 +*-*-sco3.2v5*)
   1.121 +  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
   1.122 +  SAVE_CFLAGS="$CFLAGS"
   1.123 +  CFLAGS="$CFLAGS -belf"
   1.124 +  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
   1.125 +    [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
   1.126 +  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
   1.127 +    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
   1.128 +    CFLAGS="$SAVE_CFLAGS"
   1.129 +  fi
   1.130 +  ;;
   1.131 +
   1.132 +ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
   1.133 +[*-*-cygwin* | *-*-mingw*)
   1.134 +  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
   1.135 +  AC_CHECK_TOOL(AS, as, false)
   1.136 +  AC_CHECK_TOOL(OBJDUMP, objdump, false)
   1.137 +
   1.138 +  # recent cygwin and mingw systems supply a stub DllMain which the user
   1.139 +  # can override, but on older systems we have to supply one
   1.140 +  AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
   1.141 +    [AC_TRY_LINK([DllMain (0, 0, 0);],
   1.142 +      [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);],
   1.143 +      [lt_cv_need_dllmain=yes],[lt_cv_need_dllmain=no])])
   1.144 +
   1.145 +  case $host in
   1.146 +  *-*-cygwin*)
   1.147 +    # cygwin systems need to pass --dll to the linker, and not link
   1.148 +    # crt.o which will require a WinMain@16 definition.
   1.149 +    lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
   1.150 +  *-*-mingw*)
   1.151 +    # old mingw systems require "-dll" to link a DLL, while more recent ones
   1.152 +    # require "-mdll"
   1.153 +    SAVE_CFLAGS="$CFLAGS"
   1.154 +    CFLAGS="$CFLAGS -mdll"
   1.155 +    AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
   1.156 +      [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
   1.157 +    CFLAGS="$SAVE_CFLAGS" ;;
   1.158 +  esac
   1.159 +  ;;
   1.160 +  ])
   1.161 +esac
   1.162 +])
   1.163 +
   1.164 +# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
   1.165 +AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
   1.166 +
   1.167 +# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
   1.168 +AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
   1.169 +
   1.170 +# AC_ENABLE_SHARED - implement the --enable-shared flag
   1.171 +# Usage: AC_ENABLE_SHARED[(DEFAULT)]
   1.172 +#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
   1.173 +#   `yes'.
   1.174 +AC_DEFUN(AC_ENABLE_SHARED, [dnl
   1.175 +define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
   1.176 +AC_ARG_ENABLE(shared,
   1.177 +changequote(<<, >>)dnl
   1.178 +<<  --enable-shared[=PKGS]  build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
   1.179 +changequote([, ])dnl
   1.180 +[p=${PACKAGE-default}
   1.181 +case "$enableval" in
   1.182 +yes) enable_shared=yes ;;
   1.183 +no) enable_shared=no ;;
   1.184 +*)
   1.185 +  enable_shared=no
   1.186 +  # Look at the argument we got.  We use all the common list separators.
   1.187 +  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
   1.188 +  for pkg in $enableval; do
   1.189 +    if test "X$pkg" = "X$p"; then
   1.190 +      enable_shared=yes
   1.191 +    fi
   1.192 +  done
   1.193 +  IFS="$ac_save_ifs"
   1.194 +  ;;
   1.195 +esac],
   1.196 +enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
   1.197 +])
   1.198 +
   1.199 +# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
   1.200 +AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
   1.201 +AC_ENABLE_SHARED(no)])
   1.202 +
   1.203 +# AC_ENABLE_STATIC - implement the --enable-static flag
   1.204 +# Usage: AC_ENABLE_STATIC[(DEFAULT)]
   1.205 +#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
   1.206 +#   `yes'.
   1.207 +AC_DEFUN(AC_ENABLE_STATIC, [dnl
   1.208 +define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
   1.209 +AC_ARG_ENABLE(static,
   1.210 +changequote(<<, >>)dnl
   1.211 +<<  --enable-static[=PKGS]  build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
   1.212 +changequote([, ])dnl
   1.213 +[p=${PACKAGE-default}
   1.214 +case "$enableval" in
   1.215 +yes) enable_static=yes ;;
   1.216 +no) enable_static=no ;;
   1.217 +*)
   1.218 +  enable_static=no
   1.219 +  # Look at the argument we got.  We use all the common list separators.
   1.220 +  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
   1.221 +  for pkg in $enableval; do
   1.222 +    if test "X$pkg" = "X$p"; then
   1.223 +      enable_static=yes
   1.224 +    fi
   1.225 +  done
   1.226 +  IFS="$ac_save_ifs"
   1.227 +  ;;
   1.228 +esac],
   1.229 +enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
   1.230 +])
   1.231 +
   1.232 +# AC_DISABLE_STATIC - set the default static flag to --disable-static
   1.233 +AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
   1.234 +AC_ENABLE_STATIC(no)])
   1.235 +
   1.236 +
   1.237 +# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
   1.238 +# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
   1.239 +#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
   1.240 +#   `yes'.
   1.241 +AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
   1.242 +define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
   1.243 +AC_ARG_ENABLE(fast-install,
   1.244 +changequote(<<, >>)dnl
   1.245 +<<  --enable-fast-install[=PKGS]  optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
   1.246 +changequote([, ])dnl
   1.247 +[p=${PACKAGE-default}
   1.248 +case "$enableval" in
   1.249 +yes) enable_fast_install=yes ;;
   1.250 +no) enable_fast_install=no ;;
   1.251 +*)
   1.252 +  enable_fast_install=no
   1.253 +  # Look at the argument we got.  We use all the common list separators.
   1.254 +  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
   1.255 +  for pkg in $enableval; do
   1.256 +    if test "X$pkg" = "X$p"; then
   1.257 +      enable_fast_install=yes
   1.258 +    fi
   1.259 +  done
   1.260 +  IFS="$ac_save_ifs"
   1.261 +  ;;
   1.262 +esac],
   1.263 +enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
   1.264 +])
   1.265 +
   1.266 +# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
   1.267 +AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
   1.268 +AC_ENABLE_FAST_INSTALL(no)])
   1.269 +
   1.270 +# AC_PROG_LD - find the path to the GNU or non-GNU linker
   1.271 +AC_DEFUN(AC_PROG_LD,
   1.272 +[AC_ARG_WITH(gnu-ld,
   1.273 +[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
   1.274 +test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
   1.275 +AC_REQUIRE([AC_PROG_CC])dnl
   1.276 +AC_REQUIRE([AC_CANONICAL_HOST])dnl
   1.277 +AC_REQUIRE([AC_CANONICAL_BUILD])dnl
   1.278 +ac_prog=ld
   1.279 +if test "$ac_cv_prog_gcc" = yes; then
   1.280 +  # Check if gcc -print-prog-name=ld gives a path.
   1.281 +  AC_MSG_CHECKING([for ld used by GCC])
   1.282 +  case $host in
   1.283 +  *-*-mingw*)
   1.284 +    # gcc leaves a trailing carriage return which upsets mingw
   1.285 +    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
   1.286 +  *)
   1.287 +    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
   1.288 +  esac
   1.289 +  case "$ac_prog" in
   1.290 +    # Accept absolute paths.
   1.291 +changequote(,)dnl
   1.292 +    [\\/]* | [A-Za-z]:[\\/]*)
   1.293 +      re_direlt='/[^/][^/]*/\.\./'
   1.294 +changequote([,])dnl
   1.295 +      # Canonicalize the path of ld
   1.296 +      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
   1.297 +      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
   1.298 +	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
   1.299 +      done
   1.300 +      test -z "$LD" && LD="$ac_prog"
   1.301 +      ;;
   1.302 +  "")
   1.303 +    # If it fails, then pretend we aren't using GCC.
   1.304 +    ac_prog=ld
   1.305 +    ;;
   1.306 +  *)
   1.307 +    # If it is relative, then search for the first ld in PATH.
   1.308 +    with_gnu_ld=unknown
   1.309 +    ;;
   1.310 +  esac
   1.311 +elif test "$with_gnu_ld" = yes; then
   1.312 +  AC_MSG_CHECKING([for GNU ld])
   1.313 +else
   1.314 +  AC_MSG_CHECKING([for non-GNU ld])
   1.315 +fi
   1.316 +AC_CACHE_VAL(ac_cv_path_LD,
   1.317 +[if test -z "$LD"; then
   1.318 +  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
   1.319 +  for ac_dir in $PATH; do
   1.320 +    test -z "$ac_dir" && ac_dir=.
   1.321 +    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
   1.322 +      ac_cv_path_LD="$ac_dir/$ac_prog"
   1.323 +      # Check to see if the program is GNU ld.  I'd rather use --version,
   1.324 +      # but apparently some GNU ld's only accept -v.
   1.325 +      # Break only if it was the GNU/non-GNU ld that we prefer.
   1.326 +      if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
   1.327 +	test "$with_gnu_ld" != no && break
   1.328 +      else
   1.329 +	test "$with_gnu_ld" != yes && break
   1.330 +      fi
   1.331 +    fi
   1.332 +  done
   1.333 +  IFS="$ac_save_ifs"
   1.334 +else
   1.335 +  ac_cv_path_LD="$LD" # Let the user override the test with a path.
   1.336 +fi])
   1.337 +LD="$ac_cv_path_LD"
   1.338 +if test -n "$LD"; then
   1.339 +  AC_MSG_RESULT($LD)
   1.340 +else
   1.341 +  AC_MSG_RESULT(no)
   1.342 +fi
   1.343 +test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
   1.344 +AC_SUBST(LD)
   1.345 +AC_PROG_LD_GNU
   1.346 +])
   1.347 +
   1.348 +AC_DEFUN(AC_PROG_LD_GNU,
   1.349 +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
   1.350 +[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
   1.351 +if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
   1.352 +  ac_cv_prog_gnu_ld=yes
   1.353 +else
   1.354 +  ac_cv_prog_gnu_ld=no
   1.355 +fi])
   1.356 +])
   1.357 +
   1.358 +# AC_PROG_NM - find the path to a BSD-compatible name lister
   1.359 +AC_DEFUN(AC_PROG_NM,
   1.360 +[AC_MSG_CHECKING([for BSD-compatible nm])
   1.361 +AC_CACHE_VAL(ac_cv_path_NM,
   1.362 +[if test -n "$NM"; then
   1.363 +  # Let the user override the test.
   1.364 +  ac_cv_path_NM="$NM"
   1.365 +else
   1.366 +  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
   1.367 +  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
   1.368 +    test -z "$ac_dir" && ac_dir=.
   1.369 +    if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
   1.370 +      # Check to see if the nm accepts a BSD-compat flag.
   1.371 +      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
   1.372 +      #   nm: unknown option "B" ignored
   1.373 +      if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
   1.374 +	ac_cv_path_NM="$ac_dir/nm -B"
   1.375 +	break
   1.376 +      elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
   1.377 +	ac_cv_path_NM="$ac_dir/nm -p"
   1.378 +	break
   1.379 +      else
   1.380 +	ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
   1.381 +	continue # so that we can try to find one that supports BSD flags
   1.382 +      fi
   1.383 +    fi
   1.384 +  done
   1.385 +  IFS="$ac_save_ifs"
   1.386 +  test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
   1.387 +fi])
   1.388 +NM="$ac_cv_path_NM"
   1.389 +AC_MSG_RESULT([$NM])
   1.390 +AC_SUBST(NM)
   1.391 +])
   1.392 +
   1.393 +# AC_CHECK_LIBM - check for math library
   1.394 +AC_DEFUN(AC_CHECK_LIBM,
   1.395 +[AC_REQUIRE([AC_CANONICAL_HOST])dnl
   1.396 +LIBM=
   1.397 +case "$host" in
   1.398 +*-*-beos* | *-*-cygwin*)
   1.399 +  # These system don't have libm
   1.400 +  ;;
   1.401 +*-ncr-sysv4.3*)
   1.402 +  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
   1.403 +  AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
   1.404 +  ;;
   1.405 +*)
   1.406 +  AC_CHECK_LIB(m, main, LIBM="-lm")
   1.407 +  ;;
   1.408 +esac
   1.409 +])
   1.410 +
   1.411 +# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
   1.412 +# the libltdl convenience library, adds --enable-ltdl-convenience to
   1.413 +# the configure arguments.  Note that LIBLTDL is not AC_SUBSTed, nor
   1.414 +# is AC_CONFIG_SUBDIRS called.  If DIR is not provided, it is assumed
   1.415 +# to be `${top_builddir}/libltdl'.  Make sure you start DIR with
   1.416 +# '${top_builddir}/' (note the single quotes!) if your package is not
   1.417 +# flat, and, if you're not using automake, define top_builddir as
   1.418 +# appropriate in the Makefiles.
   1.419 +AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
   1.420 +  case "$enable_ltdl_convenience" in
   1.421 +  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
   1.422 +  "") enable_ltdl_convenience=yes
   1.423 +      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
   1.424 +  esac
   1.425 +  LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
   1.426 +  INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
   1.427 +])
   1.428 +
   1.429 +# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
   1.430 +# the libltdl installable library, and adds --enable-ltdl-install to
   1.431 +# the configure arguments.  Note that LIBLTDL is not AC_SUBSTed, nor
   1.432 +# is AC_CONFIG_SUBDIRS called.  If DIR is not provided, it is assumed
   1.433 +# to be `${top_builddir}/libltdl'.  Make sure you start DIR with
   1.434 +# '${top_builddir}/' (note the single quotes!) if your package is not
   1.435 +# flat, and, if you're not using automake, define top_builddir as
   1.436 +# appropriate in the Makefiles.
   1.437 +# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
   1.438 +AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
   1.439 +  AC_CHECK_LIB(ltdl, main,
   1.440 +  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
   1.441 +  [if test x"$enable_ltdl_install" = xno; then
   1.442 +     AC_MSG_WARN([libltdl not installed, but installation disabled])
   1.443 +   else
   1.444 +     enable_ltdl_install=yes
   1.445 +   fi
   1.446 +  ])
   1.447 +  if test x"$enable_ltdl_install" = x"yes"; then
   1.448 +    ac_configure_args="$ac_configure_args --enable-ltdl-install"
   1.449 +    LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
   1.450 +    INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
   1.451 +  else
   1.452 +    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
   1.453 +    LIBLTDL="-lltdl"
   1.454 +    INCLTDL=
   1.455 +  fi
   1.456 +])
   1.457 +
   1.458 +dnl old names
   1.459 +AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
   1.460 +AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
   1.461 +AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
   1.462 +AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
   1.463 +AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
   1.464 +AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
   1.465 +AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
   1.466 +
   1.467 +dnl This is just to silence aclocal about the macro not being used
   1.468 +ifelse([AC_DISABLE_FAST_INSTALL])dnl
     2.1 --- a/aclocal.m4	Sat Oct 23 03:33:09 1999 +0000
     2.2 +++ b/aclocal.m4	Mon Oct 25 14:38:12 1999 +0000
     2.3 @@ -176,101 +176,6 @@
     2.4    rm -f conf.sdltest
     2.5  ])
     2.6  
     2.7 -# Do all the work for Automake.  This macro actually does too much --
     2.8 -# some checks are only needed if your package does certain things.
     2.9 -# But this isn't really a big deal.
    2.10 -
    2.11 -# serial 1
    2.12 -
    2.13 -dnl Usage:
    2.14 -dnl AM_INIT_AUTOMAKE(package,version, [no-define])
    2.15 -
    2.16 -AC_DEFUN(AM_INIT_AUTOMAKE,
    2.17 -[AC_REQUIRE([AC_PROG_INSTALL])
    2.18 -dnl We require 2.13 because we rely on SHELL being computed by configure.
    2.19 -AC_PREREQ([2.13])
    2.20 -PACKAGE=[$1]
    2.21 -AC_SUBST(PACKAGE)
    2.22 -VERSION=[$2]
    2.23 -AC_SUBST(VERSION)
    2.24 -dnl test to see if srcdir already configured
    2.25 -if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
    2.26 -  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
    2.27 -fi
    2.28 -ifelse([$3],,
    2.29 -AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
    2.30 -AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
    2.31 -AC_REQUIRE([AM_SANITY_CHECK])
    2.32 -AC_REQUIRE([AC_ARG_PROGRAM])
    2.33 -dnl FIXME This is truly gross.
    2.34 -missing_dir=`cd $ac_aux_dir && pwd`
    2.35 -AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
    2.36 -AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
    2.37 -AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
    2.38 -AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
    2.39 -AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
    2.40 -AC_REQUIRE([AC_PROG_MAKE_SET])])
    2.41 -
    2.42 -#
    2.43 -# Check to make sure that the build environment is sane.
    2.44 -#
    2.45 -
    2.46 -AC_DEFUN(AM_SANITY_CHECK,
    2.47 -[AC_MSG_CHECKING([whether build environment is sane])
    2.48 -# Just in case
    2.49 -sleep 1
    2.50 -echo timestamp > conftestfile
    2.51 -# Do `set' in a subshell so we don't clobber the current shell's
    2.52 -# arguments.  Must try -L first in case configure is actually a
    2.53 -# symlink; some systems play weird games with the mod time of symlinks
    2.54 -# (eg FreeBSD returns the mod time of the symlink's containing
    2.55 -# directory).
    2.56 -if (
    2.57 -   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
    2.58 -   if test "[$]*" = "X"; then
    2.59 -      # -L didn't work.
    2.60 -      set X `ls -t $srcdir/configure conftestfile`
    2.61 -   fi
    2.62 -   if test "[$]*" != "X $srcdir/configure conftestfile" \
    2.63 -      && test "[$]*" != "X conftestfile $srcdir/configure"; then
    2.64 -
    2.65 -      # If neither matched, then we have a broken ls.  This can happen
    2.66 -      # if, for instance, CONFIG_SHELL is bash and it inherits a
    2.67 -      # broken ls alias from the environment.  This has actually
    2.68 -      # happened.  Such a system could not be considered "sane".
    2.69 -      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
    2.70 -alias in your environment])
    2.71 -   fi
    2.72 -
    2.73 -   test "[$]2" = conftestfile
    2.74 -   )
    2.75 -then
    2.76 -   # Ok.
    2.77 -   :
    2.78 -else
    2.79 -   AC_MSG_ERROR([newly created file is older than distributed files!
    2.80 -Check your system clock])
    2.81 -fi
    2.82 -rm -f conftest*
    2.83 -AC_MSG_RESULT(yes)])
    2.84 -
    2.85 -dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
    2.86 -dnl The program must properly implement --version.
    2.87 -AC_DEFUN(AM_MISSING_PROG,
    2.88 -[AC_MSG_CHECKING(for working $2)
    2.89 -# Run test in a subshell; some versions of sh will print an error if
    2.90 -# an executable is not found, even if stderr is redirected.
    2.91 -# Redirect stdin to placate older versions of autoconf.  Sigh.
    2.92 -if ($2 --version) < /dev/null > /dev/null 2>&1; then
    2.93 -   $1=$2
    2.94 -   AC_MSG_RESULT(found)
    2.95 -else
    2.96 -   $1="$3/missing $2"
    2.97 -   AC_MSG_RESULT(missing)
    2.98 -fi
    2.99 -AC_SUBST($1)])
   2.100 -
   2.101 -
   2.102  # serial 41 AC_PROG_LIBTOOL
   2.103  AC_DEFUN(AC_PROG_LIBTOOL,
   2.104  [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
   2.105 @@ -711,6 +616,100 @@
   2.106  dnl This is just to silence aclocal about the macro not being used
   2.107  ifelse([AC_DISABLE_FAST_INSTALL])dnl
   2.108  
   2.109 +# Do all the work for Automake.  This macro actually does too much --
   2.110 +# some checks are only needed if your package does certain things.
   2.111 +# But this isn't really a big deal.
   2.112 +
   2.113 +# serial 1
   2.114 +
   2.115 +dnl Usage:
   2.116 +dnl AM_INIT_AUTOMAKE(package,version, [no-define])
   2.117 +
   2.118 +AC_DEFUN(AM_INIT_AUTOMAKE,
   2.119 +[AC_REQUIRE([AC_PROG_INSTALL])
   2.120 +dnl We require 2.13 because we rely on SHELL being computed by configure.
   2.121 +AC_PREREQ([2.13])
   2.122 +PACKAGE=[$1]
   2.123 +AC_SUBST(PACKAGE)
   2.124 +VERSION=[$2]
   2.125 +AC_SUBST(VERSION)
   2.126 +dnl test to see if srcdir already configured
   2.127 +if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
   2.128 +  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
   2.129 +fi
   2.130 +ifelse([$3],,
   2.131 +AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
   2.132 +AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
   2.133 +AC_REQUIRE([AM_SANITY_CHECK])
   2.134 +AC_REQUIRE([AC_ARG_PROGRAM])
   2.135 +dnl FIXME This is truly gross.
   2.136 +missing_dir=`cd $ac_aux_dir && pwd`
   2.137 +AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
   2.138 +AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
   2.139 +AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
   2.140 +AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
   2.141 +AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
   2.142 +AC_REQUIRE([AC_PROG_MAKE_SET])])
   2.143 +
   2.144 +#
   2.145 +# Check to make sure that the build environment is sane.
   2.146 +#
   2.147 +
   2.148 +AC_DEFUN(AM_SANITY_CHECK,
   2.149 +[AC_MSG_CHECKING([whether build environment is sane])
   2.150 +# Just in case
   2.151 +sleep 1
   2.152 +echo timestamp > conftestfile
   2.153 +# Do `set' in a subshell so we don't clobber the current shell's
   2.154 +# arguments.  Must try -L first in case configure is actually a
   2.155 +# symlink; some systems play weird games with the mod time of symlinks
   2.156 +# (eg FreeBSD returns the mod time of the symlink's containing
   2.157 +# directory).
   2.158 +if (
   2.159 +   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
   2.160 +   if test "[$]*" = "X"; then
   2.161 +      # -L didn't work.
   2.162 +      set X `ls -t $srcdir/configure conftestfile`
   2.163 +   fi
   2.164 +   if test "[$]*" != "X $srcdir/configure conftestfile" \
   2.165 +      && test "[$]*" != "X conftestfile $srcdir/configure"; then
   2.166 +
   2.167 +      # If neither matched, then we have a broken ls.  This can happen
   2.168 +      # if, for instance, CONFIG_SHELL is bash and it inherits a
   2.169 +      # broken ls alias from the environment.  This has actually
   2.170 +      # happened.  Such a system could not be considered "sane".
   2.171 +      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
   2.172 +alias in your environment])
   2.173 +   fi
   2.174 +
   2.175 +   test "[$]2" = conftestfile
   2.176 +   )
   2.177 +then
   2.178 +   # Ok.
   2.179 +   :
   2.180 +else
   2.181 +   AC_MSG_ERROR([newly created file is older than distributed files!
   2.182 +Check your system clock])
   2.183 +fi
   2.184 +rm -f conftest*
   2.185 +AC_MSG_RESULT(yes)])
   2.186 +
   2.187 +dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
   2.188 +dnl The program must properly implement --version.
   2.189 +AC_DEFUN(AM_MISSING_PROG,
   2.190 +[AC_MSG_CHECKING(for working $2)
   2.191 +# Run test in a subshell; some versions of sh will print an error if
   2.192 +# an executable is not found, even if stderr is redirected.
   2.193 +# Redirect stdin to placate older versions of autoconf.  Sigh.
   2.194 +if ($2 --version) < /dev/null > /dev/null 2>&1; then
   2.195 +   $1=$2
   2.196 +   AC_MSG_RESULT(found)
   2.197 +else
   2.198 +   $1="$3/missing $2"
   2.199 +   AC_MSG_RESULT(missing)
   2.200 +fi
   2.201 +AC_SUBST($1)])
   2.202 +
   2.203  # Define a conditional.
   2.204  
   2.205  AC_DEFUN(AM_CONDITIONAL,
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/autogen.sh	Mon Oct 25 14:38:12 1999 +0000
     3.3 @@ -0,0 +1,7 @@
     3.4 +#!/bin/sh
     3.5 +#
     3.6 +aclocal
     3.7 +automake --foreign
     3.8 +autoconf
     3.9 +
    3.10 +./configure $*
     4.1 --- a/configure	Sat Oct 23 03:33:09 1999 +0000
     4.2 +++ b/configure	Mon Oct 25 14:38:12 1999 +0000
     4.3 @@ -1665,6 +1665,30 @@
     4.4  test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
     4.5  
     4.6  
     4.7 +echo $ac_n "checking target system type""... $ac_c" 1>&6
     4.8 +echo "configure:1670: checking target system type" >&5
     4.9 +
    4.10 +target_alias=$target
    4.11 +case "$target_alias" in
    4.12 +NONE)
    4.13 +  case $nonopt in
    4.14 +  NONE) target_alias=$host_alias ;;
    4.15 +  *) target_alias=$nonopt ;;
    4.16 +  esac ;;
    4.17 +esac
    4.18 +
    4.19 +target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
    4.20 +target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
    4.21 +target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
    4.22 +target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
    4.23 +echo "$ac_t""$target" 1>&6
    4.24 +
    4.25 +case "$target" in
    4.26 +    alpha*-*-linux*)
    4.27 +        CFLAGS="$CFLAGS -mcpu=ev4 -Wa,-mall"
    4.28 +        ;;
    4.29 +esac
    4.30 +
    4.31  # Check whether --with-sdl-prefix or --without-sdl-prefix was given.
    4.32  if test "${with_sdl_prefix+set}" = set; then
    4.33    withval="$with_sdl_prefix"
    4.34 @@ -1706,7 +1730,7 @@
    4.35    # Extract the first word of "sdl-config", so it can be a program name with args.
    4.36  set dummy sdl-config; ac_word=$2
    4.37  echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    4.38 -echo "configure:1710: checking for $ac_word" >&5
    4.39 +echo "configure:1734: checking for $ac_word" >&5
    4.40  if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then
    4.41    echo $ac_n "(cached) $ac_c" 1>&6
    4.42  else
    4.43 @@ -1741,7 +1765,7 @@
    4.44  
    4.45    min_sdl_version=0.11.2
    4.46    echo $ac_n "checking for SDL - version >= $min_sdl_version""... $ac_c" 1>&6
    4.47 -echo "configure:1745: checking for SDL - version >= $min_sdl_version" >&5
    4.48 +echo "configure:1769: checking for SDL - version >= $min_sdl_version" >&5
    4.49    no_sdl=""
    4.50    if test "$SDL_CONFIG" = "no" ; then
    4.51      no_sdl=yes
    4.52 @@ -1765,7 +1789,7 @@
    4.53    echo $ac_n "cross compiling; assumed OK... $ac_c"
    4.54  else
    4.55    cat > conftest.$ac_ext <<EOF
    4.56 -#line 1769 "configure"
    4.57 +#line 1793 "configure"
    4.58  #include "confdefs.h"
    4.59  
    4.60  #include <stdio.h>
    4.61 @@ -1823,7 +1847,7 @@
    4.62  
    4.63  
    4.64  EOF
    4.65 -if { (eval echo configure:1827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    4.66 +if { (eval echo configure:1851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    4.67  then
    4.68    :
    4.69  else
    4.70 @@ -1857,7 +1881,7 @@
    4.71            CFLAGS="$CFLAGS $SDL_CFLAGS"
    4.72            LIBS="$LIBS $SDL_LIBS"
    4.73            cat > conftest.$ac_ext <<EOF
    4.74 -#line 1861 "configure"
    4.75 +#line 1885 "configure"
    4.76  #include "confdefs.h"
    4.77  
    4.78  #include <stdio.h>
    4.79 @@ -1867,7 +1891,7 @@
    4.80   return 0; 
    4.81  ; return 0; }
    4.82  EOF
    4.83 -if { (eval echo configure:1871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    4.84 +if { (eval echo configure:1895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    4.85    rm -rf conftest*
    4.86     echo "*** The test program compiled, but did not run. This usually means"
    4.87            echo "*** that the run-time linker is not finding SDL or finding the wrong"
    4.88 @@ -1959,10 +1983,10 @@
    4.89  
    4.90  if test x$enable_music_mp3 = xyes; then
    4.91      echo $ac_n "checking for SMPEG headers and libraries""... $ac_c" 1>&6
    4.92 -echo "configure:1963: checking for SMPEG headers and libraries" >&5
    4.93 +echo "configure:1987: checking for SMPEG headers and libraries" >&5
    4.94      have_smpeg=no
    4.95      cat > conftest.$ac_ext <<EOF
    4.96 -#line 1966 "configure"
    4.97 +#line 1990 "configure"
    4.98  #include "confdefs.h"
    4.99  
   4.100       #include <smpeg/smpeg.h>
   4.101 @@ -1972,7 +1996,7 @@
   4.102      
   4.103  ; return 0; }
   4.104  EOF
   4.105 -if { (eval echo configure:1976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   4.106 +if { (eval echo configure:2000: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   4.107    rm -rf conftest*
   4.108    
   4.109      have_smpeg=yes
   4.110 @@ -2195,6 +2219,11 @@
   4.111  s%@LN_S@%$LN_S%g
   4.112  s%@RANLIB@%$RANLIB%g
   4.113  s%@LIBTOOL@%$LIBTOOL%g
   4.114 +s%@target@%$target%g
   4.115 +s%@target_alias@%$target_alias%g
   4.116 +s%@target_cpu@%$target_cpu%g
   4.117 +s%@target_vendor@%$target_vendor%g
   4.118 +s%@target_os@%$target_os%g
   4.119  s%@SDL_CONFIG@%$SDL_CONFIG%g
   4.120  s%@SDL_CFLAGS@%$SDL_CFLAGS%g
   4.121  s%@SDL_LIBS@%$SDL_LIBS%g
     5.1 --- a/configure.in	Sat Oct 23 03:33:09 1999 +0000
     5.2 +++ b/configure.in	Mon Oct 25 14:38:12 1999 +0000
     5.3 @@ -46,6 +46,14 @@
     5.4  AM_PROG_LIBTOOL
     5.5  AC_PROG_INSTALL
     5.6  
     5.7 +dnl The alpha architecture needs special flags for binary portability
     5.8 +AC_CANONICAL_TARGET
     5.9 +case "$target" in
    5.10 +    alpha*-*-linux*)
    5.11 +        CFLAGS="$CFLAGS -mcpu=ev4 -Wa,-mall"
    5.12 +        ;;
    5.13 +esac
    5.14 +
    5.15  dnl Check for SDL 0.11.2
    5.16  AM_PATH_SDL(0.11.2)
    5.17  CFLAGS="$CFLAGS $SDL_CFLAGS"