-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathconfigure.ac
executable file
·74 lines (54 loc) · 1.39 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.61])
AC_INIT(vfd-dispatcher, 0.1, http://www.csksoft.net)
AC_SYS_LARGEFILE
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_RANLIB
AC_PATH_PROG(AR,ar,ar)
# Checks for libraries.
# Checks for header files.
AC_CHECK_HEADERS([fcntl.h stdint.h stdlib.h string.h sys/time.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_UINT8_T
# check target platform via current machine type
machine=`uname -m`
if test x$machine = xarmv7l; then
ARCH_PLATFORM=armv7l
else
ARCH_PLATFORM=x86
fi
# check target platform type based on the host arch
case "$host" in
arm-*-*)
ARCH_PLATFORM=armv7l
;;
*86* )
ARCH_PLATFORM=x86
;;
esac
AC_SUBST(ARCH_PLATFORM)
COMPILER_PREFIX=$host
AC_SUBST(COMPILER_PREFIX)
# enable debug
AC_MSG_CHECKING(for debug)
AC_ARG_ENABLE([debug],
[AC_HELP_STRING([--enable-debug],
[Turn off optimization flag and Turn on debug flag. (DEFINE _DEBUG)(default=disable)])],
[OPT_DBG="$enableval"],
[OPT_DBG=no] )
AC_SUBST(OPT_DBG)
# Checks for library functions.
AC_FUNC_FORK
AC_CHECK_FUNCS([clock_gettime ftruncate gettimeofday memset usleep])
AC_CONFIG_FILES([Makefile.conf
Makefile])
AC_OUTPUT