Help with configure.ac rule wanted
Uwe Bonnes
bon at elektron.ikp.physik.tu-darmstadt.de
Tue Dec 22 11:35:06 CST 2015
>>>>> "Austin" == Austin English <austinenglish at gmail.com> writes:
Austin> It would be helpful if you shared your previous patch / what
Austin> you've tried that doesn't work.
Rule used so long:
dnl **** Check for LIBUSB ****
AC_SUBST(USBLIBS,"")
AC_SUBST(USBINCL,"")
if test "x$with_usb" != "xno"
then
AC_CHECK_HEADERS([usb.h],
AC_CHECK_LIB(usb, usb_init,
[AC_DEFINE(HAVE_LIBUSB, 1, [Define if you have the libusb library and header])
USBLIBS="-lusb"]))
ac_save_CPPFLAGS="$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="$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"],
[libusb ${notice_platform}development files not found, USB won't be supported.])
What I tried last:
dnl **** Check for LIBUSB ****
if test "x$with_usb" != "xno"
then
WINE_PACKAGE_FLAGS(USB,[libusb-1.0],,,,
[AC_CHECK_HEADERS([libusb-1.0/usb.h])
if test "$ac_cv_header_usb_h" = "yes"
then
WINE_CHECK_SONAME(usb-1.0, libusb_init,,[USB_CFLAGS=""],[$USB_LIBS])
else
USB_CFLAGS=""
fi])
fi
Cheers
--
Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 1623569 ------- Fax. 06151 1623305 ---------
More information about the wine-devel
mailing list