forked from nbfc-linux/nbfc-linux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
50 lines (40 loc) · 1.17 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
AC_INIT([nbfc-linux], [0.2.8], [[email protected]])
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_INSTALL
# Checks for libraries.
AC_CHECK_LIB([m], [roundf])
# Checks for header files.
AC_CHECK_HEADERS([fcntl.h stdint.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_INT64_T
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_TYPE_UINT16_T
AC_TYPE_UINT64_T
AC_TYPE_UINT8_T
AC_TYPE_MODE_T
# Checks for library functions.
AC_FUNC_FORK
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_FUNC_STRTOD
AC_CHECK_FUNCS([atexit memset mkdir realpath setlocale strchr strrchr strcspn strdup strerror strtol strtoull])
# Init-System
AC_ARG_WITH([init-system],
[AS_HELP_STRING([--with-init-system=SYSTEM], [Sets the Init-System (systemd, systemv, openrc)])],
[init_system="$withval"],
[init_system="systemd"])
case "$init_system" in
systemd|systemv|openrc) ;;
*) AC_MSG_ERROR([Invalid value for --with-init-system. Use systemd, systemv or openrc.]);;
esac
AC_MSG_CHECKING([which Init-System should be used])
AC_MSG_RESULT([$with_init_system])
AC_SUBST([INIT_SYSTEM], [$init_system])
AC_SUBST([PACKAGE_VERSION])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT