| 1 | #                                     -*- Autoconf -*-
 | 
|---|
| 2 | # Process this file with autoconf to produce a configure script.
 | 
|---|
| 3 | 
 | 
|---|
| 4 | AC_PREREQ([2.65])
 | 
|---|
| 5 | AC_INIT([LibCodePatterns], [1.3.2], [heber@ins.uni-bonn.de], [libcodepatterns], [http://trac.ins.uni-bonn.de/projects/CodePatterns/])
 | 
|---|
| 6 | AC_CONFIG_AUX_DIR([build-aux])
 | 
|---|
| 7 | AC_CONFIG_SRCDIR([src/codepatterns-config-main.cpp])
 | 
|---|
| 8 | AC_CONFIG_HEADERS([config.h libcodepatterns_config.h])
 | 
|---|
| 9 | AC_CONFIG_MACRO_DIR([m4])
 | 
|---|
| 10 | 
 | 
|---|
| 11 | AM_INIT_AUTOMAKE([dist-bzip2 1.11 parallel-tests color-tests subdir-objects])
 | 
|---|
| 12 | 
 | 
|---|
| 13 | # Checks for programs.
 | 
|---|
| 14 | AM_PATH_CPPUNIT(1.9.6)
 | 
|---|
| 15 | AC_PROG_CXX
 | 
|---|
| 16 | AC_PROG_INSTALL
 | 
|---|
| 17 | AC_PROG_MAKE_SET
 | 
|---|
| 18 | 
 | 
|---|
| 19 | # use doxygen
 | 
|---|
| 20 | DX_HTML_FEATURE(ON)
 | 
|---|
| 21 | DX_PS_FEATURE(OFF)
 | 
|---|
| 22 | DX_PDF_FEATURE(OFF)
 | 
|---|
| 23 | DX_INIT_DOXYGEN(libcodepatterns, Doxyfile, ${docdir})
 | 
|---|
| 24 | 
 | 
|---|
| 25 | # use libtool
 | 
|---|
| 26 | LT_INIT([static])
 | 
|---|
| 27 | AC_SUBST([LIBTOOL_DEPS])
 | 
|---|
| 28 | 
 | 
|---|
| 29 | # Define these substitions here to keep all version information in one place.
 | 
|---|
| 30 | # For information on how to properly maintain the library version information,
 | 
|---|
| 31 | # refer to the libtool manual, section "Updating library version information":
 | 
|---|
| 32 | # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
 | 
|---|
| 33 | AC_SUBST([CODEPATTERNS_SO_VERSION], [12:2:0])
 | 
|---|
| 34 | AC_SUBST([CODEPATTERNS_API_VERSION], [1.3.2])
 | 
|---|
| 35 | 
 | 
|---|
| 36 | # Checks for libraries.
 | 
|---|
| 37 | # FIXME: Replace `main' with a function in `-ldl':
 | 
|---|
| 38 | AC_CHECK_LIB([dl], [main])
 | 
|---|
| 39 | 
 | 
|---|
| 40 | # Boost libraries
 | 
|---|
| 41 | BOOST_REQUIRE([1.40])
 | 
|---|
| 42 | BOOST_BIND
 | 
|---|
| 43 | BOOST_FUNCTION
 | 
|---|
| 44 | BOOST_ITERATOR
 | 
|---|
| 45 | BOOST_OPTIONAL
 | 
|---|
| 46 | BOOST_PREPROCESSOR
 | 
|---|
| 47 | BOOST_PROGRAM_OPTIONS
 | 
|---|
| 48 | BOOST_SERIALIZATION
 | 
|---|
| 49 | BOOST_SMART_PTR
 | 
|---|
| 50 | BOOST_THREADS
 | 
|---|
| 51 | BOOST_TOKENIZER
 | 
|---|
| 52 | 
 | 
|---|
| 53 | # Checks for typedefs, structures, and compiler characteristics.
 | 
|---|
| 54 | AC_HEADER_STDBOOL
 | 
|---|
| 55 | AC_C_INLINE
 | 
|---|
| 56 | AC_TYPE_SIZE_T
 | 
|---|
| 57 | AC_CHECK_HEADERS([time.h])
 | 
|---|
| 58 | AC_CHECK_HEADERS([sys/time.h])
 | 
|---|
| 59 | AC_CHECK_HEADERS([sys/times.h])
 | 
|---|
| 60 | AC_CHECK_HEADERS([unistd.h])
 | 
|---|
| 61 | AC_CXX_HAVE_VALARRAY
 | 
|---|
| 62 | 
 | 
|---|
| 63 | LIBRT=""
 | 
|---|
| 64 | AS_IF([test x"$ac_cv_header_time_h" = xyes],
 | 
|---|
| 65 |         AC_CHECK_LIB(rt, clock_gettime, [LIBRT="-lrt"])
 | 
|---|
| 66 |         AC_SUBST(LIBRT)
 | 
|---|
| 67 | )
 | 
|---|
| 68 | 
 | 
|---|
| 69 | # Checks for library functions.
 | 
|---|
| 70 | AC_FUNC_MALLOC
 | 
|---|
| 71 | AC_CHECK_FUNCS([memset])
 | 
|---|
| 72 | 
 | 
|---|
| 73 | # -${CODEPATTERNS_API_VERSION}
 | 
|---|
| 74 | AC_CONFIG_FILES([
 | 
|---|
| 75 |   libcodepatterns.pc:libcodepatterns.pc.in])
 | 
|---|
| 76 | AC_CONFIG_FILES([
 | 
|---|
| 77 |   libcodepatterns-debug.pc:libcodepatterns-debug.pc.in])
 | 
|---|
| 78 | AC_CONFIG_FILES([
 | 
|---|
| 79 |         Makefile
 | 
|---|
| 80 |         doc/Makefile
 | 
|---|
| 81 |         src/Makefile
 | 
|---|
| 82 |         src/Helpers/Makefile
 | 
|---|
| 83 |         src/Observer/Makefile
 | 
|---|
| 84 |         src/Patterns/Makefile
 | 
|---|
| 85 |         src/unittests/Makefile
 | 
|---|
| 86 |         ])
 | 
|---|
| 87 | AC_OUTPUT
 | 
|---|