Reworked lxsession man page generation.
[lxde/lxsession.git] / configure.ac
CommitLineData
dd69beb8 1AC_PREREQ([2.57])
a912c0f4 2AC_INIT(lxsession,[0.3.8], [],lxsession)
dd69beb8
FC
3AM_INIT_AUTOMAKE([dist-bzip2])
4AC_PROG_INTLTOOL(, [no-xml])
5AM_MAINTAINER_MODE
6
7AM_CONFIG_HEADER(config.h)
8
9AC_PROG_CC
10AC_PROG_INSTALL
11AM_PROG_CC_C_O
12
13AC_CHECK_FUNC([mkstemp],
5857ef5d 14 AC_DEFINE(HAS_MKSTEMP,1,[Define to 1 if you have the 'mkstemp' function.]))
dd69beb8 15
6afdcce3
JH
16AC_ARG_ENABLE(man,
17 [AC_HELP_STRING([--enable-man],
18 [regenerate roff man pages from Docbook @<:@default=no@:>@])],
19 [enable_man="${enableval}"],
20 [enable_man=no]
21)
22
dd69beb8
FC
23PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.6.0])
24AC_SUBST(GTK_CFLAGS)
25AC_SUBST(GTK_LIBS)
26
27PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.6.0])
28AC_SUBST(GLIB_CFLAGS)
29AC_SUBST(GLIB_LIBS)
30
dd69beb8
FC
31AC_ARG_ENABLE(
32 [hal],
33 AS_HELP_STRING([--enable-hal],
34 [Build with Linux HAL support for shutdown/reboot/suspend (default: yes)]),
35 use_hal=$enableval, use_hal="yes")
36
37if test x"$use_hal" = x"yes"; then
38dnl Check HAL support
39 hal_modules="dbus-1"
40 PKG_CHECK_MODULES(HAL, [$hal_modules], [have_hal=yes], [have_hal=no])
41
42 if test x"$have_hal" = x"yes"; then
43 AC_DEFINE([HAVE_HAL], [1], [Define to 1 if you have HAL.])
44 else
45 AC_MSG_ERROR([To use HAL support, you must have developing packages of dbus-glib-1 (>=0.31), or you can use --disable-hal to disable HAL support.])
46 fi
47fi
48AM_CONDITIONAL(USE_HAL, test "$use_hal" = "yes")
49AC_SUBST(HAL_CFLAGS)
50AC_SUBST(HAL_LIBS)
51
dd69beb8
FC
52GETTEXT_PACKAGE=lxsession
53#AM_GNU_GETTEXT([external])
54AM_GNU_GETTEXT_VERSION(0.14.1)
55AC_SUBST(GETTEXT_PACKAGE)
56AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
57
b8203777 58ALL_LINGUAS="af ar cs da de es et eu fa fi fr gl hr hu id it ja ko lt ml ms nb nl nn pl ps pt pt_BR ru sk sl sv tr uk ur ur_PK vi zh_CN zh_TW"
dd69beb8
FC
59AM_GLIB_GNU_GETTEXT
60
6afdcce3
JH
61if test x"$enable_man" = x"yes"; then
62 AC_PATH_PROG([XSLTPROC], [xsltproc])
63 if test -z "$XSLTPROC"; then
64 enable_man=no
65 fi
66
67 dnl check for DocBook DTD and stylesheets in the local catalog.
68 JH_CHECK_XML_CATALOG([-//OASIS//DTD DocBook XML V4.1.2//EN],
69 [DocBook XML DTD V4.1.2], [], enable_man=no)
70 JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl],
71 [DocBook XSL Stylesheets >= 1.70.1], [], enable_man=no)
72fi
73
74AM_CONDITIONAL(ENABLE_REGENERATE_MAN, test "x$enable_man" != "xno")
75
dd69beb8
FC
76AC_OUTPUT([
77 Makefile
78 lxsession/Makefile
79 lxsession-logout/Makefile
80 po/Makefile.in
81 man/Makefile
82])
83
84echo
85echo LXSession.................................... : Version $VERSION
86echo
87echo Prefix....................................... : $prefix
88echo Linux HAL support............................ : $use_hal
89echo
90echo The binary will be installed in $prefix/bin
91echo
a2d20055 92echo http://lxde.org/
dd69beb8
FC
93echo
94echo Have fun!
95echo