sane-find-scanner: disable USB if not supported

This fixes a [-Wpedantic] compiler warning about ISO C forbidding empty
translation units.  The check-usb-chip.c file reduces to such a file in
the case USB support was explicitly disabled or no usable library found.
merge-requests/1/head
Olaf Meeuwissen 2016-09-25 17:00:54 +09:00
rodzic 471e8ac0c1
commit da49686efe
2 zmienionych plików z 5 dodań i 2 usunięć

Wyświetl plik

@ -426,7 +426,7 @@ AS_IF([test xno != "x$with_usb"],
AS_IF([test xyes = "x$with_usb" && test xyes != "x$have_usb"],
[AC_MSG_ERROR([USB support requested but required libraries not found.])
])
dnl AM_CONDITIONAL([have_usb], [test x != "x$USB_LIBS])
AM_CONDITIONAL([have_usblib], [test x != "x$USB_LIBS"])
dnl ************
dnl SCSI Support

Wyświetl plik

@ -34,7 +34,10 @@ CLEANFILES = $(bin_SCRIPTS) $(dist_noinst_SCRIPTS)
EXTRA_DIST = check-po.awk libtool-get-dll-ext mustek600iin-off.c \
RenSaneDlls.cmd README xerox
sane_find_scanner_SOURCES = sane-find-scanner.c check-usb-chip.c
sane_find_scanner_SOURCES = sane-find-scanner.c
if have_usblib
sane_find_scanner_SOURCES += check-usb-chip.c
endif
sane_find_scanner_LDADD = ../sanei/libsanei.la ../lib/liblib.la \
$(USB_LIBS) $(IEEE1284_LIBS) $(SCSI_LIBS) \
../backend/sane_strstatus.lo