forked from sarfata/pi-blaster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
63 lines (52 loc) · 1.92 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([pi-blaster], [0.1.2])
AC_CONFIG_SRCDIR([pi-blaster.c])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE
# Default folders
AC_PREFIX_DEFAULT([/usr])
test "$sysconfdir" = '${prefix}/etc' && sysconfdir=/etc
test "$sharedstatedir" = '${prefix}/com' && sharedstatedir=/var
test "$localstatedir" = '${prefix}/var' && localstatedir=/var
# Checks for debian packaging.
AC_ARG_ENABLE(
[debian-pkg],
AS_HELP_STRING([--enable-debian-pkg], [build for debian pkg, no init file installed]),
[
case "${enableval}" in
yes) enable_debian_pkg=yes ;;
no) enable_debian_pkg=no ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-debian-pkg]) ;;
esac],
[enable_debian_pkg=no])
# Checks for systemd.
PKG_PROG_PKG_CONFIG
AC_ARG_WITH([systemdsystemunitdir],
AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
[], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
if test "x$with_systemdsystemunitdir" != xno; then
AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
fi
AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ])
AM_CONDITIONAL(CROSS_COMPILING, [test x"$cross_compiling" = x"yes" ])
AM_CONDITIONAL(DEBIAN_PKG, [test x"$enable_debian_pkg" = x"yes" ])
# Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MAKE_SET
# Check for libraries.
# Check for header files.
AC_CHECK_HEADERS([fcntl.h stdint.h stdlib.h string.h sys/ioctl.h sys/time.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_HEADER_STDBOOL
AC_TYPE_SIZE_T
AC_TYPE_UINT32_T
AC_TYPE_UINT8_T
# Checks for library functions.
AC_HEADER_MAJOR
AC_FUNC_MMAP
AC_CHECK_FUNCS([memset mkfifo munmap])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT