0e4e855e0c9417c05d7a8e73699e9150b4d72cfb
[darcs-mirror-screen-message.debian.git] / configure.ac
1 AC_INIT(screen-message, 0.18, 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         ])
15
16 AC_ARG_WITH([iscc],
17             [AS_HELP_STRING([--with-issc=PATH],
18               [path to the Inno Setup compiler for win32 cross builds])],
19             [ ],
20             [with_iscc=no])
21
22 AS_IF([test "x$with_iscc" != xno],
23             [
24             AC_SUBST(ISCC,[$with_iscc])
25             ],
26             [
27             AS_IF([test "x$win32" = xtrue],
28                 [AC_MSG_ERROR("You need to specify --with-iscc when building for Win32")]
29                 )
30             ])
31
32
33 PKG_PROG_PKG_CONFIG
34 AC_ARG_WITH([win32-gtk],
35             [AS_HELP_STRING([--with-win32-gtk=PATH],
36               [path to the gtk+ source bundle for win32 cross builds])],
37             [],
38             [with_win32_gtk=no])
39
40 AS_IF([test "x$with_win32_gtk" != xno],
41             [AC_SUBST(WIN32_GTK, [`$WINEPATH -w $with_win32_gtk`])
42              AS_VAR_APPEND(PKG_CONFIG," --define-variable prefix=$with_win32_gtk")
43              export PKG_CONFIG_PATH="$with_win32_gtk/lib/pkgconfig:$PKG_CONFIG_PATH"
44             ],
45             [
46             AS_IF([test "x$win32" = xtrue],
47                 [AC_MSG_ERROR("You need to specify --with-win32-gtk when building for Win32")]
48                 )
49             ])
50
51
52 AC_CONFIG_HEADERS(config.h)
53
54 AC_PROG_CC
55 AC_PROG_INSTALL
56 AC_STDC_HEADERS
57
58 PKG_CHECK_MODULES(DEPS, gtk+-2.0 >= 2.10 gdk-2.0 >= 2.10 pango >= 1.16)
59 AC_SUBST(DEPS_CFLAGS)
60 AC_SUBST(DEPS_LIBS)
61
62 AC_CONFIG_FILES([Makefile])
63 AC_OUTPUT