configure.ac 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. # -*- Autoconf -*-
  2. # Process this file with autoconf to produce a configure script.
  3. m4_define([ixion_major_version], [0])
  4. m4_define([ixion_minor_version], [9])
  5. m4_define([ixion_micro_version], [1])
  6. m4_define([ixion_version],
  7. [ixion_major_version.ixion_minor_version.ixion_micro_version])
  8. m4_define([ixion_minor_api_version], [m4_eval(ixion_minor_version + ixion_minor_version%2)])
  9. m4_define([ixion_api_version],
  10. [ixion_major_version.ixion_minor_api_version])
  11. AC_PREREQ([2.63])
  12. AC_INIT([libixion], [ixion_version])
  13. AC_CONFIG_HEADERS([config.h])
  14. AM_INIT_AUTOMAKE([1.11 foreign dist-bzip2 dist-xz])
  15. AM_PATH_PYTHON(2.7.0)
  16. m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
  17. AC_ARG_WITH(hash-container-compat,
  18. [
  19. --with-hash-container-compat use std::hash_foo instead of boost::unordered_foo
  20. ],
  21. ,with_hash_container_compat=no)
  22. AC_ARG_WITH(mdds-include-path,
  23. AS_HELP_STRING([--with-mdds-include-path], [specify include path for mdds headers.])
  24. ,)
  25. IXION_API_VERSION=ixion_api_version
  26. IXION_MAJOR_VERSION=ixion_major_version
  27. IXION_MINOR_VERSION=ixion_minor_version
  28. IXION_MICRO_VERSION=ixion_micro_version
  29. AC_SUBST(IXION_API_VERSION)
  30. AC_SUBST(IXION_MAJOR_VERSION)
  31. AC_SUBST(IXION_MINOR_VERSION)
  32. AC_SUBST(IXION_MICRO_VERSION)
  33. AC_CONFIG_MACRO_DIR([m4])
  34. m4_pattern_allow([^BOOST_])
  35. for top_builddir in . .. ../.. $ac_auxdir $ac_auxdir/..; do
  36. test -f $top_builddir/configure && break
  37. done
  38. # Checks for programs.
  39. AC_PROG_CXX
  40. LT_INIT([win32-dll disable-static pic-only])
  41. AC_CANONICAL_HOST
  42. # Checks for libraries.
  43. # Checks for header files.
  44. AC_CHECK_HEADERS([stdlib.h sys/time.h unistd.h])
  45. # Checks for typedefs, structures, and compiler characteristics.
  46. AC_HEADER_STDBOOL
  47. AC_C_INLINE
  48. AC_TYPE_MODE_T
  49. AC_TYPE_SIZE_T
  50. # Checks for library functions.
  51. AC_FUNC_STRTOD
  52. AC_CHECK_FUNCS([gettimeofday])
  53. CPPFLAGS="$CPPFLAGS -D_REENTRANT -DMDDS_HASH_CONTAINER_BOOST"
  54. AC_MSG_CHECKING([whether to turn on hash container compatibility])
  55. if test "z$with_hash_container_compat" = "zno"; then
  56. AC_MSG_RESULT([no])
  57. BOOST_REQUIRE([1.36])
  58. BOOST_UNORDERED
  59. else
  60. AC_MSG_RESULT([yes])
  61. DEFINES="$DEFINES -D_IXION_HASH_CONTAINER_COMPAT"
  62. fi
  63. # Check for mdds.
  64. PKG_CHECK_MODULES([MDDS],[mdds >= 0.12.0])
  65. # Check for python.
  66. PKG_CHECK_MODULES([PYTHON], [python >= 0.27.1])
  67. CPPFLAGS="$CPPFLAGS -g -Os -fvisibility=hidden"
  68. BOOST_THREADS
  69. BOOST_PROGRAM_OPTIONS
  70. AC_CONFIG_FILES([Makefile
  71. libixion-$IXION_API_VERSION.pc:libixion.pc.in
  72. include/Makefile
  73. include/ixion/Makefile
  74. include/ixion/hash_container/Makefile
  75. include/ixion/interface/Makefile
  76. misc/libixion.spec
  77. src/Makefile
  78. src/libixion/Makefile
  79. src/libixion/constants.inl
  80. src/python/Makefile])
  81. AC_OUTPUT