Require Boost 1.33 or later.
[metaproxy-moved-to-github.git] / configure.ac
1 ## -*- Autoconf -*-
2 ## Process this file with autoconf to produce a configure script.
3
4 # Autoconf and automake setup
5 AC_PREREQ(2.60)
6 AC_INIT([metaproxy],[1.0.13],[metaproxy-help@indexdata.dk])
7
8 AC_CONFIG_HEADERS(src/config.hpp)
9
10 AC_CONFIG_SRCDIR([configure.ac]) 
11 AC_CONFIG_AUX_DIR([config])
12 AC_CANONICAL_SYSTEM
13 ##AC_PREFIX_DEFAULT(`pwd`/install) 
14
15 AM_INIT_AUTOMAKE([1.9])
16
17 # Checks for programs.
18 AC_PROG_CXX
19 AC_PROG_CXXCPP
20 AC_PROG_INSTALL
21 AC_PROG_LN_S
22 AC_PROG_MAKE_SET
23 AC_PROG_RANLIB
24 AM_PROG_LIBTOOL
25
26 # Default language to use for tests (some tests may switch to C++)
27 AC_LANG(C)
28
29 if test "$enable_shared" = "yes"; then
30     AC_DEFINE([HAVE_DL_SUPPORT],[1],
31         [Define to 1 if you have shared module support])
32 fi
33
34 # Checks for libraries.
35 AC_CHECK_LIB(dl,dlopen)
36 AC_CHECK_LIB(m,main)
37
38 AC_CHECK_FUNCS([localtime_r])
39
40 ## YAZPP checks
41 YAZPP_INIT([threads],[1.1.0])
42 if test -z "$YAZPPLIB"; then
43     AC_MSG_ERROR([YAZ++ development libraries missing])
44 fi
45 YAZ_DOC
46 CPPFLAGS="$YAZPPINC $CPPFLAGS"
47
48 # check for Boost C++ development libs and headers
49
50 AX_BOOST([1.33])
51 if test "$ax_cv_boost_base" = "no"; then
52     AC_MSG_ERROR([install libboost-dev or similar])
53 fi
54 if test "$ax_cv_boost_thread" = "no"; then
55     AC_MSG_ERROR([install libboost-thread-dev or similar])
56 fi
57 if test "$ax_cv_boost_unit_test_framework" = "no"; then
58     AC_MSG_ERROR([install libboost-test-dev or similar])
59 fi
60     
61
62
63 # Checks for header files.
64 ##AC_HEADER_STDC
65 ##AC_HEADER_SYS_WAIT
66 ##AC_HEADER_TIME 
67 AC_CHECK_HEADERS(sys/select.h sys/socket.h)
68
69 # Checks for typedefs, structures, and compiler characteristics.
70 ##AC_TYPE_SIZE_T 
71 ##AC_CHECK_SIZEOF(int)
72 ##AC_CHECK_SIZEOF(long int)
73
74 # Checks for library functions.
75
76 AC_CONFIG_FILES([
77         Doxyfile
78         Makefile
79         src/Makefile
80         src/Jamfile
81         xml/Makefile
82         xml/schema/Makefile
83         xml/xslt/Makefile
84         doc/Makefile
85         doc/local.ent
86         doc/common/Makefile
87         doc/common/print.dsl
88         etc/Makefile
89 ])
90
91 AC_OUTPUT
92
93
94 # postamble
95
96
97 echo \
98 "------------------------------------------------------------------------
99
100   Package:                    ${PACKAGE}
101   Version:                    ${VERSION}
102   Source code location:       ${srcdir}
103   CPP Preprocessor:           ${CPP}
104   CPP Preprocessor flags:     ${CPPFLAGS}
105   CXX Compiler:               ${CXX}
106   CXX Compiler flags:         ${CXXFLAGS}
107   Linker flags:               ${LDFLAGS}
108   Linked libs:                ${LIBS}
109   Host System Type:           ${host}
110   Install path:               ${prefix}
111   Automake:                   ${AUTOMAKE}
112   Archiver:                   ${AR}
113   Ranlib:                     ${RANLIB}
114   Boost Version:              ${BOOST_VERSION}               
115   Boost Include:              ${BOOST_CPPFLAGS}               
116   Boost linker flags:         ${BOOST_LDFLAGS}               
117   Boost Libs:                 ${BOOST_DATE_TIME_LIB} ${BOOST_PROGRAM_OPTIONS_LIB} ${BOOST_THREAD_LIB}               
118   YAZPP Version:              ${YAZPPVERSION}
119   YAZPP Include:              ${YAZPPINC}
120   YAZPP La Lib:               ${YAZPPLALIB}
121   YAZPP Lib:                  ${YAZPPLIB}
122   Bugreport:                  ${PACKAGE_BUGREPORT}
123
124 ------------------------------------------------------------------------"
125 dnl Local Variables:
126 dnl mode:shell-script
127 dnl sh-indentation: 2
128 dnl sh-basic-offset: 4
129 dnl End: