Add long long checking to build systems (#230)
authorAlpar Juttner <alpar@cs.elte.hu>
Fri, 20 Feb 2009 18:06:10 +0000
changeset 3727992dcb0d0e6
parent 371 14a7e712e80f
child 373 7d7d9debb29a
Add long long checking to build systems (#230)
CMakeLists.txt
configure.ac
lemon/bits/default_map.h
lemon/config.h.cmake
lemon/config.h.in
lemon/tolerance.h
     1.1 --- a/CMakeLists.txt	Fri Feb 20 06:59:00 2009 +0000
     1.2 +++ b/CMakeLists.txt	Fri Feb 20 18:06:10 2009 +0000
     1.3 @@ -14,6 +14,9 @@
     1.4  INCLUDE(FindDoxygen)
     1.5  INCLUDE(FindGhostscript)
     1.6  
     1.7 +INCLUDE(CheckTypeSize)
     1.8 +CHECK_TYPE_SIZE("long long" LONG_LONG)
     1.9 +
    1.10  ENABLE_TESTING()
    1.11  
    1.12  ADD_SUBDIRECTORY(lemon)
     2.1 --- a/configure.ac	Fri Feb 20 06:59:00 2009 +0000
     2.2 +++ b/configure.ac	Fri Feb 20 18:06:10 2009 +0000
     2.3 @@ -24,6 +24,12 @@
     2.4  dnl Do compilation tests using the C++ compiler.
     2.5  AC_LANG([C++])
     2.6  
     2.7 +dnl Check the existence of long long type.
     2.8 +AC_CHECK_TYPE(long long, [long_long_found=yes], [long_long_found=no])
     2.9 +if test x"$long_long_found" = x"yes"; then
    2.10 +  AC_DEFINE([HAVE_LONG_LONG], [1], [Define to 1 if you have long long.])
    2.11 +fi
    2.12 +
    2.13  dnl Checks for programs.
    2.14  AC_PROG_CXX
    2.15  AC_PROG_CXXCPP
    2.16 @@ -116,6 +122,8 @@
    2.17  echo C++ compiler.................. : $CXX
    2.18  echo C++ compiles flags............ : $CXXFLAGS
    2.19  echo
    2.20 +echo Compiler supports long long... : $long_long_found
    2.21 +echo
    2.22  #echo GLPK support.................. : $lx_glpk_found
    2.23  #echo CPLEX support................. : $lx_cplex_found
    2.24  #echo SOPLEX support................ : $lx_soplex_found
     3.1 --- a/lemon/bits/default_map.h	Fri Feb 20 06:59:00 2009 +0000
     3.2 +++ b/lemon/bits/default_map.h	Fri Feb 20 18:06:10 2009 +0000
     3.3 @@ -96,7 +96,7 @@
     3.4    };
     3.5  
     3.6  
     3.7 -#if defined __GNUC__ && !defined __STRICT_ANSI__
     3.8 +#if defined HAVE_LONG_LONG
     3.9  
    3.10    // long long
    3.11    template <typename _Graph, typename _Item>
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/lemon/config.h.cmake	Fri Feb 20 18:06:10 2009 +0000
     4.3 @@ -0,0 +1,1 @@
     4.4 +#cmakedefine HAVE_LONG_LONG 1
     4.5 \ No newline at end of file
     5.1 --- a/lemon/config.h.in	Fri Feb 20 06:59:00 2009 +0000
     5.2 +++ b/lemon/config.h.in	Fri Feb 20 18:06:10 2009 +0000
     5.3 @@ -3,3 +3,6 @@
     5.4  
     5.5  /* Define to 1 if you have GLPK. */
     5.6  #undef HAVE_GLPK
     5.7 +
     5.8 +/* Define to 1 if you have long long */
     5.9 +#undef HAVE_LONG_LONG
     6.1 --- a/lemon/tolerance.h	Fri Feb 20 06:59:00 2009 +0000
     6.2 +++ b/lemon/tolerance.h	Fri Feb 20 18:06:10 2009 +0000
     6.3 @@ -371,7 +371,7 @@
     6.4      static Value zero() {return 0;}
     6.5    };
     6.6  
     6.7 -#if defined __GNUC__ && !defined __STRICT_ANSI__
     6.8 +#if HAVE_LONG_LONG 
     6.9  
    6.10    ///Long long integer specialization of Tolerance.
    6.11