-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.ac
70 lines (53 loc) · 2.32 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
AC_PREREQ([2.61])
AC_INIT([avrprog2], [1.4.1], [[email protected]])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE(foreign [subdir-objects])
AC_CONFIG_SRCDIR([src/CAVRprog.cpp])
AC_CONFIG_HEADERS([config.h])
AM_SILENT_RULES([yes])
#AC_LANG_PUSH([C++])
AC_LANG_CPLUSPLUS
# Checks for programs.
AC_PROG_CXX
# doxygen is needed to generate a manpage
AC_CHECK_PROG([DOXYGEN], [doxygen], [yes], [no])
if test $DOXYGEN = no; then
AC_MSG_ERROR([doxygen was not found])
fi
# dot is needed by doxygen
AC_CHECK_PROG([DOT], [dot], [yes], [no])
if test $DOT = no; then
AC_MSG_WARN([dot (graphviz) was not found (documentation will not fully work)])
fi
# Checks for libraries and headers
# libs required only on some systems (known from openSUSE)
AC_SEARCH_LIBS([dlopen], [dl], [], [])
AC_CHECK_LIB([iberty], [main], [], [])
AC_CHECK_LIB([intl], [main], [], [])
AC_SEARCH_LIBS([zlibVersion], [z], [], [])
# Need at least libusb-1.0
AC_SEARCH_LIBS([libusb_init], [usb-1.0], [], [AC_MSG_ERROR([libusb-1.0 was not found])])
AC_CHECK_HEADER([libusb-1.0/libusb.h], [], [AC_MSG_ERROR([libusb.h was not found])])
# bfd
AC_SEARCH_LIBS([bfd_init], [bfd], [], [AC_MSG_ERROR([libbfd was not found])])
AC_CHECK_HEADER([bfd.h], [], [AC_MSG_ERROR([bfd.h was not found])])
# boost-filesystem
AC_CHECK_LIB([boost_filesystem], [main], [], [AC_MSG_ERROR([boost_filesystem library was not found])])
AC_CHECK_HEADER([boost/filesystem.hpp], [], [AC_MSG_ERROR([boost/filesystem.hpp was not found])])
# Checks for header files.
AC_CHECK_HEADERS([inttypes.h string.h])
# boost system
AC_CHECK_LIB([boost_system], [main], [], [AC_MSG_ERROR([boost_system library was not found])])
AC_CHECK_HEADER([boost/foreach.hpp], [], [AC_MSG_ERROR([boost/foreach.hpp was not found])])
AC_CHECK_HEADER([boost/property_tree/ptree.hpp], [], [AC_MSG_ERROR([boost/property_tree/ptree.hpp was not found])])
AC_CHECK_HEADER([boost/property_tree/xml_parser.hpp], [], [AC_MSG_ERROR([boost/property_tree/xml_parser.hpp was not found])])
AC_CHECK_HEADER([boost/algorithm/string.hpp], [], [AC_MSG_ERROR([boost/algorithm/string.hpp was not found])])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT8_T
# Checks for library functions.
AC_CHECK_FUNCS([floor memset])
AC_CONFIG_FILES([Makefile Doxyfile Doxyfile_man man.txt])
AC_OUTPUT