Marcin Wojdyr avatar Marcin Wojdyr committed 6c16777

autotools: build DLLs on Windows (win32-dll libtool option)

Since there are no undefined symbols in libgd,
-no-undefined can be added unconditionally.

Comments (0)

Files changed (2)

 AM_INIT_AUTOMAKE([foreign -Wall -Werror])
 AC_CONFIG_HEADERS([src/config.h:src/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])
-
 dnl newer automake wants this, but we still want to work with older
 m4_ifndef([AM_PROG_AR],[m4_define([AM_PROG_AR],[:])])
 AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_PROG_LN_S
 AC_PROG_MAKE_SET
-LT_INIT
+LT_INIT([win32-dll])
 PKG_PROG_PKG_CONFIG
 
 dnl may be required for freetype and Xpm
                    gd_tga.c gd_tga.h gd_bmp.c bmp.h gd_color.h gd_nnquant.h gd_tga.h gd_intern.h gd_io_stream.h gd_xbm.c \
 		   gd_color_match.c
 
-libgd_la_LDFLAGS = -version-info $(GDLIB_CURRENT):$(GDLIB_REVISION):$(GDLIB_AGE) $(XTRA_LDFLAGS)
+libgd_la_LDFLAGS = -version-info $(GDLIB_CURRENT):$(GDLIB_REVISION):$(GDLIB_AGE) -no-undefined
 
 libgd_la_LIBADD = $(LTLIBICONV)
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.