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(boost_thread, main, [],[
32 AC_MSG_ERROR([boost thread library not found. Install libboost-thread-dev (or similar)])
35 AC_CHECK_LIB(boost_date_time, main, [],[
36 AC_MSG_ERROR([boost date_time library not found. Install libboost-date-time-dev (or similar)])
39 AC_MSG_CHECKING([for boost_unit_test_framework presence])
41 LIBS="$LIBS -lboost_unit_test_framework"
43 #define BOOST_AUTO_TEST_MAIN
44 #include <boost/test/auto_unit_test.hpp>
45 BOOST_AUTO_TEST_CASE( test )
56 AC_MSG_ERROR([Install libboost-test-dev (or similar)])
60 YAZPP_INIT(threads,1.0)
61 if test -z "$YAZPPLIB"; then
62 AC_MSG_ERROR([YAZ++ development libraries missing])
70 AC_ARG_WITH(xslt,[[ --with-xslt[=PREFIX] use libxslt in PREFIX]],xsltdir=$withval)
71 if test "$xsltdir" = "yes" -o "$xsltdir" = "default"; then
72 for d in /usr /usr/local; do
73 if test -x $d/bin/xslt-config; then
78 if test "$xsltdir" != "no"; then
79 AC_MSG_CHECKING(for libXSLT)
80 if test -x $xsltdir/bin/xslt-config; then
81 XSLT_LIBS=`$xsltdir/bin/xslt-config --libs`
82 XSLT_CFLAGS=`$xsltdir/bin/xslt-config --cflags`
83 XSLT_VER=`$xsltdir/bin/xslt-config --version`
84 AC_MSG_RESULT($XSLT_VER)
85 AC_DEFINE([HAVE_XSLT],[1],
86 [Define to 1 if you have libxslt installed])
88 AC_MSG_RESULT(Not found)
89 if test "$xsltdir" = "default"; then
90 AC_MSG_WARN([Libxslt development libraries not found.])
92 AC_MSG_ERROR([libxslt development libraries not found.]) fi
97 # Checks for header files.
101 AC_CHECK_HEADERS(iostream list vector stdexcept)
102 AC_CHECK_HEADERS(boost/thread/mutex.hpp \
103 boost/date_time/posix_time/posix_time.hpp \
104 boost/test/auto_unit_test.hpp)
106 # Checks for typedefs, structures, and compiler characteristics.
108 ##AC_CHECK_SIZEOF(int)
109 ##AC_CHECK_SIZEOF(long int)
112 # Checks for library functions.
126 "------------------------------------------------------------------------
129 Source code location: ${srcdir}
130 CPP Preprocessor flags: ${CPPFLAGS}
132 CXX Compiler flags: ${CXXFLAGS}
133 Linker flags: ${LDFLAGS}
135 Host System Type: ${host}
136 Install path: ${prefix}
137 Automake: ${AUTOMAKE}
139 ------------------------------------------------------------------------"