2 # Process this file with autoconf to produce a configure script.
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])
12 # Checks for programs.
16 AC_USE_SYSTEM_EXTENSIONS
21 # Checks for libraries.
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])
26 # Checks for typedefs, structures, and compiler characteristics.
32 # Checks for library functions.
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])
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])])
51 AC_CONFIG_FILES([Makefile kacpimon/Makefile])