Mercurial > jwe > octave
diff configure.ac @ 15134:edae65062740
build: Move unordered_map header tests to acinclude.m4 and add caching of results.
* configure.ac: Remove unordered_map header tests
* m4/acinclude.m4: New OCTAVE_UNORDERED_MAP_HEADERS macro which checks
and caches results of undordered_map and tr1_namespace checks.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 09 Aug 2012 08:29:50 -0700 |
parents | f635710b3090 |
children | 089b98bdaebf 4388f6518440 |
line wrap: on
line diff
--- a/configure.ac Wed Aug 08 21:51:23 2012 -0700 +++ b/configure.ac Thu Aug 09 08:29:50 2012 -0700 @@ -1771,27 +1771,10 @@ ## C++ headers AC_LANG_PUSH(C++) + AC_CHECK_HEADERS(sstream) -AC_CHECK_HEADERS([unordered_map], [], [ - AC_CHECK_HEADERS([tr1/unordered_map])]) -AC_MSG_CHECKING([whether unordered_map requires tr1 namespace]) -unordered_map_requires_tr1_namespace=no -if test "$ac_cv_header_unordered_map" = "yes"; then - ## Have <unordered_map>, but still have to check whether - ## tr1 namespace is required (like MSVC, for instance). - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([ - #include <unordered_map> - ], [ - std::unordered_map<int,int> m; - ])], [], [unordered_map_requires_tr1_namespace=yes]) -elif test "$ac_cv_header_tr1_unordered_map" = "yes"; then - unordered_map_requires_tr1_namespace=yes -fi -if test "$unordered_map_requires_tr1_namespace" = "yes"; then - AC_DEFINE(USE_UNORDERED_MAP_WITH_TR1, 1, [Define to 1 if unordered_map requires the use of tr1 namespace.]) -fi -AC_MSG_RESULT([$unordered_map_requires_tr1_namespace]) +OCTAVE_UNORDERED_MAP_HEADERS + AC_LANG_POP(C++) ## Find a termio header to include. @@ -1838,10 +1821,8 @@ ### Check structures and existence of necessary members -AC_CHECK_MEMBERS([struct stat.st_blksize, struct stat.st_blocks, struct stat.st_rdev, struct group.gr_passwd]) -#AC_CHECK_MEMBERS([struct stat.st_blksize, struct stat.st_blocks, struct stat.st_rdev]) -#AC_CHECK_MEMBERS(struct group.gr_passwd) -#AC_CHECK_MEMBERS(struct group.gr_passwd) +AC_CHECK_MEMBERS([struct stat.st_blksize, struct stat.st_blocks, struct stat.st_rdev]) +AC_CHECK_MEMBERS([struct group.gr_passwd]) AC_STRUCT_TIMEZONE