sane-0.69 doesn't compile with `--disable-static'

Alexander Jolk (jolk@ap-pc513b.physik.uni-karlsruhe.de)
28 Jan 1998 12:34:06 +0100

Hi,

I configured sane-0.69 using `./configure --disable-static' on a
Linux-2.0.3x machine. Since I know shared libraries work on this
platform, I usually do this in order to save on disk space and
compilation time.

Compilation went wrong in the lib subdirectory:
[lots of files get compiled like this one:]
gcc -c -DHAVE_CONFIG_H -I. -I. -I../include/sane -I../include -D_GNU_SOURCE -DPATH_SANE_CONFIG_DIR=/usr/local/etc/sane.d -DPATH_SANE_DATA_DIR=/usr/local/share -DV_MAJOR=0 -DV_MINOR=69 -I/usr/X11R6/include -O3 -fomit-frame-pointer -Wall -fPIC -DPIC usleep.c
mv -f usleep.o usleep.lo
ar r liblib.a alloca.o getopt.o getopt1.o sigprocmask.o strndup.o strdup.o strsep.o snprintf.o usleep.o
ar: alloca.o: No such file or directory

Obviously, the .o files have not been built by libtool.

This is because of the Makefile.in in the lib subdir:
---->8----
[...]
LIBLIB_OBJS = alloca.o getopt.o getopt1.o sigprocmask.o strndup.o \
strdup.o strsep.o snprintf.o usleep.o
LIBLIB_LTOBJS = alloca.lo getopt.lo getopt1.lo sigprocmask.lo strndup.lo \
strdup.lo strsep.lo snprintf.lo usleep.lo

TARGETS = $(LIBLIB_OBJS)
TARGETS = liblib.a

.SUFFIXES:
.SUFFIXES: .c .o
.c.o:
@$(LIBTOOL) $(MCOMP) $(COMPILE) $<

all: $(TARGETS)

liblib.a: $(LIBLIB_OBJS)
ar r $@ $(LIBLIB_OBJS)
$(RANLIB) $@
----8<----
So we only want the static library, and there is a special rule
involving `ar'. I don't get why there is mentioning of libtool in
this Makefile fragment at all if all we want is a static library?

I seem to recall there were some plans to have the build process use
automake in the not too distant future. If this is true, I think this
will kind of automagically fix problems such as this one, and I'll be
glad to just not use `--disable-static' until then.

Greetings,
Alex

-- 
Alexander Jolk * jolk@ap-pc513b.physik.uni-karlsruhe.de * +49-721-608-3572

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com