diff -Naurp gnome-print-0.37/libgnomeprint/Makefile.in gnome-print-0.37-cygwin/libgnomeprint/Makefile.in --- gnome-print-0.37/libgnomeprint/Makefile.in 2002-09-15 21:54:39.000000000 +0100 +++ gnome-print-0.37-cygwin/libgnomeprint/Makefile.in 2002-11-21 10:13:43.000000000 +0000 @@ -245,6 +245,9 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIE if test -f $$p; then \ echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \ $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \ + dll=$$(echo $$p | sed 's,^lib\(.*\).la$$,cyg\1.dll,'); \ + echo "install -D --mode=755 .libs/$$dll $(DESTDIR)$(bindir)/$$dll"; \ + install -D --mode=755 .libs/$$dll $(DESTDIR)$(bindir)/$$dll; \ else :; fi; \ done @@ -252,6 +255,8 @@ uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) list='$(lib_LTLIBRARIES)'; for p in $$list; do \ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \ + dll=$$(echo $$p | sed 's,^lib\(.*\).la$$,cyg\1.dll,'); \ + rm -f $(DESTDIR)$(bindir)/$$dll; \ done .c.o: @@ -294,6 +299,7 @@ maintainer-clean-libtool: libgnomeprint.la: $(libgnomeprint_la_OBJECTS) $(libgnomeprint_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libgnomeprint_la_LDFLAGS) $(libgnomeprint_la_OBJECTS) $(libgnomeprint_la_LIBADD) $(LIBS) + cd .libs && PREFIX=$(prefix) sh ../../mkdll.sh $@ $(libgnomeprint_la_LIBADD) install-libgnomeprintincHEADERS: $(libgnomeprintinc_HEADERS) @$(NORMAL_INSTALL) diff -Naurp gnome-print-0.37/mkdll.sh gnome-print-0.37-cygwin/mkdll.sh --- gnome-print-0.37/mkdll.sh 1970-01-01 00:00:00.000000000 +0000 +++ gnome-print-0.37-cygwin/mkdll.sh 2002-11-21 10:13:43.000000000 +0000 @@ -0,0 +1,59 @@ +#!/bin/sh + +# script to generate dll from libtool-generated static archive (.la file) +# invoke in .libs directory with: +# mkdll.sh +# eg: +# mkdll.sh libtest.la -L/usr/local/lib -llocal + +# defaults to using gcc for libraries written in C. +# set the CC env var to use a different compiler driver: eg +# export CC=g++ +# for C++ libraries + +# defaults to using /usr/local as the installation PREFIX +# override this by setting the PREFIX env var: eg +# export PREFIX=/opt/gnome + +archive=$1 +module=$(echo $(basename $archive) | sed -e 's,^lib\(.*\).la$,\1,') + +shift +dependency_libs="$@" + +test -n "$CC" || CC=gcc +test -n "$PREFIX" || prefix=/usr/local + +# get the static library name +old_lib=$(sed -ne '/^old_library=/ s,^old_library='\''\(.*\)'\''.*$,\1,p' $archive) + +# update the archive with the dll and import lib name. +if sed -e 's,^dlname='\'\'',dlname='\'cyg${module}.dll\'',;s,^library_names='\'\'',library_names='\'lib${module}.dll.a\'',' $archive > ${archive}.tmp +then cat ${archive}.tmp > ${archive} +fi +rm -f ${archive}.tmp + +# update the install archive if it exists +if [ -f ${archive}i ] ; then + if sed -e 's,^dlname='\'\'',dlname='\'../bin/cyg${module}.dll\'',;s,^library_names='\'\'',library_names='\'lib${module}.dll.a\'',' ${archive}i > ${archive}i.tmp + then cat ${archive}i.tmp > ${archive}i + fi + rm -f ${archive}i.tmp +fi + +# update the archive with the install dir if not already set +libdir=${prefix}/lib +if sed -e '/^libdir=/ s,='\'\'',='\'$libdir\'',' $archive > ${archive}.tmp +then cat ${archive}.tmp > $archive +fi +rm -f ${archive}.tmp + + +# report the link command to stdout +eval echo $CC -shared -o cyg${module}.dll -Wl,--out-implib=lib${module}.dll.a \ +-Wl,--export-all-symbols -Wl,--whole-archive $old_lib -Wl,--no-whole-archive ${dependency_libs} + +# do the link command +eval $CC -shared -o cyg${module}.dll -Wl,--out-implib=lib${module}.dll.a -Wl,--export-all-symbols \ +-Wl,--whole-archive $old_lib -Wl,--no-whole-archive ${dependency_libs} +