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)
8 AC_CONFIG_HEADERS(src/config.hpp)
10 AC_CONFIG_SRCDIR(configure.ac)
11 AC_CONFIG_AUX_DIR(config)
13 ##AC_PREFIX_DEFAULT(`pwd`/install)
17 # Checks for programs.
26 # Use C++ compilers only for tests
29 # Checks for libraries.
30 AC_CHECK_LIB(boost_thread, main, [],[
31 AC_MSG_ERROR([boost thread library not found. Install libboost-thread-dev (or similar)])
34 AC_CHECK_LIB(boost_date_time, main, [],[
35 AC_MSG_ERROR([boost date_time library not found. Install libboost-date-time-dev (or similar)])
38 AC_MSG_CHECKING([for boost_unit_test_framework presence])
40 LIBS="$LIBS -lboost_unit_test_framework"
42 #define BOOST_AUTO_TEST_MAIN
43 #include <boost/test/auto_unit_test.hpp>
44 BOOST_AUTO_TEST_CASE( test )
55 AC_MSG_ERROR([Install libboost-test-dev (or similar)])
59 YAZPP_INIT(threads,1.0)
60 if test -z "$YAZPPLIB"; then
61 AC_MSG_ERROR([YAZ++ development libraries missing])
69 AC_ARG_WITH(xslt,[[ --with-xslt[=PREFIX] use libxslt in PREFIX]],xsltdir=$withval)
70 if test "$xsltdir" = "yes" -o "$xsltdir" = "default"; then
71 for d in /usr /usr/local; do
72 if test -x $d/bin/xslt-config; then
77 if test "$xsltdir" != "no"; then
78 AC_MSG_CHECKING(for libXSLT)
79 if test -x $xsltdir/bin/xslt-config; then
80 XSLT_LIBS=`$xsltdir/bin/xslt-config --libs`
81 XSLT_CFLAGS=`$xsltdir/bin/xslt-config --cflags`
82 XSLT_VER=`$xsltdir/bin/xslt-config --version`
83 AC_MSG_RESULT($XSLT_VER)
84 AC_DEFINE([HAVE_XSLT],[1],
85 [Define to 1 if you have libxslt installed])
87 AC_MSG_RESULT(Not found)
88 if test "$xsltdir" = "default"; then
89 AC_MSG_WARN([Libxslt development libraries not found.])
91 AC_MSG_ERROR([libxslt development libraries not found.]) fi
96 # Checks for header files.
100 AC_CHECK_HEADERS(iostream list vector stdexcept)
101 AC_CHECK_HEADERS(boost/thread/mutex.hpp \
102 boost/date_time/posix_time/posix_time.hpp \
103 boost/test/auto_unit_test.hpp)
105 # Checks for typedefs, structures, and compiler characteristics.
107 ##AC_CHECK_SIZEOF(int)
108 ##AC_CHECK_SIZEOF(long int)
111 # Checks for library functions.
125 "------------------------------------------------------------------------
128 Source code location: ${srcdir}
129 CPP Preprocessor flags: ${CPPFLAGS}
131 CXX Compiler flags: ${CXXFLAGS}
132 Linker flags: ${LDFLAGS}
134 Host System Type: ${host}
135 Install path: ${prefix}
136 Automake: ${AUTOMAKE}
138 ------------------------------------------------------------------------"