configure.in
changeset 313 db79bfffb09b
parent 312 8a536296ef3d
child 314 8c791a6ba872
     1.1 --- a/configure.in	Fri May 12 06:14:15 2006 +0000
     1.2 +++ b/configure.in	Fri May 12 08:31:36 2006 +0000
     1.3 @@ -264,8 +264,31 @@
     1.4      SMPEG_VERSION=0.4.3
     1.5      AM_PATH_SMPEG($SMPEG_VERSION, have_smpeg=yes, have_smpeg=no)
     1.6      if test x$have_smpeg = xyes; then
     1.7 +        AC_ARG_ENABLE([music-mp3-shared],
     1.8 +AC_HELP_STRING([--enable-music-mp3-shared], [dynamically load MP3 support [[default=no]]]),
     1.9 +                      [], [enable_music_mp3_shared=no])
    1.10 +        case "$host" in
    1.11 +            *-*-darwin*)
    1.12 +                smpeg_lib=''
    1.13 +                ;;
    1.14 +            *-*-cygwin* | *-*-mingw32*)
    1.15 +                smpeg_lib='smpeg.dll'
    1.16 +                ;;
    1.17 +            *)
    1.18 +                for path in /usr/lib /usr/local/lib; do
    1.19 +                    if test x$smpeg_lib = x; then
    1.20 +                        smpeg_lib=[`ls -- $path/libsmpeg*.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
    1.21 +                    fi
    1.22 +                done
    1.23 +                ;;
    1.24 +        esac
    1.25          EXTRA_CFLAGS="$EXTRA_CFLAGS -DMP3_MUSIC $SMPEG_CFLAGS"
    1.26 -        EXTRA_LDFLAGS="$EXTRA_LDFLAGS $SMPEG_LIBS"
    1.27 +        if test x$enable_music_mp3_shared = xyes && test x$smpeg_lib != x; then
    1.28 +            echo "-- dynamic libsmpeg -> $smpeg_lib"
    1.29 +            EXTRA_CFLAGS="$EXTRA_CFLAGS -DMP3_DYNAMIC=\\\"$smpeg_lib\\\""
    1.30 +        else
    1.31 +            EXTRA_LDFLAGS="$EXTRA_LDFLAGS $SMPEG_LIBS"
    1.32 +        fi
    1.33      fi
    1.34  fi
    1.35