Bump version
[darcs-mirror-screen-message.git] / configure.ac
1 AC_INIT(screen-message, 0.22.2, mail@joachim-breitner.de)
2 AC_CONFIG_SRCDIR([sm.c])
3 AM_INIT_AUTOMAKE([foreign])
4 AC_CONFIG_FILES([setup.iss README.Win32])
5
6 AS_CASE($host,
7         [*mingw32msvc*],[win32=true],
8         [win32=false])
9
10 AM_CONDITIONAL(WIN32, test "x$win32" = xtrue)
11 AS_IF([test "x$win32" = xtrue],[
12         AC_CHECK_TOOL(WINE,[wine],[],[])
13         AC_CHECK_TOOL(WINEPATH,[winepath],[],[])
14         AC_CHECK_TOOL(WINDRES,[windres],[],[])
15         ])
16
17 AC_ARG_WITH([iscc],
18             [AS_HELP_STRING([--with-issc=PATH],
19               [path to the Inno Setup compiler for win32 cross builds])],
20             [ ],
21             [with_iscc=no])
22
23 AS_IF([test "x$with_iscc" = xyes],[
24         AC_MSG_ERROR("You need to pass a parameter to --with-iscc")
25         ])
26
27 AS_IF([test "x$with_iscc" != xno],
28             [
29             AC_SUBST(ISCC,[$with_iscc])
30             ],
31             [
32             AS_IF([test "x$win32" = xtrue],
33                 [AC_MSG_ERROR("You need to specify --with-iscc when building for Win32")]
34                 )
35             ])
36
37
38 PKG_PROG_PKG_CONFIG
39 AC_ARG_WITH([win32-gtk],
40             [AS_HELP_STRING([--with-win32-gtk=PATH],
41               [path to the gtk+ source bundle for win32 cross builds])],
42             [],
43             [with_win32_gtk=no])
44
45 AS_IF([test "x$with_win32_gtk" = xyes],[
46         AC_MSG_ERROR("You need to pass a parameter to --with-win32_-gtk")
47         ])
48
49 AS_IF([test "x$with_win32_gtk" != xno],
50             [AC_SUBST(WIN32_GTK, [`$WINEPATH -w $with_win32_gtk`])
51              AS_VAR_APPEND(PKG_CONFIG," --define-variable prefix=$with_win32_gtk")
52              export PKG_CONFIG_PATH="$with_win32_gtk/lib/pkgconfig:$PKG_CONFIG_PATH"
53             ],
54             [
55             AS_IF([test "x$win32" = xtrue],
56                 [AC_MSG_ERROR("You need to specify --with-win32-gtk when building for Win32")]
57                 )
58             ])
59
60
61 AC_CONFIG_HEADERS(config.h)
62
63 AC_PROG_CC
64 AC_PROG_INSTALL
65 AC_STDC_HEADERS
66
67 PKG_CHECK_MODULES(DEPS, gtk+-3.0 gdk-3.0 pango >= 1.16)
68 AC_SUBST(DEPS_CFLAGS)
69 AC_SUBST(DEPS_LIBS)
70
71 AC_CONFIG_FILES([Makefile])
72 AC_OUTPUT