-
Notifications
You must be signed in to change notification settings - Fork 2
/
configure.ac
99 lines (80 loc) · 2.27 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([tea],
0.1.2,
[https://gitcafe.com/gkmail/tea])
# Detect the canonical host and target build environment
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE
# Package version
# Making releases:
# MICRO_VERSION += 1;
# INTERFACE_AGE += 1;
# BINARY_AGE += 1;
# if any functions have been added, set INTERFACE_AGE to 0.
# if backwards compatibility has been broken, set BINARY_AGE and INTERFACE_AGE to 0.
MAJOR_VERSION=0
MINOR_VERSION=1
MICRO_VERSION=2
INTERFACE_AGE=1
BINARY_AGE=1
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION
AC_SUBST(MAJOR_VERSION)
AC_SUBST(MINOR_VERSION)
AC_SUBST(MICRO_VERSION)
AC_SUBST(INTERFACE_AGE)
AC_SUBST(BINARY_AGE)
AC_SUBST(VERSION)
# libtool versioning
LT_RELEASE=$MAJOR_VERSION.$MINOR_VERSION
LT_CURRENT=`expr $MICRO_VERSION - $INTERFACE_AGE`
LT_REVISION=$INTERFACE_AGE
LT_AGE=`expr $BINARY_AGE - $INTERFACE_AGE`
AC_SUBST(LT_RELEASE)
AC_SUBST(LT_CURRENT)
AC_SUBST(LT_REVISION)
AC_SUBST(LT_AGE)
AC_CONFIG_SRCDIR([include/t_types.h])
AC_CONFIG_HEADERS([include/config.h])
CFLAGS="$CFLAGS -Wall -Wno-unused-function -O3"
AC_ARG_ENABLE([memwatch], AS_HELP_STRING([--enable-memwatch], [use memwatch[default=no]]), , [enable_memwatch=no])
if test "x$enable_memwatch" = "xyes"; then
CFLAGS="$CFLAGS -DMEMWATCH -DMEMWATCH_STDIO"
AM_CONDITIONAL(ENABLE_MEMWATCH, true)
else
AM_CONDITIONAL(ENABLE_MEMWATCH, false)
fi
AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug], [debug mode[default=no]]), , [enable_debug=no])
if test "x$enable_debug" = "xyes"; then
CFLAGS="$CFLAGS -g"
else
AC_DEFINE_UNQUOTED(T_DISABLE_DEBUG, 1, [Define if you want to disable debug information.])
fi
# Checks for programs.
AC_PROG_CC
AC_C_INLINE
AC_PROG_INSTALL
AC_CONFIG_MACRO_DIR([m4])
PKG_PROG_PKG_CONFIG()
AC_PROG_LIBTOOL
# Checks for libraries.
# Checks for header files.
AC_CHECK_HEADERS([inttypes.h stdlib.h string.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_INT16_T
AC_TYPE_INT32_T
AC_TYPE_INT64_T
AC_TYPE_INT8_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_UINT8_T
# Checks for library functions.
AC_CHECK_FUNCS([memset])
AC_OUTPUT([
Makefile
include/Makefile
src/Makefile
test/Makefile
])