-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
46 lines (33 loc) · 1.04 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
AC_PREREQ([2.69])
AC_INIT([turnandrun], [0.02], [[email protected]])
AM_INIT_AUTOMAKE([1.9 foreign])
LT_INIT
AC_CONFIG_SRCDIR([src/main.cpp])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
# Set compiler
AC_LANG([C++])
AX_CXX_COMPILE_STDCXX([14], [noext])
inst_msg="Install a development version of this library and rerun ./configure"
AC_LANG_PUSH([C++])
# Checks for header files.
AC_CHECK_HEADERS([limits.h stdlib.h string.h sys/time.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_SIZE_T
# Checks for library functions.
AC_FUNC_ERROR_AT_LINE
AC_CHECK_FUNCS([gettimeofday sqrt strchr strcspn])
# Checks for libraries.
AC_CHECK_LIB([iio], [iio_create_default_context], [], [AC_MSG_ERROR([$inst_msg])])
AC_CHECK_HEADER([iio.h], [], [AC_MSG_ERROR([$inst_msg])])
AC_LANG_POP([C++])
AC_CONFIG_FILES([Makefile
src/Makefile
scripts/turnandrun_service_install
])
AC_OUTPUT