Bump to version 2.0.22
[platform/upstream/acpid.git] / configure.ac
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 AC_PREREQ([2.60])
5 AC_INIT([acpid], [2.0.22])
6 AC_CONFIG_SRCDIR([connection_list.h])
7 AC_CONFIG_HEADERS([config.h])
8 AC_CONFIG_AUX_DIR([build-aux])
9 AM_INIT_AUTOMAKE([foreign tar-pax no-dist-gzip dist-xz subdir-objects])
10 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
11 AM_MAINTAINER_MODE
12 # Checks for programs.
13 AC_PROG_AWK
14 AC_PROG_CC_STDC
15 AM_PROG_CC_C_O
16 AC_USE_SYSTEM_EXTENSIONS
17 AC_SYS_LARGEFILE
18 AC_PROG_INSTALL
19 AC_PROG_MAKE_SET
20
21 # Checks for libraries.
22
23 # Checks for header files.
24 AC_CHECK_HEADERS([arpa/inet.h fcntl.h malloc.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/socket.h syslog.h unistd.h])
25
26 # Checks for typedefs, structures, and compiler characteristics.
27 AC_TYPE_MODE_T
28 AC_TYPE_PID_T
29 AC_TYPE_SIZE_T
30 AC_TYPE_SSIZE_T
31
32 # Checks for library functions.
33 AC_FUNC_FORK
34 AC_FUNC_MALLOC
35 AC_FUNC_REALLOC
36 AC_FUNC_STRNLEN
37 AC_CHECK_FUNC(fchown, AC_DEFINE(HAVE_FCHOWN, 1, "Define if fchown() exists"), AC_MSG_ERROR(["fchown() not found"]))
38 AC_CHECK_FUNC(chmod, AC_DEFINE(HAVE_CHMOD, 1, "Define if chmod() exists"), AC_MSG_ERROR(["chmod() not found"]))
39 AC_CHECK_FUNC(fstat, AC_DEFINE(HAVE_FSTAT, 1, "Define if fstat() exists"), AC_MSG_ERROR(["fstat() not found"]))
40 AC_CHECK_FUNC(fstatat, AC_DEFINE(HAVE_FSTATAT, 1, "Define if fstatat() exists"), AC_MSG_ERROR(["fstatat() not found"]))
41 AC_CHECK_FUNC(openat, AC_DEFINE(HAVE_OPENAT, 1, "Define if openat() exists"), AC_MSG_ERROR(["openat() not found"]))
42 AC_CHECK_FUNC(asprintf, AC_DEFINE(HAVE_ASPRINTF, 1, "Define if asprintf() exists"), AC_MSG_ERROR(["asprintf() not found"]))
43 # These are actually required.  Should switch to above form.
44 AC_CHECK_FUNCS([alarm dup2 memset regcomp select socket strcasecmp strdup strerror strrchr strtol])
45
46 # removed for now as kacpimon was not included in dist target
47 #AC_ARG_ENABLE([kacpimon],AS_HELP_STRING([--enable-kacpimon], [Build kacpimon]))
48 #AM_CONDITIONAL(KACPIMON, test "x$enable_kacpimon" = "xyes")
49 #AM_COND_IF([KACPIMON],[AC_CONFIG_FILES([kacpimon/Makefile])])
50
51 AC_CONFIG_FILES([Makefile kacpimon/Makefile])
52 AC_OUTPUT