diff options
author | davilla <davilla@svn> | 2010-12-09 23:15:37 +0000 |
---|---|---|
committer | davilla <davilla@svn> | 2010-12-09 23:15:37 +0000 |
commit | 4fd9997226e4a1857957e3f401d0a19a8cf8cbcb (patch) | |
tree | 087ca4edfc110cbf52d64681e4fc7ae4b46ccae7 | |
parent | 02bc11f5e48afaf270c8dd56fac9d57d7754e1ba (diff) |
merge r35608, [osx] fixed, figure out correct dylib names to match what linker uses
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/Dharma@35610 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
-rw-r--r-- | configure.in | 36 | ||||
-rw-r--r-- | xbmc/DllPaths_generated.h.in | 12 |
2 files changed, 31 insertions, 17 deletions
diff --git a/configure.in b/configure.in index cbfa2d2614..f20cd61842 100644 --- a/configure.in +++ b/configure.in @@ -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 @@ -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 diff --git a/xbmc/DllPaths_generated.h.in b/xbmc/DllPaths_generated.h.in index 2f4c49bd1c..271e20d8b6 100644 --- a/xbmc/DllPaths_generated.h.in +++ b/xbmc/DllPaths_generated.h.in @@ -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" @@ -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__) |