-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure.ac
60 lines (48 loc) · 1.47 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
# Process this file with autoconf to produce a configure script.
AC_INIT(Autodiffadolc, 0.1, [email protected])
AC_CONFIG_SRCDIR([src/adolc_r_wrap.cpp])
AC_CONFIG_AUX_DIR([autoconf])
AC_CONFIG_MACRO_DIR([autoconf])
#AC_CONFIG_HEADER([src/cconfig.h])
# find R home and set CC/CFLAGS
: ${R_HOME=`R RHOME`}
if test -z "${R_HOME}"; then
echo "could not determine R_HOME"
exit 1
fi
RBIN="${R_HOME}/bin/R"
CC=`"${RBIN}" CMD config CC`;
CFLAGS=`"${RBIN}" CMD config CFLAGS`
CPP=`"${RBIN}" CMD config CPP`;
AC_SUBST(R_HOME)
# platform check
#AC_CANONICAL_HOST
# Checks for programs.
AC_PROG_CC
# Checks for libraries.
# Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([string.h sys/time.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
#AC_HEADER_TIME
# Checks for library functions.
#AC_FUNC_MALLOC
#AC_TYPE_SIGNAL
AC_PATH_PROG([PKGCONF],[pkg-config],[],[$PATH:/usr/local/bin:ext/bin:ext:/sw/bin:/opt/bin])
AX_BOOST_BASE([1.54],[boost_new=yes],[boost_new=no])
if test x$boost_new = xyes ; then
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
AC_LANG_PUSH([C++])
#AC_CHECK_HEADERS([boost/pool/pool_alloc.hpp])
AC_CHECK_HEADER(boost/regex.h,,AC_MSG_ERROR([Cannot find boost/regex.h! Please install boost (http://www.boost.org/)]))
AC_LANG_POP([C++])
AX_BOOST_SYSTEM
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS $BOOST_SYSTEM_LIB"
fi
COLPACK_CONF
AX_CXX_COMPILE_STDCXX_11(noext,mandatory)
AC_CONFIG_FILES([src/Makevars])
AC_SUBST(CXXFLAGS)
AC_OUTPUT