[vlc-commits] configure: simplify checks for libm

Rémi Denis-Courmont git at videolan.org
Tue Jul 26 17:05:39 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Jul 26 18:03:02 2011 +0300| [7fe3cfeea280e494b4f99662d9962b17131a9691] | committer: Rémi Denis-Courmont

configure: simplify checks for libm

We do not need to care which functions are in the math library. We only
need to care whether libm actually exists and can be linked against.

And by the way, lets define @LIBM@ for makefiles.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7fe3cfeea280e494b4f99662d9962b17131a9691
---

 configure.ac |   26 +++++---------------------
 1 files changed, 5 insertions(+), 21 deletions(-)

diff --git a/configure.ac b/configure.ac
index 97785f8..940206e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -678,29 +678,13 @@ AC_CHECK_FUNC(getopt_long,, [
 ])
 AC_SUBST(GNUGETOPT_LIBS)
 
-if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then
 AC_CHECK_LIB(m,cos,[
-  VLC_ADD_LIBS([adjust wave ripple psychedelic gradient a52tofloat32 dtstofloat32 x264 goom visual panoramix rotate noise grain scene kate flac lua chorus_flanger freetype],[-lm])
-])
-AC_CHECK_LIB(m,pow,[
-  VLC_ADD_LIBS([avcodec avformat access_avio swscale postproc i420_rgb faad twolame equalizer spatializer param_eq libvlccore freetype mod mpc dmo quicktime realvideo qt4],[-lm])
-])
-AC_CHECK_LIB(m,sqrt,[
-  VLC_ADD_LIBS([compressor headphone_channel_mixer normvol audiobargraph_a speex mono colorthres extract ball],[-lm])
-])
-AC_CHECK_LIB(m,ceil,[
-  VLC_ADD_LIBS([access_imem hotkeys mosaic],[-lm])
-])
-AC_CHECK_LIB(m,exp,[
-  VLC_ADD_LIBS([gaussianblur],[-lm])
-])
-AC_CHECK_LIB(m,round,[
-  VLC_ADD_LIBS([dbus],[-lm])
-])
-AC_CHECK_LIB(m,sqrtf,[
-  VLC_ADD_LIBS([x264],[-lm])
+  VLC_ADD_LIBS([adjust wave ripple psychedelic gradient a52tofloat32 dtstofloat32 x264 goom visual panoramix rotate noise grain scene kate flac lua chorus_flanger freetype avcodec avformat access_avio swscale postproc i420_rgb faad twolame equalizer spatializer param_eq libvlccore freetype mod mpc dmo quicktime realvideo qt4 compressor headphone_channel_mixer normvol audiobargraph_a speex mono colorthres extract ball access_imem hotkeys mosaic gaussianblur dbus x264],[-lm])
+  LIBM="-lm"
+], [
+  LIBM=""
 ])
-fi # end "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"
+AC_SUBST(LIBM)
 
 AC_CHECK_LIB(m,lrintf, [
   AC_DEFINE(HAVE_LRINTF, 1, [Define to 1 if you have the lrintf function])



More information about the vlc-commits mailing list