Fix libcurl basename path for users using libcurl3-gnutls.
authorceros7 <ceros7@svn>
Mon, 19 Apr 2010 20:54:08 +0000 (20:54 +0000)
committerceros7 <ceros7@svn>
Mon, 19 Apr 2010 20:54:08 +0000 (20:54 +0000)
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@29385 568bbfeb-2a22-0410-94d2-cc84cf5bfa90

configure.in
xbmc/DllPaths_generated.h.in

index 3d3ca29..7135c00 100644 (file)
@@ -471,6 +471,17 @@ else
                     AC_MSG_ERROR($missing_library))
 fi
 
+# libcurl GnuTLS or OpenSSL check
+# checks whether to use libcurl.so.* or libcurl-gnutls.so.* for libcurl basename
+if test "$host_vendor" != "apple"; then
+  LIBCURL_BASENAME=$(readlink -e /usr/lib/libcurl.so | \
+                     sed -e 's/^\/usr\/lib\///' | \
+                     sed -e 's/\.[[0-9]]\+\.[[0-9]]\+$//')
+  if [[ ! -e "/usr/lib/$LIBCURL_BASENAME" ]]; then
+    AC_MSG_ERROR([Error occurred determining basename of libcurl library])
+  fi
+fi
+
 # PulseAudio
 if test "$host_vendor" = "apple" ; then
   use_pulse="no"
@@ -1152,6 +1163,7 @@ AC_SUBST(USE_PYTHON2_4)
 AC_SUBST(OUTPUT_FILES)
 AC_SUBST(HAVE_XBMC_NONFREE)
 AC_SUBST(USE_ASAP_CODEC)
+AC_SUBST(LIBCURL_BASENAME)
 # Function to run the configure scripts in our submodules
 # Consists of three paramaters, the path to the submodule, the configure command
 # with appropriate arguments, and a third parameter set to 1 if we are to skip
index 36ca979..40538aa 100644 (file)
@@ -13,7 +13,7 @@
 #ifdef __APPLE__
 #define DLL_PATH_LIBCURL       "special://xbmc/system/libcurl-@ARCH@.so"
 #else
-#define DLL_PATH_LIBCURL       "libcurl.so.4"
+#define DLL_PATH_LIBCURL       "@LIBCURL_BASENAME@"
 #endif
 #endif