-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
55 lines (45 loc) · 1.49 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
AC_PREREQ(2.59)
AC_INIT(hardhat, m4_esyscmd_s([
read -r debian_version <debian/changelog
debian_version=${debian_version#*\(}
debian_version=${debian_version%%\)*}
echo "${debian_version%-*}"
]), [wsl-hardhat-bugs@fruit.je])
AM_INIT_AUTOMAKE([foreign subdir-objects dist-xz no-dist-gzip])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([src/hardhat.c])
AC_CONFIG_HEADERS([src/config.h])
AC_DEFINE(_GNU_SOURCE, 1, [needed for some calls])
AC_DEFINE(_FILE_OFFSET_BITS, 64, [gnu libc has insane defaults])
AC_DEFINE(_XOPEN_SOURCE, 500, [needed for some calls])
# Checks for typedefs, structures, and compiler characteristics.
AC_PROG_CC
# This adds -std=gnu99 which we do not want:
#AC_PROG_CC_C99
AC_PROG_INSTALL
AC_PROG_LIBTOOL
AC_SYS_LARGEFILE
AC_HEADER_STDBOOL
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_FUNC_MALLOC
AC_FUNC_MMAP
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdint.h inttypes.h stdlib.h unistd.h fcntl.h], , [
AC_MSG_FAILURE([Required system header files not found.])
exit 1
])
AC_CHECK_LIB(rt, clock_gettime, [true], [
AC_MSG_FAILURE([rt clock library not found.])
exit 1
])
AC_CHECK_FUNCS([qsort_r], [have_qsort_r=true], [have_qsort_r=false])
AM_CONDITIONAL([HAVE_QSORT_R], [$have_qsort_r])
MY_GCC_BUILTIN(bswap16, 0)
MY_GCC_BUILTIN(bswap32, 0)
MY_GCC_BUILTIN(bswap64, 0)
AX_APPEND_FLAG([-std=c99 -pipe -fvisibility=hidden -Wall -Wextra -Wno-missing-field-initializers -Wstrict-aliasing -include src/config.h])
AC_REQUIRE_AUX_FILE([tap-driver.sh])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT