Merge remote-tracking branch 'origin/new-interfaces'
[hdapsd.git] / configure.ac
blobee1c03853a3a7691fa40dcc37518631917eedca4
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
4 AC_PREREQ(2.61)
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.
12 AC_PROG_CC
14 # Checks for libraries.
16 # Checks for header files.
17 AC_HEADER_STDC
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.
21 AC_C_CONST
22 AC_HEADER_TIME
24 # Checks for library functions.
25 AC_TYPE_SIGNAL
26 AC_CHECK_FUNCS([gettimeofday strerror uname])
28 # check for systemd
29 PKG_PROG_PKG_CONFIG
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 ])
38 # check for udevdir
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])
47 AC_OUTPUT