[MPlayer-dev-eng] [PATCH] darwin ./configure fix for ldd

Steven M. Schultz sms at 2BSD.COM
Tue Apr 22 04:58:02 CEST 2003


Hi -

	OS/X ("Darwin") does not have 'ldd'.   Instead it has "otool".  
	To list the libraries a program uses the command is "otool -L".

	Attached is a small patch for your consideration.  It tests
	for "darwin" and uses "otool -L" instead of "ldd".

	Cheers,
	Steven Schultz
-------------- next part --------------
--- configure.dist	Mon Apr 21 19:43:47 2003
+++ configure	Mon Apr 21 19:52:46 2003
@@ -34,8 +34,13 @@
   ( $_cc $CFLAGS $_inc_extra $_ld_static $_ld_extra "$TMPC" -o "$TMPO" "$@" ) >> "$TMPLOG" 2>&1
   TMP="$?"
   echo >> "$TMPLOG"
-  echo "ldd $TMPO" >> "$TMPLOG"
-  ( ldd "$TMPO" ) >> "$TMPLOG" 2>&1
+  if darwin ; then
+    echo "otool -L $TMPO" >> $TMPLOG
+    ( otool -L "$TMPO" ) >> $TMPLOG 2>&1
+  else
+    echo "ldd $TMPO" >> "$TMPLOG"
+    ( ldd "$TMPO" ) >> "$TMPLOG" 2>&1
+  fi
   echo >> "$TMPLOG"
   return "$TMP"
 }


More information about the MPlayer-dev-eng mailing list