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_NOTICE([boost thread library not found.])
32 AC_MSG_ERROR([Install libboost-thread-dev (or similar)])
35 AC_CHECK_LIB(boost_date_time, main, [],[
36 AC_MSG_NOTICE([boost date_time library not found.])
37 AC_MSG_ERROR([Install libboost-date-time-dev (or similar)])
40 AC_CHECK_LIB(boost_program_options, main, [],[
41 AC_MSG_NOTICE([boost program options library not found.])
42 AC_MSG_ERROR([Install libboost-program-options-dev (or similar)])
45 AC_MSG_CHECKING([for boost_unit_test_framework presence])
47 LIBS="$LIBS -lboost_unit_test_framework"
49 #define BOOST_AUTO_TEST_MAIN
50 #include <boost/test/auto_unit_test.hpp>
51 BOOST_AUTO_TEST_CASE( test )
62 AC_MSG_ERROR([Install libboost-test-dev (or similar)])
66 YAZPP_INIT(threads,1.0)
67 if test -z "$YAZPPLIB"; then
68 AC_MSG_ERROR([YAZ++ development libraries missing])
76 AC_ARG_WITH(xslt,[[ --with-xslt[=PREFIX] use libxslt in PREFIX]],xsltdir=$withval)
77 if test "$xsltdir" = "yes" -o "$xsltdir" = "default"; then
78 for d in /usr /usr/local; do
79 if test -x $d/bin/xslt-config; then
84 if test "$xsltdir" != "no"; then
85 AC_MSG_CHECKING(for libXSLT)
86 if test -x $xsltdir/bin/xslt-config; then
87 XSLT_LIBS=`$xsltdir/bin/xslt-config --libs`
88 XSLT_CFLAGS=`$xsltdir/bin/xslt-config --cflags`
89 XSLT_VER=`$xsltdir/bin/xslt-config --version`
90 AC_MSG_RESULT($XSLT_VER)
91 AC_DEFINE([HAVE_XSLT],[1],
92 [Define to 1 if you have libxslt installed])
94 AC_MSG_RESULT(Not found)
95 if test "$xsltdir" = "default"; then
96 AC_MSG_WARN([Libxslt development libraries not found.])
98 AC_MSG_ERROR([libxslt development libraries not found.]) fi
103 # Checks for header files.
107 AC_CHECK_HEADERS(iostream list vector stdexcept)
108 AC_CHECK_HEADERS(boost/thread/mutex.hpp \
109 boost/date_time/posix_time/posix_time.hpp \
110 boost/test/auto_unit_test.hpp)
112 # Checks for typedefs, structures, and compiler characteristics.
114 ##AC_CHECK_SIZEOF(int)
115 ##AC_CHECK_SIZEOF(long int)
118 # Checks for library functions.
132 "------------------------------------------------------------------------
135 Source code location: ${srcdir}
136 CPP Preprocessor flags: ${CPPFLAGS}
138 CXX Compiler flags: ${CXXFLAGS}
139 Linker flags: ${LDFLAGS}
141 Host System Type: ${host}
142 Install path: ${prefix}
143 Automake: ${AUTOMAKE}
145 ------------------------------------------------------------------------"