aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/libusb/libusb-0.1.8/configure.patch
blob: 6f014a9dcd0f72c1fdcc402d2c8a36513ccbc521 (plain)
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
87
88
89
90
91
92
93
94
95
96
97
98
99
--- libusb-0.1.8/configure.in~configure.patch	2004-02-12 03:27:18.000000000 +1100
+++ libusb-0.1.8/configure.in	2004-11-03 20:17:45.949802575 +1100
@@ -1,10 +1,11 @@
 # This configure.in is based off of the one that glib uses
 
 # require atleast autoconf 2.13
-AC_PREREQ(2.13)
+AC_PREREQ(2.57)
 
 # init autoconf (and check for presence of usb.c)
-AC_INIT(usb.c)
+AC_INIT
+AC_CONFIG_SRCDIR([usb.c])
 
 AH_TOP(
 #undef LINUX_API
@@ -29,8 +30,8 @@
 
 dnl we need to AC_DIVERT_PUSH/AC_DIVERT_POP these variable definitions so they
 dnl are available for $ac_help expansion (don't we all *love* autoconf?)
-ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
-			     [AC_DIVERT_PUSH(NOTICE)])
+dnl ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
+dnl			     [AC_DIVERT_PUSH(NOTICE)])
 
 #
 # The following version number definitions apply to libusb
@@ -52,7 +53,7 @@
 LIBUSB_BINARY_AGE=4
 LIBUSB_VERSION=$LIBUSB_MAJOR_VERSION.$LIBUSB_MINOR_VERSION.$LIBUSB_MICRO_VERSION
 dnl
-AC_DIVERT_POP()dnl
+dnl AC_DIVERT_POP()dnl
 
 AC_SUBST(LIBUSB_MAJOR_VERSION)
 AC_SUBST(LIBUSB_MINOR_VERSION)
@@ -81,7 +82,7 @@
 AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
 
 # Specify a configuration file
-AM_CONFIG_HEADER(config.h)
+AC_CONFIG_HEADERS([config.h])
 
 AC_DEFINE_UNQUOTED(LIBUSB_MAJOR_VERSION, $LIBUSB_MAJOR_VERSION)
 AC_DEFINE_UNQUOTED(LIBUSB_MINOR_VERSION, $LIBUSB_MINOR_VERSION)
@@ -149,14 +150,14 @@
 
 dnl figure debugging default, prior to $ac_help setup
 dnl
-ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
-			     [AC_DIVERT_PUSH(NOTICE)])
+dnl ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
+dnl			     [AC_DIVERT_PUSH(NOTICE)])
 if test `expr $LIBUSB_MINOR_VERSION \% 2` = 1 ; then
   debug_default=yes
 else
   debug_default=minimum
 fi
-AC_DIVERT_POP()dnl
+dnl AC_DIVERT_POP()dnl
 
 dnl declare --enable-* args and collect ac_help strings
 AC_ARG_ENABLE(debug, [  --enable-debug=[no/minimum/yes] turn on debugging [default=$debug_default]],,enable_debug=$debug_default)
@@ -207,15 +208,11 @@
 
 if test "$os_support" = "bsd"; then
   AC_MSG_CHECKING(if dev/usb/usb.h uses new naming convention)
-  AC_TRY_COMPILE(
-    [#include <dev/usb/usb.h>],
-    [int main(void)
+  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <dev/usb/usb.h>]], [[int main(void)
      {
        int a = ((struct usb_ctl_request *)0L)->ucr_addr;
        return 0;
-     }],
-    [AC_MSG_RESULT(yes)],
-    [AC_MSG_RESULT(no)
+     }]])],[AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
     AC_DEFINE_UNQUOTED(HAVE_OLD_DEV_USB_USB_H)])
 fi
 
@@ -246,7 +243,7 @@
 
 AM_CONDITIONAL(BUILD_DOCS, test "$build_docs" != "no")
 
-AC_OUTPUT([
+AC_CONFIG_FILES([
   Makefile
   doc/Makefile
   libusb.spec
@@ -255,5 +252,6 @@
   README
   INSTALL.libusb
   usb.h
-],[chmod +x libusb-config])
-
+])
+AC_CONFIG_COMMANDS([default],[[chmod +x libusb-config]],[[]])
+AC_OUTPUT