Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
11 kB · 377 lines
at develop
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378dnldnl Main authors:dnl Guido Tack <tack@gecode.org>dnldnl Contributing authors:dnl Samuel Gagnon <samuel.gagnon92@gmail.com>dnldnl Copyright:dnl Guido Tack, 2004, 2005dnl Samuel Gagnon, 2018dnldnl This file is part of Gecode, the generic constraintdnl development environment:dnl http://www.gecode.orgdnldnl Permission is hereby granted, free of charge, to any person obtainingdnl a copy of this software and associated documentation files (thednl "Software"), to deal in the Software without restriction, includingdnl without limitation the rights to use, copy, modify, merge, publish,dnl distribute, sublicense, and/or sell copies of the Software, and todnl permit persons to whom the Software is furnished to do so, subject todnl the following conditions:dnldnl The above copyright notice and this permission notice shall bednl included in all copies or substantial portions of the Software.dnldnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,dnl EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OFdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE ANDdnl NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BEdnl LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTIONdnl OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTIONdnl WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.dnldnlAC_REVISION([$Id$])AC_PREREQ(2.53)AC_INIT(GECODE, 6.3.1, users@gecode.org)AC_CONFIG_HEADERS([gecode/support/config.hpp])AC_CONFIG_SRCDIR(gecode/kernel.hh)ac_gecode_soversion=52AC_SUBST(GECODE_SOVERSION, ${ac_gecode_soversion})ac_gecode_flatzincversion=1.6AC_SUBST(GECODE_FLATZINC_VERSION, ${ac_gecode_flatzincversion})# checks for programs: ${CXXFLAGS=""} dnl we do not want autoconf's default: ${CFLAGS=""} dnl we do not want autoconf's default: ${DLLFLAGS=""} dnl we do not want autoconf's default: ${GLDFLAGS=""} dnl we do not want autoconf's defaultdnl include Gecode specific macrosm4_include([gecode.m4])dnl determine the operating systemAC_GECODE_GET_OSif test "${CXX}x" = "x" -a "${CC}x" = "x" -a "${host_os}" = "windows"; then CC=cl CXX=clfiAC_PROG_CXXAC_PROG_CCAC_LANG(C++)AC_PROG_RANLIBdnl check whether we have certain programs we needAC_CHECK_PROG(PROG_DIFF, diff, [ok]) if test "${PROG_DIFF}x" = "x"; then AC_MSG_ERROR([In order to compile Gecode, you need the diff tool.]) fiAC_CHECK_PROG(PROG_TAR, tar, [ok]) if test "${PROG_TAR}x" = "x"; then AC_MSG_ERROR([In order to compile Gecode, you need the tar tool.]) fiAC_CHECK_PROG(PROG_MAKE, make, [ok]) if test "${PROG_MAKE}x" = "x"; then AC_MSG_ERROR([In order to compile Gecode, you need the make tool.]) fiAC_CHECK_PROG(PROG_SED, sed, [ok]) if test "${PROG_SED}x" = "x"; then AC_MSG_ERROR([In order to compile Gecode, you need the sed tool.]) fiAC_CHECK_PROG(PROG_PERL, perl, [ok]) if test "${PROG_PERL}x" = "x"; then AC_MSG_ERROR([In order to compile Gecode, you need perl.]) fidnl Check for environment to use when running programs in the MakefileAC_GECODE_RUNENVIRONMENTdnl determine which compiler we are usingAC_CXX_COMPILER_VENDOR(ac_gecode_compiler_vendor)case $ac_gecode_compiler_vendor ingnu) AC_CHECK_GCC_VERSION(4,2) ;;intel) ;;microsoft) AC_CHECK_MSVC_VERSION(1800,2013) ;;*) ;;esacAC_GECODE_RESOURCEAC_LANG(C++)dnl check whether we want to build universal binaries on Mac OS XAC_GECODE_UNIVERSALdnl check whether the user wants a prefix or suffixes for the librariesAC_GECODE_USER_SUFFIXdnl check whether we want to build a framework bundle on Mac OS XAC_GECODE_FRAMEWORKdnl check whether we want to build static librariesAC_GECODE_STATICLIBSdnl check whether we want to have assertions and debugging optionsAC_GECODE_DEBUGdnl check whether we want to have peak heap size trackingAC_GECODE_PEAKHEAPdnl check whether to optimize for code sizeAC_GECODE_CODESIZEdnl check whether we want to have support for finding memory leaksAC_GECODE_LEAK_DEBUGdnl check whether we want to use default memory allocatorAC_GECODE_ALLOCATORdnl check whether we want audit code in our buildAC_GECODE_AUDITdnl check whether we want to produce code suitable for profilingAC_GECODE_PROFILEdnl check whether we want to produce code instrumented for gcovAC_GECODE_GCOVdnl check platform specific behaviour of arithmeticAC_GECODE_CHECK_ARITHdnl checking for thread supportAC_GECODE_THREADSdnl checking for timer to useAC_GECODE_TIMERdnl checking for freelist sizes to useAC_GECODE_FREELIST_32_SIZEAC_GECODE_FREELIST_64_SIZEcase $ac_gecode_compiler_vendor ingnu) dnl general compiler flags AC_GECODE_UNIX_PATHS AC_GECODE_GCC_GENERAL_SWITCHES dnl check whether we want to use visibility attributes with gcc AC_GECODE_GCC_VISIBILITY if test "${enable_debug:-no}" = "no" -a "${enable_gcov:-no}" = "no"; then dnl compiler flags for an optimized build AC_GECODE_GCC_OPTIMIZED_SWITCHES dnl compiler flags for optimize float computings dnl AC_GECODE_CHECK_COMPILERFLAG([-ffast-math]) dnl ffast-math implies:-fno-math-errno -funsafe-math-optimizations -ffinite-math-only -fno-rounding-math -fno-signaling-nans -fcx-limited-range dnl but -funsafe-math-optimizations break IEEE float comptability, so we have to avoid it AC_GECODE_CHECK_COMPILERFLAG([-fno-math-errno]) AC_GECODE_CHECK_COMPILERFLAG([-ffinite-math-only]) AC_GECODE_CHECK_COMPILERFLAG([-fno-rounding-math]) AC_GECODE_CHECK_COMPILERFLAG([-fno-signaling-nans]) AC_GECODE_CHECK_COMPILERFLAG([-fcx-limited-range]) AC_GECODE_CHECK_COMPILERFLAG([-mthreads]) else if test "${enable_debug:-no}" = "yes"; then dnl compiler flags for a debug build AC_GECODE_GCC_DEBUG_SWITCHES fi fi AC_GECODE_CHECK_COMPILERFLAG([-Qunused-arguments]) ;;intel) dnl flags for creating dlls case $host_os in windows*) AC_GECODE_MSVC_SWITCHES ;; *) dnl check whether we want to use visibility attributes with gcc AC_GECODE_GCC_VISIBILITY 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.) ;;esacdnl check whether we can use GNU hash_mapAC_CHECK_HEADER([ext/hash_map], [AC_DEFINE([GECODE_HAS_GNU_HASH_MAP],[], [Whether GNU hash_map is available])])dnl check whether we can use unordered_mapAC_CHECK_HEADER([unordered_map], [AC_DEFINE([GECODE_HAS_UNORDERED_MAP],[], [Whether unordered_map is available])])dnl find out what parts the user wants to buildAC_GECODE_DOC_SWITCHESdnl ------------------------------------------------------------------dnl Enabling of non-variable contribsdnl @CONTRIBS@dnl ------------------------------------------------------------------dnl Definition of variable typesdnl Include contributor's vtisdnl @VTIS@AC_GECODE_VISAC_GECODE_VTI(float, [float variable library (implies --enable-int-vars)], yes, [\$(top_srcdir)/gecode/float/var-imp/float.vis], [enable_int_vars="yes"; AC_SUBST(LINKFLOAT,[${LINKLIBDIR}${LINKPREFIX}${FLOAT}${DLL_ARCH}${LINKSUFFIX}]) ], [ AC_SUBST(LINKFLOAT,[]) ] )AC_GECODE_VTI(set, [finite set library (implies --enable-int-vars)], yes, [\$(top_srcdir)/gecode/set/var-imp/set.vis], [enable_int_vars="yes"; AC_SUBST(LINKSET,[${LINKLIBDIR}${LINKPREFIX}${SET}${DLL_ARCH}${LINKSUFFIX}]) ], [ AC_SUBST(LINKSET,[]) ] )AC_GECODE_VTI(int, finite domain library, yes, [\$(top_srcdir)/gecode/int/var-imp/int.vis \$(top_srcdir)/gecode/int/var-imp/bool.vis], [ AC_SUBST(LINKINT,[${LINKLIBDIR}${LINKPREFIX}${INT}${DLL_ARCH}${LINKSUFFIX}]) ], [ AC_SUBST(LINKINT,[]) ])dnl End of definition of variable typesdnl ------------------------------------------------------------------AC_GECODE_MPFRAC_GECODE_QTAC_GECODE_GISTAC_GECODE_CBSAC_GECODE_CPPROFILERAC_GECODE_FLEXBISONAC_FUNC_MMAPAC_GECODE_ENABLE_MODULE(driver, yes, [build script commandline driver library], [enable_search="yes"; enable_int="yes"; ])AC_GECODE_ENABLE_MODULE(flatzinc, yes, [build FlatZinc interpreter], [enable_search="yes"; enable_driver="yes"; enable_minimodel="yes"; ])AC_GECODE_ENABLE_MODULE(driver, yes, [build script commandline driver library], [enable_search="yes"; enable_int="yes"; ])AC_GECODE_ENABLE_MODULE(examples, yes, [build examples for the enabled variable types], [enable_search="yes"; enable_driver="yes"; enable_minimodel="yes"; ])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 contributionsAC_CONFIG_SUBDIRS()dnl @SUBDIRS@AC_SUBST(VERSION, ${PACKAGE_VERSION})AC_SUBST(GECODE_VERSION, ${PACKAGE_VERSION})AC_SUBST(DLLFLAGS, ${DLLFLAGS})AC_SUBST(GLDFLAGS, ${GLDFLAGS})AC_SUBST(ALLVIS, ${ac_gecode_vis})VERSION_DASHES=`echo $PACKAGE_VERSION | sed -e s/\\\\./-/g`PACKAGE_VERSION_NUMBER=`echo $PACKAGE_VERSION | awk -F. '{print $1 * 100000 + $2 * 100 + $3}'`AC_DEFINE_UNQUOTED(GECODE_VERSION, "${PACKAGE_VERSION}", [Gecode version])AC_DEFINE_UNQUOTED(GECODE_LIBRARY_VERSION, "${VERSION_DASHES}", [Gecode version])AC_DEFINE_UNQUOTED(GECODE_VERSION_NUMBER, ${PACKAGE_VERSION_NUMBER}, [Gecode version])AC_DEFINE_UNQUOTED(GECODE_FLATZINC_VERSION, "${GECODE_FLATZINC_VERSION}", [Supported version of FlatZinc])ac_gecode_library_architecture=-${VERSION_DASHES}${ac_gecode_library_architecture}if test "$ac_gecode_compiler_vendor" == "microsoft" \ -o \( "$ac_gecode_compiler_vendor" == "intel" \ -a "$host_os" == "windows" \) ; then AC_SUBST(DLL_ARCH,[${ac_gecode_library_architecture}])else AC_SUBST(DLL_ARCH,[""])fiAC_CONFIG_FILES([Makefile])if test "${host_os}" = "windows"; then AC_SUBST(BATCHFILE, ".bat") AC_CONFIG_FILES([tools/flatzinc/mzn-gecode.bat:tools/flatzinc/mzn-gecode.bat.in],[chmod +x tools/flatzinc/mzn-gecode.bat])else AC_SUBST(BATCHFILE, "") AC_CONFIG_FILES([tools/flatzinc/mzn-gecode:tools/flatzinc/mzn-gecode.in],[chmod +x tools/flatzinc/mzn-gecode])fiAC_CONFIG_FILES([tools/flatzinc/gecode.msc:tools/flatzinc/gecode.msc.in])AC_CONFIG_FILES([doxygen.conf:doxygen/doxygen.conf.in])AC_CONFIG_FILES([doxygen.hh:doxygen/doxygen.hh.in])AC_OUTPUT