diff -Naurp libglade-0.17/Makefile.in libglade-0.17-cygwin/Makefile.in --- libglade-0.17/Makefile.in Fri Sep 7 04:00:35 2001 +++ libglade-0.17-cygwin/Makefile.in Wed Feb 27 13:24:13 2002 @@ -83,7 +83,7 @@ GNOME_APPLETS_LIBS = @GNOME_APPLETS_LIBS GNOME_CAPPLET_LIBS = @GNOME_CAPPLET_LIBS@ GNOME_CONFIG = @GNOME_CONFIG@ GNOME_DOCKLETS_LIBS = @GNOME_DOCKLETS_LIBS@ -GNOME_INCLUDEDIR = @GNOME_INCLUDEDIR@ +GNOME_INCLUDEDIR = @GNOME_INCLUDEDIR@ -I$(prefix)/include GNOME_LIBDIR = @GNOME_LIBDIR@ GNOME_LIBS = @GNOME_LIBS@ GNORBA_CFLAGS = @GNORBA_CFLAGS@ diff -Naurp libglade-0.17/configure libglade-0.17-cygwin/configure --- libglade-0.17/configure Fri Sep 7 04:00:42 2001 +++ libglade-0.17-cygwin/configure Mon Jan 7 14:47:18 2002 @@ -4571,7 +4571,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. @@ -6490,7 +6491,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 libglade-0.17/glade/Makefile.in libglade-0.17-cygwin/glade/Makefile.in --- libglade-0.17/glade/Makefile.in Fri Sep 7 04:01:15 2001 +++ libglade-0.17-cygwin/glade/Makefile.in Mon Jan 7 14:47:18 2002 @@ -91,7 +91,7 @@ GNOME_CAPPLET_LIBS = @GNOME_CAPPLET_LIBS@ GNOME_CONFIG = @GNOME_CONFIG@ GNOME_DOCKLETS_LIBS = @GNOME_DOCKLETS_LIBS@ -GNOME_INCLUDEDIR = @GNOME_INCLUDEDIR@ +GNOME_INCLUDEDIR = @GNOME_INCLUDEDIR@ -I$(prefix)/include GNOME_LIBDIR = @GNOME_LIBDIR@ GNOME_LIBS = @GNOME_LIBS@ GNORBA_CFLAGS = @GNORBA_CFLAGS@ @@ -268,6 +268,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 @@ -276,18 +279,28 @@ 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) libglade-bonobo.la: $(libglade_bonobo_la_OBJECTS) $(libglade_bonobo_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libglade_bonobo_la_LDFLAGS) $(libglade_bonobo_la_OBJECTS) $(libglade_bonobo_la_LIBADD) $(LIBS) + cd .libs && PREFIX=$(prefix) sh ../../mkdll.sh $@ + libglade-gnome.la: $(libglade_gnome_la_OBJECTS) $(libglade_gnome_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libglade_gnome_la_LDFLAGS) $(libglade_gnome_la_OBJECTS) $(libglade_gnome_la_LIBADD) $(LIBS) + cd .libs && PREFIX=$(prefix) sh ../../mkdll.sh $@ libglade.dll.a $$(gnome-config --libs gnomeui xml) -lintl + libglade-gnomedb.la: $(libglade_gnomedb_la_OBJECTS) $(libglade_gnomedb_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libglade_gnomedb_la_LDFLAGS) $(libglade_gnomedb_la_OBJECTS) $(libglade_gnomedb_la_LIBADD) $(LIBS) + cd .libs && PREFIX=$(prefix) sh ../../mkdll.sh $@ $$(gnome-config --libs gtk) -lintl + libglade.la: $(libglade_la_OBJECTS) $(libglade_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libglade_la_LDFLAGS) $(libglade_la_OBJECTS) $(libglade_la_LIBADD) $(LIBS) + cd .libs && PREFIX=$(prefix) sh ../../mkdll.sh $@ $$(gnome-config --libs gtk xml) -lintl + mostlyclean-compile: -rm -f *.$(OBJEXT) core *.core diff -Naurp libglade-0.17/glade/glade-init.c libglade-0.17-cygwin/glade/glade-init.c --- libglade-0.17/glade/glade-init.c Sat Feb 10 11:45:31 2001 +++ libglade-0.17-cygwin/glade/glade-init.c Mon Jan 7 15:04:36 2002 @@ -72,10 +72,14 @@ glade_load_module (const char *module) return; } +#ifndef __CYGWIN__ if (module[0]=='/' || (module[0]=='l' && module[1]=='i' && module[2]=='b')) module_name = g_strdup(module); else module_name = g_strconcat("lib", module, ".so", NULL); +#else + module_name = g_strconcat("cyg", module, ".dll", NULL); +#endif mod = g_module_open(module_name, G_MODULE_BIND_LAZY); if (mod && g_module_symbol(mod, "glade_init_module", (gpointer*)&init_func)) { diff -Naurp libglade-0.17/mkdll.sh libglade-0.17-cygwin/mkdll.sh --- libglade-0.17/mkdll.sh Thu Jan 1 00:00:00 1970 +++ libglade-0.17-cygwin/mkdll.sh Mon Jan 7 14:47:18 2002 @@ -0,0 +1,61 @@ +#!/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=/usr/local/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\'',;s,^dependency_libs=.*$,dependency_libs='\'" ${dependency_libs}"\'',' ${archive}i > ${archive}i.tmp + 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 +# (${prefix}/lib is hard-coded here - edit it if necessary) +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} +