Skip to content

Commit 52628d0

Browse files
committed
Merge pull request #2063 from mgreter/build/fix-msys2-mingw64-automake
Fix automake compile on msys2 and mingw64
2 parents c95478c + 1036ba1 commit 52628d0

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

configure.ac

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ AC_CONFIG_AUX_DIR([script])
1313
# Though they look like gcc flags!
1414
AM_INIT_AUTOMAKE([foreign parallel-tests -Wall])
1515
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])])
16-
# would fail with mingw otherwise
17-
# m4_pattern_allow([AM_PROG_AR])
1816

1917
# Checks for programs.
2018
AC_PROG_CC
@@ -25,11 +23,10 @@ AC_GNU_SOURCE
2523
# Check fails on Travis, but it works fine
2624
# AX_CXX_COMPILE_STDCXX_11([ext],[optional])
2725
AC_CHECK_TOOL([AR], [ar], [false])
28-
if test "x$is_mingw32" != "xyes"; then
29-
AC_CHECK_TOOL([DLLTOOL], [dlltool], [false])
30-
AC_CHECK_TOOL([DLLWRAP], [dllwrap], [false])
31-
AC_CHECK_TOOL([WINDRES], [windres], [false])
32-
fi
26+
AC_CHECK_TOOL([DLLTOOL], [dlltool], [false])
27+
AC_CHECK_TOOL([DLLWRAP], [dllwrap], [false])
28+
AC_CHECK_TOOL([WINDRES], [windres], [false])
29+
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
3330
LT_INIT([dlopen])
3431

3532
# Checks for header files.
@@ -46,7 +43,7 @@ AC_CHECK_FUNCS([floor getcwd strtol])
4643
AC_ARG_ENABLE(tests, AS_HELP_STRING([--enable-tests], [enable testing the build]),
4744
[enable_tests="$enableval"], [enable_tests=no])
4845

49-
AS_CASE([$target], [*-*-mingw32], [is_mingw32=yes], [is_mingw32=no])
46+
AS_CASE([$host], [*-*-mingw*], [is_mingw32=yes], [is_mingw32=no])
5047
AM_CONDITIONAL(COMPILER_IS_MINGW32, test "x$is_mingw32" = "xyes")
5148

5249
dnl The dlopen() function is in the C library for *BSD and in

0 commit comments

Comments
 (0)