Introduce WIN32 conditional
authorJoachim Breitner <mail@joachim-breitner.de>
Wed, 30 Dec 2009 17:22:28 +0000 (17:22 +0000)
committerJoachim Breitner <mail@joachim-breitner.de>
Wed, 30 Dec 2009 17:22:28 +0000 (17:22 +0000)
configure.ac

index 61c4e26..bf2b8d7 100644 (file)
@@ -2,6 +2,12 @@ AC_INIT(screen-message, 0.18, mail@joachim-breitner.de)
 AC_CONFIG_SRCDIR([sm.c])
 AM_INIT_AUTOMAKE([foreign])
 
+AS_CASE($host,
+       [*mingw32msvc*],[win32=true],
+       [win32=false])
+
+AM_CONDITIONAL(WIN32, test "x$win32" = xtrue)
+
 PKG_PROG_PKG_CONFIG
 AC_ARG_WITH([win32-gtk],
             [AS_HELP_STRING([--with-win32-gtk=PATH],
@@ -14,11 +20,12 @@ AS_IF([test "x$with_win32_gtk" != xno],
             export PKG_CONFIG_PATH="$with_win32_gtk/lib/pkgconfig:$PKG_CONFIG_PATH"
            ],
            [
-           AS_CASE($host,[*mingw32msvc*],[
-               AC_MSG_ERROR("You need to specify --with-win32-gtk when building for Win32")
-               ])
+           AS_IF([test "x$win32" = xtrue],
+               [AC_MSG_ERROR("You need to specify --with-win32-gtk when building for Win32")]
+               )
            ])
 
+
 AC_CONFIG_HEADERS(config.h)
 
 AC_PROG_CC