use strncpy
[hdapsd.git] / configure.ac
blob03cfd577f69b0213b8a9c3733022048d7df9b9d3
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 # Check for pkg-config/pkg.m4.
12 m4_pattern_forbid([^PKG_[A-Z_]+$], [pkg.m4 missing, please install pkg-config])
14 # Checks for programs.
15 AC_PROG_CC
17 # Checks for libraries.
19 # Checks for header files.
20 AC_HEADER_STDC
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.
24 AC_C_CONST
25 AC_HEADER_TIME
27 # Checks for library functions.
28 AC_TYPE_SIGNAL
29 AC_CHECK_FUNCS([gettimeofday strerror uname])
31 # check for systemd
32 PKG_PROG_PKG_CONFIG
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 ])
41 # check for udevdir
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])
50 AC_OUTPUT