Index: Make.rules.in
===================================================================
RCS file: /home/wine/wine/Make.rules.in,v
retrieving revision 1.41
diff -u -r1.41 Make.rules.in
--- Make.rules.in	2000/05/12 20:18:14	1.41
+++ Make.rules.in	2000/05/17 19:24:26
@@ -60,6 +60,12 @@
 DLLDIR    = $(TOPOBJDIR)/dlls
 @SET_MAKE@
 
+LIBTOOL = $(SHELL) $(TOPOBJDIR)/libtool
+COMPILE   = $(CC)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC)
+LINK      = $(LIBTOOL) --mode=link $(CC)
+
+
 # Installation infos
 
 INSTALL         = @INSTALL@
@@ -74,12 +80,15 @@
 prog_manext     = 1
 conf_manext     = 5
 includedir      = @includedir@/wine
-CLEAN_FILES     = *.o *.a *.so *.ln \\\#*\\\# *~ *% .\\\#* *.bak *.orig *.rej *.flc \
+CLEAN_FILES     = *.o *.lo *.la *.a *.so *.ln \\\#*\\\# *~ *% .\\\#* *.bak *.orig *.rej *.flc \
                   *.spec.c *.glue.c y.tab.c y.tab.h lex.yy.c core
 
 OBJS = $(SPEC_SRCS:.spec=.spec.o) $(C_SRCS:.c=.o) $(GEN_ASM_SRCS:.s=.o) \
        $(ASM_SRCS:.S=.o) $(RC_SRCS:.rc=.o) $(GLUE:.c=.glue.o) $(EXTRA_OBJS)
 
+LTOBJS = $(SPEC_SRCS:.spec=.spec.lo) $(C_SRCS:.c=.lo) $(GEN_ASM_SRCS:.s=.lo) \
+       $(ASM_SRCS:.S=.lo) $(RC_SRCS:.rc=.lo) $(GLUE:.c=.glue.lo) $(EXTRA_OBJS)
+
 LINTS = $(C_SRCS:.c=.ln)
 
 # DLL list
@@ -149,20 +158,32 @@
 # Implicit rules
 
 .SUFFIXES:
-.SUFFIXES: .rc .res .spec .spec.c .spec.o .glue.c $(SUFFIXES)
+.SUFFIXES: .lo .rc .res .spec .spec.c .spec.o .spec.lo .glue.c $(SUFFIXES)
 
 .c.o:
-	$(CC) -c $(ALLCFLAGS) -o $*.o $<
+	$(COMPILE) -c $(ALLCFLAGS) -o $*.o $<
+
+.c.lo:
+	$(LTCOMPILE) -c $(ALLCFLAGS) -o $*.o $<
 
 .spec.c.spec.o:
-	$(CC) -c $(ALLCFLAGS) @GCC_NO_BUILTIN@ -o $*.spec.o $<
+	$(COMPILE) -c $(ALLCFLAGS) @GCC_NO_BUILTIN@ -o $*.spec.o $<
 
+.spec.c.spec.lo:
+	$(LTCOMPILE) -c $(ALLCFLAGS) @GCC_NO_BUILTIN@ -o $*.spec.o $<
+
 .s.o:
 	$(AS) -o $*.o $<  
 
 .S.o:
-	$(CC) -c -o $*.o $<  
+	$(COMPILE) -c -o $*.o $<  
+
+.s.lo:
+	$(LTCOMPILE) -c $<
 
+.S.lo:
+	$(LTCOMPILE) -c $<
+
 .rc.s:
 	$(WRC) $(WRCFLAGS) $(WRCEXTRA) $(DIVINCL) $<
 
@@ -209,9 +230,10 @@
 	cd $(TOPOBJDIR)/tools && $(MAKE) build@PROGEXT@
 
 # Rule for main module
-
-$(MODULE).o: $(OBJS) Makefile.in $(TOPSRCDIR)/Make.rules.in
-	$(LDCOMBINE) $(OBJS) -o $(MODULE).o
+# FIXME: should use $(LINK), but for some reason, libtool grabs the
+#        static .o objects, rather than the relocatable .lo objects.
+$(MODULE).lo: $(LTOBJS) Makefile.in $(TOPSRCDIR)/Make.rules.in
+	$(LDCOMBINE) $(LTOBJS) -o $(MODULE).lo
 
 # Rules for makefile
 
Index: Makefile.in
===================================================================
RCS file: /home/wine/wine/Makefile.in,v
retrieving revision 1.79
diff -u -r1.79 Makefile.in
--- Makefile.in	2000/04/24 17:17:49	1.79
+++ Makefile.in	2000/05/17 19:24:26
@@ -94,36 +94,36 @@
 LINTSUBDIRS = $(LIBSUBDIRS) $(DLLDIR) $(EMUSUBDIRS) $(DOCSUBDIRS)
 
 LIBOBJS = \
-	controls/controls.o \
-	console/console.o \
-	dlls/advapi32/advapi32.o \
-	dlls/crtdll/crtdll.o \
-	dlls/display/display.o \
-	dlls/mouse/mouse.o \
-	dlls/ntdll/ntdll.o \
-	files/files.o \
-	graphics/graphics.o \
-	graphics/enhmetafiledrv/enhmetafiledrv.o \
-	graphics/metafiledrv/metafiledrv.o \
-	graphics/psdrv/psdrv.o \
-	graphics/win16drv/win16drv.o \
-	if1632/if1632.o \
-	loader/loader.o \
-	loader/ne/ne.o \
-	loader/dos/dos.o \
-	memory/memory.o \
-	misc/misc.o \
-	msdos/msdos.o \
-	objects/objects.o \
-	ole/ole.o \
-	relay32/relay32.o \
-	resources/resources.o \
-	scheduler/scheduler.o \
-	win32/win32.o \
-	windows/windows.o
+	controls/controls.lo \
+	console/console.lo \
+	dlls/advapi32/advapi32.lo \
+	dlls/crtdll/crtdll.lo \
+	dlls/display/display.lo \
+	dlls/mouse/mouse.lo \
+	dlls/ntdll/ntdll.lo \
+	files/files.lo \
+	graphics/graphics.lo \
+	graphics/enhmetafiledrv/enhmetafiledrv.lo \
+	graphics/metafiledrv/metafiledrv.lo \
+	graphics/psdrv/psdrv.lo \
+	graphics/win16drv/win16drv.lo \
+	if1632/if1632.lo \
+	loader/loader.lo \
+	loader/ne/ne.lo \
+	loader/dos/dos.lo \
+	memory/memory.lo \
+	misc/misc.lo \
+	msdos/msdos.lo \
+	objects/objects.lo \
+	ole/ole.lo \
+	relay32/relay32.lo \
+	resources/resources.lo \
+	scheduler/scheduler.lo \
+	win32/win32.lo \
+	windows/windows.lo
 
 EMUOBJS = \
-	miscemu/miscemu.o
+	miscemu/miscemu.lo
 
 DLLOBJS = $(DLLS:%=dlls/lib%.@LIBEXT@)
 
@@ -134,8 +134,8 @@
 all: Make.rules $(PROGRAMS) $(LIBPROGRAMS) lib$(MODULE).$(LIBEXT) $(DLLDIR) $(EMU_TARGET)
 	@echo "Wine build complete."
 
-LIBLINTS = $(LIBOBJS:.o=.ln) 
-EMULINTS = $(EMUOBJS:.o=.ln)
+LIBLINTS = $(LIBOBJS:.lo=.ln) 
+EMULINTS = $(EMUOBJS:.lo=.ln)
 
 lint:: llib-lwine.ln $(EMULINTS)
 	$(LINT) $(ALLLINTFLAGS) -L. -lwine $(EMULINTS)
@@ -149,7 +149,7 @@
 	@exit 1
 
 wine: lib$(MODULE).$(LIBEXT) $(DLLDIR) $(EMUOBJS)
-	$(CC) -o wine $(EMUOBJS) $(DLL_LINK) $(LIBS)
+	$(LINK) -o wine $(EMUOBJS) $(DLL_LINK) $(LIBS)
 
 llib-lwine.ln : $(LIBLINTS)
 	$(LINT) $(ALLLINTFLAGS) -owine $(LIBLINTS)
@@ -177,6 +177,8 @@
 	cd $(libdir) && $(RM) libwine.a libwine.so libwine.so.$(SOVERSION)
 	cd $(bindir) && $(RM) wine wineserver dosmod winedbg
 
+# FIXME: This should be handled by libtool, via $(LINK), but we need to pass in
+# the proper lnk options
 lib$(MODULE).so.$(SOVERSION): $(OBJS) Makefile.in Make.rules.in
 	$(LDSHARED) $(OBJS) -o $@
 
@@ -189,7 +191,7 @@
 	$(RANLIB) $@
 
 checklink::
-	$(CC) -o checklink $(TOPSRCDIR)/library/checklink.c -L. -lwine $(LIBS) && $(RM) checklink
+	$(LINK) -o checklink $(TOPSRCDIR)/library/checklink.c -L. -lwine $(LIBS) && $(RM) checklink
 
 $(EMUOBJS) $(LIBOBJS) $(DLLOBJS) $(PROGRAMS) $(LIBPROGRAMS): $(TOOLSUBDIRS) dummy
 	@cd `dirname $@` && $(MAKE) `basename $@`
Index: configure.in
===================================================================
RCS file: /home/wine/wine/configure.in,v
retrieving revision 1.120
diff -u -r1.120 configure.in
--- configure.in	2000/05/12 20:18:14	1.120
+++ configure.in	2000/05/17 19:24:26
@@ -69,7 +69,8 @@
 AC_PATH_XTRA
 AC_PROG_YACC
 AC_PROG_LEX
-AC_PROG_RANLIB
+AC_DISABLE_STATIC
+AC_PROG_LIBTOOL
 AC_PROG_INSTALL
 AC_PROG_LN_S
 AC_CHECK_PROG(C2MAN,c2man,c2man,true)
Index: console/Makefile.in
===================================================================
RCS file: /home/wine/wine/console/Makefile.in,v
retrieving revision 1.2
diff -u -r1.2 Makefile.in
--- console/Makefile.in	1998/12/09 15:43:03	1.2
+++ console/Makefile.in	2000/05/17 19:24:26
@@ -12,7 +12,7 @@
 	tty.c \
 	xterm.c
 
-all: $(MODULE).o
+all: $(MODULE).lo
 
 @MAKE_RULES@
 
Index: controls/Makefile.in
===================================================================
RCS file: /home/wine/wine/controls/Makefile.in,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Makefile.in
--- controls/Makefile.in	1998/09/24 03:43:35	1.1.1.1
+++ controls/Makefile.in	2000/05/17 19:24:26
@@ -18,7 +18,7 @@
 	uitools.c \
 	widgets.c
 
-all: $(MODULE).o
+all: $(MODULE).lo
 
 @MAKE_RULES@
 
Index: debugger/Makefile.in
===================================================================
RCS file: /home/wine/wine/debugger/Makefile.in,v
retrieving revision 1.11
diff -u -r1.11 Makefile.in
--- debugger/Makefile.in	2000/04/24 17:17:50	1.11
+++ debugger/Makefile.in	2000/05/17 19:24:26
@@ -44,6 +44,6 @@
 	$(LEX) -8 -I $(SRCDIR)/debug.l
 
 winedbg: $(OBJS)
-	$(CC) -o $@ $(OBJS) $(DLL_LINK) $(LIBS)
+	$(LINK) -o $@ $(OBJS) $(DLL_LINK) $(LIBS)
 
 ### Dependencies:
Index: dlls/Makedll.rules.in
===================================================================
RCS file: /home/wine/wine/dlls/Makedll.rules.in,v
retrieving revision 1.3
diff -u -r1.3 Makedll.rules.in
--- dlls/Makedll.rules.in	2000/04/24 17:17:50	1.3
+++ dlls/Makedll.rules.in	2000/05/17 19:24:27
@@ -23,8 +23,8 @@
 
 # Rules for .so files
 
-lib$(MODULE).so.$(SOVERSION): $(OBJS) Makefile.in $(TOPSRCDIR)/Make.rules.in
-	$(LDSHARED) $(OBJS) -o $@ -L$(DLLDIR) $(IMPORTS:%=-l%) $(EXTRALIBS)
+lib$(MODULE).so.$(SOVERSION): $(LTOBJS) Makefile.in $(TOPSRCDIR)/Make.rules.in
+	$(LDSHARED) $(LTOBJS) -o $@ -L$(DLLDIR) $(IMPORTS:%=-l%) $(EXTRALIBS)
 
 $(ALLNAMES): lib$(MODULE).so.$(SOVERSION)
 	$(RM) $@ && $(LN_S) lib$(MODULE).so.$(SOVERSION) $@
Index: dlls/advapi32/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/advapi32/Makefile.in,v
retrieving revision 1.5
diff -u -r1.5 Makefile.in
--- dlls/advapi32/Makefile.in	2000/03/04 22:31:27	1.5
+++ dlls/advapi32/Makefile.in	2000/05/17 19:24:27
@@ -15,7 +15,7 @@
 	security.c \
 	service.c
 
-all: check_wrc $(MODULE).o
+all: check_wrc $(MODULE).lo
 
 @MAKE_RULES@
 
Index: dlls/crtdll/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/crtdll/Makefile.in,v
retrieving revision 1.2
diff -u -r1.2 Makefile.in
--- dlls/crtdll/Makefile.in	1999/08/08 18:47:59	1.2
+++ dlls/crtdll/Makefile.in	2000/05/17 19:24:27
@@ -12,7 +12,7 @@
 	mbstring.c \
 	wcstring.c
 
-all: $(MODULE).o
+all: $(MODULE).lo
 
 @MAKE_RULES@
 
Index: dlls/display/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/display/Makefile.in,v
retrieving revision 1.2
diff -u -r1.2 Makefile.in
--- dlls/display/Makefile.in	2000/03/04 22:31:28	1.2
+++ dlls/display/Makefile.in	2000/05/17 19:24:27
@@ -13,7 +13,7 @@
 RC_SRCS = \
 	disp.rc
 
-all: $(MODULE).o
+all: $(MODULE).lo
 
 @MAKE_RULES@
 
Index: dlls/mouse/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/mouse/Makefile.in,v
retrieving revision 1.2
diff -u -r1.2 Makefile.in
--- dlls/mouse/Makefile.in	2000/03/04 22:31:29	1.2
+++ dlls/mouse/Makefile.in	2000/05/17 19:24:27
@@ -13,7 +13,7 @@
 RC_SRCS = \
 	mouserc.rc
 
-all: $(MODULE).o
+all: $(MODULE).lo
 
 @MAKE_RULES@
 
Index: dlls/ntdll/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/ntdll/Makefile.in,v
retrieving revision 1.9
diff -u -r1.9 Makefile.in
--- dlls/ntdll/Makefile.in	2000/01/24 20:59:45	1.9
+++ dlls/ntdll/Makefile.in	2000/05/17 19:24:27
@@ -23,7 +23,7 @@
 	sync.c \
 	time.c
 
-all: $(MODULE).o
+all: $(MODULE).lo
 
 @MAKE_RULES@
 
Index: dlls/ttydrv/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/ttydrv/Makefile.in,v
retrieving revision 1.4
diff -u -r1.4 Makefile.in
--- dlls/ttydrv/Makefile.in	2000/04/25 19:58:22	1.4
+++ dlls/ttydrv/Makefile.in	2000/05/17 19:24:28
@@ -12,8 +12,8 @@
 	ttydrv_main.c
 
 EXTRA_OBJS = \
-	$(TOPOBJDIR)/graphics/ttydrv/ttydrv.o \
-	$(TOPOBJDIR)/windows/ttydrv/ttydrv.o
+	$(TOPOBJDIR)/graphics/ttydrv/ttydrv.lo \
+	$(TOPOBJDIR)/windows/ttydrv/ttydrv.lo
 
 SUBDIRS = \
 	$(TOPOBJDIR)/graphics/ttydrv \
Index: dlls/x11drv/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/x11drv/Makefile.in,v
retrieving revision 1.5
diff -u -r1.5 Makefile.in
--- dlls/x11drv/Makefile.in	2000/04/24 17:17:51	1.5
+++ dlls/x11drv/Makefile.in	2000/05/17 19:24:28
@@ -15,9 +15,9 @@
 	$(TOPOBJDIR)/windows/x11drv/wineclipsrv
 
 EXTRA_OBJS = \
-	$(TOPOBJDIR)/graphics/x11drv/x11drv.o \
-	$(TOPOBJDIR)/tsx11/tsx11.o \
-	$(TOPOBJDIR)/windows/x11drv/x11drv.o
+	$(TOPOBJDIR)/graphics/x11drv/x11drv.lo \
+	$(TOPOBJDIR)/tsx11/tsx11.lo \
+	$(TOPOBJDIR)/windows/x11drv/x11drv.lo
 
 SUBDIRS = \
 	$(TOPOBJDIR)/graphics/x11drv \
Index: files/Makefile.in
===================================================================
RCS file: /home/wine/wine/files/Makefile.in,v
retrieving revision 1.5
diff -u -r1.5 Makefile.in
--- files/Makefile.in	1999/12/10 03:46:20	1.5
+++ files/Makefile.in	2000/05/17 19:24:28
@@ -16,7 +16,7 @@
 	profile.c \
 	tape.c
 
-all: $(MODULE).o
+all: $(MODULE).lo
 
 @MAKE_RULES@
 
Index: graphics/Makefile.in
===================================================================
RCS file: /home/wine/wine/graphics/Makefile.in,v
retrieving revision 1.6
diff -u -r1.6 Makefile.in
--- graphics/Makefile.in	2000/03/17 16:58:11	1.6
+++ graphics/Makefile.in	2000/05/17 19:24:28
@@ -18,7 +18,7 @@
 	path.c \
 	vga.c
 
-all: $(MODULE).o
+all: $(MODULE).lo
 
 @MAKE_RULES@
 
Index: graphics/x11drv/Makefile.in
===================================================================
RCS file: /home/wine/wine/graphics/x11drv/Makefile.in,v
retrieving revision 1.5
diff -u -r1.5 Makefile.in
--- graphics/x11drv/Makefile.in	2000/05/12 20:18:16	1.5
+++ graphics/x11drv/Makefile.in	2000/05/17 19:24:28
@@ -21,7 +21,7 @@
 	text.c \
 	xfont.c
 
-all: $(MODULE).o
+all: $(MODULE).lo
 
 @MAKE_RULES@
 
Index: if1632/Makefile.in
===================================================================
RCS file: /home/wine/wine/if1632/Makefile.in,v
retrieving revision 1.18
diff -u -r1.18 Makefile.in
--- if1632/Makefile.in	2000/05/14 23:34:41	1.18
+++ if1632/Makefile.in	2000/05/17 19:24:28
@@ -29,7 +29,7 @@
 
 GLUE = thunk.c
 
-all: $(MODULE).o
+all: $(MODULE).lo
 
 @MAKE_RULES@
 
Index: loader/Makefile.in
===================================================================
RCS file: /home/wine/wine/loader/Makefile.in,v
retrieving revision 1.6
diff -u -r1.6 Makefile.in
--- loader/Makefile.in	2000/02/03 01:33:48	1.6
+++ loader/Makefile.in	2000/05/17 19:24:29
@@ -18,7 +18,7 @@
 
 GLUE = task.c
 
-all: $(MODULE).o
+all: $(MODULE).lo
 
 @MAKE_RULES@
 
Index: loader/dos/Makefile.in
===================================================================
RCS file: /home/wine/wine/loader/dos/Makefile.in,v
retrieving revision 1.2
diff -u -r1.2 Makefile.in
--- loader/dos/Makefile.in	1999/06/06 17:28:21	1.2
+++ loader/dos/Makefile.in	2000/05/17 19:24:29
@@ -11,10 +11,10 @@
 
 PROGRAMS = dosmod
 
-all: $(MODULE).o $(PROGRAMS)
+all: $(MODULE).lo $(PROGRAMS)
 
 dosmod: dosmod.c
-	$(CC) $(ALLCFLAGS) -o dosmod $(SRCDIR)/dosmod.c
+	$(LINK) $(ALLCFLAGS) -o dosmod $(SRCDIR)/dosmod.c
 
 @MAKE_RULES@
 
Index: memory/Makefile.in
===================================================================
RCS file: /home/wine/wine/memory/Makefile.in,v
retrieving revision 1.2
diff -u -r1.2 Makefile.in
--- memory/Makefile.in	1999/06/18 18:29:04	1.2
+++ memory/Makefile.in	2000/05/17 19:24:29
@@ -17,7 +17,7 @@
 	string.c \
 	virtual.c
 
-all: $(MODULE).o
+all: $(MODULE).lo
 
 @MAKE_RULES@
 
Index: misc/Makefile.in
===================================================================
RCS file: /home/wine/wine/misc/Makefile.in,v
retrieving revision 1.21
diff -u -r1.21 Makefile.in
--- misc/Makefile.in	2000/05/14 23:34:42	1.21
+++ misc/Makefile.in	2000/05/17 19:24:29
@@ -29,7 +29,7 @@
 
 GLUE = printdrv.c
 
-all: $(MODULE).o
+all: $(MODULE).lo
 
 @MAKE_RULES@
 
Index: msdos/Makefile.in
===================================================================
RCS file: /home/wine/wine/msdos/Makefile.in,v
retrieving revision 1.10
diff -u -r1.10 Makefile.in
--- msdos/Makefile.in	2000/03/08 19:41:50	1.10
+++ msdos/Makefile.in	2000/05/17 19:24:29
@@ -38,7 +38,7 @@
 	ioports.c \
 	vxd.c
 
-all: $(MODULE).o
+all: $(MODULE).lo
 
 @MAKE_RULES@
 
Index: objects/Makefile.in
===================================================================
RCS file: /home/wine/wine/objects/Makefile.in,v
retrieving revision 1.4
diff -u -r1.4 Makefile.in
--- objects/Makefile.in	2000/03/18 22:12:33	1.4
+++ objects/Makefile.in	2000/05/17 19:24:29
@@ -25,7 +25,7 @@
 
 GLUE = dc.c
 
-all: $(MODULE).o
+all: $(MODULE).lo
 
 @MAKE_RULES@
 
Index: ole/Makefile.in
===================================================================
RCS file: /home/wine/wine/ole/Makefile.in,v
retrieving revision 1.18
diff -u -r1.18 Makefile.in
--- ole/Makefile.in	2000/04/09 18:20:00	1.18
+++ ole/Makefile.in	2000/05/17 19:24:29
@@ -11,7 +11,7 @@
 
 EXTRASUBDIRS = nls
 
-all: $(MODULE).o
+all: $(MODULE).lo
 
 @MAKE_RULES@
 
Index: relay32/Makefile.in
===================================================================
RCS file: /home/wine/wine/relay32/Makefile.in,v
retrieving revision 1.19
diff -u -r1.19 Makefile.in
--- relay32/Makefile.in	2000/03/19 12:08:11	1.19
+++ relay32/Makefile.in	2000/05/17 19:24:30
@@ -19,7 +19,7 @@
 GEN_ASM_SRCS = \
 	call32.s
 
-all: $(MODULE).o
+all: $(MODULE).lo
 
 @MAKE_RULES@
 
Index: resources/Makefile.in
===================================================================
RCS file: /home/wine/wine/resources/Makefile.in,v
retrieving revision 1.6
diff -u -r1.6 Makefile.in
--- resources/Makefile.in	2000/03/04 22:31:32	1.6
+++ resources/Makefile.in	2000/05/17 19:24:30
@@ -9,7 +9,7 @@
 RC_SRCS = \
 	user32.rc
 
-all: check_wrc $(MODULE).o
+all: check_wrc $(MODULE).lo
 
 @MAKE_RULES@
 
Index: scheduler/Makefile.in
===================================================================
RCS file: /home/wine/wine/scheduler/Makefile.in,v
retrieving revision 1.8
diff -u -r1.8 Makefile.in
--- scheduler/Makefile.in	2000/04/14 14:47:02	1.8
+++ scheduler/Makefile.in	2000/05/17 19:24:30
@@ -23,7 +23,7 @@
 	thread.c \
 	timer.c
 
-all: $(MODULE).o
+all: $(MODULE).lo
 
 @MAKE_RULES@
 
Index: server/Makefile.in
===================================================================
RCS file: /home/wine/wine/server/Makefile.in,v
retrieving revision 1.19
diff -u -r1.19 Makefile.in
--- server/Makefile.in	2000/02/13 13:56:14	1.19
+++ server/Makefile.in	2000/05/17 19:24:30
@@ -40,6 +40,6 @@
 @MAKE_RULES@
 
 wineserver: $(OBJS)
-	$(CC) -o $(PROGRAMS) $(OBJS) $(LIBS)
+	$(LINK) -o $(PROGRAMS) $(OBJS) $(LIBS)
 
 ### Dependencies:
Index: tools/Makefile.in
===================================================================
RCS file: /home/wine/wine/tools/Makefile.in,v
retrieving revision 1.4
diff -u -r1.4 Makefile.in
--- tools/Makefile.in	2000/05/01 20:06:00	1.4
+++ tools/Makefile.in	2000/05/17 19:24:30
@@ -24,15 +24,15 @@
 @MAKE_RULES@
 
 build@PROGEXT@: build.o
-	$(CC) $(CFLAGS) -o build@PROGEXT@ build.o
+	$(LINK) $(CFLAGS) -o build@PROGEXT@ build.o
 
 makedep@PROGEXT@: makedep.o
-	$(CC) $(CFLAGS) -o makedep@PROGEXT@ makedep.o
+	$(LINK) $(CFLAGS) -o makedep@PROGEXT@ makedep.o
 
 fnt2bdf@PROGEXT@: fnt2bdf.o
-	$(CC) $(CFLAGS) -o fnt2bdf@PROGEXT@ fnt2bdf.o
+	$(LINK) $(CFLAGS) -o fnt2bdf@PROGEXT@ fnt2bdf.o
 
 bin2res@PROGEXT@: bin2res.o
-	$(CC) $(CFLAGS) -o bin2res@PROGEXT@ bin2res.o
+	$(LINK) $(CFLAGS) -o bin2res@PROGEXT@ bin2res.o
 
 ### Dependencies:
Index: tools/wrc/Makefile.in
===================================================================
RCS file: /home/wine/wine/tools/wrc/Makefile.in,v
retrieving revision 1.4
diff -u -r1.4 Makefile.in
--- tools/wrc/Makefile.in	2000/05/09 22:35:10	1.4
+++ tools/wrc/Makefile.in	2000/05/17 19:24:30
@@ -29,7 +29,7 @@
 @MAKE_RULES@
 
 wrc@PROGEXT@: $(OBJS)
-	$(CC) $(CFLAGS) -o wrc@PROGEXT@ $(OBJS) $(LEXLIB)
+	$(LINK) $(CFLAGS) -o wrc@PROGEXT@ $(OBJS) $(LEXLIB)
 
 y.tab.c y.tab.h: parser.y
 	$(YACC) $(YACCOPT) -d -t $(SRCDIR)/parser.y
Index: tsx11/Makefile.in
===================================================================
RCS file: /home/wine/wine/tsx11/Makefile.in,v
retrieving revision 1.3
diff -u -r1.3 Makefile.in
--- tsx11/Makefile.in	1999/09/20 18:42:46	1.3
+++ tsx11/Makefile.in	2000/05/17 19:24:31
@@ -15,7 +15,7 @@
 	ts_xutil.c \
 	ts_xpm.c
 
-all: $(MODULE).o
+all: $(MODULE).lo
 
 @MAKE_RULES@
 
Index: win32/Makefile.in
===================================================================
RCS file: /home/wine/wine/win32/Makefile.in,v
retrieving revision 1.3
diff -u -r1.3 Makefile.in
--- win32/Makefile.in	2000/03/07 13:14:28	1.3
+++ win32/Makefile.in	2000/05/17 19:24:31
@@ -20,7 +20,7 @@
 	struct32.c \
 	time.c
 
-all: $(MODULE).o
+all: $(MODULE).lo
 
 @MAKE_RULES@
 
Index: windows/Makefile.in
===================================================================
RCS file: /home/wine/wine/windows/Makefile.in,v
retrieving revision 1.8
diff -u -r1.8 Makefile.in
--- windows/Makefile.in	2000/03/18 22:12:33	1.8
+++ windows/Makefile.in	2000/05/17 19:24:31
@@ -44,7 +44,7 @@
 GLUE =	hook.c \
 	driver.c
 
-all: $(MODULE).o
+all: $(MODULE).lo
 
 @MAKE_RULES@
 
Index: windows/x11drv/Makefile.in
===================================================================
RCS file: /home/wine/wine/windows/x11drv/Makefile.in,v
retrieving revision 1.7
diff -u -r1.7 Makefile.in
--- windows/x11drv/Makefile.in	2000/03/25 17:30:14	1.7
+++ windows/x11drv/Makefile.in	2000/05/17 19:24:31
@@ -15,10 +15,10 @@
 
 PROGRAMS = wineclipsrv
 
-all: $(MODULE).o $(PROGRAMS)
+all: $(MODULE).lo $(PROGRAMS)
 
 wineclipsrv: wineclipsrv.c
-	$(CC) $(ALLCFLAGS) -o wineclipsrv $(SRCDIR)/wineclipsrv.c $(X_LIBS) $(XLIB) $(LIBS)
+	$(LINK) $(ALLCFLAGS) -o wineclipsrv $(SRCDIR)/wineclipsrv.c $(X_LIBS) $(XLIB) $(LIBS)
 
 @MAKE_RULES@
 
--- /dev/null	Mon Feb 22 21:41:16 1999
+++ aclocal.m4	Tue May 16 14:25:03 2000
@@ -0,0 +1,430 @@
+## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*-
+## Copyright (C) 1996-1999 Free Software Foundation, Inc.
+## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+##
+## As a special exception to the GNU General Public License, if you
+## distribute this file as part of a program that contains a
+## configuration script generated by Autoconf, you may include it under
+## the same distribution terms that you use for the rest of that program.
+
+# serial 40 AC_PROG_LIBTOOL
+AC_DEFUN(AC_PROG_LIBTOOL,
+[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
+
+# Save cache, so that ltconfig can load it
+AC_CACHE_SAVE
+
+# Actually configure libtool.  ac_aux_dir is where install-sh is found.
+CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
+LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
+LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
+DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
+${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
+$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
+|| AC_MSG_ERROR([libtool configure failed])
+
+# Reload cache, that may have been modified by ltconfig
+AC_CACHE_LOAD
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+# Redirect the config.log output again, so that the ltconfig log is not
+# clobbered by the next message.
+exec 5>>./config.log
+])
+
+AC_DEFUN(AC_LIBTOOL_SETUP,
+[AC_PREREQ(2.13)dnl
+AC_REQUIRE([AC_ENABLE_SHARED])dnl
+AC_REQUIRE([AC_ENABLE_STATIC])dnl
+AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_REQUIRE([AC_PROG_RANLIB])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_LD])dnl
+AC_REQUIRE([AC_PROG_NM])dnl
+AC_REQUIRE([AC_PROG_LN_S])dnl
+dnl
+
+case "$target" in
+NONE) lt_target="$host" ;;
+*) lt_target="$target" ;;
+esac
+
+# Check for any special flags to pass to ltconfig.
+libtool_flags="--cache-file=$cache_file"
+test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
+test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
+test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
+test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
+test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
+ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
+[libtool_flags="$libtool_flags --enable-dlopen"])
+ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
+[libtool_flags="$libtool_flags --enable-win32-dll"])
+AC_ARG_ENABLE(libtool-lock,
+  [  --disable-libtool-lock  avoid locking (might break parallel builds)])
+test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
+test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case "$lt_target" in
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case "`/usr/bin/file conftest.o`" in
+    *32-bit*)
+      LD="${LD-ld} -32"
+      ;;
+    *N32*)
+      LD="${LD-ld} -n32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -64"
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+    [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+
+ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
+[*-*-cygwin* | *-*-mingw*)
+  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+  AC_CHECK_TOOL(AS, as, false)
+  AC_CHECK_TOOL(OBJDUMP, objdump, false)
+  ;;
+])
+esac
+])
+
+# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
+AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
+
+# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
+AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
+
+# AC_ENABLE_SHARED - implement the --enable-shared flag
+# Usage: AC_ENABLE_SHARED[(DEFAULT)]
+#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
+#   `yes'.
+AC_DEFUN(AC_ENABLE_SHARED, [dnl
+define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE(shared,
+changequote(<<, >>)dnl
+<<  --enable-shared[=PKGS]  build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
+changequote([, ])dnl
+[p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_shared=yes ;;
+no) enable_shared=no ;;
+*)
+  enable_shared=no
+  # Look at the argument we got.  We use all the common list separators.
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+  for pkg in $enableval; do
+    if test "X$pkg" = "X$p"; then
+      enable_shared=yes
+    fi
+  done
+  IFS="$ac_save_ifs"
+  ;;
+esac],
+enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
+])
+
+# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
+AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_SHARED(no)])
+
+# AC_ENABLE_STATIC - implement the --enable-static flag
+# Usage: AC_ENABLE_STATIC[(DEFAULT)]
+#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
+#   `yes'.
+AC_DEFUN(AC_ENABLE_STATIC, [dnl
+define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE(static,
+changequote(<<, >>)dnl
+<<  --enable-static[=PKGS]  build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
+changequote([, ])dnl
+[p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_static=yes ;;
+no) enable_static=no ;;
+*)
+  enable_static=no
+  # Look at the argument we got.  We use all the common list separators.
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+  for pkg in $enableval; do
+    if test "X$pkg" = "X$p"; then
+      enable_static=yes
+    fi
+  done
+  IFS="$ac_save_ifs"
+  ;;
+esac],
+enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
+])
+
+# AC_DISABLE_STATIC - set the default static flag to --disable-static
+AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_STATIC(no)])
+
+
+# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
+# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
+#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
+#   `yes'.
+AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
+define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE(fast-install,
+changequote(<<, >>)dnl
+<<  --enable-fast-install[=PKGS]  optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
+changequote([, ])dnl
+[p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_fast_install=yes ;;
+no) enable_fast_install=no ;;
+*)
+  enable_fast_install=no
+  # Look at the argument we got.  We use all the common list separators.
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+  for pkg in $enableval; do
+    if test "X$pkg" = "X$p"; then
+      enable_fast_install=yes
+    fi
+  done
+  IFS="$ac_save_ifs"
+  ;;
+esac],
+enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
+])
+
+# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
+AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_FAST_INSTALL(no)])
+
+# AC_PROG_LD - find the path to the GNU or non-GNU linker
+AC_DEFUN(AC_PROG_LD,
+[AC_ARG_WITH(gnu-ld,
+[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+ac_prog=ld
+if test "$ac_cv_prog_gcc" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  AC_MSG_CHECKING([for ld used by GCC])
+  ac_prog=`($CC -print-prog-name=ld) 2>&5`
+  case "$ac_prog" in
+    # Accept absolute paths.
+changequote(,)dnl
+    [\\/]* | [A-Za-z]:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+changequote([,])dnl
+      # Canonicalize the path of ld
+      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  AC_MSG_CHECKING([for GNU ld])
+else
+  AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(ac_cv_path_LD,
+[if test -z "$LD"; then
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      ac_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some GNU ld's only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+	test "$with_gnu_ld" != no && break
+      else
+	test "$with_gnu_ld" != yes && break
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+else
+  ac_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$ac_cv_path_LD"
+if test -n "$LD"; then
+  AC_MSG_RESULT($LD)
+else
+  AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_PROG_LD_GNU
+])
+
+AC_DEFUN(AC_PROG_LD_GNU,
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+  ac_cv_prog_gnu_ld=yes
+else
+  ac_cv_prog_gnu_ld=no
+fi])
+])
+
+# AC_PROG_NM - find the path to a BSD-compatible name lister
+AC_DEFUN(AC_PROG_NM,
+[AC_MSG_CHECKING([for BSD-compatible nm])
+AC_CACHE_VAL(ac_cv_path_NM,
+[if test -n "$NM"; then
+  # Let the user override the test.
+  ac_cv_path_NM="$NM"
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
+      # Check to see if the nm accepts a BSD-compat flag.
+      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+      #   nm: unknown option "B" ignored
+      if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+	ac_cv_path_NM="$ac_dir/nm -B"
+	break
+      elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+	ac_cv_path_NM="$ac_dir/nm -p"
+	break
+      else
+	ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
+	continue # so that we can try to find one that supports BSD flags
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
+fi])
+NM="$ac_cv_path_NM"
+AC_MSG_RESULT([$NM])
+])
+
+# AC_CHECK_LIBM - check for math library
+AC_DEFUN(AC_CHECK_LIBM,
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case "$lt_target" in
+*-*-beos* | *-*-cygwin*)
+  # These system don't have libm
+  ;;
+*-ncr-sysv4.3*)
+  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+  AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
+  ;;
+*)
+  AC_CHECK_LIB(m, main, LIBM="-lm")
+  ;;
+esac
+])
+
+# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
+# the libltdl convenience library, adds --enable-ltdl-convenience to
+# the configure arguments.  Note that LIBLTDL is not AC_SUBSTed, nor
+# is AC_CONFIG_SUBDIRS called.  If DIR is not provided, it is assumed
+# to be `${top_builddir}/libltdl'.  Make sure you start DIR with
+# '${top_builddir}/' (note the single quotes!) if your package is not
+# flat, and, if you're not using automake, define top_builddir as
+# appropriate in the Makefiles.
+AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+  case "$enable_ltdl_convenience" in
+  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
+  "") enable_ltdl_convenience=yes
+      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
+  esac
+  LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
+  INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
+])
+
+# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
+# the libltdl installable library, and adds --enable-ltdl-install to
+# the configure arguments.  Note that LIBLTDL is not AC_SUBSTed, nor
+# is AC_CONFIG_SUBDIRS called.  If DIR is not provided, it is assumed
+# to be `${top_builddir}/libltdl'.  Make sure you start DIR with
+# '${top_builddir}/' (note the single quotes!) if your package is not
+# flat, and, if you're not using automake, define top_builddir as
+# appropriate in the Makefiles.
+# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
+AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+  AC_CHECK_LIB(ltdl, main,
+  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
+  [if test x"$enable_ltdl_install" = xno; then
+     AC_MSG_WARN([libltdl not installed, but installation disabled])
+   else
+     enable_ltdl_install=yes
+   fi
+  ])
+  if test x"$enable_ltdl_install" = x"yes"; then
+    ac_configure_args="$ac_configure_args --enable-ltdl-install"
+    LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
+    INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
+  else
+    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
+    LIBLTDL="-lltdl"
+    INCLTDL=
+  fi
+])
+
+dnl old names
+AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
+AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
+AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
+AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
+AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
+AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
+AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
+
+dnl This is just to silence aclocal about the macro not being used
+ifelse([AC_DISABLE_FAST_INSTALL])dnl
