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.
26 # Use C++ compilers only for tests
29 # Checks for libraries.
30 ##AC_CHECK_LIB(ibrary, main)
31 AC_CHECK_LIB(boost_thread, main, [],[
32 AC_MSG_ERROR([boost thread library not found. Install libboost-thread-dev (or similar)])
35 ## AC_CHECK_LIB(boost_unit_test_framework, [], [],[
36 ## AC_MSG_ERROR([boost unit test library not found. Install libboost-test-dev (or similar)])
40 YAZPP_INIT(threads,1.0)
41 if test -z "$YAZPPLIB"; then
42 AC_MSG_ERROR([YAZ++ development libraries missing])
50 AC_ARG_WITH(xslt,[[ --with-xslt[=PREFIX] use libxslt in PREFIX]],xsltdir=$withval)
51 if test "$xsltdir" = "yes" -o "$xsltdir" = "default"; then
52 for d in /usr /usr/local; do
53 if test -x $d/bin/xslt-config; then
58 if test "$xsltdir" != "no"; then
59 AC_MSG_CHECKING(for libXSLT)
60 if test -x $xsltdir/bin/xslt-config; then
61 XSLT_LIBS=`$xsltdir/bin/xslt-config --libs`
62 XSLT_CFLAGS=`$xsltdir/bin/xslt-config --cflags`
63 XSLT_VER=`$xsltdir/bin/xslt-config --version`
64 AC_MSG_RESULT($XSLT_VER)
65 AC_DEFINE([HAVE_XSLT],[1],
66 [Define to 1 if you have libxslt installed])
68 AC_MSG_RESULT(Not found)
69 if test "$xsltdir" = "default"; then
70 AC_MSG_WARN([Libxslt development libraries not found.])
72 AC_MSG_ERROR([libxslt development libraries not found.]) fi
77 # Checks for header files.
82 AC_CHECK_HEADERS(boost/thread/mutex.hpp)
86 # Checks for typedefs, structures, and compiler characteristics.
88 ##AC_CHECK_SIZEOF(int)
89 ##AC_CHECK_SIZEOF(long int)
92 # Checks for library functions.
106 "------------------------------------------------------------------------
109 Source code location: ${srcdir}
110 CPP Preprocessor flags: ${CPPFLAGS}
112 CXX Compiler flags: ${CXXFLAGS}
113 Linker flags: ${LDFLAGS}
115 Host System Type: ${host}
116 Install path: ${prefix}
117 Automake: ${AUTOMAKE}
119 ------------------------------------------------------------------------"
121 automake --version| grep 1.4 > /dev/null || \
122 automake --version| grep 1.5 > /dev/null || \
123 automake --version| grep 1.6 > /dev/null || \
124 automake --version| grep 1.7 > /dev/null || \
125 automake --version| grep 1.8 > /dev/null \
127 " YOUR AUTOMAKE IS TOO OLD - USE VERSION 1.9 OR NEWER
129 On a Debian system run
131 sudo apt-get install automake1.9
132 sudo update-alternatives --config automake