2 ## Process this file with autoconf to produce a configure script.
4 # Autoconf and automake setup
6 AC_INIT(yp2, 0.0.1, marc@indexdata.dk)
7 AM_CONFIG_HEADER(src/config.hpp)
10 AC_CONFIG_SRCDIR(configure.ac)
11 AC_CONFIG_AUX_DIR(config)
13 ##AC_PREFIX_DEFAULT(`pwd`/install)
18 # Checks for programs.
27 # Use C++ compilers only for tests
30 # Checks for libraries.
31 ##AC_CHECK_LIB(ibrary, main)
32 AC_CHECK_LIB(boost_thread, main, [],[
33 AC_MSG_ERROR([boost thread library not found. Install libboost-thread-dev (or similar)])
36 AC_MSG_CHECKING([for boost_unit_test_framework presence])
38 LIBS="$LIBS -lboost_unit_test_framework"
40 #define BOOST_AUTO_TEST_MAIN
41 #include <boost/test/auto_unit_test.hpp>
42 BOOST_AUTO_TEST_CASE( test )
53 AC_MSG_ERROR([Install libboost-test-dev (or similar)])
57 YAZPP_INIT(threads,1.0)
58 if test -z "$YAZPPLIB"; then
59 AC_MSG_ERROR([YAZ++ development libraries missing])
67 AC_ARG_WITH(xslt,[[ --with-xslt[=PREFIX] use libxslt in PREFIX]],xsltdir=$withval)
68 if test "$xsltdir" = "yes" -o "$xsltdir" = "default"; then
69 for d in /usr /usr/local; do
70 if test -x $d/bin/xslt-config; then
75 if test "$xsltdir" != "no"; then
76 AC_MSG_CHECKING(for libXSLT)
77 if test -x $xsltdir/bin/xslt-config; then
78 XSLT_LIBS=`$xsltdir/bin/xslt-config --libs`
79 XSLT_CFLAGS=`$xsltdir/bin/xslt-config --cflags`
80 XSLT_VER=`$xsltdir/bin/xslt-config --version`
81 AC_MSG_RESULT($XSLT_VER)
82 AC_DEFINE([HAVE_XSLT],[1],
83 [Define to 1 if you have libxslt installed])
85 AC_MSG_RESULT(Not found)
86 if test "$xsltdir" = "default"; then
87 AC_MSG_WARN([Libxslt development libraries not found.])
89 AC_MSG_ERROR([libxslt development libraries not found.]) fi
94 # Checks for header files.
98 AC_CHECK_HEADERS(iostream list vector stdexcept)
99 AC_CHECK_HEADERS(boost/thread/mutex.hpp boost/test/auto_unit_test.hpp)
101 # Checks for typedefs, structures, and compiler characteristics.
103 ##AC_CHECK_SIZEOF(int)
104 ##AC_CHECK_SIZEOF(long int)
107 # Checks for library functions.
121 "------------------------------------------------------------------------
124 Source code location: ${srcdir}
125 CPP Preprocessor flags: ${CPPFLAGS}
127 CXX Compiler flags: ${CXXFLAGS}
128 Linker flags: ${LDFLAGS}
130 Host System Type: ${host}
131 Install path: ${prefix}
132 Automake: ${AUTOMAKE}
134 ------------------------------------------------------------------------"
135 automake --version| grep 1.4 > /dev/null || \
136 automake --version| grep 1.5 > /dev/null || \
137 automake --version| grep 1.6 > /dev/null || \
138 automake --version| grep 1.7 > /dev/null || \
139 automake --version| grep 1.8 > /dev/null \
141 " YOUR AUTOMAKE IS TOO OLD - USE VERSION 1.9 OR NEWER
143 On a Debian system run
145 sudo apt-get install automake1.9
146 sudo update-alternatives --config automake