-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.ac
74 lines (60 loc) · 1.87 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
AC_INIT([libtta-c], [2.3], [[email protected]])
AC_CANONICAL_TARGET
AC_CONFIG_SRCDIR([libtta.c])
AC_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE
# Initialize ranlib
AC_PROG_RANLIB
# Common compiler flags
CFLAGS="-Wall -O2 -funroll-loops -fomit-frame-pointer"
# Determine CPU
AM_CONDITIONAL(CPU_X86, false)
AM_CONDITIONAL(CPU_ARM, false)
AM_CONDITIONAL(CPU_MIPS, false)
case "${host_cpu}" in
i?86*|x86_64*|amd64*)
AM_CONDITIONAL(CPU_X86, true)
AC_DEFINE(CPU_X86,, [Define if building for X86]) ;;
arm*)
AM_CONDITIONAL(CPU_ARM, true)
AC_DEFINE(CPU_ARM,, [Define if building for ARM]) ;;
mipsel*)
AM_CONDITIONAL(CPU_MIPS, true)
AC_DEFINE(CPU_MIPS,, [Define if building for MIPS])
CFLAGS = "$CFLAGS -mips32r2 -mtune=24kf" ;;
*)
AC_MSG_ERROR([CPU ${host_cpu} is not supported]) ;;
esac
# Checks for programs
AC_PROG_CC
AM_PROG_CC_STDC
AM_PROG_AS
AC_PROG_INSTALL
# Checks for header files
AC_HEADER_STDC
AC_CHECK_HEADERS([setjmp.h])
# Checks for typedefs, structures, and compiler characteristics
AC_C_CONST
AC_C_INLINE
# Checks for library functions
AC_PROG_GCC_TRADITIONAL
AC_CHECK_FUNCS([read write malloc memset memcpy lseek64 posix_memalign])
# Specific optimization features
AM_CONDITIONAL(ENABLE_ASM, false)
AC_ARG_ENABLE(asm,
AC_HELP_STRING([--enable-asm], [enable assembly optimizations]),
[AC_DEFINE(ENABLE_ASM,, [Define to enable assembly optimizations])
AM_CONDITIONAL(ENABLE_ASM, true)],)
AC_ARG_ENABLE(sse2,
AC_HELP_STRING([--enable-sse2], [build with SSE2 support]),
[AC_DEFINE(ENABLE_SSE2,, [Define to use SSE2 instructions])
CFLAGS="-msse2 $CFLAGS"],)
AC_ARG_ENABLE(sse4,
AC_HELP_STRING([--enable-sse4], [build with SSE4 support]),
[AC_DEFINE(ENABLE_SSE4,, [Define to use SSE4 instructions])
CFLAGS="-msse4 $CFLAGS"],)
if false; then
AC_DEFINE(ENABLE_FRW,, [Define to enable FRW optimization])
fi
AC_CONFIG_FILES(Makefile console/Makefile)
AC_OUTPUT