Do not force math library usage beforce checking its presence.
authorPatrice Mandin <patmandin@gmail.com>
Mon, 26 Oct 2009 18:08:09 +0000
changeset 4649a6369a63488
parent 463 47c9366cede1
child 465 9e6cc9037caf
Do not force math library usage beforce checking its presence.
configure.in
     1.1 --- a/configure.in	Mon Oct 26 11:58:29 2009 +0000
     1.2 +++ b/configure.in	Mon Oct 26 18:08:09 2009 +0000
     1.3 @@ -173,6 +173,9 @@
     1.4  EXTRA_CFLAGS="$EXTRA_CFLAGS $SDL_CFLAGS"
     1.5  EXTRA_LDFLAGS="$EXTRA_LDFLAGS $SDL_LIBS"
     1.6  
     1.7 +dnl Check for math library
     1.8 +AC_CHECK_LIB(m, pow, [LIBM="-lm"])
     1.9 +
    1.10  dnl Check command-line options
    1.11  
    1.12  AC_ARG_ENABLE([music-cmd],
    1.13 @@ -321,7 +324,7 @@
    1.14  if test x$enable_music_ogg = xyes; then
    1.15      if test x$enable_music_ogg_tremor = xyes; then
    1.16          AC_CHECK_HEADER([tremor/ivorbisfile.h], [have_tremor_hdr=yes])
    1.17 -        AC_CHECK_LIB([vorbisidec], [ov_open_callbacks], [have_tremor_lib=yes], [have_tremor_lib=no], [-lvorbis -logg -lm])
    1.18 +        AC_CHECK_LIB([vorbisidec], [ov_open_callbacks], [have_tremor_lib=yes], [have_tremor_lib=no], [-lvorbis -logg $LIBM])
    1.19          if test x$have_tremor_hdr = xyes -a x$have_tremor_lib = xyes; then
    1.20              case "$host" in
    1.21                  *-*-darwin*)
    1.22 @@ -349,7 +352,7 @@
    1.23                  echo "-- dynamic libvorbisidec -> $ogg_lib"
    1.24                  EXTRA_CFLAGS="$EXTRA_CFLAGS -DOGG_DYNAMIC=\\\"$ogg_lib\\\""
    1.25              else
    1.26 -                EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvorbisidec"
    1.27 +                EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvorbisidec -lvorbis -logg $LIBM"
    1.28              fi
    1.29          else
    1.30              AC_MSG_WARN([*** Unable to find Ogg Vorbis Tremor library (http://www.xiph.org/)])
    1.31 @@ -357,7 +360,7 @@
    1.32          fi
    1.33      else
    1.34          AC_CHECK_HEADER([vorbis/vorbisfile.h], [have_ogg_hdr=yes])
    1.35 -        AC_CHECK_LIB([vorbisfile], [ov_open_callbacks], [have_ogg_lib=yes], [have_ogg_lib=no], [-lvorbis -logg -lm])
    1.36 +        AC_CHECK_LIB([vorbisfile], [ov_open_callbacks], [have_ogg_lib=yes], [have_ogg_lib=no], [-lvorbis -logg $LIBM])
    1.37          if test x$have_ogg_hdr = xyes -a x$have_ogg_lib = xyes; then
    1.38              case "$host" in
    1.39                  *-*-darwin*)
    1.40 @@ -379,7 +382,7 @@
    1.41                  echo "-- dynamic libvorbisfile -> $ogg_lib"
    1.42                  EXTRA_CFLAGS="$EXTRA_CFLAGS -DOGG_DYNAMIC=\\\"$ogg_lib\\\""
    1.43              else
    1.44 -                EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvorbisfile -lvorbis -logg"
    1.45 +                EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvorbisfile -lvorbis -logg $LIBM"
    1.46              fi
    1.47          else
    1.48              AC_MSG_WARN([*** Unable to find Ogg Vorbis library (http://www.xiph.org/)])