Fix hal on the latest -CURRENT now that libusb20 has been renamed.

This commit is contained in:
Joe Marcus Clarke 2009-03-14 06:51:17 +00:00
parent b0cc15a039
commit f91321f9e7
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=230023
7 changed files with 167 additions and 59 deletions

View file

@ -8,7 +8,7 @@
PORTNAME= hal PORTNAME= hal
DISTVERSION= 0.5.11 DISTVERSION= 0.5.11
PORTREVISION= 20 PORTREVISION= 21
CATEGORIES= sysutils CATEGORIES= sysutils
MASTER_SITES= http://hal.freedesktop.org/releases/ MASTER_SITES= http://hal.freedesktop.org/releases/

View file

@ -1,190 +1,193 @@
--- configure.orig 2009-02-23 01:57:48.000000000 -0500 --- configure.orig 2009-03-14 00:22:20.000000000 -0400
+++ configure 2009-02-23 01:57:54.000000000 -0500 +++ configure 2009-03-14 00:22:44.000000000 -0400
@@ -930,6 +930,8 @@ HALD_COMPILE_FREEBSD_FALSE @@ -930,6 +930,9 @@ HALD_COMPILE_FREEBSD_FALSE
HALD_COMPILE_SOLARIS_TRUE HALD_COMPILE_SOLARIS_TRUE
HALD_COMPILE_SOLARIS_FALSE HALD_COMPILE_SOLARIS_FALSE
HALD_BACKEND HALD_BACKEND
+HAVE_LIBUSB20_TRUE +HAVE_LIBUSB20_TRUE
+HAVE_LIBUSB20_FALSE +HAVE_LIBUSB20_FALSE
+LIBUSB20_LIBS
HAVE_CONKIT_TRUE HAVE_CONKIT_TRUE
HAVE_CONKIT_FALSE HAVE_CONKIT_FALSE
GPERF GPERF
@@ -5944,7 +5946,7 @@ ia64-*-hpux*) @@ -5944,7 +5947,7 @@ ia64-*-hpux*)
;; ;;
*-*-irix6*) *-*-irix6*)
# Find out which ABI we are using. # Find out which ABI we are using.
- echo '#line 5947 "configure"' > conftest.$ac_ext - echo '#line 5947 "configure"' > conftest.$ac_ext
+ echo '#line 5949 "configure"' > conftest.$ac_ext + echo '#line 5950 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5 (eval $ac_compile) 2>&5
ac_status=$? ac_status=$?
@@ -8596,11 +8598,11 @@ else @@ -8596,11 +8599,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8599: $lt_compile\"" >&5) - (eval echo "\"\$as_me:8599: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8601: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8602: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err) (eval "$lt_compile" 2>conftest.err)
ac_status=$? ac_status=$?
cat conftest.err >&5 cat conftest.err >&5
- echo "$as_me:8603: \$? = $ac_status" >&5 - echo "$as_me:8603: \$? = $ac_status" >&5
+ echo "$as_me:8605: \$? = $ac_status" >&5 + echo "$as_me:8606: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output. # So say no if there are warnings other than the usual output.
@@ -8886,11 +8888,11 @@ else @@ -8886,11 +8889,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8889: $lt_compile\"" >&5) - (eval echo "\"\$as_me:8889: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8891: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8892: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err) (eval "$lt_compile" 2>conftest.err)
ac_status=$? ac_status=$?
cat conftest.err >&5 cat conftest.err >&5
- echo "$as_me:8893: \$? = $ac_status" >&5 - echo "$as_me:8893: \$? = $ac_status" >&5
+ echo "$as_me:8895: \$? = $ac_status" >&5 + echo "$as_me:8896: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output. # So say no if there are warnings other than the usual output.
@@ -8990,11 +8992,11 @@ else @@ -8990,11 +8993,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8993: $lt_compile\"" >&5) - (eval echo "\"\$as_me:8993: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8995: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8996: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err) (eval "$lt_compile" 2>out/conftest.err)
ac_status=$? ac_status=$?
cat out/conftest.err >&5 cat out/conftest.err >&5
- echo "$as_me:8997: \$? = $ac_status" >&5 - echo "$as_me:8997: \$? = $ac_status" >&5
+ echo "$as_me:8999: \$? = $ac_status" >&5 + echo "$as_me:9000: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext if (exit $ac_status) && test -s out/conftest2.$ac_objext
then then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
@@ -11354,7 +11356,7 @@ else @@ -11354,7 +11357,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
-#line 11357 "configure" -#line 11357 "configure"
+#line 11359 "configure" +#line 11360 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
@@ -11454,7 +11456,7 @@ else @@ -11454,7 +11457,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
-#line 11457 "configure" -#line 11457 "configure"
+#line 11459 "configure" +#line 11460 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
@@ -13855,11 +13857,11 @@ else @@ -13855,11 +13858,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13858: $lt_compile\"" >&5) - (eval echo "\"\$as_me:13858: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13860: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13861: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err) (eval "$lt_compile" 2>conftest.err)
ac_status=$? ac_status=$?
cat conftest.err >&5 cat conftest.err >&5
- echo "$as_me:13862: \$? = $ac_status" >&5 - echo "$as_me:13862: \$? = $ac_status" >&5
+ echo "$as_me:13864: \$? = $ac_status" >&5 + echo "$as_me:13865: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output. # So say no if there are warnings other than the usual output.
@@ -13959,11 +13961,11 @@ else @@ -13959,11 +13962,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13962: $lt_compile\"" >&5) - (eval echo "\"\$as_me:13962: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13964: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13965: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err) (eval "$lt_compile" 2>out/conftest.err)
ac_status=$? ac_status=$?
cat out/conftest.err >&5 cat out/conftest.err >&5
- echo "$as_me:13966: \$? = $ac_status" >&5 - echo "$as_me:13966: \$? = $ac_status" >&5
+ echo "$as_me:13968: \$? = $ac_status" >&5 + echo "$as_me:13969: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext if (exit $ac_status) && test -s out/conftest2.$ac_objext
then then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
@@ -15542,11 +15544,11 @@ else @@ -15542,11 +15545,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15545: $lt_compile\"" >&5) - (eval echo "\"\$as_me:15545: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15547: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15548: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err) (eval "$lt_compile" 2>conftest.err)
ac_status=$? ac_status=$?
cat conftest.err >&5 cat conftest.err >&5
- echo "$as_me:15549: \$? = $ac_status" >&5 - echo "$as_me:15549: \$? = $ac_status" >&5
+ echo "$as_me:15551: \$? = $ac_status" >&5 + echo "$as_me:15552: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output. # So say no if there are warnings other than the usual output.
@@ -15646,11 +15648,11 @@ else @@ -15646,11 +15649,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15649: $lt_compile\"" >&5) - (eval echo "\"\$as_me:15649: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15651: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15652: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err) (eval "$lt_compile" 2>out/conftest.err)
ac_status=$? ac_status=$?
cat out/conftest.err >&5 cat out/conftest.err >&5
- echo "$as_me:15653: \$? = $ac_status" >&5 - echo "$as_me:15653: \$? = $ac_status" >&5
+ echo "$as_me:15655: \$? = $ac_status" >&5 + echo "$as_me:15656: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext if (exit $ac_status) && test -s out/conftest2.$ac_objext
then then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
@@ -17853,11 +17855,11 @@ else @@ -17853,11 +17856,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:17856: $lt_compile\"" >&5) - (eval echo "\"\$as_me:17856: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:17858: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17859: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err) (eval "$lt_compile" 2>conftest.err)
ac_status=$? ac_status=$?
cat conftest.err >&5 cat conftest.err >&5
- echo "$as_me:17860: \$? = $ac_status" >&5 - echo "$as_me:17860: \$? = $ac_status" >&5
+ echo "$as_me:17862: \$? = $ac_status" >&5 + echo "$as_me:17863: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output. # So say no if there are warnings other than the usual output.
@@ -18143,11 +18145,11 @@ else @@ -18143,11 +18146,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:18146: $lt_compile\"" >&5) - (eval echo "\"\$as_me:18146: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:18148: $lt_compile\"" >&5) + (eval echo "\"\$as_me:18149: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err) (eval "$lt_compile" 2>conftest.err)
ac_status=$? ac_status=$?
cat conftest.err >&5 cat conftest.err >&5
- echo "$as_me:18150: \$? = $ac_status" >&5 - echo "$as_me:18150: \$? = $ac_status" >&5
+ echo "$as_me:18152: \$? = $ac_status" >&5 + echo "$as_me:18153: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output. # So say no if there are warnings other than the usual output.
@@ -18247,11 +18249,11 @@ else @@ -18247,11 +18250,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:18250: $lt_compile\"" >&5) - (eval echo "\"\$as_me:18250: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:18252: $lt_compile\"" >&5) + (eval echo "\"\$as_me:18253: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err) (eval "$lt_compile" 2>out/conftest.err)
ac_status=$? ac_status=$?
cat out/conftest.err >&5 cat out/conftest.err >&5
- echo "$as_me:18254: \$? = $ac_status" >&5 - echo "$as_me:18254: \$? = $ac_status" >&5
+ echo "$as_me:18256: \$? = $ac_status" >&5 + echo "$as_me:18257: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext if (exit $ac_status) && test -s out/conftest2.$ac_objext
then then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
@@ -23420,6 +23422,7 @@ else @@ -23420,6 +23423,9 @@ else
fi fi
+USE_LIBUSB20=no +USE_LIBUSB20=no
+USE_LIBUSB=no
+LIBUSB20_LIBS=""
# Check whether --with-backend was given. # Check whether --with-backend was given.
if test "${with_backend+set}" = set; then if test "${with_backend+set}" = set; then
@@ -23477,6 +23480,91 @@ else @@ -23477,6 +23483,176 @@ else
fi fi
@ -257,6 +260,75 @@
+fi +fi
+ +
+fi +fi
+if test "x$USE_LIBUSB20" = "xno"; then
+ { echo "$as_me:$LINENO: checking for libusb20_dev_get_info in -lusb" >&5
+echo $ECHO_N "checking for libusb20_dev_get_info in -lusb... $ECHO_C" >&6; }
+if test "${ac_cv_lib_usb_libusb20_dev_get_info+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lusb $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char libusb20_dev_get_info ();
+int
+main ()
+{
+return libusb20_dev_get_info ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_usb_libusb20_dev_get_info=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_usb_libusb20_dev_get_info=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_usb_libusb20_dev_get_info" >&5
+echo "${ECHO_T}$ac_cv_lib_usb_libusb20_dev_get_info" >&6; }
+if test $ac_cv_lib_usb_libusb20_dev_get_info = yes; then
+ USE_LIBUSB=yes
+else
+ USE_LIBUSB=np
+fi
+
+fi
+ if test "x$USE_LIBUSB20" = "xyes"; then + if test "x$USE_LIBUSB20" = "xyes"; then
+ HAVE_LIBUSB20_TRUE= + HAVE_LIBUSB20_TRUE=
+ HAVE_LIBUSB20_FALSE='#' + HAVE_LIBUSB20_FALSE='#'
@ -265,18 +337,34 @@
+ HAVE_LIBUSB20_FALSE= + HAVE_LIBUSB20_FALSE=
+fi +fi
+ +
+ if test "x$USE_LIBUSB" = "xyes"; then
+ HAVE_LIBUSB20_TRUE=
+ HAVE_LIBUSB20_FALSE='#'
+else
+ HAVE_LIBUSB20_TRUE='#'
+ HAVE_LIBUSB20_FALSE=
+fi
+
+if test "x$USE_LIBUSB20" = "xyes"; then +if test "x$USE_LIBUSB20" = "xyes"; then
+ +
+cat >>confdefs.h <<\_ACEOF +cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBUSB20 1 +#define HAVE_LIBUSB20 1
+_ACEOF +_ACEOF
+ +
+ LIBUSB20_LIBS="-lusb20"
+elif test "x$USE_LIBUSB" = "xyes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBUSB20 1
+_ACEOF
+
+ LIBUSB20_LIBS="-lusb"
+fi +fi
+ +
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
@@ -25602,6 +25690,13 @@ echo "$as_me: error: conditional \"HALD_ @@ -25602,6 +25778,20 @@ echo "$as_me: error: conditional \"HALD_
Usually this means the macro was only invoked conditionally." >&2;} Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; } { (exit 1); exit 1; }; }
fi fi
@ -286,43 +374,53 @@
+echo "$as_me: error: conditional \"HAVE_LIBUSB20\" was never defined. +echo "$as_me: error: conditional \"HAVE_LIBUSB20\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;} +Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_LIBUSB20_TRUE}" && test -z "${HAVE_LIBUSB20_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"HAVE_LIBUSB20\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"HAVE_LIBUSB20\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi +fi
if test -z "${HAVE_CONKIT_TRUE}" && test -z "${HAVE_CONKIT_FALSE}"; then if test -z "${HAVE_CONKIT_TRUE}" && test -z "${HAVE_CONKIT_FALSE}"; then
{ { echo "$as_me:$LINENO: error: conditional \"HAVE_CONKIT\" was never defined. { { echo "$as_me:$LINENO: error: conditional \"HAVE_CONKIT\" was never defined.
Usually this means the macro was only invoked conditionally." >&5 Usually this means the macro was only invoked conditionally." >&5
@@ -26568,6 +26663,8 @@ HALD_COMPILE_FREEBSD_FALSE!$HALD_COMPILE @@ -26568,6 +26758,9 @@ HALD_COMPILE_FREEBSD_FALSE!$HALD_COMPILE
HALD_COMPILE_SOLARIS_TRUE!$HALD_COMPILE_SOLARIS_TRUE$ac_delim HALD_COMPILE_SOLARIS_TRUE!$HALD_COMPILE_SOLARIS_TRUE$ac_delim
HALD_COMPILE_SOLARIS_FALSE!$HALD_COMPILE_SOLARIS_FALSE$ac_delim HALD_COMPILE_SOLARIS_FALSE!$HALD_COMPILE_SOLARIS_FALSE$ac_delim
HALD_BACKEND!$HALD_BACKEND$ac_delim HALD_BACKEND!$HALD_BACKEND$ac_delim
+HAVE_LIBUSB20_TRUE!$HAVE_LIBUSB20_TRUE$ac_delim +HAVE_LIBUSB20_TRUE!$HAVE_LIBUSB20_TRUE$ac_delim
+HAVE_LIBUSB20_FALSE!$HAVE_LIBUSB20_FALSE$ac_delim +HAVE_LIBUSB20_FALSE!$HAVE_LIBUSB20_FALSE$ac_delim
+LIBUSB20_LIBS!$LIBUSB20_LIBS$ac_delim
HAVE_CONKIT_TRUE!$HAVE_CONKIT_TRUE$ac_delim HAVE_CONKIT_TRUE!$HAVE_CONKIT_TRUE$ac_delim
HAVE_CONKIT_FALSE!$HAVE_CONKIT_FALSE$ac_delim HAVE_CONKIT_FALSE!$HAVE_CONKIT_FALSE$ac_delim
GPERF!$GPERF$ac_delim GPERF!$GPERF$ac_delim
@@ -26598,8 +26695,6 @@ DBUS_LIBS!$DBUS_LIBS$ac_delim @@ -26597,9 +26790,6 @@ DBUS_CFLAGS!$DBUS_CFLAGS$ac_delim
DBUS_LIBS!$DBUS_LIBS$ac_delim
GLIB_CFLAGS!$GLIB_CFLAGS$ac_delim GLIB_CFLAGS!$GLIB_CFLAGS$ac_delim
GLIB_LIBS!$GLIB_LIBS$ac_delim GLIB_LIBS!$GLIB_LIBS$ac_delim
VOLUME_ID_CFLAGS!$VOLUME_ID_CFLAGS$ac_delim -VOLUME_ID_CFLAGS!$VOLUME_ID_CFLAGS$ac_delim
-VOLUME_ID_LIBS!$VOLUME_ID_LIBS$ac_delim -VOLUME_ID_LIBS!$VOLUME_ID_LIBS$ac_delim
-HALD_OS_LIBS!$HALD_OS_LIBS$ac_delim -HALD_OS_LIBS!$HALD_OS_LIBS$ac_delim
_ACEOF _ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -26641,6 +26736,8 @@ _ACEOF @@ -26641,6 +26831,9 @@ _ACEOF
ac_delim='%!_!# ' ac_delim='%!_!# '
for ac_last_try in false false false false false :; do for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF cat >conf$$subs.sed <<_ACEOF
+VOLUME_ID_CFLAGS!$VOLUME_ID_CFLAGS$ac_delim
+VOLUME_ID_LIBS!$VOLUME_ID_LIBS$ac_delim +VOLUME_ID_LIBS!$VOLUME_ID_LIBS$ac_delim
+HALD_OS_LIBS!$HALD_OS_LIBS$ac_delim +HALD_OS_LIBS!$HALD_OS_LIBS$ac_delim
XMLTO!$XMLTO$ac_delim XMLTO!$XMLTO$ac_delim
XMLLINT!$XMLLINT$ac_delim XMLLINT!$XMLLINT$ac_delim
DOCBOOK_DOCS_ENABLED_TRUE!$DOCBOOK_DOCS_ENABLED_TRUE$ac_delim DOCBOOK_DOCS_ENABLED_TRUE!$DOCBOOK_DOCS_ENABLED_TRUE$ac_delim
@@ -26672,7 +26769,7 @@ LIBOBJS!$LIBOBJS$ac_delim @@ -26672,7 +26865,7 @@ LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF _ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 29; then - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 29; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 31; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 32; then
break break
elif $ac_last_try; then elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5

View file

@ -1,25 +1,35 @@
--- configure.in.orig 2008-05-07 19:24:31.000000000 -0400 --- configure.in.orig 2008-05-07 19:24:31.000000000 -0400
+++ configure.in 2009-02-18 00:28:01.000000000 -0500 +++ configure.in 2009-03-14 00:14:25.000000000 -0400
@@ -446,6 +446,7 @@ if test "x$with_libpci" != xno ; then @@ -446,6 +446,9 @@ if test "x$with_libpci" != xno ; then
fi fi
AM_CONDITIONAL([HAVE_LIBPCI], [test "x$USE_LIBPCI" = "xyes"]) AM_CONDITIONAL([HAVE_LIBPCI], [test "x$USE_LIBPCI" = "xyes"])
+USE_LIBUSB20=no +USE_LIBUSB20=no
+USE_LIBUSB=no
+LIBUSB20_LIBS=""
AC_ARG_WITH([backend], AC_ARG_WITH([backend],
AS_HELP_STRING([--with-backend=<name>], AS_HELP_STRING([--with-backend=<name>],
[backend to use (linux/solaris/freebsd/dummy)]), [backend to use (linux/solaris/freebsd/dummy)]),
@@ -473,6 +474,14 @@ AM_CONDITIONAL(HALD_COMPILE_LINUX, [test @@ -473,6 +476,22 @@ AM_CONDITIONAL(HALD_COMPILE_LINUX, [test
AM_CONDITIONAL(HALD_COMPILE_FREEBSD, [test x$HALD_BACKEND = xfreebsd], [Compiling for FreeBSD]) AM_CONDITIONAL(HALD_COMPILE_FREEBSD, [test x$HALD_BACKEND = xfreebsd], [Compiling for FreeBSD])
AM_CONDITIONAL(HALD_COMPILE_SOLARIS, [test x$HALD_BACKEND = xsolaris], [Compiling for Solaris]) AM_CONDITIONAL(HALD_COMPILE_SOLARIS, [test x$HALD_BACKEND = xsolaris], [Compiling for Solaris])
AC_SUBST(HALD_BACKEND) AC_SUBST(HALD_BACKEND)
+if test "x$HALD_BACKEND" = "xfreebsd"; then +if test "x$HALD_BACKEND" = "xfreebsd"; then
+ AC_CHECK_LIB([usb20], [libusb20_dev_get_info], [USE_LIBUSB20=yes], [USE_LIBUSB20=no]) + AC_CHECK_LIB([usb20], [libusb20_dev_get_info], [USE_LIBUSB20=yes], [USE_LIBUSB20=no])
+fi +fi
+if test "x$USE_LIBUSB20" = "xno"; then
+ AC_CHECK_LIB([usb], [libusb20_dev_get_info], [USE_LIBUSB=yes], [USE_LIBUSB=np])
+fi
+AM_CONDITIONAL([HAVE_LIBUSB20],[test "x$USE_LIBUSB20" = "xyes"]) +AM_CONDITIONAL([HAVE_LIBUSB20],[test "x$USE_LIBUSB20" = "xyes"])
+AM_CONDITIONAL([HAVE_LIBUSB20],[test "x$USE_LIBUSB" = "xyes"])
+if test "x$USE_LIBUSB20" = "xyes"; then +if test "x$USE_LIBUSB20" = "xyes"; then
+ AC_DEFINE(HAVE_LIBUSB20, 1, [Set if we need libusb20]) + AC_DEFINE(HAVE_LIBUSB20, 1, [Set if we need libusb20])
+ LIBUSB20_LIBS="-lusb20"
+elif test "x$USE_LIBUSB" = "xyes"; then
+ AC_DEFINE(HAVE_LIBUSB20, 1, [Set if we need libsub20])
+ LIBUSB20_LIBS="-lusb"
+fi +fi
+ +AC_SUBST(LIBUSB20_LIBS)
dnl DBUS API is subject to changes dnl DBUS API is subject to changes
AC_DEFINE_UNQUOTED(DBUS_API_SUBJECT_TO_CHANGE, [], [DBUS API is subject to change]) AC_DEFINE_UNQUOTED(DBUS_API_SUBJECT_TO_CHANGE, [], [DBUS API is subject to change])

View file

@ -8,7 +8,7 @@
+libhald_freebsd_la_SOURCES += \ +libhald_freebsd_la_SOURCES += \
+ hf-usb2.c \ + hf-usb2.c \
+ hf-usb2.h + hf-usb2.h
+libhald_freebsd_la_LDFLAGS += -lusb20 +libhald_freebsd_la_LDFLAGS += @LIBUSB20_LIBS@
+endif +endif
+ +
EXTRA_DIST = README TODO EXTRA_DIST = README TODO

View file

@ -8,7 +8,7 @@
+@HAVE_LIBUSB20_TRUE@ hf-usb2.c \ +@HAVE_LIBUSB20_TRUE@ hf-usb2.c \
+@HAVE_LIBUSB20_TRUE@ hf-usb2.h +@HAVE_LIBUSB20_TRUE@ hf-usb2.h
+ +
+@HAVE_LIBUSB20_TRUE@am__append_2 = -lusb20 +@HAVE_LIBUSB20_TRUE@am__append_2 = @LIBUSB20_LIBS@
subdir = hald/freebsd subdir = hald/freebsd
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in TODO DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in TODO
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4

View file

@ -31,12 +31,12 @@
+hald_probe_usb2_device_SOURCES = probe-usb2-device.c +hald_probe_usb2_device_SOURCES = probe-usb2-device.c
+hald_probe_usb2_device_LDADD = \ +hald_probe_usb2_device_LDADD = \
+ $(top_builddir)/hald/freebsd/libprobe/libhald_freebsd_probe.la \ + $(top_builddir)/hald/freebsd/libprobe/libhald_freebsd_probe.la \
+ -lusb20 + @LIBUSB20_LIBS@
+ +
+hald_probe_usb2_interface_SOURCES = probe-usb2-interface.c +hald_probe_usb2_interface_SOURCES = probe-usb2-interface.c
+hald_probe_usb2_interface_LDADD = \ +hald_probe_usb2_interface_LDADD = \
+ $(top_builddir)/hald/freebsd/libprobe/libhald_freebsd_probe.la \ + $(top_builddir)/hald/freebsd/libprobe/libhald_freebsd_probe.la \
+ -lusb20 + @LIBUSB20_LIBS@
+endif +endif
+ +
+hald_probe_mouse_SOURCES = probe-mouse.c +hald_probe_mouse_SOURCES = probe-mouse.c

View file

@ -90,12 +90,12 @@
+@HAVE_LIBUSB20_TRUE@hald_probe_usb2_device_SOURCES = probe-usb2-device.c +@HAVE_LIBUSB20_TRUE@hald_probe_usb2_device_SOURCES = probe-usb2-device.c
+@HAVE_LIBUSB20_TRUE@hald_probe_usb2_device_LDADD = \ +@HAVE_LIBUSB20_TRUE@hald_probe_usb2_device_LDADD = \
+@HAVE_LIBUSB20_TRUE@ $(top_builddir)/hald/freebsd/libprobe/libhald_freebsd_probe.la \ +@HAVE_LIBUSB20_TRUE@ $(top_builddir)/hald/freebsd/libprobe/libhald_freebsd_probe.la \
+@HAVE_LIBUSB20_TRUE@ -lusb20 +@HAVE_LIBUSB20_TRUE@ @LIBUSB20_LIBS@
+ +
+@HAVE_LIBUSB20_TRUE@hald_probe_usb2_interface_SOURCES = probe-usb2-interface.c +@HAVE_LIBUSB20_TRUE@hald_probe_usb2_interface_SOURCES = probe-usb2-interface.c
+@HAVE_LIBUSB20_TRUE@hald_probe_usb2_interface_LDADD = \ +@HAVE_LIBUSB20_TRUE@hald_probe_usb2_interface_LDADD = \
+@HAVE_LIBUSB20_TRUE@ $(top_builddir)/hald/freebsd/libprobe/libhald_freebsd_probe.la \ +@HAVE_LIBUSB20_TRUE@ $(top_builddir)/hald/freebsd/libprobe/libhald_freebsd_probe.la \
+@HAVE_LIBUSB20_TRUE@ -lusb20 +@HAVE_LIBUSB20_TRUE@ @LIBUSB20_LIBS@
+ +
+hald_probe_mouse_SOURCES = probe-mouse.c +hald_probe_mouse_SOURCES = probe-mouse.c
+hald_probe_mouse_CPPFLAGS = $(AM_CPPFLAGS) @GLIB_CFLAGS@ +hald_probe_mouse_CPPFLAGS = $(AM_CPPFLAGS) @GLIB_CFLAGS@