diff -Naurp audiofile-0.2.3/audiofile-config.in audiofile-0.2.3-cygwin/audiofile-config.in --- audiofile-0.2.3/audiofile-config.in Tue Feb 27 00:00:23 2001 +++ audiofile-0.2.3-cygwin/audiofile-config.in Wed May 22 13:32:20 2002 @@ -46,7 +46,7 @@ while test $# -gt 0; do ;; --libs) libdirs=-L@libdir@ - echo $libdirs -laudiofile -lm + echo $libdirs -laudiofile ;; *) echo "${usage}" 1>&2 diff -Naurp audiofile-0.2.3/configure audiofile-0.2.3-cygwin/configure --- audiofile-0.2.3/configure Fri Oct 26 05:13:56 2001 +++ audiofile-0.2.3-cygwin/configure Wed May 22 13:52:50 2002 @@ -4278,7 +4278,8 @@ EOF else $CC -o impgen impgen.c ; fi)~ $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' - old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' +# old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' +old_archive_from_expsyms_cmds= # cygwin and mingw dlls have different entry points and sets of symbols # to exclude. @@ -6225,7 +6226,8 @@ old_postuninstall_cmds=$lt_old_postunins old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds +#old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds +old_archive_from_expsyms_cmds= # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds diff -Naurp audiofile-0.2.3/libaudiofile/Makefile.in audiofile-0.2.3-cygwin/libaudiofile/Makefile.in --- audiofile-0.2.3/libaudiofile/Makefile.in Fri Oct 26 05:13:01 2001 +++ audiofile-0.2.3-cygwin/libaudiofile/Makefile.in Wed May 22 13:43:29 2002 @@ -203,6 +203,9 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIE if test -f $$p; then \ echo " $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$p"; \ $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$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 @@ -211,12 +214,15 @@ uninstall-libLTLIBRARIES: @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ echo " $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p"; \ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \ + dll=$$(echo $$p | sed 's,^lib\(.*\).la$$,cyg\1.dll,'); \ + rm -f $(DESTDIR)$(bindir)/$$dll; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) libaudiofile.la: $(libaudiofile_la_OBJECTS) $(libaudiofile_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libaudiofile_la_LDFLAGS) $(libaudiofile_la_OBJECTS) $(libaudiofile_la_LIBADD) $(LIBS) + PREFIX=$(prefix) sh $(top_srcdir)/mkdll.sh $@ mostlyclean-compile: -rm -f *.$(OBJEXT) core *.core diff -Naurp audiofile-0.2.3/mkdll.sh audiofile-0.2.3-cygwin/mkdll.sh --- audiofile-0.2.3/mkdll.sh Thu Jan 1 00:00:00 1970 +++ audiofile-0.2.3-cygwin/mkdll.sh Wed May 22 13:43:57 2002 @@ -0,0 +1,71 @@ +#!/bin/sh + +# script to generate dll from libtool-generated static archive (.la file) +# invoke 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 +test -f $archive || { echo $(basename $0): $archive not found; exit 1; } + +module=$(echo $(basename $archive) | sed -e 's,^lib\(.*\).la$,\1,') + +shift +dependency_libs="$@" + +test -n "$CC" || CC=gcc +prefix=${PREFIX:=/usr/local} + +# get the static library name +# first look in the .la archive +old_lib=$(sed -ne '/^old_library=/ s,^old_library='\''\(.*\)'\''.*$,\1,p' .libs/$archive) +# if not there, use default name +test -n "$old_lib" || old_lib=lib${module}.a + + + +# update the archive with the dll and import lib name; fix install dir; remove relink command +# (${prefix}/lib is hard-coded here - edit it if necessary) +libdir=${prefix}/lib +if sed -e 's,^dlname='\'\'',dlname='\'cyg${module}.dll\'',' \ + -e 's,^library_names='\'\'',library_names='\'lib${module}.dll.a\'',' \ + -e 's,^libdir='\'\'',libdir='\'$libdir\'',' \ + -e 's,^relink_command=.*$,,' \ + .libs/$archive > .libs/${archive}.tmp +then cat .libs/${archive}.tmp > .libs/${archive} +fi +rm -f .libs/${archive}.tmp + +# update the install archive if it exists +if [ -f .libs/${archive}i ] ; then + if sed -e 's,^dlname='\'\'',dlname='\'../bin/cyg${module}.dll\'',' \ + -e 's,^library_names='\'\'',library_names='\'lib${module}.dll.a\'',' \ + -e 's,^relink_command=.*$,,' \ + .libs/${archive}i > .libs/${archive}i.tmp + then cat .libs/${archive}i.tmp > .libs/${archive}i + fi + rm -f .libs/${archive}i.tmp +fi + + +# 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 - if it fails, remove archive so make knows to re-build it +eval $CC -shared -o .libs/cyg${module}.dll -Wl,--out-implib=.libs/lib${module}.dll.a -Wl,--export-all-symbols \ +-Wl,--whole-archive .libs/$old_lib -Wl,--no-whole-archive ${dependency_libs} || { rm -f $archive; false; } + +# copy the .dll.a file to .dll.aT to keep libtool happy +rm -f .libs/lib${module}.dll.aT +ln .libs/lib${module}.dll.a .libs/lib${module}.dll.aT diff -Naurp audiofile-0.2.3/test/Makefile.in audiofile-0.2.3-cygwin/test/Makefile.in --- audiofile-0.2.3/test/Makefile.in Fri Oct 26 05:13:08 2001 +++ audiofile-0.2.3-cygwin/test/Makefile.in Wed May 22 13:32:20 2002 @@ -14,6 +14,7 @@ @SET_MAKE@ SHELL = @SHELL@ +TESTS_ENVIRONMENT = PATH=$(shell pwd)/../libaudiofile/.libs:$$PATH srcdir = @srcdir@ top_srcdir = @top_srcdir@ diff -Naurp audiofile-0.2.3/sfcommands/Makefile.in audiofile-0.2.3-cygwin/sfcommands/Makefile.in --- audiofile-0.2.3/sfcommands/Makefile.in 2001-10-26 05:13:04.000000000 +0100 +++ audiofile-0.2.3-cygwin/sfcommands/Makefile.in 2002-05-24 10:22:21.000000000 +0100 @@ -165,8 +165,8 @@ install-binPROGRAMS: $(bin_PROGRAMS) || test -f $$p1 \ ; then \ f=`echo $$p1|sed '$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) .libs/$$p $(DESTDIR)$(bindir)"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) .libs/$$p $(DESTDIR)$(bindir); \ else :; fi; \ done