[Wine-patches] [eter-1.0.12] [eterhack] configure: Use PKG_CONFIG variable, do not hardcode USBLIBS.

Alexander Morozov amorozov на etersoft.ru
Пт Апр 1 17:56:03 MSD 2011


----------- следующая часть -----------
From 4608e9c75e11a7933d36756daa5843f29c1c0fc5 Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov на etersoft.ru>
Date: Fri, 1 Apr 2011 16:41:07 +0400
Subject: [eter-1.0.12] configure: Use PKG_CONFIG variable, do not hardcode USBLIBS.

---
 configure    |   13 ++++++++-----
 configure.ac |   14 +++++++++-----
 2 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/configure b/configure
index d482758..ae6cf77 100755
--- a/configure
+++ b/configure
@@ -10098,9 +10098,13 @@ fi
 
 done
 
-    ac_usb_incl=`pkg-config --cflags libusb-1.0`
     ac_save_CPPFLAGS="$CPPFLAGS"
-    CPPFLAGS="$ac_usb_incl $CPPFLAGS"
+    if test "$PKG_CONFIG" != "false"
+    then
+        ac_usb_incl="`$PKG_CONFIG --cflags libusb-1.0`"
+        ac_usb_libs="`$PKG_CONFIG --libs libusb-1.0`"
+        CPPFLAGS="$ac_usb_incl $CPPFLAGS"
+    fi
     for ac_header in libusb.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "libusb.h" "ac_cv_header_libusb_h" "$ac_includes_default"
@@ -10148,9 +10152,8 @@ if test "x$ac_cv_lib_usb_1_0_libusb_init" = x""yes; then :
 
 $as_echo "#define HAVE_LIBUSB 1" >>confdefs.h
 
-             USBLIBS="-lusb-1.0"
+             USBLIBS="$ac_usb_libs"
              USBINCL="$ac_usb_incl"
-
 fi
 
 fi
@@ -11087,7 +11090,7 @@ fi
 
 if test "$ac_cv_header_fontconfig_fontconfig_h" = "yes"
 then
-    ac_fontconfig_libs=`pkg-config --libs fontconfig`
+    ac_fontconfig_libs="`$PKG_CONFIG --libs fontconfig`"
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -lfontconfig" >&5
 $as_echo_n "checking for -lfontconfig... " >&6; }
 if test "${ac_cv_lib_soname_fontconfig+set}" = set; then :
diff --git a/configure.ac b/configure.ac
index 34dfc21..3eb7a6d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1064,14 +1064,18 @@ then
         AC_CHECK_LIB(usb, usb_init,
             [AC_DEFINE(HAVE_LIBUSB, 1, [Define if you have the libusb library and header])
              USBLIBS="-lusb"]))
-    ac_usb_incl=`pkg-config --cflags libusb-1.0`
     ac_save_CPPFLAGS="$CPPFLAGS"
-    CPPFLAGS="$ac_usb_incl $CPPFLAGS"
+    if test "$PKG_CONFIG" != "false"
+    then
+        ac_usb_incl="`$PKG_CONFIG --cflags libusb-1.0`"
+        ac_usb_libs="`$PKG_CONFIG --libs libusb-1.0`"
+        CPPFLAGS="$ac_usb_incl $CPPFLAGS"
+    fi
     AC_CHECK_HEADERS([libusb.h],
         AC_CHECK_LIB(usb-1.0, libusb_init,
             [AC_DEFINE(HAVE_LIBUSB, 1, [Define if you have the libusb library and header])
-             USBLIBS="-lusb-1.0"
-             AC_SUBST(USBINCL,"$ac_usb_incl")]))
+             USBLIBS="$ac_usb_libs"
+             USBINCL="$ac_usb_incl"]))
     CPPFLAGS="$ac_save_CPPFLAGS"
 fi
 WINE_NOTICE_WITH(usb,[test "x$ac_cv_lib_usb_usb_init" != "xyes" -a "x$ac_cv_lib_usb_1_0_libusb_init" != "xyes"],
@@ -1291,7 +1295,7 @@ fi
 dnl **** Check for fontconfig ****
 if test "$ac_cv_header_fontconfig_fontconfig_h" = "yes"
 then
-    ac_fontconfig_libs=`pkg-config --libs fontconfig`
+    ac_fontconfig_libs="`$PKG_CONFIG --libs fontconfig`"
     WINE_CHECK_SONAME(fontconfig,FcInit)
     AC_SUBST(FONTCONFIGLIBS,"$ac_fontconfig_libs")
 elif test -n "$X_CFLAGS" -a "x$with_fontconfig" != "xno"
-- 
1.7.4.2



Подробная информация о списке рассылки Wine-patches