From ce24e0d3e52c545bd0d4b4f22a11ff4a9f8f0039 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Fri, 11 Oct 2013 15:26:01 +0200 Subject: [PATCH] configure.ac: Define USE_WINDOWS for Automake when building for Windows --- configure.ac | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/configure.ac b/configure.ac index 309789ca1..8b0b8d087 100644 --- a/configure.ac +++ b/configure.ac @@ -724,6 +724,19 @@ if test x$printf_hooks = xauto -o x$printf_hooks = xglibc; then ) fi +AC_MSG_CHECKING([for Windows target]) +AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[#ifndef WIN32 + # error WIN32 undefined + #endif + ]])], + [AC_MSG_RESULT([yes]); windows=true ], + [AC_MSG_RESULT([no])] +) +AM_CONDITIONAL(USE_WINDOWS, [test "x$windows" = xtrue]) + if test x$printf_hooks = xvstr; then AC_CHECK_LIB([vstr],[main],[LIBS="$LIBS"],[AC_MSG_ERROR([Vstr string library not found])],[]) AC_DEFINE([USE_VSTR], [], [use Vstr string library for printf hooks])