./configure --with-win32-gtk for win32 build
authorJoachim Breitner <mail@joachim-breitner.de>
Wed, 30 Dec 2009 17:16:16 +0000 (17:16 +0000)
committerJoachim Breitner <mail@joachim-breitner.de>
Wed, 30 Dec 2009 17:16:16 +0000 (17:16 +0000)
configure.ac

index 12fd5e0..61c4e26 100644 (file)
@@ -2,6 +2,23 @@ AC_INIT(screen-message, 0.18, mail@joachim-breitner.de)
 AC_CONFIG_SRCDIR([sm.c])
 AM_INIT_AUTOMAKE([foreign])
 
+PKG_PROG_PKG_CONFIG
+AC_ARG_WITH([win32-gtk],
+            [AS_HELP_STRING([--with-win32-gtk=PATH],
+              [path to the gtk+ source bundle for win32 cross builds])],
+            [],
+            [with_win32_gtk=no])
+
+AS_IF([test "x$with_win32_gtk" != xno],
+            [AS_VAR_APPEND(PKG_CONFIG," --define-variable prefix=$with_win32_gtk")
+            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")
+               ])
+           ])
+
 AC_CONFIG_HEADERS(config.h)
 
 AC_PROG_CC