-
Notifications
You must be signed in to change notification settings - Fork 28
/
configure.ac
69 lines (54 loc) · 1.81 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
64
65
66
67
68
69
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([bitwise], [v0.50], [[email protected]])
AC_CONFIG_SRCDIR([src/misc.c])
AC_CONFIG_HEADERS([inc/config.h])
dnl Document where we keep our .m4 file.
AC_CONFIG_MACRO_DIR([m4])
dnl Make sure aclocal actually found it!
m4_pattern_forbid([^AX_])
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
# Checks for programs.
AC_PROG_CC
AC_PROG_CC_STDC
AC_PROG_INSTALL
AC_PROG_CC_C99
AX_LIB_READLINE
if test "$ac_cv_have_readline" = no; then
AC_MSG_ERROR([requires readline library])
fi
# Checks for libraries.
AC_CHECK_LIB([form], [form_driver])
AC_CHECK_LIB([ncurses], [newwin])
AC_SEARCH_LIBS([sqrt], [m])
# Checks for header files.
AC_CHECK_HEADERS([fcntl.h inttypes.h stdint.h stdlib.h string.h curses.h form.h])
AC_CHECK_DECLS([bswap_32], [], [], [[#include <byteswap.h>]])
AM_CONDITIONAL(HAVE_BYTESWAP_H, [test "x$ac_cv_have_decl_bswap_32" = "xyes"])
# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_HEADER_STDBOOL
AC_TYPE_UINT64_T
# Checks for library functions.
AC_FUNC_STRCOLL
AC_CHECK_FUNCS([memchr memmove memset stpcpy strchr strcspn strdup strerror strpbrk strrchr strspn strstr])
AC_CONFIG_FILES([Makefile])
AC_ARG_ENABLE([gcov],
[AS_HELP_STRING([--enable-gcov],
[Build with coverage support])],
[],
[enable_gcov=no])
AM_CONDITIONAL([COND_GCOV],[test '!' "$enable_gcov" = no])
AC_ARG_ENABLE([trace],
[AS_HELP_STRING([--enable-trace],
[Build with trace support])],
[],
[enable_trace=no])
AM_CONDITIONAL([COND_TRACE],[test '!' "$enable_trace" = no])
AC_ARG_ENABLE([debug],
[AS_HELP_STRING([--enable-debug],
[Build with debug symbols])],
[],
[enable_debug=no])
AM_CONDITIONAL([COND_DEBUG],[test '!' "$enable_debug" = no])
AC_OUTPUT