Commits

pajoye  committed 195de07

- MFB: #31 — Shared library support on cygwin (Dr. Volker Zell)

  • Participants
  • Parent commits 3d96fcd
  • Branches GD-2.0

Comments (0)

Files changed (2)

File src/Makefile.am

 
 libgd_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 gd_ss.c gd_topal.c gd_wbmp.c gdcache.c gdfontg.c gdfontl.c gdfontmb.c gdfonts.c gdfontt.c gdft.c gdhelpers.c gdhelpers.h gdkanji.c gdtables.c gdxpm.c jisx0208.h wbmp.c wbmp.h
 
-libgd_la_LDFLAGS = -version-info 2:0:0
+libgd_la_LDFLAGS = -version-info 2:0:0 $(XTRA_LDFLAGS)
+
+libgd_la_LIBADD = $(LTLIBICONV)
 
 LDADD = ./libgd.la $(LIBICONV)
 

File src/configure.ac

 #
 AC_PREREQ(2.54)
 
-#HEY! Change BOTH the vesion number and the GDLIB_REVISION setting!
+#HEY! Change BOTH the version number and the GDLIB_REVISION setting!
 AC_INIT([GD], [2.0.34], [http://bugs.libgd.org])
 AC_CONFIG_SRCDIR([gd.c])
 AC_CONFIG_AUX_DIR(config)
+AC_CANONICAL_TARGET([])
 
 GDLIB_MAJOR=2
 GDLIB_MINOR=0
 AM_INIT_AUTOMAKE()
 AC_CONFIG_HEADERS([config.h:config.hin])
 
+AC_MSG_CHECKING([if we are building a Cygwin target])
+case "$target" in
+  *-*-cygwin*) XTRA_LDFLAGS="-no-undefined"
+               os_cygwin=yes
+               ;;
+           *)  XTRA_LDFLAGS=
+               os_cygwin=no
+               ;;
+esac
+AC_MSG_RESULT([$os_cygwin])
+AC_SUBST([XTRA_LDFLAGS])
+
 AC_PROG_CC
 AM_PROG_CC_STDC
 AC_PROG_INSTALL