2 # Process this file with autoconf to produce a configure script.
5 AC_INIT(hdapsd, 20090401, hdaps-devel@lists.sourceforge.net)
6 AM_INIT_AUTOMAKE([foreign])
7 AC_CONFIG_SRCDIR([src/hdapsd.c])
8 AC_CONFIG_HEADERS([src/config.h])
9 AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile misc/Makefile])
11 # Checks for programs.
14 # Checks for libraries.
16 # Checks for header files.
18 AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/time.h unistd.h syslog.h linux/input.h dirent.h])
20 # Checks for typedefs, structures, and compiler characteristics.
24 # Checks for library functions.
26 AC_CHECK_FUNCS([gettimeofday strerror uname])
30 AC_ARG_WITH([systemdsystemunitdir],
31 AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
32 [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
33 if test "x$with_systemdsystemunitdir" != xno; then
34 AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
36 AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ])
39 AC_ARG_WITH([udevdir],
40 AS_HELP_STRING([--with-udevdir=DIR], [Directory for udev]),
41 [], [with_udevdir=$($PKG_CONFIG --variable=udevdir udev)])
42 if test -z "$with_udevdir"; then
43 with_udevdir="/lib/udev"
45 AC_SUBST([udevdir], [$with_udevdir])