-
Notifications
You must be signed in to change notification settings - Fork 49
/
configure.ac
97 lines (73 loc) · 2.17 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
AC_INIT([annabell],[2.0.9],[[email protected]])
AC_PREREQ([2.60])
AC_CONFIG_SRCDIR([src/annabell_main.cc])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
AC_CANONICAL_HOST
LIB_CURRENT=0
LIB_REVISION=0
LIB_AGE=0
AC_SUBST(LIB_CURRENT)
AC_SUBST(LIB_REVISION)
AC_SUBST(LIB_AGE)
#m4_pattern_allow([AS_TR_SH])
AC_CONFIG_MACRO_DIR([m4])
AC_USE_SYSTEM_EXTENSIONS
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
#libtool
LT_PREREQ([2.0.0])
LT_INIT()
AC_PROG_LIBTOOL
AC_PROG_CC
if test `AS_BASENAME([$CC])` = $CC ; then
AC_CHECK_PROG(CC_FULL, [$CC], $CC, [none])
#this next line may never be reached...
if test x$CC_FULL = "xnone" ; then
AC_MSG_ERROR([no C compiler was found on the system.])
fi
fi
AM_PROG_CC_C_O
AC_PROG_CXX
if test `AS_BASENAME([$CXX])` = $CXX ; then
AC_CHECK_PROG(CXX_FULL, [$CXX], $CXX, [none])
#this next line may never be reached...
if test x$CXX_FULL = "xnone" ; then
AC_MSG_ERROR([no C++ compiler was found on the system.])
fi
fi
AC_PROG_CXX_C_O
LDFLAGS_EXTRA=""
case "$host" in
*mingw*)
LDFLAGS_EXTRA+="-no-undefined"
;;
esac
AC_SUBST(LDFLAGS_EXTRA)
#look for openmp support in C++
AC_LANG_PUSH(C++)
AC_OPENMP
AC_LANG_POP(C++)
AC_CHECK_LIB([m], [exp], [], [AC_MSG_ERROR([math library does not contain exp])])
AC_CHECK_FUNC(expm1,,[AC_MSG_ERROR([Required libc function not found])])
AC_CHECK_FUNC(log1p,,[AC_MSG_ERROR([Required libc function not found])])
#determine if the yarp support should be built
AC_ARG_ENABLE([yarp], AS_HELP_STRING([--enable-yarp],[build with YARP support]), [enable_yarp=yes], [enable_yarp=no])
if test x$enable_yarp = xyes ; then
AC_MSG_NOTICE([Building with YARP support])
else
AC_MSG_NOTICE([Building without YARP support])
fi
AM_CONDITIONAL(ENABLE_YARP,[test "x$enable_yarp" = xyes && test "x$enable_yarp" = xyes])
AC_CONFIG_FILES([ Makefile
src/Makefile
annabell.spec])
AC_CONFIG_HEADERS([config.h])
abs_top_builddir=`pwd -P`
AC_SUBST(abs_top_builddir)
abs_top_srcdir=`AS_DIRNAME([$0])`
cd $abs_top_srcdir
abs_top_srcdir=`pwd -P`
cd $abs_top_builddir
AC_SUBST(abs_top_srcdir)
AM_CONDITIONAL([ABS_SRC_BUILD_EQUAL],[test x$abs_top_builddir = x$abs_top_srcdir])
AC_OUTPUT