diff --git a/aclocal.m4 b/aclocal.m4 index a6982fbeb..cdfa8ca14 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -64,7 +64,7 @@ fi # AX_WIN32 # -------- # Combined check for several flavors of Microsoft Windows so -# their "issues" can be dealt with + # their "issues" can be dealt with AC_DEFUN([AX_WIN32], [AC_MSG_CHECKING([for Microsoft Windows]) AC_REQUIRE([AC_CANONICAL_HOST]) []dnl @@ -230,6 +230,17 @@ case "${host}" in esac ])# AX_CPP_PRECOMP +# AX_C99_STRTOD +# ------------- +AC_DEFUN([AX_C99_STRTOD], +[# On MinGW we need to jump through hoops to get a C99 compliant strtod(). +case "${host}" in + *-*-mingw*) + LDFLAGS="-Wl,--undefined=___strtod,--wrap,strtod,--defsym,___wrap_strtod=___strtod" + ;; +esac +])# AX_C99_STRTOD + # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp file name are based on the header name. diff --git a/configure.in b/configure.in index d3ca2fdc9..cae2abf7c 100644 --- a/configure.in +++ b/configure.in @@ -192,6 +192,9 @@ AX_C_PICFLAG # may modify CPPFLAGS and CFLAGS AX_CPP_PRECOMP +# may modify LDFLAGS +AX_C99_STRTOD + # Processor specific compile flags case "${host}" in alpha*-*-linux*)