Line 0
Link Here
|
|
|
1 |
--- configure.orig 2005-12-10 07:27:54 UTC |
2 |
+++ configure |
3 |
@@ -3860,281 +3860,6 @@ _ACEOF |
4 |
|
5 |
|
6 |
|
7 |
-# Check whether --with-libusb-prefix or --without-libusb-prefix was given. |
8 |
-if test "${with_libusb_prefix+set}" = set; then |
9 |
- withval="$with_libusb_prefix" |
10 |
- libusb_prefix="$withval" |
11 |
-else |
12 |
- libusb_prefix="" |
13 |
-fi; |
14 |
- |
15 |
-# Check whether --with-libusb-exec-prefix or --without-libusb-exec-prefix was given. |
16 |
-if test "${with_libusb_exec_prefix+set}" = set; then |
17 |
- withval="$with_libusb_exec_prefix" |
18 |
- libusb_exec_prefix="$withval" |
19 |
-else |
20 |
- libusb_exec_prefix="" |
21 |
-fi; |
22 |
- |
23 |
- if test x$libusb_exec_prefix != x ; then |
24 |
- libusb_config_args="$libusb_config_args --exec-prefix=$libusb_exec_prefix" |
25 |
- if test x${LIBUSB_CONFIG+set} != xset ; then |
26 |
- LIBUSB_CONFIG=$libusb_exec_prefix/bin/libusb-config |
27 |
- fi |
28 |
- fi |
29 |
- if test x$libusb_prefix != x ; then |
30 |
- libusb_config_args="$libusb_config_args --prefix=$libusb_prefix" |
31 |
- if test x${LIBUSB_CONFIG+set} != xset ; then |
32 |
- LIBUSB_CONFIG=$libusb_prefix/bin/libusb-config |
33 |
- fi |
34 |
- fi |
35 |
- |
36 |
- # Extract the first word of "libusb-config", so it can be a program name with args. |
37 |
-set dummy libusb-config; ac_word=$2 |
38 |
-echo "$as_me:$LINENO: checking for $ac_word" >&5 |
39 |
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 |
40 |
-if test "${ac_cv_path_LIBUSB_CONFIG+set}" = set; then |
41 |
- echo $ECHO_N "(cached) $ECHO_C" >&6 |
42 |
-else |
43 |
- case $LIBUSB_CONFIG in |
44 |
- [\\/]* | ?:[\\/]*) |
45 |
- ac_cv_path_LIBUSB_CONFIG="$LIBUSB_CONFIG" # Let the user override the test with a path. |
46 |
- ;; |
47 |
- *) |
48 |
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
49 |
-for as_dir in $PATH |
50 |
-do |
51 |
- IFS=$as_save_IFS |
52 |
- test -z "$as_dir" && as_dir=. |
53 |
- for ac_exec_ext in '' $ac_executable_extensions; do |
54 |
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
55 |
- ac_cv_path_LIBUSB_CONFIG="$as_dir/$ac_word$ac_exec_ext" |
56 |
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
57 |
- break 2 |
58 |
- fi |
59 |
-done |
60 |
-done |
61 |
- |
62 |
- test -z "$ac_cv_path_LIBUSB_CONFIG" && ac_cv_path_LIBUSB_CONFIG="no" |
63 |
- ;; |
64 |
-esac |
65 |
-fi |
66 |
-LIBUSB_CONFIG=$ac_cv_path_LIBUSB_CONFIG |
67 |
- |
68 |
-if test -n "$LIBUSB_CONFIG"; then |
69 |
- echo "$as_me:$LINENO: result: $LIBUSB_CONFIG" >&5 |
70 |
-echo "${ECHO_T}$LIBUSB_CONFIG" >&6 |
71 |
-else |
72 |
- echo "$as_me:$LINENO: result: no" >&5 |
73 |
-echo "${ECHO_T}no" >&6 |
74 |
-fi |
75 |
- |
76 |
- min_libusb_version=0.1.7 |
77 |
- echo "$as_me:$LINENO: checking for libusb - version >= $min_libusb_version" >&5 |
78 |
-echo $ECHO_N "checking for libusb - version >= $min_libusb_version... $ECHO_C" >&6 |
79 |
- no_libusb="" |
80 |
- if test "$LIBUSB_CONFIG" = "no" ; then |
81 |
- no_libusb="yes" |
82 |
- else |
83 |
- LIBUSB_CFLAGS=`$LIBUSB_CONFIG $libusb_config_args --cflags` |
84 |
- LIBUSB_LIBS=`$LIBUSB_CONFIG $libusb_config_args --libs` |
85 |
- |
86 |
- libusb_major_version=`$LIBUSB_CONFIG $libusb_args --version | \ |
87 |
- sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` |
88 |
- libusb_minor_version=`$LIBUSB_CONFIG $libusb_args --version | \ |
89 |
- sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` |
90 |
- libusb_micro_version=`$LIBUSB_CONFIG $libusb_args --version | \ |
91 |
- sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` |
92 |
- if test "x$enable_libusbtext" = "xyes" ; then |
93 |
- ac_save_CFLAGS="$CFLAGS" |
94 |
- ac_save_LIBS="$LIBS" |
95 |
- CFLAGS="$CFLAGS $LIBUSB_CFLAGS" |
96 |
- LIBS="$LIBS $LIBUSB_LIBS" |
97 |
- rm -f conf.libusbtest |
98 |
- if test "$cross_compiling" = yes; then |
99 |
- echo $ac_n "cross compiling; assumed OK... $ac_c" |
100 |
-else |
101 |
- cat >conftest.$ac_ext <<_ACEOF |
102 |
-/* confdefs.h. */ |
103 |
-_ACEOF |
104 |
-cat confdefs.h >>conftest.$ac_ext |
105 |
-cat >>conftest.$ac_ext <<_ACEOF |
106 |
-/* end confdefs.h. */ |
107 |
- |
108 |
-#include <stdio.h> |
109 |
-#include <stdlib.h> |
110 |
-#include <string.h> |
111 |
-#include <usb.h> |
112 |
- |
113 |
-char* |
114 |
-my_strdup (char *str) |
115 |
-{ |
116 |
- char *new_str; |
117 |
- |
118 |
- if (str) |
119 |
- { |
120 |
- new_str = malloc ((strlen (str) + 1) * sizeof(char)); |
121 |
- strcpy (new_str, str); |
122 |
- } |
123 |
- else |
124 |
- new_str = NULL; |
125 |
- |
126 |
- return new_str; |
127 |
-} |
128 |
- |
129 |
-int main () |
130 |
-{ |
131 |
- int major, minor, micro; |
132 |
- char *tmp_version; |
133 |
- |
134 |
- system ("touch conf.libusbtest"); |
135 |
- |
136 |
- /* HP/UX 9 (%@#!) writes to sscanf strings */ |
137 |
- tmp_version = my_strdup("$min_libusb_version"); |
138 |
- if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { |
139 |
- printf("%s, bad version string\n", "$min_libusb_version"); |
140 |
- exit(1); |
141 |
- } |
142 |
- |
143 |
- if (($libusb_major_version > major) || |
144 |
- (($libusb_major_version == major) && ($libusb_minor_version > minor)) || |
145 |
- (($libusb_major_version == major) && ($libusb_minor_version == minor) && |
146 |
- ($libusb_micro_version >= micro))) |
147 |
- { |
148 |
- return 0; |
149 |
- } |
150 |
- else |
151 |
- { |
152 |
- printf("\n*** 'libusb-config --version' returned %d.%d, but the minimum version\n", $libusb_major_version, $libusb_minor_version); |
153 |
- printf("*** of libusb required is %d.%d. If libusb-config is correct, then it is\n", major, minor); |
154 |
- printf("*** best to upgrade to the required version.\n"); |
155 |
- printf("*** If libusb-config was wrong, set the environment variable LIBUSB_CONFIG\n"); |
156 |
- printf("*** to point to the correct copy of libusb-config, and remove the file\n"); |
157 |
- printf("*** config.cache before re-running configure\n"); |
158 |
- return 1; |
159 |
- } |
160 |
-} |
161 |
- |
162 |
- |
163 |
-_ACEOF |
164 |
-rm -f conftest$ac_exeext |
165 |
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
166 |
- (eval $ac_link) 2>&5 |
167 |
- ac_status=$? |
168 |
- echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
169 |
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' |
170 |
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
171 |
- (eval $ac_try) 2>&5 |
172 |
- ac_status=$? |
173 |
- echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
174 |
- (exit $ac_status); }; }; then |
175 |
- : |
176 |
-else |
177 |
- echo "$as_me: program exited with status $ac_status" >&5 |
178 |
-echo "$as_me: failed program was:" >&5 |
179 |
-sed 's/^/| /' conftest.$ac_ext >&5 |
180 |
- |
181 |
-( exit $ac_status ) |
182 |
-no_libusb=yes |
183 |
-fi |
184 |
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
185 |
-fi |
186 |
- CFLAGS="$ac_save_CFLAGS" |
187 |
- LIBS="$ac_save_LIBS" |
188 |
- fi |
189 |
- fi |
190 |
- if test "x$no_libusb" = x ; then |
191 |
- echo "$as_me:$LINENO: result: yes" >&5 |
192 |
-echo "${ECHO_T}yes" >&6 |
193 |
- : |
194 |
- else |
195 |
- echo "$as_me:$LINENO: result: no" >&5 |
196 |
-echo "${ECHO_T}no" >&6 |
197 |
- if test "$LIBUSB_CONFIG" = "no" ; then |
198 |
- echo "*** The libusb-config script installed by libusb could not be found" |
199 |
- echo "*** If libusb was installed in PREFIX, make sure PREFIX/bin is in" |
200 |
- echo "*** your path, or set the LIBUSB_CONFIG environment variable to the" |
201 |
- echo "*** full path to libusb-config." |
202 |
- else |
203 |
- if test -f conf.libusbtest ; then |
204 |
- : |
205 |
- else |
206 |
- echo "*** Could not run libusb test program, checking why..." |
207 |
- CFLAGS="$CFLAGS $LIBUSB_CFLAGS" |
208 |
- LIBS="$LIBS $LIBUSB_LIBS" |
209 |
- cat >conftest.$ac_ext <<_ACEOF |
210 |
-/* confdefs.h. */ |
211 |
-_ACEOF |
212 |
-cat confdefs.h >>conftest.$ac_ext |
213 |
-cat >>conftest.$ac_ext <<_ACEOF |
214 |
-/* end confdefs.h. */ |
215 |
- |
216 |
-#include <stdio.h> |
217 |
-#include <usb.h> |
218 |
- |
219 |
-int |
220 |
-main () |
221 |
-{ |
222 |
- return 0; |
223 |
- ; |
224 |
- return 0; |
225 |
-} |
226 |
-_ACEOF |
227 |
-rm -f conftest.$ac_objext conftest$ac_exeext |
228 |
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
229 |
- (eval $ac_link) 2>conftest.er1 |
230 |
- ac_status=$? |
231 |
- grep -v '^ *+' conftest.er1 >conftest.err |
232 |
- rm -f conftest.er1 |
233 |
- cat conftest.err >&5 |
234 |
- echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
235 |
- (exit $ac_status); } && |
236 |
- { ac_try='test -z "$ac_c_werror_flag" |
237 |
- || test ! -s conftest.err' |
238 |
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
239 |
- (eval $ac_try) 2>&5 |
240 |
- ac_status=$? |
241 |
- echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
242 |
- (exit $ac_status); }; } && |
243 |
- { ac_try='test -s conftest$ac_exeext' |
244 |
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
245 |
- (eval $ac_try) 2>&5 |
246 |
- ac_status=$? |
247 |
- echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
248 |
- (exit $ac_status); }; }; then |
249 |
- echo "*** The test program compiled, but did not run. This usually means" |
250 |
- echo "*** that the run-time linker is not finding libusb or finding the wrong" |
251 |
- echo "*** version of libusb. If it is not finding libusb, you'll need to set your" |
252 |
- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" |
253 |
- echo "*** to the installed location Also, make sure you have run ldconfig if that" |
254 |
- echo "*** is required on your system" |
255 |
- echo "***" |
256 |
- echo "*** If you have an old version installed, it is best to remove it, although" |
257 |
- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" |
258 |
-else |
259 |
- echo "$as_me: failed program was:" >&5 |
260 |
-sed 's/^/| /' conftest.$ac_ext >&5 |
261 |
- |
262 |
- echo "*** The test program failed to compile or link. See the file config.log for the" |
263 |
- echo "*** exact error that occured. This usually means libusb was incorrectly installed" |
264 |
- echo "*** or that you have moved libusb since it was installed. In the latter case, you" |
265 |
- echo "*** may want to edit the libusb-config script: $LIBUSB_CONFIG" |
266 |
-fi |
267 |
-rm -f conftest.err conftest.$ac_objext \ |
268 |
- conftest$ac_exeext conftest.$ac_ext |
269 |
- CFLAGS="$ac_save_CFLAGS" |
270 |
- LIBS="$ac_save_LIBS" |
271 |
- fi |
272 |
- fi |
273 |
- LIBUSB_CFLAGS="" |
274 |
- LIBUSB_LIBS="" |
275 |
- { { echo "$as_me:$LINENO: error: libusb is required." >&5 |
276 |
-echo "$as_me: error: libusb is required." >&2;} |
277 |
- { (exit 1); exit 1; }; } |
278 |
- fi |
279 |
- |
280 |
- |
281 |
- rm -f conf.libusbtest |
282 |
|
283 |
|
284 |
# Checks for header files. |