[sane-devel] OS/2 version of Sane

Paul Floyd paulf@free.fr
Thu, 22 Nov 2001 10:12:33 +0100 (MET)


Hi

I thought I'd throw in my experiences as well.

1. configure failed to detect syslog. Had to edit include/sane/config.h

2. similar problems with .exe as Franz. I fixed that by editing all the
Makefiles and changing the statements that look like [from memory]

ifneq ($exeext, .exe)
	COPTS = -Zomf ...
else
	COPTS = ...
endif

to be "ifeq" instead

This results in a OMF exe being generated (as opposed to an a.out file which
OS/2 can't run).

This does not result in a DLL being produced. Instead, one great big .exe is
produced - I manually set the compile options to -g and removed the -s. In order
to get a DLL, some significant work with libtool is required.

3. snapscan is not supported on OS/2 (USB code uses headers that are not
available).

My fix for this is to do something like

#ifdef OS2
#include "snapscan-usb-stubs.c"
#else
#include "snapscan-usb.c"
#endif

where the 'stubs' version doesn't include the offending header file, but it does
have empty function bodies to keep the linker happy.

After these changes, it all worked (for me). So far, the "smoothest" build I've
experienced with SANE (since 1.0.3).

A bientot
Paul
-- 
Paul Floyd   http://paulf.free.fr for those with time to waste
What's the point? The sharp thing on the end.