+2012-01-07 Simon Josefsson <simon@josefsson.org>
+
+ Fix for mingw with MSVC9.
+ * m4/ld-version-script.m4: Check that compiler rejects version
+ scripts with syntax errors. Reported by Bruno Haible
+ <bruno@clisp.org>.
+
2012-01-06 Bruno Haible <bruno@clisp.org>
Talk about "native Windows API", not "Woe32".
-# ld-version-script.m4 serial 2
+# ld-version-script.m4 serial 3
dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
cat > conftest.map <<EOF
+foo
+EOF
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
+ [accepts_syntax_errors=yes], [accepts_syntax_errors=no])
+ if test "$accepts_syntax_errors" = no; then
+ cat > conftest.map <<EOF
VERS_1 {
global: sym;
};
global: sym;
} VERS_1;
EOF
- AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
- [have_ld_version_script=yes], [have_ld_version_script=no])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
+ [have_ld_version_script=yes], [have_ld_version_script=no])
+ else
+ have_ld_version_script=no
+ fi
rm -f conftest.map
LDFLAGS="$save_LDFLAGS"
AC_MSG_RESULT($have_ld_version_script)