From 0fc0e4d891766602be38530c80368e51be7d1e13 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 26 Dec 1999 11:17:50 +0000 Subject: [PATCH] Added a post-mix callback, and updated configure.in for Win32 cross-compile --- aclocal.m4 | 4 +- configure | 337 ++++++++++++++++++++++++++++++--- configure.in | 5 +- ltconfig | 519 +++++++++------------------------------------------ ltmain.sh | 67 +++++-- mixer.c | 20 ++ mixer.h | 11 +- music.c | 103 +++++----- 8 files changed, 526 insertions(+), 540 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index d7a48985..dbf8fc07 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -74,7 +74,7 @@ dnl #include #include #include -#include +#include "SDL.h" char* my_strdup (char *str) @@ -148,7 +148,7 @@ int main () LIBS="$LIBS $SDL_LIBS" AC_TRY_LINK([ #include -#include +#include "SDL.h" ], [ return 0; ], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding SDL or finding the wrong" diff --git a/configure b/configure index 9f44b2fb..e81fa51a 100755 --- a/configure +++ b/configure @@ -561,9 +561,9 @@ fi MAJOR_VERSION=1 MINOR_VERSION=0 -MICRO_VERSION=0 +MICRO_VERSION=1 INTERFACE_AGE=0 -BINARY_AGE=0 +BINARY_AGE=1 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION @@ -1087,6 +1087,7 @@ else fi fi + # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then enableval="$enable_shared" @@ -1163,7 +1164,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:1167: checking host system type" >&5 +echo "configure:1168: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -1184,7 +1185,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:1188: checking build system type" >&5 +echo "configure:1189: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -1213,7 +1214,7 @@ ac_prog=ld if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:1217: checking for ld used by GCC" >&5 +echo "configure:1218: checking for ld used by GCC" >&5 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw @@ -1243,10 +1244,10 @@ echo "configure:1217: checking for ld used by GCC" >&5 esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:1247: checking for GNU ld" >&5 +echo "configure:1248: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1250: checking for non-GNU ld" >&5 +echo "configure:1251: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1282,7 +1283,7 @@ fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:1286: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:1287: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1298,7 +1299,7 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1302: checking for BSD-compatible nm" >&5 +echo "configure:1303: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1335,7 +1336,7 @@ echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1339: checking whether ln -s works" >&5 +echo "configure:1340: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1365,7 +1366,7 @@ fi # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1369: checking for $ac_word" >&5 +echo "configure:1370: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1397,7 +1398,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1401: checking for $ac_word" >&5 +echo "configure:1402: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1438,7 +1439,7 @@ test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" - +libtool_flags="$libtool_flags --enable-win32-dll" # Check whether --enable-libtool-lock or --disable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval="$enable_libtool_lock" @@ -1464,8 +1465,8 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic" case "$host" in *-*-irix6*) # Find out which ABI we are using. - echo '#line 1468 "configure"' > conftest.$ac_ext - if { (eval echo configure:1469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 1469 "configure"' > conftest.$ac_ext + if { (eval echo configure:1470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" @@ -1486,19 +1487,19 @@ case "$host" in SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:1490: checking whether the C compiler needs -belf" >&5 +echo "configure:1491: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else @@ -1517,7 +1518,278 @@ echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 fi ;; +*-*-cygwin* | *-*-mingw*) + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1526: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +DLLTOOL="$ac_cv_prog_DLLTOOL" +if test -n "$DLLTOOL"; then + echo "$ac_t""$DLLTOOL" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +if test -z "$ac_cv_prog_DLLTOOL"; then +if test -n "$ac_tool_prefix"; then + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1558: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_DLLTOOL="dlltool" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false" +fi +fi +DLLTOOL="$ac_cv_prog_DLLTOOL" +if test -n "$DLLTOOL"; then + echo "$ac_t""$DLLTOOL" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +else + DLLTOOL="false" +fi +fi + + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. +set dummy ${ac_tool_prefix}as; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1593: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_AS="${ac_tool_prefix}as" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +AS="$ac_cv_prog_AS" +if test -n "$AS"; then + echo "$ac_t""$AS" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +if test -z "$ac_cv_prog_AS"; then +if test -n "$ac_tool_prefix"; then + # Extract the first word of "as", so it can be a program name with args. +set dummy as; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1625: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_AS="as" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false" +fi +fi +AS="$ac_cv_prog_AS" +if test -n "$AS"; then + echo "$ac_t""$AS" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +else + AS="false" +fi +fi + + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1660: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +OBJDUMP="$ac_cv_prog_OBJDUMP" +if test -n "$OBJDUMP"; then + echo "$ac_t""$OBJDUMP" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test -z "$ac_cv_prog_OBJDUMP"; then +if test -n "$ac_tool_prefix"; then + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1692: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_OBJDUMP="objdump" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false" +fi +fi +OBJDUMP="$ac_cv_prog_OBJDUMP" +if test -n "$OBJDUMP"; then + echo "$ac_t""$OBJDUMP" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +else + OBJDUMP="false" +fi +fi + + + # recent cygwin and mingw systems supply a stub DllMain which the user + # can override, but on older systems we have to supply one + echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6 +echo "configure:1728: checking if libtool should supply DllMain function" >&5 +if eval "test \"`echo '$''{'lt_cv_need_dllmain'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + lt_cv_need_dllmain=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + lt_cv_need_dllmain=no +fi +rm -f conftest* +fi + +echo "$ac_t""$lt_cv_need_dllmain" 1>&6 + + case $host in + *-*-cygwin*) + # cygwin systems need to pass --dll to the linker, and not link + # crt.o which will require a WinMain@16 definition. + lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;; + *-*-mingw*) + # old mingw systems require "-dll" to link a DLL, while more recent ones + # require "-mdll" + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -mdll" + echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6 +echo "configure:1765: checking how to link DLLs" >&5 +if eval "test \"`echo '$''{'lt_cv_cc_dll_switch'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + lt_cv_cc_dll_switch=-mdll +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + lt_cv_cc_dll_switch=-dll +fi +rm -f conftest* +fi + +echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6 + CFLAGS="$SAVE_CFLAGS" ;; + esac + ;; + esac @@ -1611,7 +1883,7 @@ exec 5>>./config.log # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1615: checking for a BSD compatible install" >&5 +echo "configure:1887: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1665,7 +1937,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:1669: checking target system type" >&5 +echo "configure:1941: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -1730,7 +2002,7 @@ fi # Extract the first word of "sdl-config", so it can be a program name with args. set dummy sdl-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1734: checking for $ac_word" >&5 +echo "configure:2006: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1765,7 +2037,7 @@ fi min_sdl_version=$SDL_VERSION echo $ac_n "checking for SDL - version >= $min_sdl_version""... $ac_c" 1>&6 -echo "configure:1769: checking for SDL - version >= $min_sdl_version" >&5 +echo "configure:2041: checking for SDL - version >= $min_sdl_version" >&5 no_sdl="" if test "$SDL_CONFIG" = "no" ; then no_sdl=yes @@ -1789,13 +2061,13 @@ echo "configure:1769: checking for SDL - version >= $min_sdl_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < #include #include -#include +#include "SDL.h" char* my_strdup (char *str) @@ -1847,7 +2119,7 @@ int main () EOF -if { (eval echo configure:1851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1881,17 +2153,17 @@ fi CFLAGS="$CFLAGS $SDL_CFLAGS" LIBS="$LIBS $SDL_LIBS" cat > conftest.$ac_ext < -#include +#include "SDL.h" int main() { return 0; ; return 0; } EOF -if { (eval echo configure:1895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding SDL or finding the wrong" @@ -1984,10 +2256,10 @@ fi if test x$enable_music_mp3 = xyes; then echo $ac_n "checking for SMPEG headers and libraries""... $ac_c" 1>&6 -echo "configure:1988: checking for SMPEG headers and libraries" >&5 +echo "configure:2260: checking for SMPEG headers and libraries" >&5 have_smpeg=no cat > conftest.$ac_ext < @@ -1997,7 +2269,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* have_smpeg=yes @@ -2219,6 +2491,9 @@ s%@LD@%$LD%g s%@NM@%$NM%g s%@LN_S@%$LN_S%g s%@RANLIB@%$RANLIB%g +s%@DLLTOOL@%$DLLTOOL%g +s%@AS@%$AS%g +s%@OBJDUMP@%$OBJDUMP%g s%@LIBTOOL@%$LIBTOOL%g s%@target@%$target%g s%@target_alias@%$target_alias%g diff --git a/configure.in b/configure.in index d3566021..9cae5a54 100644 --- a/configure.in +++ b/configure.in @@ -13,9 +13,9 @@ dnl Set various version strings - taken gratefully from the GTk sources MAJOR_VERSION=1 MINOR_VERSION=0 -MICRO_VERSION=0 +MICRO_VERSION=1 INTERFACE_AGE=0 -BINARY_AGE=0 +BINARY_AGE=1 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION AC_SUBST(MAJOR_VERSION) @@ -43,6 +43,7 @@ dnl Check for tools AC_PROG_MAKE_SET AC_PROG_CC +AC_LIBTOOL_WIN32_DLL AM_PROG_LIBTOOL AC_PROG_INSTALL diff --git a/ltconfig b/ltconfig index 317d202c..59cd2fb3 100644 --- a/ltconfig +++ b/ltconfig @@ -170,7 +170,7 @@ progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'` PROGRAM=ltconfig PACKAGE=libtool VERSION=1.3c -TIMESTAMP=" (1.612 1999/09/30 00:26:50)" +TIMESTAMP=" (1.620 1999/10/07 15:40:07)" ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5' ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5' rm="rm -f" @@ -511,219 +511,28 @@ old_archive_cmds='$AR cru $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= -# Set a sane default for `AR'. +# Set sane defaults for various commands +# -- these are usually overridden from the command line by make test -z "$AR" && AR=ar - -# Set a sane default for `OBJDUMP'. -test -z "$OBJDUMP" && OBJDUMP=objdump - -# Set sane defaults for `DLLTOOL' -test -z "$DLLTOOL" && DLLTOOL=dlltool - -# Set sane defaults for `AS' -test -z "$AS" && AS=as - -# Check to see if we can use ln -s, or we need hard links. -echo $ac_n "checking whether ln -s works... $ac_c" 1>&6 -echo "$progname:528: checking for ln -s" 1>&5 -result=yes -if test "X${ac_cv_prog_LN_S+set}" = Xset; then - echo $ac_n "(cached) $ac_c" 1>&6 - if test "X$ac_cv_prog_LN_S" != "Xln -s"; then - result=no - fi -else - if test -n "$LN_S"; then - ac_cv_prog_LN_S="$LN_S" - else - $rm conftest.dat - if ln -s X conftest.dat 2>/dev/null; then - $rm conftest.dat - ac_cv_prog_LN_S="ln -s" - else - ac_cv_prog_LN_S=ln - result=no - fi - fi -fi -LN_S="$ac_cv_prog_LN_S" -echo "$ac_t""$result" 1>&6 - -# Search for a ranlib program -for ac_prog in "${ac_host_prefix}ranlib" ranlib : -do - echo $ac_n "checking for $ac_prog... $ac_c" 1>&6 - echo "$progname:556: checking for $ac_prog" 1>&5 - if test "X${ac_cv_prog_RANLIB+set}" = Xset; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. - else - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" - for dir in $PATH; do - test -z "$dir" && dir=. - if test -f $dir/$ac_prog || test -f $dir/$ac_prog$ac_exeext; then - ac_cv_prog_RANLIB="$ac_prog" - break - fi - done - IFS="$save_ifs" - fi - fi - if test -n "$ac_cv_prog_RANLIB"; then - RANLIB="$ac_cv_prog_RANLIB" - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" - old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" - echo "$ac_t$RANLIB" 1>&6 - else - echo "$ac_t""no" 1>&6 - fi - - test -n "$RANLIB" && break -done - -if test -z "$NM"; then - echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6 - case "$NM" in - [\\/]* | [A-Za-z]:[\\/]*) ;; # Let the user override the test with a path. - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" - for ac_dir in $PATH /usr/ucb /usr/ccs/bin /bin; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - NM="$ac_dir/nm -B" - break - elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - NM="$ac_dir/nm -p" - break - else - NM=${NM="$ac_dir/nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - fi - fi - done - IFS="$ac_save_ifs" - test -z "$NM" && NM=nm - ;; - esac - echo "$ac_t$NM" 1>&6 -fi - -# Search for a strip program -echo $ac_n "checking for strip... $ac_c" 1>&6 -echo "$progname:619: checking for strip" 1>&5 -if test "X${ac_cv_prog_STRIP+set}" = Xset; then - echo $ac_n "(cached) $ac_c" 1>&6 - result="$ac_cv_prog_STRIP" -else - if test -n "$STRIP"; then - result="$STRIP" # Let the user override the test. - ac_cv_prog_STRIP="$result" - else - result=no - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" - for dir in $PATH; do - test -z "$dir" && dir=. - if test -f $dir/strip || test -f $dir/strip$ac_exeext; then - result="strip" - ac_cv_prog_STRIP="$result" - break - fi - done - IFS="$save_ifs" - fi -fi -test -n "$ac_cv_prog_STRIP" && STRIP="$ac_cv_prog_STRIP" -echo "$ac_t$result" 1>&6 - -# Check to see if we are using GCC. -if test "$with_gcc" != yes || test -z "$CC"; then - # If CC is not set, then try to find GCC or a usable CC. - if test -z "$CC"; then - echo $ac_n "checking for gcc... $ac_c" 1>&6 - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" - for dir in $PATH; do - test -z "$dir" && dir=. - if test -f $dir/gcc || test -f $dir/gcc$ac_exeext; then - CC="gcc" - break - fi - done - IFS="$save_ifs" - - if test -n "$CC"; then - echo "$ac_t$CC" 1>&6 - else - echo "$ac_t"no 1>&6 - fi - fi - - # Not "gcc", so try "cc", rejecting "/usr/ucb/cc". - if test -z "$CC"; then - echo $ac_n "checking for cc... $ac_c" 1>&6 - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" - cc_rejected=no - for dir in $PATH; do - test -z "$dir" && dir=. - if test -f $dir/cc || test -f $dir/cc$ac_exeext; then - if test "$dir/cc" = "/usr/ucb/cc"; then - cc_rejected=yes - continue - fi - CC="cc" - break - fi - done - IFS="$save_ifs" - if test $cc_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $CC - shift - if test $# -gt 0; then - # We chose a different compiler from the bogus one. - # However, it has the same name, so the bogon will be chosen - # first if we set CC to just the name; use the full file name. - shift - set dummy "$dir/cc" "$@" - shift - CC="$@" - fi - fi - - if test -n "$CC"; then - echo "$ac_t$CC" 1>&6 - else - echo "$ac_t"no 1>&6 - fi - - if test -z "$CC"; then - echo "$progname: error: no acceptable cc found in \$PATH" 1>&2 - exit 1 - fi - fi - - # Now see if the compiler is really GCC. - with_gcc=no - echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6 - echo "$progname:713: checking whether we are using GNU C" >&5 - - $rm conftest.c - cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - with_gcc=yes - fi - $rm conftest.c - echo "$ac_t$with_gcc" 1>&6 -fi +test -z "$AS" && AS= +test -z "$DLLTOOL" && DLLTOOL= +test -z "$LN_S" && LN_S=ln -s +test -z "$NM" && NM=/usr/bin/nm -B +test -z "$OBJDUMP" && OBJDUMP= +test -z "$RANLIB" && RANLIB=ranlib + +# Commands probed in libtool.m4 +# -- let the user override the result from configure +test -z "$CC" && CC=gcc +test -z "$FILE" && FILE=file +test -z "$LD" && LD=/usr/bin/ld +test -z "$STRIP" && STRIP=strip + +# Other config vars probed in libtool.m4 +test -z "$with_gcc" && with_gcc=yes +test -z "$with_gnu_ld" && with_gnu_ld=yes +objext=o +exeext= echo $ac_n "checking for objdir... $ac_c" 1>&6 rm -f .libs 2>/dev/null @@ -737,70 +546,6 @@ fi rmdir .libs 2>/dev/null echo "$ac_t$objdir" 1>&6 -echo $ac_n "checking for object suffix... $ac_c" 1>&6 -echo "$progname:741: checking for object suffix" 1>&5 -if test "X${ac_cv_objext+set}" = Xset; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_cv_objext="no" - $rm conftest* - echo 'int i = 1;' > conftest.c - if { (eval echo $progname:748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then - # Append any warnings to the config.log. - cat conftest.err 1>&5 - - for ac_file in conftest.*; do - case $ac_file in - *.c | *.err) ;; - *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;; - esac - done - else - cat conftest.err 1>&5 - echo "$progname: failed program was:" >&5 - cat conftest.c >&5 - fi - $rm conftest* -fi -if test "X$ac_cv_objext" = Xno; then - objext="" -else - objext="$ac_cv_objext" -fi -echo "$ac_t$ac_cv_objext" 1>&6 - -echo $ac_n "checking for executable suffix... $ac_c" 1>&6 -echo "$progname:773: checking for executable suffix" 1>&5 -if test "X${ac_cv_exeext+set}" = Xset; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_cv_exeext="no" - $rm conftest* - echo 'main () { return 0; }' > conftest.c - if { (eval echo $progname:780: \"$ac_link\") 1>&5; (eval $ac_link) 2>conftest.err; }; then - # Append any warnings to the config.log. - cat conftest.err 1>&5 - - for ac_file in conftest.*; do - case $ac_file in - *.c | *.err | *.$objext ) ;; - *) ac_cv_exeext=.`echo $ac_file | sed -e s/conftest.//` ;; - esac - done - else - cat conftest.err 1>&5 - echo "$progname: failed program was:" >&5 - cat conftest.c >&5 - fi - $rm conftest* -fi -if test "X$ac_cv_exeext" = Xno; then - exeext="" -else - exeext="$ac_cv_exeext" -fi -echo "$ac_t$ac_cv_exeext" 1>&6 - # Allow CC to be a program name with arguments. set dummy $CC compiler="$2" @@ -809,7 +554,7 @@ compiler="$2" # in isolation, and that seeing it set (from the cache) indicates that # the associated values are set (in the cache) correctly too. echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6 -echo "$progname:812:checking for $compiler option to produce PIC" 1>&5 +echo "$progname:557:checking for $compiler option to produce PIC" 1>&5 if test "X${ac_cv_prog_cc_pic+set}" = Xset; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -825,7 +570,7 @@ else ac_cv_prog_cc_static='-static' case "$host_os" in - beos* | irix5* | irix6* | osf3* | osf4*) + beos* | irix5* | irix6* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; aix*) @@ -884,7 +629,7 @@ else ac_cv_prog_cc_pic='-DDLL_EXPORT' ;; - osf3* | osf4*) + osf3* | osf4* | osf5*) # All OSF/1 code is PIC. ac_cv_prog_cc_wl='-Wl,' ac_cv_prog_cc_static='-non_shared' @@ -939,7 +684,7 @@ else # Check to make sure the pic_flag actually works. echo $ac_n "checking if $compiler PIC flag $ac_cv_prog_cc_pic works... $ac_c" 1>&6 - echo "$progname:942:checking that $compiler PIC flag $ac_cv_prog_cc_pic works." 1>&5 + echo "$progname:687:checking that $compiler PIC flag $ac_cv_prog_cc_pic works." 1>&5 if test "X${ac_cv_prog_cc_pic_works+set}" = Xset; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -948,7 +693,7 @@ else echo "int some_variable = 0;" > conftest.c save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $ac_cv_prog_cc_pic -DPIC" - if { (eval echo $progname:951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then + if { (eval echo $progname:696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then # Append any warnings to the config.log. cat conftest.err 1>&5 @@ -1000,7 +745,7 @@ if test -n "$ac_cv_prog_cc_shlib"; then fi echo $ac_n "checking if $compiler static flag $ac_cv_prog_cc_static works... $ac_c" 1>&6 -echo "$progname:1003: checking if $compiler static flag $ac_cv_prog_cc_static works" >&5 +echo "$progname:748: checking if $compiler static flag $ac_cv_prog_cc_static works" >&5 if test "X${ac_cv_prog_cc_static_works+set}" = Xset; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1008,7 +753,7 @@ else echo 'main(){return(0);}' > conftest.c save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $ac_cv_prog_cc_static" - if { (eval echo $progname:1011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + if { (eval echo $progname:756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_static_works=yes else ac_cv_prog_cc_static_works=no @@ -1045,8 +790,8 @@ mkdir out chmod -w . save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -o out/conftest2.o" -echo "$progname:1048: checking if $compiler supports -c -o file.o" >&5 -if { (eval echo $progname:1049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then +echo "$progname:793: checking if $compiler supports -c -o file.o" >&5 +if { (eval echo $progname:794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -1078,8 +823,8 @@ if test x"$compiler_c_o" = x"yes"; then echo "int some_variable = 0;" > conftest.c save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -c -o conftest.lo" - echo "$progname:1081: checking if $compiler supports -c -o file.lo" >&5 -if { (eval echo $progname:1082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then + echo "$progname:826: checking if $compiler supports -c -o file.lo" >&5 +if { (eval echo $progname:827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -1130,8 +875,8 @@ if test "$with_gcc" = yes; then echo "int some_variable = 0;" > conftest.c save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c" - echo "$progname:1133: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 - if { (eval echo $progname:1134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then + echo "$progname:878: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 + if { (eval echo $progname:879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -1159,89 +904,6 @@ if test "$with_gcc" = yes; then fi -# Make sure LD is an absolute path. -if test -z "$LD"; then - ac_prog=ld - if test "$with_gcc" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6 - echo "$progname:1168: checking for ld used by GCC" >&5 - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case "$ac_prog" in - # Accept absolute paths. - [\\/]* | [A-Za-z]:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the path of ld - ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we are not using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac - elif test "$with_gnu_ld" = yes; then - echo $ac_n "checking for GNU ld... $ac_c" 1>&6 - echo "$progname:1198: checking for GNU ld" >&5 - else - echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 - echo "$progname:1201: checking for non-GNU ld" >&5 - fi - - if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - if "$LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then - test "$with_gnu_ld" != no && break - else - test "$with_gnu_ld" != yes && break - fi - fi - done - IFS="$ac_save_ifs" - fi - - if test -n "$LD"; then - echo "$ac_t$LD" 1>&6 - else - echo "$ac_t"no 1>&6 - fi - - if test -z "$LD"; then - echo "$progname: error: no acceptable ld found in \$PATH" 1>&2 - exit 1 - fi -fi - -# Check to see if it really is or is not GNU ld. -echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6 -# I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 &5; then - with_gnu_ld=yes -else - with_gnu_ld=no -fi -echo "$ac_t$with_gnu_ld" 1>&6 - # See if the linker supports building shared libraries. echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6 @@ -1334,7 +996,7 @@ EOF beos*) if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported + #allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $linker_flags ${wl}-soname $wl$soname -o $lib' @@ -1631,7 +1293,7 @@ else old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def' ;; - osf3* | osf4*) + osf3* | osf4* | osf5*) if test "$with_gcc" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' @@ -1667,17 +1329,6 @@ else link_all_deplibs=yes ;; - sysv5*) - no_undefined_flag=' -z text' - # $CC -shared without GNU ld will not create a library from C++ - # object files and a static libstdc++, better avoid it by now - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp' - hardcode_libdir_flag_spec= - hardcode_shlibpath_var=no - ;; - sunos4*) archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' @@ -1699,12 +1350,16 @@ else export_dynamic_flag_spec='-Bexport' ;; - sysv5) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs -$linker_flags' - runpath_var='LD_RUN_PATH' + sysv5*) + no_undefined_flag=' -z text' + # $CC -shared without GNU ld will not create a library from C++ + # object files and a static libstdc++, better avoid it by now + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + hardcode_libdir_flag_spec= hardcode_shlibpath_var=no - hardcode_direct=no + runpath_var='LD_RUN_PATH' ;; uts4*) @@ -1801,7 +1456,7 @@ version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -file_magic_cmd= +file_magic_cmd="$FILE" file_magic_test_file= deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support @@ -1861,7 +1516,6 @@ bsdi4*) finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - file_magic_cmd=/usr/bin/file file_magic_test_file=/shlib/libc.so sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" @@ -1881,7 +1535,9 @@ cygwin* | mingw*) library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib' fi dynamic_linker='Win32 ld.exe' - deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + # FIXME: mingw32 cross-compiler doesn't see shared versions of libs + #deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + deplibs_check_method=pass_all file_magic_cmd='${OBJDUMP} -f' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH @@ -1977,9 +1633,8 @@ irix5* | irix6*) shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - file_magic_cmd=/usr/bin/file file_magic_test_file=`echo /lib${libsuff}/libc.so*` - deplibs_check_method='pass_all' + deplibs_check_method=pass_all ;; # No shared lib support for Linux oldld, aout, or coff. @@ -1999,13 +1654,12 @@ linux-gnu*) shlibpath_overrides_runpath=no case "$host_cpu" in - alpha* | i*86 | sparc* ) + alpha* | i*86 | sparc* | powerpc* ) deplibs_check_method=pass_all ;; *) # glibc up to 2.1.1 does not perform some relocations on ARM deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; esac - file_magic_cmd=/usr/bin/file file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` if test -f /lib/ld.so.1; then @@ -2052,7 +1706,7 @@ os2*) shlibpath_var=LIBPATH ;; -osf3* | osf4*) +osf3* | osf4* | osf5*) version_type=osf need_version=no soname_spec='${libname}${release}.so' @@ -2060,9 +1714,8 @@ osf3* | osf4*) shlibpath_var=LD_LIBRARY_PATH # this will be overridden with pass_all, but let us keep it just in case deplibs_check_method='file_magic COFF format alpha shared library' - file_magic_cmd=/usr/bin/file file_magic_test_file=/shlib/libc.so - deplibs_check_method='pass_all' + deplibs_check_method=pass_all sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; @@ -2086,7 +1739,6 @@ solaris*) # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' deplibs_check_method=pass_all - file_magic_cmd=/usr/bin/file file_magic_test_file=/lib/libc.so ;; @@ -2109,7 +1761,7 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) shlibpath_var=LD_LIBRARY_PATH case "$host_vendor" in ncr) - deplibs_check_method='pass_all' + deplibs_check_method=pass_all ;; motorola) need_lib_prefix=no @@ -2117,7 +1769,6 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - file_magic_cmd=/usr/bin/file file_magic_test_file=`echo /usr/lib/libc.so*` ;; esac @@ -2221,11 +1872,11 @@ void nm_test_func(){} main(){nm_test_var='a';nm_test_func();return(0);} EOF - echo "$progname:2224: checking if global_symbol_pipe works" >&5 - if { (eval echo $progname:2225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then + echo "$progname:1873: checking if global_symbol_pipe works" >&5 + if { (eval echo $progname:1874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then # Now try to grab the symbols. nlist=conftest.nm - if { echo "$progname:2228: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then + if { echo "$progname:1877: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then @@ -2277,7 +1928,7 @@ EOF save_CFLAGS="$CFLAGS" LIBS="conftstm.$objext" CFLAGS="$CFLAGS$no_builtin_flag" - if { (eval echo $progname:2280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + if { (eval echo $progname:1929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then pipe_works=yes else echo "$progname: failed program was:" >&5 @@ -2330,7 +1981,7 @@ cygwin* | mingw* | os2*) ;; esac -if test -n "$file_magic_test_file" && test -n "$file_magic_cmd"; then +if test -n "$file_magic_test_file"; then case "$deplibs_check_method" in "file_magic "*) file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" @@ -2410,14 +2061,14 @@ else if test "X${lt_cv_dlopen+set}" != Xset; then lt_cv_dlopen=no lt_cv_dlopen_libs= echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "$progname:2413: checking for dlopen in -ldl" >&5 +echo "$progname:2062: checking for dlopen in -ldl" >&5 if test "X${ac_cv_lib_dl_dlopen+set}" = Xset; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo $progname:2079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_lib_dl_dlopen=yes else @@ -2446,12 +2097,12 @@ if test "X$ac_cv_lib_dl_dlopen" = Xyes; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dlopen""... $ac_c" 1>&6 -echo "$progname:2449: checking for dlopen" >&5 +echo "$progname:2098: checking for dlopen" >&5 if test "X${ac_cv_func_dlopen+set}" = Xset; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -2473,7 +2124,7 @@ dlopen(); ; return 0; } EOF -if { (eval echo $progname:2476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo $progname:2125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_dlopen=yes else @@ -2490,14 +2141,14 @@ if test "X$ac_cv_func_dlopen" = Xyes; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6 -echo "$progname:2493: checking for dld_link in -ldld" >&5 +echo "$progname:2142: checking for dld_link in -ldld" >&5 if test "X${ac_cv_lib_dld_dld_link+set}" = Xset; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo $progname:2159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_lib_dld_dld_link=yes else @@ -2526,12 +2177,12 @@ if test "X$ac_cv_lib_dld_dld_link" = Xyes; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for shl_load""... $ac_c" 1>&6 -echo "$progname:2529: checking for shl_load" >&5 +echo "$progname:2178: checking for shl_load" >&5 if test "X${ac_cv_func_shl_load+set}" = Xset; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -2553,7 +2204,7 @@ shl_load(); ; return 0; } EOF -if { (eval echo $progname:2556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo $progname:2205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_shl_load=yes else @@ -2571,14 +2222,14 @@ if test "X$ac_cv_func_shl_load" = Xyes; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "$progname:2574: checking for shl_load in -ldld" >&5 +echo "$progname:2223: checking for shl_load in -ldld" >&5 if test "X${ac_cv_lib_dld_shl_load+set}" = Xset; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo $progname:2241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_lib_dld_shl_load=yes else @@ -2632,17 +2283,17 @@ fi for ac_hdr in dlfcn.h; do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "$progname:2635: checking for $ac_hdr" >&5 +echo "$progname:2284: checking for $ac_hdr" >&5 if eval "test \"`echo 'X$''{'ac_cv_header_$ac_safe'+set}'`\" = Xset"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int fnord = 0; EOF ac_try="$ac_compile conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo $progname:2645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo $progname:2294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2670,7 +2321,7 @@ done LIBS="$lt_cv_dlopen_libs $LIBS" echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 -echo "$progname:2673: checking whether a program can dlopen itself" >&5 +echo "$progname:2322: checking whether a program can dlopen itself" >&5 if test "X${lt_cv_dlopen_self+set}" = Xset; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2678,7 +2329,7 @@ else lt_cv_dlopen_self=cross else cat > conftest.c < @@ -2724,7 +2375,7 @@ main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } EOF -if { (eval echo $progname:2727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo $progname:2376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then lt_cv_dlopen_self=yes else @@ -2743,7 +2394,7 @@ echo "$ac_t""$lt_cv_dlopen_self" 1>&6 if test "$lt_cv_dlopen_self" = yes; then LDFLAGS="$LDFLAGS $link_static_flag" echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 -echo "$progname:2746: checking whether a statically linked program can dlopen itself" >&5 +echo "$progname:2395: checking whether a statically linked program can dlopen itself" >&5 if test "X${lt_cv_dlopen_self_static+set}" = Xset; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2751,7 +2402,7 @@ else lt_cv_dlopen_self_static=cross else cat > conftest.c < @@ -2797,7 +2448,7 @@ main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } EOF -if { (eval echo $progname:2800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo $progname:2449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then lt_cv_dlopen_self_static=yes else @@ -2892,7 +2543,7 @@ case "$ltmain" in # NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh. # # Copyright (C) 1996-1999 Free Software Foundation, Inc. -# Gordon Matzigkeit , 1996 +# Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/ltmain.sh b/ltmain.sh index 1b97f6cb..77fa7de8 100644 --- a/ltmain.sh +++ b/ltmain.sh @@ -55,7 +55,7 @@ modename="$progname" PROGRAM=ltmain.sh PACKAGE=libtool VERSION=1.3c -TIMESTAMP=" (1.612 1999/09/30 00:26:50)" +TIMESTAMP=" (1.620 1999/10/07 15:40:07)" default_mode= help="Try \`$progname --help' for more information." @@ -682,6 +682,7 @@ compiler." libobjs= ltlibs= module=no + no_install=no objs= prefer_static_libs=no preload=no @@ -963,6 +964,22 @@ compiler." continue ;; + -no-install) + case "$host" in + *-*-cygwin* | *-*-mingw* | *-*-os2*) + # The PATH hackery in wrapper scripts is required on Windows + # in order for the loader to find any dlls it needs. + $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 + $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 + fast_install=no + ;; + *) + no_install=yes + ;; + esac + continue + ;; + -no-undefined) allow_undefined=no continue @@ -1240,24 +1257,23 @@ compiler." linkmode=prog ;; esac - if test $linkmode = lib || test $linkmode = prog; then - output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` - if test "X$output_objdir" = "X$output"; then - output_objdir="$objdir" - else - output_objdir="$output_objdir/$objdir" - fi + output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` + if test "X$output_objdir" = "X$output"; then + output_objdir="$objdir" + else + output_objdir="$output_objdir/$objdir" + fi - # Create the object directory. - if test ! -d $output_objdir; then - $show "$mkdir $output_objdir" - $run $mkdir $output_objdir - status=$? - if test $status -ne 0 && test ! -d $output_objdir; then - exit $status - fi + # Create the object directory. + if test ! -d $output_objdir; then + $show "$mkdir $output_objdir" + $run $mkdir $output_objdir + status=$? + if test $status -ne 0 && test ! -d $output_objdir; then + exit $status fi - else + fi + if test $linkmode != lib && test $linkmode != prog; then # Find libtool convenience libraries for deplib in $deplibs; do case "$deplib" in @@ -3381,6 +3397,19 @@ static const void *lt_preloaded_setup() { fi fi + if test "$no_install" = yes; then + # We don't need to create a wrapper script. + link_command="$compile_var$compile_command$compile_rpath" + # Replace the output file specification. + link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $run $rm $output + # Link the executable and exit + $show "$link_command" + $run eval "$link_command" || exit $? + exit 0 + fi + if test "$hardcode_action" = relink || test "$hardcode_into_libs" = yes; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" @@ -3549,7 +3578,7 @@ else fi" else echo >> $output "\ - program='$outputname$exeext' + program='$outputname' progdir=\"\$thisdir/$objdir\" " fi @@ -4754,6 +4783,8 @@ The following components of LINK-COMMAND are treated specially: -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened + -no-fast-install disable the fast-install mode + -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -release RELEASE specify package release information diff --git a/mixer.c b/mixer.c index e209a516..3a0f274c 100644 --- a/mixer.c +++ b/mixer.c @@ -56,6 +56,10 @@ static int num_channels; static int reserved_channels = 0; +/* Support for hooking into the mixer callback system */ +static void (*mix_postmix)(void *udata, Uint8 *stream, int len) = NULL; +void *mix_postmix_data = NULL; + /* Support for user defined music functions, plus the default one */ extern int music_active; extern void music_mixer(void *udata, Uint8 *stream, int len); @@ -133,6 +137,9 @@ static void mix_channels(void *udata, Uint8 *stream, int len) } } } + if ( mix_postmix ) { + mix_postmix(mix_postmix_data, stream, len); + } SDL_mutexV(mixer_lock); } @@ -384,6 +391,19 @@ void Mix_FreeChunk(Mix_Chunk *chunk) } } +/* Set a function that is called after all mixing is performed. + This can be used to provide real-time visual display of the audio stream + or add a custom mixer filter for the stream data. +*/ +void Mix_SetPostMix(void (*mix_func) + (void *udata, Uint8 *stream, int len), void *arg) +{ + SDL_LockAudio(); + mix_postmix_data = arg; + mix_postmix = mix_func; + SDL_UnlockAudio(); +} + /* Add your own music player or mixer function. If 'mix_func' is NULL, the default music player is re-enabled. */ diff --git a/mixer.h b/mixer.h index fd93970d..43717837 100644 --- a/mixer.h +++ b/mixer.h @@ -93,11 +93,18 @@ extern Mix_Chunk *Mix_QuickLoad_WAV(Uint8 *mem); extern void Mix_FreeChunk(Mix_Chunk *chunk); extern void Mix_FreeMusic(Mix_Music *music); +/* Set a function that is called after all mixing is performed. + This can be used to provide real-time visual display of the audio stream + or add a custom mixer filter for the stream data. +*/ +extern void Mix_SetPostMix(void (*mix_func) + (void *udata, Uint8 *stream, int len), void *arg); + /* Add your own music player or additional mixer function. If 'mix_func' is NULL, the default music player is re-enabled. */ -extern void Mix_HookMusic(void (*mix_func)(void *udata, Uint8 *stream, int len), - void *arg); +extern void Mix_HookMusic(void (*mix_func) + (void *udata, Uint8 *stream, int len), void *arg); /* Get a pointer to the user data for the current music hook */ extern void *Mix_GetMusicHookData(void); diff --git a/music.c b/music.c index d2fb41de..4aab5dd5 100644 --- a/music.c +++ b/music.c @@ -1,25 +1,25 @@ /* - MIXERLIB: An audio mixer library based on the SDL library - Copyright (C) 1997-1999 Sam Lantinga - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Sam Lantinga - 5635-34 Springhouse Dr. - Pleasanton, CA 94588 (USA) - slouken@devolution.com + MIXERLIB: An audio mixer library based on the SDL library + Copyright (C) 1997-1999 Sam Lantinga + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Sam Lantinga + 5635-34 Springhouse Dr. + Pleasanton, CA 94588 (USA) + slouken@devolution.com */ #include @@ -117,9 +117,9 @@ void music_mixer(void *udata, Uint8 *stream, int len) /* Handle fading */ if ( music_playing->fading != MIX_NO_FADING ) { if ( music_playing->fade_step++ < music_playing->fade_steps ) { - int fade_volume = music_playing->fade_volume; - int fade_step = music_playing->fade_step; - int fade_steps = music_playing->fade_steps; + int fade_volume = music_playing->fade_volume; + int fade_step = music_playing->fade_step; + int fade_steps = music_playing->fade_steps; if ( music_playing->fading == MIX_FADING_OUT ) { Mix_VolumeMusic((fade_volume * (fade_steps-fade_step)) @@ -190,8 +190,8 @@ void music_mixer(void *udata, Uint8 *stream, int len) break; #endif #ifdef MP3_MUSIC - case MUS_MP3: - SMPEG_playAudio(music_playing->data.mp3, stream, len); + case MUS_MP3: + SMPEG_playAudio(music_playing->data.mp3, stream, len); break; #endif default: @@ -242,29 +242,29 @@ int open_music(SDL_AudioSpec *mixer) break; default: { - SDL_SetError("Unknown hardware audio format"); + Mix_SetError("Unknown hardware audio format"); ++music_error; } } if ( mixer->channels > 1 ) { if ( mixer->channels > 2 ) { - SDL_SetError("Hardware uses more channels than mixer"); + Mix_SetError("Hardware uses more channels than mixer"); ++music_error; } md_mode |= DMODE_STEREO; } - samplesize = mixer->size/mixer->samples; - md_mixfreq = mixer->freq; - md_device = 0; - md_volume = 96; + samplesize = mixer->size/mixer->samples; + md_mixfreq = mixer->freq; + md_device = 0; + md_volume = 96; md_musicvolume = 128; md_sndfxvolume = 128; - md_pansep = 128; - md_reverb = 0; + md_pansep = 128; + md_reverb = 0; MikMod_RegisterAllLoaders(); MikMod_RegisterAllDrivers(); if ( MikMod_Init() ) { - SDL_SetError("%s", _mm_errmsg[_mm_errno]); + Mix_SetError("%s", _mm_errmsg[_mm_errno]); ++music_error; } #endif @@ -287,8 +287,8 @@ int open_music(SDL_AudioSpec *mixer) } Mix_VolumeMusic(SDL_MIX_MAXVOLUME); - /* Calculate the number of ms for each callback */ - ms_per_step = ((float)mixer->samples * 1000.0) / mixer->freq; + /* Calculate the number of ms for each callback */ + ms_per_step = ((float)mixer->samples * 1000.0) / mixer->freq; return(0); } @@ -306,7 +306,7 @@ Mix_Music *Mix_LoadMUS(const char *file) if ( fp != NULL ) { fclose(fp); } - SDL_SetError("Couldn't read from '%s'", file); + Mix_SetError("Couldn't read from '%s'", file); return(NULL); } magic[4] = '\0'; @@ -315,7 +315,7 @@ Mix_Music *Mix_LoadMUS(const char *file) /* Allocate memory for the music structure */ music = (Mix_Music *)malloc(sizeof(Mix_Music)); if ( music == NULL ) { - SDL_SetError("Out of memory"); + Mix_SetError("Out of memory"); return(NULL); } music->error = 0; @@ -348,12 +348,12 @@ Mix_Music *Mix_LoadMUS(const char *file) if ( timidity_ok ) { music->data.midi = Timidity_LoadSong((char *)file); if ( music->data.midi == NULL ) { - SDL_SetError("%s", Timidity_Error()); + Mix_SetError("%s", Timidity_Error()); music->error = 1; } } else { - SDL_SetError("%s", Timidity_Error()); + Mix_SetError("%s", Timidity_Error()); music->error = 1; } } else @@ -364,7 +364,7 @@ Mix_Music *Mix_LoadMUS(const char *file) music->type = MUS_MP3; music->data.mp3 = SMPEG_new(file, &info, 0); if(!info.has_audio){ - SDL_SetError("MPEG file does not have any audio stream."); + Mix_SetError("MPEG file does not have any audio stream."); music->error = 1; }else{ SMPEG_actualSpec(music->data.mp3, &used_mixer); @@ -376,13 +376,13 @@ Mix_Music *Mix_LoadMUS(const char *file) music->type = MUS_MOD; music->data.module = MikMod_LoadSong((char *)file, 64); if ( music->data.module == NULL ) { - SDL_SetError("%s", _mm_errmsg[_mm_errno]); + Mix_SetError("%s", _mm_errmsg[_mm_errno]); music->error = 1; } } else #endif { - SDL_SetError("Unrecognized music format"); + Mix_SetError("Unrecognized music format"); music->error = 1; } if ( music->error ) { @@ -428,7 +428,7 @@ void Mix_FreeMusic(Mix_Music *music) break; #endif #ifdef MP3_MUSIC - case MUS_MP3: + case MUS_MP3: SMPEG_delete(music->data.mp3); break; #endif @@ -472,7 +472,7 @@ static int lowlevel_play(Mix_Music *music) break; #endif #ifdef MP3_MUSIC - case MUS_MP3: + case MUS_MP3: SMPEG_enableaudio(music->data.mp3,1); SMPEG_enablevideo(music->data.mp3,0); SMPEG_setvolume(music->data.mp3,((float)music_volume/(float)MIX_MAX_VOLUME)*100.0); @@ -501,7 +501,7 @@ int Mix_PlayMusic(Mix_Music *music, int loops) if ( lowlevel_play(music) < 0 ) { return(-1); - } + } music_active = 1; music_stopped = 0; music_loops = loops; @@ -518,7 +518,7 @@ int Mix_FadeInMusic(Mix_Music *music, int loops, int ms) music_volume = 0; if ( Mix_PlayMusic(music, loops) < 0 ) { return(-1); - } + } music_playing->fade_step = 0; music_playing->fade_steps = ms/ms_per_step; music_playing->fading = MIX_FADING_IN; @@ -631,12 +631,13 @@ int Mix_HaltMusic(void) /* Progressively stop the music */ int Mix_FadeOutMusic(int ms) { - if ( music_playing && !music_stopped && (music_playing->fading == MIX_NO_FADING) ) { + if ( music_playing && !music_stopped && + (music_playing->fading == MIX_NO_FADING) ) { if ( music_volume > 0 ) { music_playing->fading = MIX_FADING_OUT; music_playing->fade_volume = music_volume; - music_playing->fade_step = 0; - music_playing->fade_steps = ms/ms_per_step; + music_playing->fade_step = 0; + music_playing->fade_steps = ms/ms_per_step; return(1); } }