-
Notifications
You must be signed in to change notification settings - Fork 3
/
configure.ac
123 lines (71 loc) · 2.27 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#we're building b1_timing, version 1.0.0, and the corresponding email is Francesco Pancaldi's
AC_INIT([b1_timing], [1.0.0], [[email protected]],[b1_timing], [http://www3.nd.edu/~fpancald/])
# Force autoconf to be at least this version number:
AC_PREREQ([2.68])
#
AC_CONFIG_AUX_DIR([config])
# turn on the keeping of produced objects in their folders. this is for non-recursive make
# and autotools
# see Recursive Make Considered Harmful, and any number of demos.
AM_INIT_AUTOMAKE([1.13 subdir-objects])
#the language for b1_timing is C++
AC_LANG([C++])
#another directive to use the m4 folder
AC_CONFIG_MACRO_DIR([m4])
#the only produced file will be a single Makefile.
AC_CONFIG_FILES([Makefile])
#find the CC compiler
AC_PROG_CXX
#find the flags for C++14
AX_CXX_COMPILE_STDCXX_14
#enable the creation of shared libraries
AC_ENABLE_SHARED
#enable the creation of static libraries
AC_ENABLE_STATIC
#set up for building libraries
AC_PROG_LIBTOOL
#find flex / lex
AC_PROG_LEX
#find bison / yacc
AC_PROG_YACC
#find the linker
AC_PROG_LN_S
#find the command for making directories with their parents
AC_PROG_MKDIR_P
#fire up libtool
LT_INIT
#this calls a file in the m4/ directory, which sets up the MPI wrapper stuffs
LX_FIND_MPI
AS_IF([test "$have_CXX_mpi" = "yes"],
AC_MSG_NOTICE([mpi c++ appears to work correctly]),
AC_MSG_ERROR([it appears you do not have mpi installed])
)
# the form of the following commands --
# AC_SEARCH_LIBS(function, libraries-list, action-if-found, action-if-not-found, extra-libraries)
#find gmp
AC_SEARCH_LIBS([__gmpz_init],[gmp], [],[
AC_MSG_ERROR([unable to find gmp])
])
# find mpfr
AC_SEARCH_LIBS([mpfr_get_version],[mpfr], [],[
AC_MSG_ERROR([unable to find mpfr])
])
#find bertini
AC_SEARCH_LIBS([head_zero_dim_track_d],[bertini-parallel], [],
[AC_MSG_ERROR([unable to find libbertini-parallel])],
$MPI_CXXLDFLAGS)
#find the math library
AC_SEARCH_LIBS([cos], [m], [], [
AC_MSG_ERROR([unable to find the cos() function])
])
# look for a header file in Eigen, and croak if fail to find.
AX_EIGEN
AX_BOOST_BASE([1.50],, [AC_MSG_ERROR([b1_timing needs Boost, but it was not found in your system])])
AX_BOOST_SYSTEM
AX_BOOST_FILESYSTEM
AX_BOOST_REGEX
AX_BOOST_TIMER
AX_BOOST_CHRONO
AM_CONFIG_HEADER(config.h)
#wrap it up.
AC_OUTPUT