configure.ac 1.81 KB
Newer Older
Daniel Drake's avatar
Daniel Drake committed
1
2
3
AC_INIT([fprintd], [0.1])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([src/main.c])
Bastien Nocera's avatar
Bastien Nocera committed
4
AC_CONFIG_HEADERS([config.h])
Daniel Drake's avatar
Daniel Drake committed
5
6

AC_PREREQ([2.50])
7
AC_PROG_LIBTOOL
Daniel Drake's avatar
Daniel Drake committed
8
9
10
AC_PROG_CC
AM_PROG_CC_C_O

Bastien Nocera's avatar
Bastien Nocera committed
11
12
13
14
GETTEXT_PACKAGE=fprintd
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"], [Define to the Gettext package name])
AC_SUBST(GETTEXT_PACKAGE)
AM_GLIB_GNU_GETTEXT
Bastien Nocera's avatar
Bastien Nocera committed
15
IT_PROG_INTLTOOL([0.35.0])
Bastien Nocera's avatar
Bastien Nocera committed
16

Daniel Drake's avatar
Daniel Drake committed
17
PKG_CHECK_MODULES(FPRINT, [libfprint > 0.1.0])
Daniel Drake's avatar
Daniel Drake committed
18
19
20
AC_SUBST(FPRINT_LIBS)
AC_SUBST(FPRINT_CFLAGS)

21
PKG_CHECK_MODULES(GLIB, glib-2.0 dbus-glib-1)
Daniel Drake's avatar
Daniel Drake committed
22
23
24
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)

25
26
27
PKG_CHECK_MODULES(DAEMON, glib-2.0 dbus-glib-1 gmodule-2.0 polkit >= 0.8 polkit-dbus)
AC_SUBST(DAEMON_LIBS)
AC_SUBST(DAEMON_CFLAGS)
Bastien Nocera's avatar
Bastien Nocera committed
28

Bastien Nocera's avatar
Bastien Nocera committed
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
AC_ARG_ENABLE(pam, AC_HELP_STRING([--enable-pam],[Build the fprintd PAM module]), enable_pam="$enableval", enable_pam=yes)
has_pam=no
if test x$enable_pam = xyes; then
	has_pam=yes
	AC_CHECK_HEADER([security/pam_modules.h], [has_pam=yes] , [has_pam=no])
	if test x$has_pam = xyes; then
		has_pam=no
		AC_CHECK_LIB(pam, pam_start, [PAM_LIBS="-lpam"
					      has_pam=yes],
			has_pam=no)
	fi
	AC_SUBST(PAM_LIBS)
fi
AM_CONDITIONAL(HAVE_PAM, test "x$has_pam" = "xyes")

AC_MSG_CHECKING(for PAM headers and library)
AC_MSG_RESULT([$has_pam])


Bastien Nocera's avatar
Bastien Nocera committed
48
49
50
AC_CHECK_PROG([POLKIT_POLICY_FILE_VALIDATE],
	      [polkit-policy-file-validate], [polkit-policy-file-validate])

51
52
53
AC_PATH_PROG([XSLTPROC], [xsltproc])
GTK_DOC_CHECK([1.3])

Daniel Drake's avatar
Daniel Drake committed
54
55
56
57
58
59
AS_AC_EXPAND(DATADIR, $datadir)

DBUS_SERVICES_DIR="$DATADIR/dbus-1/services"
AC_SUBST(DBUS_SERVICES_DIR)
AC_DEFINE_UNQUOTED(DBUS_SERVICES_DIR, "$DBUS_SERVICES_DIR", [Where services dir for DBUS is])

60
61
AC_DEFINE_UNQUOTED(SYSCONFDIR, "$sysconfdir", [Where the configuration file will be located])

Bastien Nocera's avatar
Bastien Nocera committed
62
GNOME_COMPILE_WARNINGS
Daniel Drake's avatar
Daniel Drake committed
63

64
65
66
67
68
69
70
71
72
73
74
AC_OUTPUT([
Makefile
src/Makefile
data/Makefile
tests/Makefile
pam/Makefile
doc/Makefile
doc/version.xml
doc/dbus/Makefile
po/Makefile.in
])