diff -Naurp gal-0.22/configure gal-0.22-cygwin/configure --- gal-0.22/configure 2002-12-05 17:12:52.000000000 +0000 +++ gal-0.22-cygwin/configure 2002-12-15 15:34:02.000000000 +0000 @@ -5194,7 +5194,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. @@ -7141,7 +7142,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 gal-0.22/gal/Makefile.in gal-0.22-cygwin/gal/Makefile.in --- gal-0.22/gal/Makefile.in 2002-12-05 17:13:21.000000000 +0000 +++ gal-0.22-cygwin/gal/Makefile.in 2002-12-15 15:32:16.000000000 +0000 @@ -223,19 +223,21 @@ maintainer-clean-libLTLIBRARIES: install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(libdir) + $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(bindir) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \ $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \ else :; fi; \ done + cp .libs/cyggal.dll $(DESTDIR)$(bindir)/cyggal.dll uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) list='$(lib_LTLIBRARIES)'; for p in $$list; do \ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \ done + rm -f $(DESTDIR)$(bindir)/cyggal.dll .c.o: $(COMPILE) -c $< @@ -283,6 +285,7 @@ maintainer-clean-libtool: libgal.la: $(libgal_la_OBJECTS) $(libgal_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libgal_la_LDFLAGS) $(libgal_la_OBJECTS) $(libgal_la_LIBADD) $(LIBS) + PREFIX=$(prefix) sh $(top_srcdir)/mkdll.sh $@ $$(gnome-config --libs libglade print gnomecanvaspixbuf xml) -liconv # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. diff -Naurp gal-0.22/gal/e-table/Makefile.in gal-0.22-cygwin/gal/e-table/Makefile.in --- gal-0.22/gal/e-table/Makefile.in 2002-12-05 17:13:23.000000000 +0000 +++ gal-0.22-cygwin/gal/e-table/Makefile.in 2002-12-15 16:13:22.000000000 +0000 @@ -170,7 +170,7 @@ INCLUDES = \ $(GNOME_INCLUDEDIR) \ $(ICONV_CFLAGS) \ -DETABLE_GLADEDIR=\"$(gladedir)\" \ - -DG_LOG_DOMAIN=\"e-table\" + -DG_LOG_DOMAIN=\"e-table\" -I$(prefix)/include noinst_LTLIBRARIES = libetable.la diff -Naurp gal-0.22/gal/e-text/Makefile.in gal-0.22-cygwin/gal/e-text/Makefile.in --- gal-0.22/gal/e-text/Makefile.in 2002-12-05 17:13:24.000000000 +0000 +++ gal-0.22-cygwin/gal/e-text/Makefile.in 2002-12-15 15:36:09.000000000 +0000 @@ -159,7 +159,7 @@ INCLUDES = \ $(GNOME_INCLUDEDIR) \ $(ICONV_CFLAGS) \ -DG_LOG_DOMAIN=\"e-text\" \ - $(EXTRA_GNOME_CFLAGS) + $(EXTRA_GNOME_CFLAGS) -I$(prefix)/include noinst_LTLIBRARIES = libetext.la @@ -236,10 +236,10 @@ e_completion_test_SOURCES = \ e_completion_test_LDADD = \ libetext.la \ $(top_builddir)/gal/e-table/libetable.la \ - $(EXTRA_GNOME_LIBS) \ $(top_builddir)/gal/widgets/libwidgets.la \ $(top_builddir)/gal/util/libutil.la \ $(top_builddir)/gal/unicode/libunicode.la \ + $(EXTRA_GNOME_LIBS) \ $(ICONV_LIBS) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs diff -Naurp gal-0.22/gal/menus/Makefile.in gal-0.22-cygwin/gal/menus/Makefile.in --- gal-0.22/gal/menus/Makefile.in 2002-12-05 17:13:24.000000000 +0000 +++ gal-0.22-cygwin/gal/menus/Makefile.in 2002-12-15 16:30:53.000000000 +0000 @@ -168,7 +168,7 @@ INCLUDES = \ $(GNOME_INCLUDEDIR) \ $(ICONV_CFLAGS) \ -DGAL_GLADEDIR=\"$(gladedir)\" \ - -DG_LOG_DOMAIN=\"gal\" + -DG_LOG_DOMAIN=\"gal\" -I$(prefix)/include noinst_LTLIBRARIES = libgalmenus.la diff -Naurp gal-0.22/gal/shortcut-bar/Makefile.in gal-0.22-cygwin/gal/shortcut-bar/Makefile.in --- gal-0.22/gal/shortcut-bar/Makefile.in 2002-12-05 17:13:24.000000000 +0000 +++ gal-0.22-cygwin/gal/shortcut-bar/Makefile.in 2002-12-15 16:40:54.000000000 +0000 @@ -158,7 +158,7 @@ INCLUDES = \ -I$(top_srcdir) \ $(EXTRA_GNOME_CFLAGS) \ $(ICONV_CFLAGS) \ - -DG_LOG_DOMAIN=\"shortcut-bar\" + -DG_LOG_DOMAIN=\"shortcut-bar\" -I$(prefix)/include noinst_LTLIBRARIES = libshortcut-bar.la diff -Naurp gal-0.22/gal/unicode/Makefile.in gal-0.22-cygwin/gal/unicode/Makefile.in --- gal-0.22/gal/unicode/Makefile.in 2002-12-05 17:13:22.000000000 +0000 +++ gal-0.22-cygwin/gal/unicode/Makefile.in 2002-12-15 15:37:49.000000000 +0000 @@ -180,7 +180,7 @@ noinst_HEADERS = \ INCLUDES = \ -I$(top_srcdir) \ $(GNOME_INCLUDEDIR) \ - $(ICONV_CFLAGS) + $(ICONV_CFLAGS) -I$(prefix)/include mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../../config.h diff -Naurp gal-0.22/gal/util/Makefile.in gal-0.22-cygwin/gal/util/Makefile.in --- gal-0.22/gal/util/Makefile.in 2002-12-05 17:13:22.000000000 +0000 +++ gal-0.22-cygwin/gal/util/Makefile.in 2002-12-15 16:01:36.000000000 +0000 @@ -160,7 +160,7 @@ INCLUDES = \ $(ICONV_CFLAGS) \ -I$(top_srcdir) \ -I$(top_builddir) \ - -DG_LOG_DOMAIN=\"widgets\" + -DG_LOG_DOMAIN=\"widgets\" -I$(prefix)/include noinst_LTLIBRARIES = libutil.la diff -Naurp gal-0.22/gal/util/e-util.c gal-0.22-cygwin/gal/util/e-util.c --- gal-0.22/gal/util/e-util.c 2002-12-05 17:10:43.000000000 +0000 +++ gal-0.22-cygwin/gal/util/e-util.c 2002-12-15 15:32:16.000000000 +0000 @@ -865,6 +865,13 @@ typedef gboolean (*GtkSignal_BOOL__STRIN gint, gpointer user_data); +#define E_UNSAFE_CHARS " /'\"`&();|<>${}!" +#ifdef __CYGWIN__ +#define UNSAFE_CHARS (E_UNSAFE_CHARS ":\n") +#else +#define UNSAFE_CHARS E_UNSAFE_CHARS +#endif + void e_marshal_BOOL__STRING_INT (GtkObject *object, GtkSignalFunc func, @@ -969,7 +976,7 @@ e_filename_make_safe (gchar *string) g_return_if_fail (string != NULL); for (p = string; *p; p++) { - if (!isprint ((unsigned char)*p) || strchr (" /'\"`&();|<>${}!", *p)) + if (!isprint ((unsigned char)*p) || strchr (UNSAFE_CHARS, *p)) *p = '_'; } } diff -Naurp gal-0.22/gal/widgets/Makefile.in gal-0.22-cygwin/gal/widgets/Makefile.in --- gal-0.22/gal/widgets/Makefile.in 2002-12-05 17:13:22.000000000 +0000 +++ gal-0.22-cygwin/gal/widgets/Makefile.in 2002-12-15 15:41:25.000000000 +0000 @@ -252,7 +252,7 @@ INCLUDES = \ $(EXTRA_GNOME_CFLAGS) \ $(ICONV_CFLAGS) \ -DGAL_GLADEDIR=\"$(gladedir)\" \ - -DGAL_IMAGESDIR=\"$(imagesdir)\" + -DGAL_IMAGESDIR=\"$(imagesdir)\" -I$(prefix)/include noinst_PROGRAMS = test-color test-e-font test-font-loading @@ -262,9 +262,9 @@ test_color_SOURCES = \ test_color_LDADD = \ - $(EXTRA_GNOME_LIBS) \ $(top_builddir)/gal/widgets/libwidgets.la \ - $(top_builddir)/gal/util/libutil.la + $(top_builddir)/gal/util/libutil.la \ + $(EXTRA_GNOME_LIBS) test_e_font_SOURCES = \ @@ -272,10 +272,10 @@ test_e_font_SOURCES = \ test_e_font_LDADD = \ - $(EXTRA_GNOME_LIBS) \ $(top_builddir)/gal/widgets/libwidgets.la \ $(top_builddir)/gal/unicode/libunicode.la \ $(top_builddir)/gal/util/libutil.la \ + $(EXTRA_GNOME_LIBS) \ $(ICONV_LIBS) @@ -284,10 +284,10 @@ test_font_loading_SOURCES = \ test_font_loading_LDADD = \ - $(EXTRA_GNOME_LIBS) \ $(top_builddir)/gal/widgets/libwidgets.la \ $(top_builddir)/gal/unicode/libunicode.la \ $(top_builddir)/gal/util/libutil.la \ + $(EXTRA_GNOME_LIBS) \ $(ICONV_LIBS) diff -Naurp gal-0.22/mkdll.sh gal-0.22-cygwin/mkdll.sh --- gal-0.22/mkdll.sh 1970-01-01 00:00:00.000000000 +0000 +++ gal-0.22-cygwin/mkdll.sh 2002-12-15 15:32:16.000000000 +0000 @@ -0,0 +1,68 @@ +#!/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 '/^libdir=/ s,='\'\'',='\'$libdir\'',' \ + -e '/^relink_command=/ s,^$,,' \ + .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 '/^relink_command=/ s,^$,,' \ + .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; } +