aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlaf Meeuwissen <paddy-hack@member.fsf.org>2016-09-25 17:00:54 +0900
committerOlaf Meeuwissen <paddy-hack@member.fsf.org>2016-09-25 17:00:54 +0900
commitda49686efe16bc5f7b4ddef18ea0dcb5f7c18d77 (patch)
tree25f0d871e052fabe65a381b3becec0bf62eb9b11
parent471e8ac0c1b565e5aea92f35ae173e167f3b61c7 (diff)
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.
-rw-r--r--configure.ac2
-rw-r--r--tools/Makefile.am5
2 files changed, 5 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 9beb471..de8ac2e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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
diff --git a/tools/Makefile.am b/tools/Makefile.am
index dee0ec8..70c87ee 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -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