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 # Check for pkg-config/pkg.m4.
12 m4_pattern_forbid([^PKG_[A-Z_]+$], [pkg.m4 missing, please install pkg-config])
14 # Checks for programs.
17 # Checks for libraries.
19 # Checks for header files.
21 AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/time.h unistd.h syslog.h linux/input.h dirent.h])
23 # Checks for typedefs, structures, and compiler characteristics.
27 # Checks for library functions.
29 AC_CHECK_FUNCS([gettimeofday strerror uname])
33 AC_ARG_WITH([systemdsystemunitdir],
34 AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
35 [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
36 if test "x$with_systemdsystemunitdir" != xno; then
37 AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
39 AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ])
42 AC_ARG_WITH([udevdir],
43 AS_HELP_STRING([--with-udevdir=DIR], [Directory for udev]),
44 [], [with_udevdir=$($PKG_CONFIG --variable=udevdir udev)])
45 if test -z "$with_udevdir"; then
46 with_udevdir="/lib/udev"
48 AC_SUBST([udevdir], [$with_udevdir])