Skip to content
This repository has been archived by the owner on Apr 15, 2023. It is now read-only.

Commit

Permalink
merge r35608, [osx] fixed, figure out correct dylib names to match wh…
Browse files Browse the repository at this point in the history
…at linker uses

git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/Dharma@35610 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
  • Loading branch information
davilla committed Dec 9, 2010
1 parent 02bc11f commit 4fd9997
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 17 deletions.
36 changes: 27 additions & 9 deletions configure.in
Expand Up @@ -17,11 +17,29 @@ tolower(){
# check for library basenames
AC_DEFUN([XB_FIND_SONAME],
[
AC_MSG_CHECKING([for lib$2 soname])
$1_SONAME=$( $CC -print-file-name=lib$2.so | \
while read output; do objdump -p $output | \
grep "SONAME" | \
sed -e 's/ \+SONAME \+//'; done 2> /dev/null )
if [[ "$host_vendor" != "apple" ]]; then
AC_MSG_CHECKING([for lib$2 soname])
$1_SONAME=$( $CC -print-file-name=lib$2.so | \
while read output; do objdump -p $output | \
grep "SONAME" | \
sed -e 's/ \+SONAME \+//'; done 2> /dev/null )
else
AC_MSG_CHECKING([for lib$2 dylib])
gcc_lib_path=[`$CC -print-search-dirs 2>/dev/null | fgrep libraries: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'`]
env_lib_path=[`echo $LDFLAGS | sed 's/-L[ ]*//g'`]
if test "$cross_compiling" = yes; then
host_lib_path=""
else
host_lib_path="/usr/lib /usr/local/lib"
fi
for path in $gcc_lib_path $env_lib_path $host_lib_path; do
lib=[`ls -- $path/lib$2.dylib 2>/dev/null`]
if test x$lib != x; then
# we want the path/name that is embedded in the dylib
$1_SONAME=[`otool -L $lib | grep -v lib$2.dylib | grep lib$2 | awk '{V=1; print $V}'`]
fi
done
fi
if [[ -z "$$1_SONAME" ]]; then
AC_MSG_RESULT([no])
if test -z "$3" || test "x${$3}" = "xyes"; then
Expand Down Expand Up @@ -673,14 +691,14 @@ fi
if test "$host_vendor" != "apple"; then
XB_FIND_SONAME([CURL], [curl])
XB_FIND_SONAME([FLAC], [FLAC])
XB_FIND_SONAME([VORBISFILE], [vorbisfile])
XB_FIND_SONAME([MODPLUG], [modplug])
XB_FIND_SONAME([FAAD], [faad])
XB_FIND_SONAME([MAD], [mad])
XB_FIND_SONAME([OGG], [ogg])
XB_FIND_SONAME([VORBISENC], [vorbisenc])
XB_FIND_SONAME([VORBIS], [vorbis])
fi
XB_FIND_SONAME([OGG], [ogg])
XB_FIND_SONAME([VORBIS], [vorbis])
XB_FIND_SONAME([VORBISENC], [vorbisenc])
XB_FIND_SONAME([VORBISFILE], [vorbisfile])

# WebServer
if test "$host_vendor" != "apple" ; then
Expand Down
12 changes: 4 additions & 8 deletions xbmc/DllPaths_generated.h.in
Expand Up @@ -67,13 +67,12 @@
#define DLL_PATH_SHN_CODEC "special://xbmcbin/system/players/paplayer/libshnplay-@ARCH@.so"
#if defined(_LINUX) && !defined(__APPLE__)
#define DLL_PATH_FLAC_CODEC "@FLAC_SONAME@"
#define DLL_PATH_OGG_CODEC "@VORBISFILE_SONAME@"
#define DLL_PATH_MODPLUG_CODEC "@MODPLUG_SONAME@"
#else
#define DLL_PATH_FLAC_CODEC "special://xbmcbin/system/players/paplayer/libFLAC-@ARCH@.so"
#define DLL_PATH_OGG_CODEC "libvorbisfile.3.3.2.dylib"
#define DLL_PATH_MODPLUG_CODEC "special://xbmcbin/system/players/paplayer/libmodplug-@ARCH@.so"
#endif
#define DLL_PATH_OGG_CODEC "@VORBISFILE_SONAME@"

/* dvdplayer */
#define DLL_PATH_LIBASS "special://xbmcbin/system/players/dvdplayer/libass-@ARCH@.so"
Expand All @@ -99,15 +98,12 @@
/* cdrip */
#if defined(_LINUX) && !defined(__APPLE__)
#define DLL_PATH_LAME_ENC "libmp3lame.so.0"
#define DLL_PATH_OGG "@OGG_SONAME@"
#define DLL_PATH_VORBIS_ENC "@VORBISENC_SONAME@"
#define DLL_PATH_VORBIS "@VORBIS_SONAME@"
#else
#define DLL_PATH_LAME_ENC "special://xbmcbin/system/cdrip/lame_enc-@ARCH@.so"
#define DLL_PATH_OGG "libogg.0.6.0.dylib"
#define DLL_PATH_VORBIS_ENC "libvorbisenc.2.0.6.dylib"
#define DLL_PATH_VORBIS "libvorbis.0.4.3.dylib"
#endif
#define DLL_PATH_OGG "@OGG_SONAME@"
#define DLL_PATH_VORBIS_ENC "@VORBISENC_SONAME@"
#define DLL_PATH_VORBIS "@VORBIS_SONAME@"

/* broadcom crystalhd */
#if defined(_LINUX) && !defined(__APPLE__)
Expand Down

0 comments on commit 4fd9997

Please sign in to comment.