Imported Upstream version 0.1.0
[debian/lxdm.git] / configure.ac
CommitLineData
eea1c851
AL
1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ([2.63])
5AC_INIT([lxdm], [0.1.0], [http://lxde.org/])
6AM_INIT_AUTOMAKE([-Wall -Werror foreign])
7
8AC_CONFIG_SRCDIR([src/lxdm.c])
9AC_CONFIG_HEADERS([config.h])
10
11# Checks for programs.
12AC_PROG_CC
13AC_PROG_INSTALL
14AM_PROG_CC_C_O
15
16# Checks for libraries.
17AC_CHECK_LIB([Xmu], [XmuClientWindow])
18AC_CHECK_LIB([crypt], [crypt])
19AC_CHECK_LIB([pam], [pam_open_session])
20AC_CHECK_LIB([ck-connector],[ck_connector_open_session])
21
22# Checks for header files.
23AC_PATH_X
24AC_CHECK_HEADERS([shadow.h stdlib.h string.h unistd.h])
25
26# Checks for typedefs, structures, and compiler characteristics.
27AC_TYPE_PID_T
28
29# Checks for library functions.
30AC_FUNC_FORK
31AC_CHECK_FUNCS([atexit endpwent getspnam getusershell memset putenv strstr])
32
33PKG_CONFIG=pkg-config # FIXME: is this OK?
34# Check for ISO Codes, this is taken from gdm
35AC_MSG_CHECKING([whether iso-codes has iso-639 domain])
36if $PKG_CONFIG --variable=domains iso-codes | grep 639 >/dev/null ; then
37 AC_MSG_RESULT([yes])
38else
39 AC_MSG_RESULT([no])
40fi
41AC_DEFINE_UNQUOTED([ISO_CODES_PREFIX],["`$PKG_CONFIG --variable=prefix iso-codes`"],[ISO codes prefix])
42ISO_CODES=iso-codes
43
44IT_PROG_INTLTOOL([0.40.0])
45
46pkg_modules="gtk+-2.0 >= 2.12.0"
47PKG_CHECK_MODULES(GTK, [$pkg_modules])
48AC_SUBST(GTK_CFLAGS)
49AC_SUBST(GTK_LIBS)
50
51PKG_CHECK_MODULES(CONSOLEKIT, "ck-connector")
52AC_SUBST(CONSOLEKIT_CFLAGS)
53AC_SUBST(CONSOLEKIT_LIBS)
54
55GETTEXT_PACKAGE=lxdm
56AC_SUBST(GETTEXT_PACKAGE)
57AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
58
59AC_CONFIG_FILES([
60 Makefile
61 lxdm.spec
62 src/Makefile
63 po/Makefile.in
64 pam/Makefile
65 data/Makefile
66])
67AC_OUTPUT