2 # Process this file with autoconf to produce a configure script.
4 # $Id: configure.ac 23 2003-08-27 20:16:37Z lennart $
6 # This file is part of pam_dbus.
8 # pam_dbus is free software; you can redistribute it and/or modify it
9 # under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
13 # pam_dbus is distributed in the hope that it will be useful, but
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 # General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with pam_dbus; if not, write to the Free Software Foundation,
20 # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
23 AC_INIT([pam_dbus], [0.1], [Joachim Breitner <mail@joachim-breitner.de>])
24 AC_CONFIG_SRCDIR([src/pam_dbus.c])
25 AC_CONFIG_HEADERS([config.h])
26 AM_INIT_AUTOMAKE([foreign -Wall])
30 # Checks for programs.
35 # If using GCC specifiy some additional parameters
36 if test "x$GCC" = "xyes" ; then
37 CFLAGS="$CFLAGS -pipe -Wall"
40 CFLAGS="$CFLAGS -L/lib"
42 # Checks for libraries.
43 AC_CHECK_HEADER([security/pam_modules.h],, [AC_MSG_ERROR([*** Sorry, you have to install the PAM development files ***])])
45 LIBS="$LIBS -ldl -lpam -lpam_misc"
49 PAM_MODDIR="/lib/security"
57 # Checks for header files.
59 AC_CHECK_FUNCS([dup2 memset strchr strerror strrchr])
62 AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
65 AC_CHECK_HEADERS([fcntl.h limits.h syslog.h termios.h])
77 PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.10, dummy=yes,
78 AC_MSG_ERROR(libglib-2.0 is required))
82 PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.0, dummy=yes,
83 AC_MSG_ERROR(libdbus is required))
87 PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1 >= 0.70, dummy=yes,
88 AC_MSG_ERROR(libdbus-glib is required))
89 AC_SUBST(DBUS_GLIB_CFLAGS)
90 AC_SUBST(DBUS_GLIB_LIBS)
94 AC_CONFIG_FILES([src/Makefile Makefile])