-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfigure.ac
More file actions
86 lines (73 loc) · 2.77 KB
/
configure.ac
File metadata and controls
86 lines (73 loc) · 2.77 KB
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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([crimson-firmware], [9999], [solutions@pervices.com])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_CONFIG_SRCDIR([mem.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIRS([m4])
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_INSTALL
AM_PROG_AR
AC_CHECK_PROG([GIT],git,git,AC_MSG_ERROR([git executable not in PATH]))
AC_CHECK_PROG([date],date,date,AC_MSG_ERROR([date executable not in PATH]))
# Checks for libraries.
AC_CHECK_LIB([m], [pow])
AC_CHECK_LIB([rt], [clock_gettime])
# Checks for header files.
AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h limits.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h syslog.h termios.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_INT32_T
AC_TYPE_INT64_T
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_UINT8_T
# Checks for library functions.
AC_FUNC_ERROR_AT_LINE
AC_FUNC_MALLOC
AC_FUNC_MMAP
AC_CHECK_FUNCS([clock_gettime floor getcwd gettimeofday inet_ntoa memmove memset mkdir munmap pow realpath select socket strerror strstr])
CPPFLAGS="${CPPFLAGS}"
CPPFLAGS+=" -I\${top_srcdir}/common"
CPPFLAGS+=" -I\${top_srcdir}/hal "
CPPFLAGS+=" -I\${top_srcdir}/hal/drivers/mmap"
CPPFLAGS+=" -I\${top_srcdir}/hal/drivers/uart"
CPPFLAGS+=" -I\${top_srcdir}/hal/drivers/udp"
CPPFLAGS+=" -I\${top_srcdir}/parser"
CFLAGS="${CFLAGS}"
CFLAGS+=" -DVERSIONGITBRANCH=\\\"`git rev-parse --abbrev-ref HEAD`\\\""
CFLAGS+=" -DVERSIONGITREVISION=\\\"`git describe --abbrev=8 --dirty --always --long`\\\""
CFLAGS+=" -DVERSIONDATE=\\\"`TZ=UTC date '+%F-%T'`\\\""
# Previously (and to a large extent with still do) rely on ifdef PRODUCT so it had no value
# However, this is an easy source of mistakes (by using #if PRODUCT instead of #ifdef PRODUCT) and makes using it inside larger blocks difficult
# To prevent the above issue, the value of -D${PRODUCT} is set to 1
# Relying on either ifdef ${PRODUCT} or if ${PRODUCT} are valid
CFLAGS+=" -D${PRODUCT}=1"
CFLAGS+=" -D${HW_REV}"
CFLAGS+=" -D${NRX}"
CFLAGS+=" -D${NTX}"
CFLAGS+=" -D${MAX_RATE}"
CFLAGS+=" -DRX_40GHZ_FE=${RX_40GHZ_FE}"
CFLAGS+=" -DUSE_3G_AS_1G=${USE_3G_AS_1G}"
CFLAGS+=" -DS_USE_3G_AS_1G=\\\"${USE_3G_AS_1G}\\\""
CFLAGS+=" -DUSER_LO=${USER_LO}"
LDFLAGS="${LDFLAGS}"
LDFLAGS+=" -Wl,-no-undefined"
LT_INIT
AC_CONFIG_FILES([Makefile
common/Makefile
hal/Makefile
hal/drivers/Makefile
hal/drivers/mmap/Makefile
hal/drivers/uart/Makefile
hal/drivers/udp/Makefile
parser/Makefile])
AC_OUTPUT