1AC_INIT([fprintd], [0.8.1]) 2AM_INIT_AUTOMAKE([1.11 dist-xz no-dist-gzip check-news]) 3AC_CONFIG_SRCDIR([src/main.c]) 4AC_CONFIG_HEADERS([config.h]) 5 6# Enable silent build when available (Automake 1.11) 7m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) 8 9AC_PREREQ([2.50]) 10AC_PROG_LIBTOOL 11AC_PROG_CC 12AM_PROG_CC_C_O 13 14GETTEXT_PACKAGE=fprintd 15AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"], [Define to the Gettext package name]) 16AC_SUBST(GETTEXT_PACKAGE) 17AM_GLIB_GNU_GETTEXT 18IT_PROG_INTLTOOL([0.35.0]) 19 20PKG_CHECK_MODULES(FPRINT, [libfprint > 0.1.0]) 21AC_SUBST(FPRINT_LIBS) 22AC_SUBST(FPRINT_CFLAGS) 23 24PKG_CHECK_MODULES(GLIB, glib-2.0 dbus-glib-1) 25AC_SUBST(GLIB_CFLAGS) 26AC_SUBST(GLIB_LIBS) 27 28PKG_CHECK_MODULES(DAEMON, glib-2.0 dbus-glib-1 gmodule-2.0 polkit-gobject-1 >= 0.91 gio-2.0 >= 2.26) 29AC_SUBST(DAEMON_LIBS) 30AC_SUBST(DAEMON_CFLAGS) 31 32AC_ARG_ENABLE(pam, AC_HELP_STRING([--enable-pam],[Build the fprintd PAM module]), enable_pam="$enableval", enable_pam=yes) 33has_pam=no 34if test x$enable_pam = xyes; then 35 has_pam=yes 36 AC_CHECK_HEADER([security/pam_modules.h], [has_pam=yes] , [has_pam=no]) 37 if test x$has_pam = xyes; then 38 has_pam=no 39 AC_CHECK_LIB(pam, pam_start, [PAM_LIBS="-lpam" 40 has_pam=yes], 41 has_pam=no) 42 fi 43 AC_SUBST(PAM_LIBS) 44fi 45AM_CONDITIONAL(HAVE_PAM, test "x$has_pam" = "xyes") 46 47AC_MSG_CHECKING(for PAM headers and library) 48AC_MSG_RESULT([$has_pam]) 49 50 51AC_CHECK_PROG([XMLLINT], [xmllint], [xmllint]) 52AC_CHECK_PROG([XSLTPROC], [xsltproc], [xsltproc]) 53AC_CHECK_PROG([POD2MAN], [pod2man], [pod2man]) 54AM_CONDITIONAL(BUILD_MAN, test x"$POD2MAN" != "x") 55 56GTK_DOC_CHECK([1.3]) 57 58AC_ARG_WITH([systemdsystemunitdir], 59 AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]), 60 [], 61 [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]) 62AS_IF([test "x$with_systemdsystemunitdir" != "xno"], [ 63 AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir]) 64]) 65AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$systemdsystemunitdir"]) 66 67AS_AC_EXPAND(DATADIR, $datadir) 68 69DBUS_SERVICES_DIR="$DATADIR/dbus-1/services" 70AC_SUBST(DBUS_SERVICES_DIR) 71AC_DEFINE_UNQUOTED(DBUS_SERVICES_DIR, "$DBUS_SERVICES_DIR", [Where services dir for DBUS is]) 72 73AC_DEFINE_UNQUOTED(SYSCONFDIR, "$sysconfdir", [Where the configuration file will be located]) 74 75GNOME_COMPILE_WARNINGS 76 77AC_OUTPUT([ 78Makefile 79src/Makefile 80data/Makefile 81tests/Makefile 82pam/Makefile 83doc/Makefile 84doc/version.xml 85doc/dbus/Makefile 86po/Makefile.in 87]) 88