Line 0
Link Here
|
|
|
1 |
AC_INIT([jsonrpc-cpp], [0.4], []) |
2 |
AC_CONFIG_MACRO_DIR([m4]) |
3 |
AC_CANONICAL_HOST |
4 |
AM_INIT_AUTOMAKE([-Wall -Werror foreign nostdinc subdir-objects dist-bzip2 dist-zip tar-ustar]) |
5 |
|
6 |
AM_PROG_AR |
7 |
LT_INIT |
8 |
#LT_OUTPUT |
9 |
|
10 |
# Check for C++ compiler and use it to compile the tests. |
11 |
# |
12 |
AC_PROG_CXX |
13 |
AC_PROG_INSTALL |
14 |
AC_LANG([C++]) |
15 |
AC_CHECK_PROGS([DOXYGEN], [doxygen], [:]) |
16 |
|
17 |
|
18 |
|
19 |
# Configure options: --enable-debug[=no]. |
20 |
AC_ARG_ENABLE( [debug], |
21 |
[AS_HELP_STRING([--enable-debug], [enable additional debug code paths (default is no)])], |
22 |
[debug="$withval"], [debug='no']) |
23 |
|
24 |
AC_ARG_ENABLE( [examples], |
25 |
[AS_HELP_STRING([--enable-examples], [install example code (default is yes)])], |
26 |
[examples="$withval"], [examples='yes']) |
27 |
|
28 |
AC_ARG_ENABLE( [doc], |
29 |
[AS_HELP_STRING([--enable-doc], [install documentation (default is yes)])], |
30 |
[doc="$withval"], [doc='yes']) |
31 |
|
32 |
|
33 |
|
34 |
# Configure options: --with-json-cpp-inc-dir |
35 |
AC_ARG_WITH( [jsoncpp-inc-dir], |
36 |
[AS_HELP_STRING([--with-jsoncpp-inc-dir], [set jsoncpp include dir (default is /usr/include/jsoncpp)])], |
37 |
[JSONCPP_INC_DIR="$withval"], |
38 |
[JSONCPP_INC_DIR='/usr/include/jsoncpp']) |
39 |
|
40 |
|
41 |
#AC_CHECK_LIB([jsoncpp], []) |
42 |
# Allow the user to specify the pkgconfig directory. |
43 |
# |
44 |
#PKGCONFIG |
45 |
|
46 |
# Check for doxygen program. |
47 |
AM_CONDITIONAL([HAVE_DOXYGEN],[test "${DOXYGEN}" != ':']) |
48 |
AM_CONDITIONAL([ENABLE_DEBUG],[test ${debug} == 'yes']) |
49 |
AM_CONDITIONAL([INSTALL_DOCUMENTATION],[test "${doc}" == 'yes']) |
50 |
AM_CONDITIONAL([INSTALL_EXAMPLES],[test "${examples}" == 'yes']) |
51 |
|
52 |
|
53 |
# Output. |
54 |
# |
55 |
AC_SUBST([JSONCPP_INC_DIR]) |
56 |
|
57 |
AC_CONFIG_FILES(Makefile src/Makefile test/Makefile examples/Makefile doc/Makefile) |
58 |
AC_OUTPUT |
59 |
|
60 |
|
61 |
echo " |
62 |
($PACKAGE_NAME) version $PACKAGE_VERSION |
63 |
Prefix.......................:'${prefix}' |
64 |
C++ Compiler.................: ${CXX} ${CXXFLAGS} ${CPPFLAGS} |
65 |
Linker.......................: ${LD} ${LDFLAGS} ${LIBS} |
66 |
JSON-C++ include directory...:'${JSONCPP_INC_DIR}' |
67 |
Debug Build..................: ${debug} |
68 |
Install Examples.............: ${examples} |
69 |
Install Documentation........: ${doc} |
70 |
Doxygen......................: ${DOXYGEN:-NONE} |
71 |
" |
72 |
|