updated boost autoconf checks - hopefully now running on FreeBSD also
[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.59)
6 AC_INIT([metaproxy],[1.0.9],[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.8])
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 # Use C++ compilers only for tests
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
37
38 # check for Boost C++ development libs and headers
39
40 AX_BOOST([1.32])
41 if test "$ax_cv_boost_base" = "no"; then
42    AC_MSG_ERROR([install libboost-dev or similar])
43 fi
44 if test "$ax_cv_boost_date_time" = "no"; then
45    AC_MSG_ERROR([install libboost-date-time-dev or similar])
46 fi
47 if test "$ax_cv_boost_program_options" = "no"; then
48    AC_MSG_ERROR([install libboost-program-options-dev or similar])
49 fi
50 if test "$ax_cv_boost_thread" = "no"; then
51    AC_MSG_ERROR([install libboost-thread-dev or similar])
52 fi
53 if test "$ax_cv_boost_unit_test_framework" = "no"; then
54    AC_MSG_ERROR([install libboost-test-dev or similar])
55 fi
56     
57
58 ## YAZPP checks
59 YAZPP_INIT(threads,1.0.2)
60 if test -z "$YAZPPLIB"; then
61         AC_MSG_ERROR([YAZ++ development libraries missing])
62 fi
63 YAZ_DOC
64
65 # Checks for header files.
66 ##AC_HEADER_STDC
67 ##AC_HEADER_SYS_WAIT
68 ##AC_HEADER_TIME 
69 AC_CHECK_HEADERS(sys/select.h sys/socket.h iostream list vector stdexcept)
70
71 # Checks for typedefs, structures, and compiler characteristics.
72 ##AC_TYPE_SIZE_T 
73 ##AC_CHECK_SIZEOF(int)
74 ##AC_CHECK_SIZEOF(long int)
75
76
77 # Checks for library functions.
78
79 AC_CONFIG_FILES([
80         Doxyfile
81         Makefile
82         src/Makefile
83         src/Jamfile
84         xml/Makefile
85         xml/schema/Makefile
86         xml/xslt/Makefile
87         doc/Makefile
88         doc/local.ent
89         doc/common/Makefile
90         doc/common/print.dsl
91         etc/Makefile
92 ])
93
94 AC_OUTPUT
95
96
97 # postamble
98
99
100 echo \
101 "------------------------------------------------------------------------
102
103   Package:                    ${PACKAGE}
104   Version:                    ${VERSION}
105   Source code location:       ${srcdir}
106   CPP Preprocessor:           ${CPP}
107   CPP Preprocessor flags:     ${CPPFLAGS}
108   CXX Compiler:               ${CXX}
109   CXX Compiler flags:         ${CXXFLAGS}
110   Linker flags:               ${LDFLAGS}
111   Linked libs:                ${LIBS}
112   Host System Type:           ${host}
113   Install path:               ${prefix}
114   Automake:                   ${AUTOMAKE}
115   Archiver:                   ${AR}
116   Ranlib:                     ${RANLIB}
117   Boost Version:              ${BOOST_VERSION}               
118   Boost Include:              ${BOOST_CPPFLAGS}               
119   Boost linker flags:         ${BOOST_LDFLAGS}               
120   Boost Libs:                 ${BOOST_DATE_TIME_LIB} ${BOOST_PROGRAM_OPTIONS_LIB} ${BOOST_THREAD_LIB}               
121   YAZPP Version:              ${YAZPPVERSION}
122   YAZPP Include:              ${YAZPPINC}
123   YAZPP La Lib:               ${YAZPPLALIB}
124   YAZPP Lib:                  ${YAZPPLIB}
125   Bugreport:                  ${PACKAGE_BUGREPORT}
126
127 ------------------------------------------------------------------------"