From 674b884f2911a6c0d4fb69d3309eded5f4657f80 Mon Sep 17 00:00:00 2001 From: Chris Bagwell Date: Sat, 31 Jan 2009 20:40:42 +0000 Subject: [PATCH] * acinclude.m4, configure.in: Define JPEG objects based on existence of JPEG library and not on the dc* backends alone since more backends then that use JPEG support. * backend/Makefile.am: whitespace fixes. --- ChangeLog | 6 +++++- acinclude.m4 | 3 --- backend/Makefile.am | 20 ++++++++++---------- backend/Makefile.in | 6 +++--- configure | 10 ++++------ configure.in | 4 ++++ 6 files changed, 26 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5536085fd..f9415f634 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2009-01-31 Chris Bagwell - * backend/Makefil.am: Add missing math library to coolscan2. + * backend/Makefil.am: Add missing math library to coolscan2 + and coolscan3. + * acinclude.m4, configure.in: Define JPEG objects based on + existence of JPEG library and not on the dc* backends alone + since more backends then that use JPEG support. 2009-01-30 Chris Bagwell * frontend/saned.c: Replace usage of getgrouplist() with diff --git a/acinclude.m4 b/acinclude.m4 index 9c2e7d878..a30fa2c55 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -548,9 +548,6 @@ for be in ${BACKENDS}; do if test "${sane_cv_use_libjpeg}" != "yes"; then echo "*** $be backend requires JPEG library - $DISABLE_MSG" backend_supported="no" - else - SANEI_JPEG="sanei_jpeg.o" - SANEI_JPEG_LO="sanei_jpeg.lo" fi ;; diff --git a/backend/Makefile.am b/backend/Makefile.am index 5f7e7e1c3..3735be77a 100644 --- a/backend/Makefile.am +++ b/backend/Makefile.am @@ -44,19 +44,19 @@ dll.c: dll-preload.h dll-preload.h: rm -f $@ list="$(PRELOADABLE_BACKENDS)"; for be in $$list; do \ - echo "PRELOAD_DECL($$be)" >> $@; \ - done + echo "PRELOAD_DECL($$be)" >> $@; \ + done echo "static struct backend preloaded_backends[] = {" >> $@ sep=""; \ - list="$(PRELOADABLE_BACKENDS)"; \ - if test -z "$${list}"; then \ - echo { 0, 0, 0, 0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }} >> $@; \ - else \ - for be in $$list; do \ + list="$(PRELOADABLE_BACKENDS)"; \ + if test -z "$${list}"; then \ + echo { 0, 0, 0, 0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }} >> $@; \ + else \ + for be in $$list; do \ echo "$${sep}PRELOAD_DEFN($$be)" >> $@; \ sep=","; \ - done; \ - fi + done; \ + fi echo "};" >> $@ # TODO: This really belongs together with the saned sources and @@ -124,7 +124,7 @@ uninstall-hook: rm -f $(DESTDIR)$(libdir)/libsane.* -for dir in $(FIRMWARE_DIRS) ; do \ rmdir $(DESTDIR)$(datadir)/sane/$${dir} ; \ - done + done CLEANFILES = dll-preload.h $(BACKEND_CONFS) $(be_convenience_libs) clean-local: diff --git a/backend/Makefile.in b/backend/Makefile.in index b8eecb0f8..1f8711087 100644 --- a/backend/Makefile.in +++ b/backend/Makefile.in @@ -1680,13 +1680,13 @@ libcoolscan2_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=coolscan2 nodist_libsane_coolscan2_la_SOURCES = coolscan2-s.c libsane_coolscan2_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=coolscan2 libsane_coolscan2_la_LDFLAGS = $(DIST_SANELIBS_LDFLAGS) -libsane_coolscan2_la_LIBADD = $(COMMON_LIBS) libcoolscan2.la ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo sane_strstatus.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo @SCSI_LIBS@ @CAM_LIBS@ +libsane_coolscan2_la_LIBADD = $(COMMON_LIBS) libcoolscan2.la ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo sane_strstatus.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo @SCSI_LIBS@ @CAM_LIBS@ @MATH_LIB@ libcoolscan3_la_SOURCES = coolscan3.c libcoolscan3_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=coolscan3 nodist_libsane_coolscan3_la_SOURCES = coolscan3-s.c libsane_coolscan3_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=coolscan3 libsane_coolscan3_la_LDFLAGS = $(DIST_SANELIBS_LDFLAGS) -libsane_coolscan3_la_LIBADD = $(COMMON_LIBS) libcoolscan3.la ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo sane_strstatus.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo @SCSI_LIBS@ @CAM_LIBS@ +libsane_coolscan3_la_LIBADD = $(COMMON_LIBS) libcoolscan3.la ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo sane_strstatus.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo @SCSI_LIBS@ @CAM_LIBS@ @MATH_LIB@ libdc25_la_SOURCES = dc25.c dc25.h libdc25_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=dc25 nodist_libsane_dc25_la_SOURCES = dc25-s.c @@ -4277,7 +4277,7 @@ dll-preload.h: done echo "static struct backend preloaded_backends[] = {" >> $@ sep=""; \ - list="$(PRELOADABLE_BACKENDS)"; \ + list="$(PRELOADABLE_BACKENDS)"; \ if test -z "$${list}"; then \ echo { 0, 0, 0, 0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }} >> $@; \ else \ diff --git a/configure b/configure index ae996c1b2..46000abeb 100755 --- a/configure +++ b/configure @@ -29940,9 +29940,6 @@ for be in ${BACKENDS}; do if test "${sane_cv_use_libjpeg}" != "yes"; then echo "*** $be backend requires JPEG library - $DISABLE_MSG" backend_supported="no" - else - SANEI_JPEG="sanei_jpeg.o" - SANEI_JPEG_LO="sanei_jpeg.lo" fi ;; @@ -30025,6 +30022,10 @@ done #FIXME: This only works in sanie/ directory. What needs to be #done to get it working for backend as well? Is it even needed? #why is usb/scsi/firewire not optionally compiling sanei items as well? +if test "${sane_cv_use_libjpeg}" = "yes"; then + SANEI_JPEG="sanei_jpeg.o" + SANEI_JPEG_LO="sanei_jpeg.lo" +fi @@ -30095,9 +30096,6 @@ for be in ${BACKENDS}; do if test "${sane_cv_use_libjpeg}" != "yes"; then echo "*** $be backend requires JPEG library - $DISABLE_MSG" backend_supported="no" - else - SANEI_JPEG="sanei_jpeg.o" - SANEI_JPEG_LO="sanei_jpeg.lo" fi ;; diff --git a/configure.in b/configure.in index 8238b86bc..89faa7031 100644 --- a/configure.in +++ b/configure.in @@ -418,6 +418,10 @@ SANE_CHECK_BACKENDS #FIXME: This only works in sanie/ directory. What needs to be #done to get it working for backend as well? Is it even needed? #why is usb/scsi/firewire not optionally compiling sanei items as well? +if test "${sane_cv_use_libjpeg}" = "yes"; then + SANEI_JPEG="sanei_jpeg.o" + SANEI_JPEG_LO="sanei_jpeg.lo" +fi AC_SUBST(SANEI_JPEG) AC_SUBST(SANEI_JPEG_LO)