[sane-devel] windows port of sane

Henning Meier-Geinitz henning at meier-geinitz.de
Mon Sep 22 09:30:44 BST 2003


On Sun, Sep 21, 2003 at 07:40:52PM -0500, Frank Zago wrote:
> I've updated my port of sane to windows. It works fine with 2 of my scsi 
> scanners. I'd like to integrate it. Can someone review the code?
> http://www.zago.net/sane/windows/sane_on_windows.html

Cool. I had a quick look:

+sane-backends will not compile out of the box. You need to follow the following steps:
+- edit configure.in and put all the AC_CONFIG_FILES entry in one line.

Would it help to use AC_CONFIG_FILES three times?

+ edit acinclude.m4 and remove everything from libtool (about 170kb)

That's because the libtool that comes with cygwin is newer (or just

+- edit backend/Makefile.in, and add "-no-undefined" before the "-version-info" parameter (twice).

What about checking for windows in configure.in and setting the
variable @NO_UNDEFINED@ based on that check and calling libtool with
that variable in the Makefile?

--- sane-backends-1.0.12.org/backend/Makefile.in        2003-05-13 04:39:50.000000000 -0500
+++ sane-backends-1.0.12/backend/Makefile.in    2003-09-21 21:19:38.000000000 -0500
@@ -155,7 +155,7 @@
 libsane-%.la: %.lo %-s.lo $(EXTRA) $(LIBOBJS)
        @$(LIBTOOL) $(MLINK) $(CC) -export-dynamic -o $@ $($*_LIBS) \
-       $(LDFLAGS) $(BACKENDLIBS) $^ -rpath $(libsanedir) \
+       $(LDFLAGS) $(BACKENDLIBS) $^ -rpath $(libsanedir) -no-undefined \
        -version-info $(V_MAJOR):$(V_REV):$(V_MINOR) $(DYNAMIC_FLAG)

Can "-no-undefined" be harmful on other platforms? I've read the docs
but it looks like I don't really understand what it does :-/

Otherwise I haven't found anything that may harm non-Windows system so
it's ok for me. I haven't applied the patch, however.

Could you add some lines to to README.windows about "only SCSI
supported"? README and Makefile.in must be updated, too.


More information about the sane-devel mailing list