Skip to content

Commit fab634c

Browse files
committed
Added compatility flags for shared library build on mingw
1 parent ece86b2 commit fab634c

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

configure.ac

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LT_PREREQ([2.2.4])
77
AC_CANONICAL_SYSTEM
88

99
AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip foreign subdir-objects parallel-tests color-tests])
10-
LT_INIT
10+
LT_INIT([shared static])
1111
AC_CONFIG_MACRO_DIR([m4])
1212

1313
AC_PROG_CC
@@ -45,6 +45,17 @@ AC_ARG_ENABLE([gcov],
4545
],
4646
[])
4747

48+
AC_MSG_CHECKING([if libtool needs -no-undefined flag to build shared libraries])
49+
case "`uname`" in
50+
CYGWIN*|MINGW*|AIX*)
51+
AC_MSG_RESULT([yes])
52+
LDFLAGS="$LDFLAGS -no-undefined"
53+
;;
54+
*)
55+
AC_MSG_RESULT([no])
56+
;;
57+
esac
58+
4859
AC_CONFIG_HEADERS([src/config.h])
4960
AC_CONFIG_FILES([Makefile check/Makefile])
5061

0 commit comments

Comments
 (0)