[MPlayer-dev-eng] [PATCH] darwin ./configure fix for ldd
Diego Biurrun
diego at biurrun.de
Tue Apr 22 11:54:43 CEST 2003
Steven M. Schultz schrieb:
> 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".
>
> --- 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"
> }
What about this instead?
_ldd=ldd
darwin && _ldd='otool -L'
and then replace all occurences of ldd with _ldd (just one).
Please try it, it should be just as good, but much cleaner and shorter IMHO.
Diego
More information about the MPlayer-dev-eng
mailing list