source: git/m4/win-flags.m4 @ 92a783

spielwiese
Last change on this file since 92a783 was 92a783, checked in by Erik M. Bray <erik.bray@…>, 7 years ago
Add an m4 macro SING_WIN_FLAGS that can be used in configure.ac to set additional flags needed when building on Windows (Cygwin or MinGW though the latter has not been tested)
  • Property mode set to 100755
File size: 512 bytes
Line 
1AC_DEFUN([SING_WIN_FLAGS], [
2dnl To ensure that $enable_shared is defined
3  AC_REQUIRE([LT_INIT])
4
5  AC_CANONICAL_HOST
6
7dnl Maybe necessary for mingw as well but haven't tested
8  case $host_os in
9    *cygwin* ) AX_APPEND_LINK_FLAGS([-Wl,-Bdynamic]);;
10  esac
11
12dnl libtool requires "-no-undefined" for win32 dll
13  AC_SUBST(SINGULAR_LDFLAGS)
14  case $host_os in
15    *cygwin* | *mingw*)
16      if test x"$enable_shared" = xyes; then
17        SINGULAR_LDFLAGS="$SINGULAR_LDFLAGS -no-undefined"
18      fi
19    ;;
20  esac
21])
Note: See TracBrowser for help on using the repository browser.