[MPlayer-cvslog] r36494 - trunk/configure

reimar subversion at mplayerhq.hu
Sat Oct 26 23:30:18 CEST 2013


Author: reimar
Date: Sat Oct 26 23:30:17 2013
New Revision: 36494

Log:
Fix configure for cases when libm is not available.

This seems to be the case for e.g. Haiku.
Admittedly supporting such different-for-no-good-reason
setups is a bit questionable, but it's not much effort
in this case.

Modified:
   trunk/configure

Modified: trunk/configure
==============================================================================
--- trunk/configure	Sat Oct 26 12:23:03 2013	(r36493)
+++ trunk/configure	Sat Oct 26 23:30:17 2013	(r36494)
@@ -58,9 +58,9 @@ compile_check() {
   echo >> "$TMPLOG"
   cat "$source" >> "$TMPLOG"
   echo >> "$TMPLOG"
-  echo "$_cc $WARNFLAGS $WARN_CFLAGS $CFLAGS $source $extra_cflags $ld_static $extra_ldflags $libs_mplayer $libs_mencoder -o $TMPEXE $@ -lm" >> "$TMPLOG"
+  echo "$_cc $WARNFLAGS $WARN_CFLAGS $CFLAGS $source $extra_cflags $ld_static $extra_ldflags $libs_mplayer $libs_mencoder -o $TMPEXE $@ $libm" >> "$TMPLOG"
   rm -f "$TMPEXE"
-  $_cc $WARNFLAGS $WARN_CFLAGS $CFLAGS "$source" $extra_cflags $ld_static $extra_ldflags $libs_mplayer $libs_mencoder -o "$TMPEXE" "$@" -lm >> "$TMPLOG" 2>&1
+  $_cc $WARNFLAGS $WARN_CFLAGS $CFLAGS "$source" $extra_cflags $ld_static $extra_ldflags $libs_mplayer $libs_mencoder -o "$TMPEXE" "$@" $libm >> "$TMPLOG" 2>&1
   TMPRES="$?"
   echo >> "$TMPLOG"
   echo >> "$TMPLOG"
@@ -1798,6 +1798,8 @@ echocheck "working compiler"
 cflag_check "" || die "Compiler is not functioning correctly. Check your installation and custom CFLAGS $CFLAGS ."
 echo "yes"
 
+cflag_check "-lm" && libm="-lm"
+
 if test -z "$_target" ; then
   cat > $TMPC << EOF
 int main(void) {
@@ -8048,7 +8050,7 @@ else
 fi
 echores "$_dvdnav"
 
-extra_ldflags="$extra_ldflags -lm"
+extra_ldflags="$extra_ldflags $libm"
 
 # DO NOT ADD ANY TESTS THAT USE LINKER FLAGS HERE (like cc_check).
 # Read dvdnav comment above.
@@ -8508,7 +8510,7 @@ ASFLAGS    = \$(CFLAGS)
 AS_DEPFLAGS= $DEPFLAGS
 HOSTCC     = \$(HOST_CC)
 HOSTCFLAGS = $HOSTCFLAGS
-HOSTLIBS   = -lm
+HOSTLIBS   = $libm
 AS_O       = -o \$@
 CC_O       = -o \$@
 CXX_O      = -o \$@


More information about the MPlayer-cvslog mailing list