summaryrefslogtreecommitdiff
path: root/emulators/qemu-devel/files/patch-configure
blob: 45c561b4be4a9f901c91d8f98fae9ffb2e2a1c67 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
--- a/configure
+++ a/configure
@@ -154,7 +154,7 @@ bigendian="no"
 mingw32="no"
 EXESUF=""
 prefix="/usr/local"
-mandir="\${prefix}/share/man"
+mandir="\${prefix}/man"
 datadir="\${prefix}/share"
 qemu_docdir="\${prefix}/share/doc/qemu"
 bindir="\${prefix}/bin"
@@ -1756,7 +1756,7 @@ if test "$gtk" != "no"; then
 	gtk_libs=`$pkg_config --libs $gtkpackage 2>/dev/null`
 	vte_cflags=`$pkg_config --cflags $vtepackage 2>/dev/null`
 	vte_libs=`$pkg_config --libs $vtepackage 2>/dev/null`
-	libs_softmmu="$gtk_libs $vte_libs $libs_softmmu"
+	libs_softmmu="$gtk_libs -lintl $vte_libs $libs_softmmu"
 	gtk="yes"
     else
 	if test "$gtk" = "yes" ; then
@@ -2511,15 +2511,18 @@ if compile_prog "" "" ; then
 fi
 
 # Check if tools are available to build documentation.
+#if test "$docs" != "no" ; then
+#  if has makeinfo && has pod2man; then
+#    docs=yes
+#  else
+#    if test "$docs" = "yes" ; then
+#      feature_not_found "docs"
+#    fi
+#    docs=no
+#  fi
+#fi
 if test "$docs" != "no" ; then
-  if has makeinfo && has pod2man; then
-    docs=yes
-  else
-    if test "$docs" = "yes" ; then
-      feature_not_found "docs"
-    fi
-    docs=no
-  fi
+  docs=yes
 fi
 
 # Search for bswap_32 function
@@ -3134,18 +3134,29 @@ fi
 
 # check for libusb
 if test "$libusb" != "no" ; then
-    if $pkg_config --atleast-version=1.0.13 libusb-1.0 >/dev/null 2>&1 ; then
-        libusb="yes"
-	usb="libusb"
-        libusb_cflags=$($pkg_config --cflags libusb-1.0 2>/dev/null)
-        libusb_libs=$($pkg_config --libs libusb-1.0 2>/dev/null)
-        QEMU_CFLAGS="$QEMU_CFLAGS $libusb_cflags"
+    cat > $TMPC << EOF
+#include <libusb.h>
+
+int main(void) { return libusb_get_port_path(NULL, NULL, NULL, 0); }
+EOF
+    if compile_prog "-Werror" "-lusb" ; then
+        libusb_cflags=""
+        libusb_libs=-lusb
         libs_softmmu="$libs_softmmu $libusb_libs"
     else
-        if test "$libusb" = "yes"; then
-            feature_not_found "libusb"
+        if $pkg_config --atleast-version=1.0.13 libusb-1.0 >/dev/null 2>&1 ; then
+            libusb="yes"
+            usb="libusb"
+            libusb_cflags=$($pkg_config --cflags libusb-1.0 2>/dev/null)
+            libusb_libs=$($pkg_config --libs libusb-1.0 2>/dev/null)
+            QEMU_CFLAGS="$QEMU_CFLAGS $libusb_cflags"
+            libs_softmmu="$libs_softmmu $libusb_libs"
+        else
+            if test "$libusb" = "yes"; then
+                feature_not_found "libusb"
+            fi
+            libusb="no"
         fi
-        libusb="no"
     fi
 fi