From 8389bb70011e3e1ea238ef28d25c774e622cffcc Mon Sep 17 00:00:00 2001 From: ellson Date: Tue, 18 Oct 2005 20:58:04 +0000 Subject: [PATCH] Cygwin changes Bob Lied --- cmd/gvpr/Makefile.am | 4 +++- configure.ac | 1 + lib/gd/Makefile.am | 2 +- lib/gvc/Makefile.am | 1 + lib/gvc/gvconfig.c | 7 +++++-- lib/gvc/gvplugin.c | 8 ++++++-- lib/pack/Makefile.am | 1 + 7 files changed, 18 insertions(+), 6 deletions(-) diff --git a/cmd/gvpr/Makefile.am b/cmd/gvpr/Makefile.am index 6eff2aae8..a86f57203 100644 --- a/cmd/gvpr/Makefile.am +++ b/cmd/gvpr/Makefile.am @@ -21,12 +21,14 @@ pdf_DATA = gvpr.pdf gvpr_SOURCES = actions.c compile.c gvpr.c gprstate.c parse.c queue.c gvpr_LDADD = $(top_builddir)/lib/expr/libexpr.la \ - $(top_builddir)/lib/ast/libast.la \ $(top_builddir)/lib/vmalloc/libvmalloc.la \ $(top_builddir)/lib/sfio/libsfio.la \ $(top_builddir)/lib/ingraphs/libingraphs.la \ $(top_builddir)/lib/agraph/libagraph.la @MATH_LIBS@ +gvpr_DEPENDENCIES = \ + $(top_builddir)/lib/ast/libast.la + $(gvpr_OBJECTS): gdefs.h mkdefs_SOURCES = mkdefs.c diff --git a/configure.ac b/configure.ac index 824ad5e7a..78e303127 100644 --- a/configure.ac +++ b/configure.ac @@ -79,6 +79,7 @@ case "${host_os}" in CYGWIN=yes DEFAULT_FONTPATH="C:/WINDOWS/FONTS;C:/WINNT/Fonts;C:/winnt/fonts" PATHSEPARATOR=";" + AC_DEFINE(NO_POSTSCRIPT_ALIAS,1,[Alias PostScript font names to URW type 1 fonts]) ;; *mingw32* ) MINGW32=yes diff --git a/lib/gd/Makefile.am b/lib/gd/Makefile.am index 460c1821a..fbff8460e 100644 --- a/lib/gd/Makefile.am +++ b/lib/gd/Makefile.am @@ -17,7 +17,7 @@ noinst_PROGRAMS = annotate gdparttopng gdtopng gd2copypal gd2topng pngtogd \ html_DATA = $(html) endif -libgvgd_la_LDFLAGS = -version-info 2:0:0 +libgvgd_la_LDFLAGS = -version-info 2:0:0 -no-undefined libgvgd_la_SOURCES = gd.c gdfx.c gd_security.c gd_gd.c gd_gd2.c gd_io.c gd_io_dp.c \ gd_gif_in.c gd_gif_out.c gd_io_file.c gd_io_ss.c gd_jpeg.c gd_png.c \ diff --git a/lib/gvc/Makefile.am b/lib/gvc/Makefile.am index e896f3dc4..d13a90174 100644 --- a/lib/gvc/Makefile.am +++ b/lib/gvc/Makefile.am @@ -31,6 +31,7 @@ libgvc_builtins_la_SOURCES = gvrender.c gvlayout.c gvtextlayout.c gvdevice.c \ libgvc_la_SOURCES = ${libgvc_builtins_la_SOURCES} no_builtins.c libgvc_builtins_la_LIBADD = \ + $(top_builddir)/lib/cdt/libcdt.la \ $(top_builddir)/lib/common/libcommon.la \ $(top_builddir)/lib/graph/libgraph.la \ $(top_builddir)/lib/pathplan/libpathplan.la \ diff --git a/lib/gvc/gvconfig.c b/lib/gvc/gvconfig.c index 1db9bf93a..2ca05b384 100644 --- a/lib/gvc/gvconfig.c +++ b/lib/gvc/gvconfig.c @@ -278,10 +278,13 @@ static void config_rescan(GVC_t *gvc, char *config_path) gvplugin_library_t *library; regex_t re; char *plugin_glob = "libgvplugin_*"; -#ifdef DARWIN_DYLIB - /* Mac OS X / Darwin */ +#if defined(DARWIN_DYLIB) char *plugin_re_beg = "[^0-9]\\."; char *plugin_re_end = "\\.dylib$"; +#elif defined(__CYGWIN__) + plugin_glob = "cyggvplugin_*"; + char *plugin_re_beg = "[^0-9]-"; + char *plugin_re_end = "\\.dll$"; #else /* Everyone else */ char *plugin_re_beg = "\\.so\\."; diff --git a/lib/gvc/gvplugin.c b/lib/gvc/gvplugin.c index 34cbfa94e..a2d47e427 100644 --- a/lib/gvc/gvplugin.c +++ b/lib/gvc/gvplugin.c @@ -142,8 +142,12 @@ gvplugin_library_t *gvplugin_library_load(char *path) return NULL; } sym = gmalloc(len + strlen(suffix) + 1); - strcpy(sym, s+4); /* strip leading "/lib" */ - s = strchr(sym, '.'); /* strip trailing ".so.0" */ + strcpy(sym, s+4); /* strip leading "/lib" or "/cyg" */ +#ifdef __CYGWIN__ + s = strchr(sym, '-'); /* strip trailing "-1.dll" */ +#else + s = strchr(sym, '.'); /* strip trailing ".so.0" or ".dll" */ +#endif strcpy(s,suffix); /* append "_LTX_library" */ ptr = lt_dlsym (hndl, sym); diff --git a/lib/pack/Makefile.am b/lib/pack/Makefile.am index b4ff0cabe..15933df10 100644 --- a/lib/pack/Makefile.am +++ b/lib/pack/Makefile.am @@ -20,6 +20,7 @@ libpack_la_LDFLAGS = -version-info @VERSION_INFO@ -no-undefined libpack_la_SOURCES = ccomps.c pack.c libpack_la_LIBADD = \ + $(top_builddir)/lib/graph/libgraph.la $(top_builddir)/lib/gvc/libgvc.la .3.pdf: -- 2.40.0