dnl dnl Main authors: dnl Guido Tack dnl dnl Copyright: dnl Guido Tack, 2004, 2005 dnl dnl Last modified: dnl $Date: 2006-10-25 13:51:24 +0200 (Wed, 25 Oct 2006) $ dnl by $Author: schulte $ dnl $Revision: 3787 $ dnl dnl This file is part of Gecode, the generic constraint dnl development environment: dnl http://www.gecode.org dnl dnl See the file "LICENSE" for information on usage and dnl redistribution of this file, and for a dnl DISCLAIMER OF ALL WARRANTIES. dnl dnl AC_REVISION([$Id: configure.ac.in 3787 2006-10-25 11:51:24Z schulte $]) AC_PREREQ(2.53) AC_INIT(GECODE, 1.3.1, users@gecode.org) AC_CONFIG_HEADERS([gecode/config.icc]) AC_CONFIG_SRCDIR(gecode/kernel.hh) ac_gecode_soversion=8 # checks for programs : ${CXXFLAGS=""} dnl we do not want autoconf's default AC_PROG_CXX AC_LANG(C++) AC_PROG_RANLIB dnl include Gecode specific macros m4_include([gecode.m4]) dnl check whether we have pkgconfig and should generate config files for it AC_GECODE_PKGCONFIG dnl determine the operating system AC_GECODE_GET_OS dnl determine which compiler we are using AC_CXX_COMPILER_VENDOR(ac_gecode_compiler_vendor) dnl check whether we want to build universal binaries on Mac OS X AC_GECODE_UNIVERSAL dnl check whether we want to build static libraries AC_GECODE_STATICLIBS dnl check whether we want to have assertions and debugging options AC_GECODE_DEBUG dnl check whether we want to have support for finding memory leaks AC_GECODE_LEAK_DEBUG dnl check whether we want audit code in our build AC_GECODE_AUDIT dnl check whether we want to use visibility attributes with gcc AC_GECODE_GCC_VISIBILITY dnl check whether we want to produce code suitable for profiling AC_GECODE_PROFILE dnl check platform specific behaviour of arithmetic AC_GECODE_CHECK_ARITH case $ac_gecode_compiler_vendor in gnu) dnl general compiler flags AC_GECODE_UNIX_PATHS AC_GECODE_GCC_GENERAL_SWITCHES if test "${enable_debug:-no}" = "no"; then dnl compiler flags for an optimized build AC_GECODE_GCC_OPTIMIZED_SWITCHES AC_GECODE_CHECK_CXXFLAG([-finline-limit=3000]) AC_GECODE_CHECK_CXXFLAG([-ffast-math]) AC_GECODE_CHECK_CXXFLAG([-mthreads]) else dnl compiler flags for a debug build AC_GECODE_GCC_DEBUG_SWITCHES fi ;; intel) dnl flags for creating dlls case $host_os in windows*) AC_GECODE_MSVC_SWITCHES ;; *) dnl general compiler flags AC_GECODE_UNIX_PATHS AC_GECODE_GCC_GENERAL_SWITCHES if test "${enable_debug:-no}" = "no"; then dnl compiler flags for an optimized build AC_GECODE_GCC_OPTIMIZED_SWITCHES else dnl compiler flags for a debug build AC_GECODE_GCC_DEBUG_SWITCHES fi ;; esac ;; microsoft) AC_GECODE_MSVC_SWITCHES ;; *) AC_MSG_ERROR(Gecode currently only supports the GNU and Microsoft compilers.) ;; esac dnl find out what parts the user wants to build AC_GECODE_DOC_SWITCHES dnl ------------------------------------------------------------------ dnl Enabling of non-variable contribs dnl @CONTRIBS@ dnl ------------------------------------------------------------------ dnl Definition of variable types dnl Include contributor's vtis dnl @VTIS@ AC_GECODE_VTI(set, [finite set library (implies --enable-int-vars)], yes, [AC_DEFINE(GECODE_HAVE_SET_VARS) enable_int_vars="yes";]) AC_GECODE_VTI(int, finite domain library, yes, [AC_DEFINE(GECODE_HAVE_INT_VARS)]) dnl End of definition of variable types dnl ------------------------------------------------------------------ AC_GECODE_ENABLE_MODULE(examples, yes, [build examples for the enabled variable types], [enable_search="yes"; if test ${enable_int_vars:-yes} = "yes"; then enable_minimodel="yes"; fi; ]) AC_GECODE_ENABLE_MODULE(minimodel, yes, [build modeling support library for the enabled variable types]) AC_GECODE_ENABLE_MODULE(search, yes, [build search engines]) dnl Configure contributions AC_CONFIG_SUBDIRS() dnl @SUBDIRS@ AC_SUBST(PKG_CONFIG_CXXFLAGS, ${ac_gecode_pkg_cxxflags}) AC_SUBST(VERSION, ${PACKAGE_VERSION}) AC_SUBST(DLLFLAGS, ${DLLFLAGS}) AC_CONFIG_FILES([Makefile doxygen.conf doxygen.hh misc/gecode.pc misc/gecode-search.pc misc/gecode-minimodel.pc]) AC_OUTPUT