* add the possibility to use the MultiThreaded version of bullet. (experimental)
[hkl3d.git] / configure.ac
blob653208509d717c995f652438f4d307ce2e591459
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
4 AC_PREREQ(2.59)
5 AC_INIT([hkl3d],[0.0.1],[picca@synchrotron-soleil.fr])
6 AC_CONFIG_SRCDIR([config.h.in])
7 AC_CONFIG_HEADERS([config.h])
8 AC_CONFIG_MACRO_DIR([m4])
9 AC_CONFIG_AUX_DIR(config)
11 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
13 # Checks for programs.
14 AC_PROG_CXX
15 AC_PROG_AWK
16 AC_PROG_CPP
17 AC_PROG_INSTALL
18 AC_PROG_LN_S
19 AC_PROG_MAKE_SET
20 AC_PROG_LIBTOOL
22 # Checks for libraries.
23 AM_PROG_CC_C_O
25 # Checks for header files.
26 AC_HEADER_STDC
27 AC_HEADER_TIME
28 AC_CHECK_HEADERS([float.h stdlib.h string.h sys/time.h])
30 # Check for packages
31 PKG_CHECK_MODULES([HKL], [hkl >= 4.0.0])
32 PKG_CHECK_MODULES([G3D], [libg3d >= 0.0.8])
33 PKG_CHECK_MODULES([GLU], [glu >= 7.7.1])
35 # Checks for typedefs, structures, and compiler characteristics.
36 AC_C_CONST
37 AC_C_INLINE
38 AC_TYPE_SIZE_T
40 # Checks for library functions.
41 AC_FUNC_MALLOC
42 AC_FUNC_REALLOC
43 AC_FUNC_VPRINTF
44 AC_CHECK_FUNCS([floor gettimeofday memmove memset sqrt strdup])
46 # add multithread options
47 AC_ARG_ENABLE([multithreaded],
48         [AC_HELP_STRING([--enable-multithreaded],
49                 [build BulletMultiThreaded (default NO)])],
50         [disable_multithreaded=no], [disable_multithreaded=yes])
51 AC_MSG_CHECKING([BulletMultiThreaded])
52 AS_IF([test "x$disable_multithreaded" = xyes], [build_multithreaded=no], [build_multithreaded=yes])
53 AC_MSG_RESULT([$build_multithreaded])
54 AM_CONDITIONAL([CONDITIONAL_BUILD_MULTITHREADED], [test "x$build_multithreaded" = xyes])
56 #add the bullet subpackage
57 AC_CONFIG_SUBDIRS(hkl3d/bullet)
59 AC_CONFIG_FILES([
60         Makefile
61         Documentation/Makefile
62         hkl3d/Makefile
63         test/Makefile
64         test/gui/Makefile
65         test/gui/OpenGL/Makefile
66         test/gui/DiffabsDemo/Makefile
67         hkl3d.pc
70 AC_OUTPUT