-
Notifications
You must be signed in to change notification settings - Fork 55
/
Copy pathconfigure.ac
81 lines (67 loc) · 2.36 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.60])
AC_INIT(spi-tools, 1.0.2, Christophe Blaess)
AM_INIT_AUTOMAKE([foreign])
AM_MAINTAINER_MODE([disable])
##########################################################################
# Checks for programs.
AC_PROG_MAKE_SET
AC_PROG_CC
AC_PROG_CC_C99
AM_PROG_CC_C_O
AC_LANG_C
AC_C_CONST
AC_TYPE_SIZE_T
AC_STRUCT_TM
AC_DEFINE([_GNU_SOURCE], 1, [Use GNU extensions])
# Checks for libraries.
AC_CHECK_PROGS([DOXYGEN], [doxygen])
if test -z "$DOXYGEN";
then AC_MSG_WARN([Doxygen not found - continuing without Doxygen support])
fi
#AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([docs/Doxyfile])])
# Checks for header files.
AC_CHECK_HEADERS([fcntl.h limits.h stddef.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_SIZE_T
AC_TYPE_SSIZE_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_UINT8_T
AC_FUNC_STRFTIME
AC_FUNC_STRTOD
AC_FUNC_ERROR_AT_LINE
AC_CHECK_FUNCS([memmove memset])
AC_CONFIG_SRCDIR([src])
AC_CONFIG_FILES([Makefile src/Makefile man/Makefile])
AC_CONFIG_HEADERS([src/config.h])
##########################################################################
# debug compilation support
##########################################################################
AC_MSG_CHECKING([whether to build with debug information])
AC_ARG_ENABLE([debug],
[AS_HELP_STRING([--enable-debug],
[enable debug data generation (def=no)])],
[debugit="$enableval"],
[debugit=no])
AC_MSG_RESULT([$debugit])
if test x"$debugit" = x"yes"; then
AC_DEFINE([DEBUG],[],[Debug Mode])
AM_CFLAGS="$CFLAGS -g -Wall -Werror -Wno-uninitialized -O0"
AM_CXXFLAGS="$CXXFLAGS -g -Wall -Werror -Wno-uninitialized -O0"
AC_MSG_NOTICE([Debug Mode on.])
else
AC_DEFINE([NDEBUG],[],[No-debug Mode])
AM_CFLAGS="-O0 $AM_CFLAGS $CFLAGS"
AM_CXXFLAGS="-O0 $AM_CXXFLAGS $CXXFLAGS"
AC_MSG_NOTICE([Debug Mode off.])
fi
AC_PATH_PROG(HELP2MAN, help2man, echo No help2man )
CFLAGS="$AM_CFLAGS"
CXXFLAGS="$AM_CXXFLAGS"
##########################################################################
AC_OUTPUT