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