-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathconfigure.ac
42 lines (36 loc) · 994 Bytes
/
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
AC_CONFIG_MACRO_DIR([m4])
AC_INIT([creg],[2014-02-18])
AC_CONFIG_SRCDIR([creg/creg.cc])
AM_INIT_AUTOMAKE
AC_CONFIG_HEADERS(config.h)
AC_PROG_LIBTOOL
OLD_CXXFLAGS=$CXXFLAGS
AC_PROG_CC
AC_PROG_CXX
CXXFLAGS=$OLD_CXXFLAGS
AX_CXX_COMPILE_STDCXX_11([],[mandatory])
AC_LANG_CPLUSPLUS
BOOST_REQUIRE([1.44])
BOOST_PROGRAM_OPTIONS
AC_CHECK_HEADERS(zlib.h,
AC_CHECK_LIB(z, gzread,[
AC_DEFINE(HAVE_ZLIB,[],[Do we have zlib])
ZLIBS="$ZLIBS -lz"
]))
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
LDFLAGS="$LDFLAGS $BOOST_PROGRAM_OPTIONS_LDFLAGS"
LIBS="$LIBS $BOOST_PROGRAM_OPTIONS_LIBS $ZLIBS"
AC_PROG_INSTALL
CPPFLAGS="-DPIC $CPPFLAGS -DHAVE_CONFIG_H"
CXXFLAGS="$CXX11_SWITCH $CXXFLAGS -fPIC -g -O3"
CFLAGS="$CFLAGS -fPIC -g -O3"
if test "x$HAVE_CXX11" = "x0"; then
CPPFLAGS="$CPPFLAGS -DHAVE_OLD_CXX"
else
CPPFLAGS="-DHAVE_NEW_CXX $CPPFLAGS"
fi
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([setup.py])
AC_CONFIG_FILES([liblbfgs/Makefile])
AC_CONFIG_FILES([creg/Makefile])
AC_OUTPUT