Skip to content

Commit

Permalink
Work in progress, dynamically loading SMPEG
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed May 12, 2006
1 parent cfc2b7b commit 4b6fee0
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES
@@ -1,4 +1,6 @@
1.2.7:
Sam Lantinga - Fri May 12 00:04:32 PDT 2006
* Added support for dynamically loading SMPEG library
Sam Lantinga - Thu May 11 22:22:43 PDT 2006
* Added support for dynamically loading Ogg Vorbis library
Sam Lantinga - Sun Apr 30 09:01:44 PDT 2006
Expand Down
25 changes: 24 additions & 1 deletion configure.in
Expand Up @@ -264,8 +264,31 @@ if test x$enable_music_mp3 = xyes; then
SMPEG_VERSION=0.4.3
AM_PATH_SMPEG($SMPEG_VERSION, have_smpeg=yes, have_smpeg=no)
if test x$have_smpeg = xyes; then
AC_ARG_ENABLE([music-mp3-shared],
AC_HELP_STRING([--enable-music-mp3-shared], [dynamically load MP3 support [[default=no]]]),
[], [enable_music_mp3_shared=no])
case "$host" in
*-*-darwin*)
smpeg_lib=''
;;
*-*-cygwin* | *-*-mingw32*)
smpeg_lib='smpeg.dll'
;;
*)
for path in /usr/lib /usr/local/lib; do
if test x$smpeg_lib = x; then
smpeg_lib=[`ls -- $path/libsmpeg*.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
fi
done
;;
esac
EXTRA_CFLAGS="$EXTRA_CFLAGS -DMP3_MUSIC $SMPEG_CFLAGS"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $SMPEG_LIBS"
if test x$enable_music_mp3_shared = xyes && test x$smpeg_lib != x; then
echo "-- dynamic libsmpeg -> $smpeg_lib"
EXTRA_CFLAGS="$EXTRA_CFLAGS -DMP3_DYNAMIC=\\\"$smpeg_lib\\\""
else
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $SMPEG_LIBS"
fi
fi
fi

Expand Down

0 comments on commit 4b6fee0

Please sign in to comment.