-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathconfigure.ac
executable file
·52 lines (36 loc) · 1.91 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
# Process this file with autoconf to produce a configure script.
AC_INIT([QLRest], [0.0.1],
[mike.kipnis@gmail.com],
[QLRest])
AC_PREREQ(2.50)
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_HEADERS([qlrest/config.hpp])
AM_INIT_AUTOMAKE([foreign])
AC_COPYRIGHT([mike kipnis copyright])
AC_PROG_INSTALL
# Default compilation variables
AC_SUBST([CXXFLAGS],[${CXXFLAGS='-g -O2 -Wall -std=c++0x'}])
# Continue setup
AC_PROG_CC
AC_PROG_CXX
AC_PROG_CPP
AC_PROG_LIBTOOL
AC_LANG([C++])
# Configure and validate the path to Boost/QuantLib/ObjectHandler/QuantLibAddin
AC_ARG_WITH([deps-include], AC_HELP_STRING([--with-deps-include=/path/to/quantlib], [Specify the path to dependances boost/beast, ql/quantlib, oh/object_handler, qlo/quantlibaddin]), [deps_path_include=${withval}], [AC_MSG_ERROR([You must specify the location of dependances: "./configure --with-deps-include=path/to/dependances/include"])])
AC_CHECK_FILES([${deps_path_include}/boost/beast.hpp ${deps_path_include}/ql/version.hpp ${deps_path_include}/oh/objecthandler.hpp ${deps_path_include}/qlo/qladdin.hpp], [], [AC_MSG_ERROR([Unable to locate beast.hpp ql/version.hpp oh/objecthandler.hpp qlo/qladdin.hpp in specified dependances directory])])
AC_ARG_VAR(deps_dir_include, "path to dependances include dir")
AC_SUBST(deps_dir_include, [${deps_path_include}])
AC_ARG_WITH([deps-lib], AC_HELP_STRING([--with-deps-lib=LIB_PATH],
[Specify the path to dependances libraries boost,quantlib,object_handler,quantlibadd]), [deps_path_lib="`cd ${withval} 2>/dev/null && pwd`"], [deps_path_lib=""])
AC_SUBST([DEPS_LIB],["-L${deps_path_lib}"])
AC_SUBST([LDFLAGS],["${LDFLAGS} -L${deps_path_lib}"])
# Done, output the configured files
AC_CONFIG_FILES([
Makefile
qlrest/Makefile
test-suite/Makefile
Examples/bond_pricer/bond_pricer_server/Makefile
Examples/swap_designer/swap_pricer/Makefile
Examples/options_monitor/options_pricer_server/Makefile])
AC_OUTPUT