forked from VowpalWabbit/vowpal_wabbit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
83 lines (68 loc) · 2.15 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
AC_INIT([vowpal_wabbit], [8.1.1], [jl@hunch.net])
AC_DEFINE([PACKAGE_URL],["https://github.com/JohnLangford/vowpal_wabbit"],[project url])
AC_CONFIG_HEADERS(vowpalwabbit/config.h)
AM_INIT_AUTOMAKE([subdir-objects])
AC_CONFIG_MACRO_DIR([acinclude.d])
# if CXXFLAGS is not given by user, don't use default of "-O2 -g"
: ${CXXFLAGS=""}
AC_PROG_CXX
AC_PROG_CXXCPP
AC_LANG_CPLUSPLUS
AC_CANONICAL_HOST
AC_PROG_INSTALL
AM_PROG_LIBTOOL
AX_CXX_COMPILE_STDCXX_11
AC_HEADER_STDC
AX_BOOST_BASE([1.0], [], [
AC_MSG_ERROR([Could not find a valid version of boost.])
])
AX_BOOST_PROGRAM_OPTIONS()
AX_CHECK_ZLIB()
ZLIB_CPPFLAGS="-I${ZLIB_HOME}/include"
ZLIB_LDFLAGS="-L${ZLIB_HOME}/lib -lz"
AC_SUBST(ZLIB_CPPFLAGS)
AC_SUBST(ZLIB_LDFLAGS)
PTHREAD_LIBS=-lpthread
AX_PTHREAD([], [
AC_MSG_ERROR([Could not find posix thread library.])
])
nitpick=false
AC_ARG_ENABLE([nitpicking],
AC_HELP_STRING([--enable-nitpicking],[make compiler warn about possible problems]),
[ test "$enableval" = "no" || nitpick=true ]
)
AM_CONDITIONAL(NITPICK, test x$nitpick = xtrue)
parallelize=false
AC_ARG_ENABLE([parallelization],AC_HELP_STRING([--enable-parallelization],[enable openmp]),[ test "$enableval" = "no" || parallelize=true ])
AM_CONDITIONAL(PARALLELIZE, test x$parallelize = xtrue)
profile=false
AC_ARG_ENABLE([profiling],
AC_HELP_STRING([--enable-profiling], [add -pg to C++ compiler flags]),
[ test "$enableval" = "no" || profile=true ])
AM_CONDITIONAL(PROFILE, test x$profile = xtrue)
vwbug=false
AC_ARG_ENABLE([debug],
AC_HELP_STRING([--enable-debug], [Enable debugging, disable optimization in the compiler]),
[ test "$enableval" = "no" || vwbug=true ])
AM_CONDITIONAL(VWBUG, test x$vwbug = xtrue)
clang_libcxx=false
AC_ARG_ENABLE([libc++],
AC_HELP_STRING([--enable-libc++],[use clang's libc++ vs. g++ libstdc++ headers/libraries]),
[ test "$enableval" = "no" || clang_libcxx=true])
AM_CONDITIONAL([CLANG_LIBCXX], test x$clang_libcxx = xtrue)
case $host in
*-*-freebsd*)
freebsd=true
;;
*)
freebsd=false
;;
esac
AM_CONDITIONAL(FREEBSD, test x$freebsd = xtrue)
AC_CONFIG_FILES([
Makefile
vowpalwabbit/Makefile
cluster/Makefile
library/Makefile
])
AC_OUTPUT