Merge branch 'master' of ssh://git.code.sf.net/p/cmph/git
This commit is contained in:
commit
17ef289801
7
m4/acinclude.m4
Normal file
7
m4/acinclude.m4
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
AC_DEFUN([AC_ENABLE_CXXMPH], [AC_ARG_ENABLE([cxxmph],
|
||||||
|
[ --enable-cxxmph enable the c++ cxxmph library ],
|
||||||
|
[case "${enableval}" in
|
||||||
|
yes) cxxmph=true ;;
|
||||||
|
no) cxxmph=false ;;
|
||||||
|
*) AC_MSG_ERROR([bad value ${enableval} for --enable-cxxmph]) ;;
|
||||||
|
esac],[cxxmph=false])])
|
77
m4/cxx0x.m4
Normal file
77
m4/cxx0x.m4
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
dnl Check for baseline language coverage in the compiler for the C++0x standard.
|
||||||
|
# AC_COMPILE_STDCXX_OX
|
||||||
|
AC_DEFUN([AC_COMPILE_STDCXX_0X], [
|
||||||
|
AC_CACHE_CHECK(if compiler supports C++0x features without additional flags,
|
||||||
|
ac_cv_cxx_compile_cxx0x_native,
|
||||||
|
[AC_LANG_SAVE
|
||||||
|
AC_LANG_CPLUSPLUS
|
||||||
|
AC_TRY_COMPILE([
|
||||||
|
#include <unordered_map>
|
||||||
|
#include <unordered_set>
|
||||||
|
template <typename T>
|
||||||
|
struct check
|
||||||
|
{
|
||||||
|
static_assert(sizeof(int) <= sizeof(T), "not big enough");
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef check<check<bool>> right_angle_brackets;
|
||||||
|
|
||||||
|
int a;
|
||||||
|
decltype(a) b;
|
||||||
|
],,
|
||||||
|
ac_cv_cxx_compile_cxx0x_native=yes, ac_cv_cxx_compile_cxx0x_native=no)
|
||||||
|
AC_LANG_RESTORE
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_CACHE_CHECK(if compiler supports C++0x features with -std=c++0x,
|
||||||
|
ac_cv_cxx_compile_cxx0x_cxx,
|
||||||
|
[AC_LANG_SAVE
|
||||||
|
AC_LANG_CPLUSPLUS
|
||||||
|
ac_save_CXXFLAGS="$CXXFLAGS"
|
||||||
|
CXXFLAGS="$CXXFLAGS -std=c++0x"
|
||||||
|
AC_TRY_COMPILE([
|
||||||
|
#include <unordered_map>
|
||||||
|
template <typename T>
|
||||||
|
struct check
|
||||||
|
{
|
||||||
|
static_assert(sizeof(int) <= sizeof(T), "not big enough");
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef check<check<bool>> right_angle_brackets;
|
||||||
|
|
||||||
|
int a;
|
||||||
|
decltype(a) b;],,
|
||||||
|
ac_cv_cxx_compile_cxx0x_cxx=yes, ac_cv_cxx_compile_cxx0x_cxx=no)
|
||||||
|
CXXFLAGS="$ac_save_CXXFLAGS"
|
||||||
|
AC_LANG_RESTORE
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_CACHE_CHECK(if compiler supports C++0x features with -std=gnu++0x,
|
||||||
|
ac_cv_cxx_compile_cxx0x_gxx,
|
||||||
|
[AC_LANG_SAVE
|
||||||
|
AC_LANG_CPLUSPLUS
|
||||||
|
ac_save_CXXFLAGS="$CXXFLAGS"
|
||||||
|
CXXFLAGS="$CXXFLAGS -std=gnu++0x"
|
||||||
|
AC_TRY_COMPILE([
|
||||||
|
#include <unordered_map>
|
||||||
|
template <typename T>
|
||||||
|
struct check
|
||||||
|
{
|
||||||
|
static_assert(sizeof(int) <= sizeof(T), "not big enough");
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef check<check<bool>> right_angle_brackets;
|
||||||
|
|
||||||
|
int a;
|
||||||
|
decltype(a) b;],,
|
||||||
|
ac_cv_cxx_compile_cxx0x_gxx=yes, ac_cv_cxx_compile_cxx0x_gxx=no)
|
||||||
|
CXXFLAGS="$ac_save_CXXFLAGS"
|
||||||
|
AC_LANG_RESTORE
|
||||||
|
])
|
||||||
|
|
||||||
|
if test "$ac_cv_cxx_compile_cxx0x_native" = yes ||
|
||||||
|
test "$ac_cv_cxx_compile_cxx0x_cxx" = yes ||
|
||||||
|
test "$ac_cv_cxx_compile_cxx0x_gxx" = yes; then
|
||||||
|
AC_DEFINE(HAVE_STDCXX_0X,,[Define if g++ supports C++0x features. ])
|
||||||
|
fi
|
||||||
|
])
|
@ -1,95 +1,3 @@
|
|||||||
AC_DEFUN([AC_ENABLE_CXXMPH], [AC_ARG_ENABLE([cxxmph],
|
|
||||||
[ --enable-cxxmph enable the c++ cxxmph library ],
|
|
||||||
[case "${enableval}" in
|
|
||||||
yes) cxxmph=true ;;
|
|
||||||
no) cxxmph=false ;;
|
|
||||||
*) AC_MSG_ERROR([bad value ${enableval} for --enable-cxxmph]) ;;
|
|
||||||
esac],[cxxmph=false])])
|
|
||||||
|
|
||||||
AC_DEFUN([AC_CHECK_SPOON], [
|
|
||||||
AC_ARG_WITH(spoon, [ --with-spoon=SPOON this is inocuous, since the truth is that there is no spoon ])
|
|
||||||
AC_MSG_CHECKING(if there is spoon)
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl Check for baseline language coverage in the compiler for the C++0x standard.
|
|
||||||
# AC_COMPILE_STDCXX_OX
|
|
||||||
AC_DEFUN([AC_COMPILE_STDCXX_0X], [
|
|
||||||
AC_CACHE_CHECK(if compiler supports C++0x features without additional flags,
|
|
||||||
ac_cv_cxx_compile_cxx0x_native,
|
|
||||||
[AC_LANG_SAVE
|
|
||||||
AC_LANG_CPLUSPLUS
|
|
||||||
AC_TRY_COMPILE([
|
|
||||||
#include <unordered_map>
|
|
||||||
#include <unordered_set>
|
|
||||||
template <typename T>
|
|
||||||
struct check
|
|
||||||
{
|
|
||||||
static_assert(sizeof(int) <= sizeof(T), "not big enough");
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef check<check<bool>> right_angle_brackets;
|
|
||||||
|
|
||||||
int a;
|
|
||||||
decltype(a) b;
|
|
||||||
],,
|
|
||||||
ac_cv_cxx_compile_cxx0x_native=yes, ac_cv_cxx_compile_cxx0x_native=no)
|
|
||||||
AC_LANG_RESTORE
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_CACHE_CHECK(if compiler supports C++0x features with -std=c++0x,
|
|
||||||
ac_cv_cxx_compile_cxx0x_cxx,
|
|
||||||
[AC_LANG_SAVE
|
|
||||||
AC_LANG_CPLUSPLUS
|
|
||||||
ac_save_CXXFLAGS="$CXXFLAGS"
|
|
||||||
CXXFLAGS="$CXXFLAGS -std=c++0x"
|
|
||||||
AC_TRY_COMPILE([
|
|
||||||
#include <unordered_map>
|
|
||||||
template <typename T>
|
|
||||||
struct check
|
|
||||||
{
|
|
||||||
static_assert(sizeof(int) <= sizeof(T), "not big enough");
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef check<check<bool>> right_angle_brackets;
|
|
||||||
|
|
||||||
int a;
|
|
||||||
decltype(a) b;],,
|
|
||||||
ac_cv_cxx_compile_cxx0x_cxx=yes, ac_cv_cxx_compile_cxx0x_cxx=no)
|
|
||||||
CXXFLAGS="$ac_save_CXXFLAGS"
|
|
||||||
AC_LANG_RESTORE
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_CACHE_CHECK(if compiler supports C++0x features with -std=gnu++0x,
|
|
||||||
ac_cv_cxx_compile_cxx0x_gxx,
|
|
||||||
[AC_LANG_SAVE
|
|
||||||
AC_LANG_CPLUSPLUS
|
|
||||||
ac_save_CXXFLAGS="$CXXFLAGS"
|
|
||||||
CXXFLAGS="$CXXFLAGS -std=gnu++0x"
|
|
||||||
AC_TRY_COMPILE([
|
|
||||||
#include <unordered_map>
|
|
||||||
template <typename T>
|
|
||||||
struct check
|
|
||||||
{
|
|
||||||
static_assert(sizeof(int) <= sizeof(T), "not big enough");
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef check<check<bool>> right_angle_brackets;
|
|
||||||
|
|
||||||
int a;
|
|
||||||
decltype(a) b;],,
|
|
||||||
ac_cv_cxx_compile_cxx0x_gxx=yes, ac_cv_cxx_compile_cxx0x_gxx=no)
|
|
||||||
CXXFLAGS="$ac_save_CXXFLAGS"
|
|
||||||
AC_LANG_RESTORE
|
|
||||||
])
|
|
||||||
|
|
||||||
if test "$ac_cv_cxx_compile_cxx0x_native" = yes ||
|
|
||||||
test "$ac_cv_cxx_compile_cxx0x_cxx" = yes ||
|
|
||||||
test "$ac_cv_cxx_compile_cxx0x_gxx" = yes; then
|
|
||||||
AC_DEFINE(HAVE_STDCXX_0X,,[Define if g++ supports C++0x features. ])
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl By default, many hosts won't let programs access large files;
|
dnl By default, many hosts won't let programs access large files;
|
||||||
dnl one must use special compiler options to get large-file access to work.
|
dnl one must use special compiler options to get large-file access to work.
|
||||||
dnl For more details about this brain damage please see:
|
dnl For more details about this brain damage please see:
|
||||||
@ -203,5 +111,3 @@ AC_DEFUN([AC_SYS_EXTRA_LARGEFILE],
|
|||||||
esac])
|
esac])
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
5
m4/spoon.m4
Normal file
5
m4/spoon.m4
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
AC_DEFUN([AC_CHECK_SPOON], [
|
||||||
|
AC_ARG_WITH(spoon, [ --with-spoon=SPOON this is inocuous, since the truth is that there is no spoon ])
|
||||||
|
AC_MSG_CHECKING(if there is spoon)
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
])
|
Loading…
Reference in New Issue
Block a user