diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 0f3d79e..d5b50ab 100644 --- a/configure.ac +++ b/configure.ac @@ -224,7 +224,7 @@ sunos) windows) AC_CHECK_TYPES([struct timespec], [], [], [[#include <time.h>]]) AC_DEFINE([_WIN32_WINNT], [_WIN32_WINNT_VISTA], [Define to the oldest supported Windows version.]) - LT_LDFLAGS="${LT_LDFLAGS} -avoid-version -Wl,--add-stdcall-alias" + LT_LDFLAGS="${LT_LDFLAGS} -avoid-version" ;; emscripten) AC_SUBST(EXEEXT, [.html]) @@ -402,6 +402,18 @@ if test "x$backend" = xwindows; then CFLAGS="${saved_CFLAGS}" fi +dnl Some linkers do not support the '--add-stdcall-alias' option so check for it here +if test "x$backend" = xwindows; then + saved_CFLAGS="${CFLAGS}" + CFLAGS="-Wl,--add-stdcall-alias" + AC_MSG_CHECKING([if linker supports --add-stdcall-alias]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], + [AC_MSG_RESULT([yes]) + LT_LDFLAGS="${LT_LDFLAGS} -Wl,--add-stdcall-alias"], + [AC_MSG_RESULT([no])]) + CFLAGS="${saved_CFLAGS}" +fi + SHARED_CFLAGS="-Wall -Wextra -Wshadow -Wunused -Wwrite-strings -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Werror=init-self -Werror=missing-prototypes -Werror=strict-prototypes -Werror=undef -Werror=uninitialized" AM_CPPFLAGS="${EXTRA_CPPFLAGS}" |