-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
115 lines (94 loc) · 3.23 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([axiom-evi-allocator-lib], [0.1], [BUG-REPORT-ADDRESS])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_CONFIG_HEADERS([config.h])
AM_PROG_AR
LT_INIT([disable-static])
AC_CONFIG_MACRO_DIR([m4])
# Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_GREP
######################################################################
# DOXYGEN SUPPORT
######################################################################
DX_HTML_FEATURE(ON)
DX_CHM_FEATURE(OFF)
DX_CHI_FEATURE(OFF)
DX_MAN_FEATURE(OFF)
DX_RTF_FEATURE(OFF)
DX_XML_FEATURE(OFF)
DX_PDF_FEATURE(OFF)
DX_PS_FEATURE(OFF)
DX_INIT_DOXYGEN([$PACKAGE_NAME],[docs/doxygen.cfg],[docs/output])
# Checks for libraries.
AXIOM_LD_SCRIPTS=""
AC_ARG_ENABLE([extld],
AS_HELP_STRING([--enable-extld],
[Enable the use of the external Linker Script (only aarch64)]),
[case "${enableval}" in
yes) AXIOM_LD_SCRIPTS="xs_map64.lds"; use_extld=yes ;;
no) use_extld=no ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-extld]) ;;
esac], [use_extld=no])
AM_CONDITIONAL([EXTLD], [test x"$use_extld" = "xyes"])
AC_ARG_ENABLE([extld_x86],
AS_HELP_STRING([--enable-extld_x86],
[Enable the use of the external Linker Script (only X86)]),
[case "${enableval}" in
yes) AXIOM_LD_SCRIPTS="xs_map64.lds"; use_extld_x86=yes ;;
no) use_extld_x86=no ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-extld_x86]) ;;
esac], [use_extld_x86=no])
AM_CONDITIONAL([EXTLD_X86], [test x"$use_extld_x86" = "xyes"])
AC_ARG_ENABLE([debug],
AS_HELP_STRING([--enable-debug],
[build library with debugging symbols]),
[case "${enableval}" in
yes) dbg=yes ;;
no) dbg=no ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
esac], [dbg=no])
AM_CONDITIONAL([DBG], [test x"$dbg" = "xyes"])
# Checks for header files.
AC_CHECK_HEADERS([stddef.h stdint.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
AC_TYPE_UINT32_T
# Checks for library functions.
AC_FUNC_MALLOC
AXIOM_LD_SCRIPTS_PATH=""
AXIOM_LD_SCRIPTS_MAKE=""
AXIOM_LD_SCRIPTS_MAKE_ARCH=""
if test x"$use_extld" = "xyes"; then
LINKER_SEARCH_PATH_BLOCK=$($CC -Wl,--verbose 2>&1 | $GREP "SEARCH_DIR")
AXIOM_LD_SCRIPTS_PATH="ldscript/aarch64/$AXIOM_LD_SCRIPTS"
AXIOM_LD_SCRIPTS_MAKE="ldscript/Makefile"
AXIOM_LD_SCRIPTS_MAKE_ARCH="ldscript/aarch64/Makefile"
AC_SUBST([AXIOM_LD_SCRIPTS])
AC_SUBST([LINKER_SEARCH_PATH_BLOCK])
AC_SUBST([AXIOM_LD_SCRIPTS_PATH])
fi
if test x"$use_extld_x86" = "xyes"; then
LINKER_SEARCH_PATH_BLOCK=$($CC -Wl,--verbose 2>&1 | $GREP "SEARCH_DIR")
AXIOM_LD_SCRIPTS_PATH="ldscript/x86/$AXIOM_LD_SCRIPTS"
AXIOM_LD_SCRIPTS_MAKE="ldscript/Makefile"
AXIOM_LD_SCRIPTS_MAKE_ARCH="ldscript/x86/Makefile"
AC_SUBST([AXIOM_LD_SCRIPTS])
AC_SUBST([LINKER_SEARCH_PATH_BLOCK])
AC_SUBST([AXIOM_LD_SCRIPTS_PATH])
fi
AC_CONFIG_FILES([Makefile
ldscript/Makefile
ldscript/aarch64/Makefile
ldscript/x86/Makefile
evi_lmm.pc
$AXIOM_LD_SCRIPTS_PATH
src/Makefile
test/Makefile
docs/doxygen.cfg])
AC_OUTPUT