Version 1.2.6
[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.2.6],[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
14 AM_INIT_AUTOMAKE([1.9])
15
16 AC_PROG_CXX
17 AC_PROG_CXXCPP
18 AC_PROG_INSTALL
19 AC_PROG_LN_S
20 AC_PROG_MAKE_SET
21 AC_PROG_RANLIB
22 AM_PROG_LIBTOOL
23
24 # Default language to use for tests (some tests may switch to C++)
25 AC_LANG([C])
26
27 if test "$enable_shared" = "yes"; then
28     AC_DEFINE([HAVE_DL_SUPPORT],[1],
29         [Define to 1 if you have shared module support])
30 fi
31
32 # Checks for libraries.
33 AC_CHECK_LIB([dl],[dlopen])
34 AC_CHECK_LIB([m],[main])
35
36 AC_CHECK_FUNCS([localtime_r])
37
38 ## YAZPP checks
39 YAZPP_INIT([threads],[1.2.3])
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 ID_BOOST([thread test],[1.33])
47 if test -z "${BOOST_THREAD_LIB}"; then
48     AC_MSG_ERROR([Boost thread development libraries required])
49 fi
50 if test -z "${BOOST_TEST_LIB}"; then
51     AC_MSG_ERROR([Boost unit test framework libraries required])
52 fi
53
54 AC_CHECK_HEADERS([sys/select.h sys/socket.h])
55
56 if test -d ${srcdir}/.git; then
57     SHA1=`git show --pretty=format:%H|head -1`
58 else
59     SHA1=`head -1 ${srcdir}/ChangeLog|awk '{print $2}'`
60 fi
61 AC_DEFINE_UNQUOTED([VERSION_SHA1], "$SHA1", [SHA-1 from Git])
62
63 AC_CONFIG_FILES([
64         metaproxy-config
65         Doxyfile
66         Makefile
67         include/Makefile include/metaproxy/Makefile
68         src/Makefile
69         xml/Makefile
70         xml/schema/Makefile
71         xml/xslt/Makefile
72         doc/Makefile
73         doc/local.ent
74         doc/common/Makefile
75         doc/common/print.dsl
76         etc/Makefile
77 ],[
78         sed s%echo_source=yes%echo_source=no%g < metaproxy-config > src/metaproxy-config && chmod +x metaproxy-config src/metaproxy-config
79
80 ])
81
82 AC_OUTPUT
83
84
85 # postamble
86
87
88 echo \
89 "------------------------------------------------------------------------
90
91   Package:                    ${PACKAGE}
92   Version:                    ${VERSION}
93   Source code location:       ${srcdir}
94   CPP Preprocessor:           ${CPP}
95   CPP Preprocessor flags:     ${CPPFLAGS}
96   CXX Compiler:               ${CXX}
97   CXX Compiler flags:         ${CXXFLAGS}
98   Linker flags:               ${LDFLAGS}
99   Linked libs:                ${LIBS}
100   Host System Type:           ${host}
101   Install path:               ${prefix}
102   Automake:                   ${AUTOMAKE}
103   Archiver:                   ${AR}
104   Ranlib:                     ${RANLIB}
105   Boost Version:              ${BOOST_VERSION}               
106   Boost Include:              ${BOOST_CPPFLAGS}               
107   Boost linker flags:         ${BOOST_LDFLAGS}               
108   Boost Libs:                 ${BOOST_DATE_TIME_LIB} ${BOOST_THREAD_LIB}               
109   YAZPP Version:              ${YAZPPVERSION}
110   YAZPP Include:              ${YAZPPINC}
111   YAZPP La Lib:               ${YAZPPLALIB}
112   YAZPP Lib:                  ${YAZPPLIB}
113   Bugreport:                  ${PACKAGE_BUGREPORT}
114
115 ------------------------------------------------------------------------"
116 dnl Local Variables:
117 dnl mode:shell-script
118 dnl sh-indentation: 2
119 dnl sh-basic-offset: 4
120 dnl End: