From 31c892532d5be4ebb92d26f35f726c1fbbfd6fba Mon Sep 17 00:00:00 2001 From: James O'Gorman Date: Sun, 5 Oct 2008 13:20:21 +0000 Subject: Update autoconf to silence warnings on autoconf >= 2.62 * AC_SUBST now only works with one variable per call * When using AC_CACHE the variable must contain the string '_cv_', thus prefix all cache variables with box_cv_ --- configure.ac | 15 +++++++++------ infrastructure/m4/ax_bswap64.m4 | 12 ++++++------ infrastructure/m4/ax_check_define_pragma.m4 | 6 +++--- infrastructure/m4/ax_check_dirent_d_type.m4 | 8 ++++---- infrastructure/m4/ax_check_malloc_workaround.m4 | 12 ++++++------ infrastructure/m4/ax_check_nonaligned_access.m4 | 18 +++++++++--------- infrastructure/m4/ax_check_syscall_lseek.m4 | 8 ++++---- infrastructure/m4/ax_func_syscall.m4 | 6 +++--- 8 files changed, 44 insertions(+), 41 deletions(-) diff --git a/configure.ac b/configure.ac index c8d8e5f2..8edc1373 100644 --- a/configure.ac +++ b/configure.ac @@ -238,14 +238,14 @@ AC_CHECK_DECLS([XATTR_NOFOLLOW],,, [[#include ]]) ## Check for large file support active. AC_SYS_LARGEFILE has already worked ## out how to enable it if necessary, we just use this to report to the user -AC_CACHE_CHECK([if we have large file support enabled], [have_large_file_support], +AC_CACHE_CHECK([if we have large file support enabled], [box_cv_have_large_file_support], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[$ac_includes_default]], [[ return sizeof(off_t)==4; ]])], - [have_large_file_support=yes], [have_large_file_support=no] + [box_cv_have_large_file_support=yes], [box_cv_have_large_file_support=no] )]) -if test "x$have_large_file_support" = "xyes"; then +if test "x$box_cv_have_large_file_support" = "xyes"; then AC_DEFINE([HAVE_LARGE_FILE_SUPPORT], [1], [Define to 1 if large files are supported]) fi @@ -301,7 +301,10 @@ eval sysconfdir_expanded=` eval "echo $sysconfdir"` eval localstatedir_expanded=`eval "echo $localstatedir"` prefix=$saved_prefix exec_prefix=$saved_exec_prefix -AC_SUBST([bindir_expanded sbindir_expanded sysconfdir_expanded localstatedir_expanded]) +AC_SUBST([bindir_expanded]) +AC_SUBST([sbindir_expanded]) +AC_SUBST([sysconfdir_expanded]) +AC_SUBST([localstatedir_expanded]) ### Output files @@ -355,7 +358,7 @@ without these features, but will work better where they are present. Refer to the documentation for more information on each feature. Regular expressions: $have_regex_support -Large files: $have_large_file_support +Large files: $box_cv_have_large_file_support Berkeley DB: $ax_path_bdb_ok Readline: $have_libreadline Extended attributes: $ac_cv_header_sys_xattr_h @@ -364,7 +367,7 @@ EOC ### Warnings at end for visibility -if test "x$gcc_3_plus" != "xyes" && test "x$malloc_workaround" != "xyes"; then +if test "x$box_cv_gcc_3_plus" != "xyes" && test "x$box_cv_malloc_workaround" != "xyes"; then echo AC_MSG_WARN([[the implementation of the C++ STL on this platform may have a flaw which causes it to apparently leak memory, and this flaw cannot be diff --git a/infrastructure/m4/ax_bswap64.m4 b/infrastructure/m4/ax_bswap64.m4 index 9bfc84fc..8110743c 100644 --- a/infrastructure/m4/ax_bswap64.m4 +++ b/infrastructure/m4/ax_bswap64.m4 @@ -13,7 +13,7 @@ AC_DEFUN([AX_BSWAP64], [ bswap64_function="" AC_CHECK_HEADERS([sys/endian.h asm/byteorder.h]) if test "x$ac_cv_header_sys_endian_h" = "xyes"; then - AC_CACHE_CHECK([for htobe64], [have_htobe64], + AC_CACHE_CHECK([for htobe64], [box_cv_have_htobe64], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ $ac_includes_default #include @@ -21,15 +21,15 @@ AC_DEFUN([AX_BSWAP64], [ htobe64(0); return 1; ]])], - [have_htobe64=yes], [have_htobe64=no] + [box_cv_have_htobe64=yes], [box_cv_have_htobe64=no] )]) - if test "x$have_htobe64" = "xyes"; then + if test "x$box_cv_have_htobe64" = "xyes"; then bswap64_function=htobe64 fi fi if test "x$bswap64_function" = "x" && \ test "x$ac_cv_header_asm_byteorder_h" = "xyes"; then - AC_CACHE_CHECK([for __cpu_to_be64], [have___cpu_to_be64], + AC_CACHE_CHECK([for __cpu_to_be64], [box_cv_have___cpu_to_be64], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ $ac_includes_default #include @@ -37,9 +37,9 @@ AC_DEFUN([AX_BSWAP64], [ __cpu_to_be64(0); return 1; ]])], - [have___cpu_to_be64=yes], [have___cpu_to_be64=no] + [box_cv_have___cpu_to_be64=yes], [box_cv_have___cpu_to_be64=no] )]) - if test "x$have___cpu_to_be64" = "xyes"; then + if test "x$box_cv_have___cpu_to_be64" = "xyes"; then bswap64_function=__cpu_to_be64 fi fi diff --git a/infrastructure/m4/ax_check_define_pragma.m4 b/infrastructure/m4/ax_check_define_pragma.m4 index 176faf3d..e3f7fe89 100644 --- a/infrastructure/m4/ax_check_define_pragma.m4 +++ b/infrastructure/m4/ax_check_define_pragma.m4 @@ -10,14 +10,14 @@ dnl @version 2005/07/03 dnl @license AllPermissive AC_DEFUN([AX_CHECK_DEFINE_PRAGMA], [ - AC_CACHE_CHECK([for pre-processor pragma defines], [have_define_pragma], + AC_CACHE_CHECK([for pre-processor pragma defines], [box_cv_have_define_pragma], [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ #define TEST_DEFINE #pragma pack(1) TEST_DEFINE ]])], - [have_define_pragma=yes], [have_define_pragma=no] + [box_cv_have_define_pragma=yes], [box_cv_have_define_pragma=no] )]) - if test "x$have_define_pragma" = "xyes"; then + if test "x$box_cv_have_define_pragma" = "xyes"; then AC_DEFINE([HAVE_DEFINE_PRAGMA], 1, [Define to 1 if #define of pragmas works]) m4_ifvaln([$1],[$1],[:])dnl m4_ifvaln([$2],[else $2])dnl diff --git a/infrastructure/m4/ax_check_dirent_d_type.m4 b/infrastructure/m4/ax_check_dirent_d_type.m4 index 1c0e2ec2..8351f132 100644 --- a/infrastructure/m4/ax_check_dirent_d_type.m4 +++ b/infrastructure/m4/ax_check_dirent_d_type.m4 @@ -15,7 +15,7 @@ dnl @license AllPermissive AC_DEFUN([AX_CHECK_DIRENT_D_TYPE], [ AC_CHECK_MEMBERS([struct dirent.d_type],,, [[#include ]]) if test "x$ac_cv_member_struct_dirent_d_type" = "xyes"; then - AC_CACHE_CHECK([[whether struct dirent.d_type is valid]], [have_valid_dirent_d_type], + AC_CACHE_CHECK([[whether struct dirent.d_type is valid]], [box_cv_have_valid_dirent_d_type], [AC_RUN_IFELSE( [AC_LANG_PROGRAM([[ $ac_includes_default @@ -26,14 +26,14 @@ AC_DEFUN([AX_CHECK_DIRENT_D_TYPE], [ if(dir) res = readdir(dir); return res ? (res->d_type != DT_FILE && res->d_type != DT_DIR) : 1; ]])], - [have_valid_dirent_d_type=yes], [have_valid_dirent_d_type=no] + [box_cv_have_valid_dirent_d_type=yes], [box_cv_have_valid_dirent_d_type=no] )]) - if test "x$have_valid_dirent_d_type" = "xyes"; then + if test "x$box_cv_have_valid_dirent_d_type" = "xyes"; then AC_DEFINE([HAVE_VALID_DIRENT_D_TYPE], 1, [Define to 1 if struct dirent.d_type is valid]) fi fi if test "x$ac_cv_member_struct_dirent_d_type" = "xyes" || \ - test "x$have_valid_dirent_d_type" = "xyes" + test "x$box_cv_have_valid_dirent_d_type" = "xyes" then m4_ifvaln([$1],[$1],[:])dnl m4_ifvaln([$2],[else $2])dnl diff --git a/infrastructure/m4/ax_check_malloc_workaround.m4 b/infrastructure/m4/ax_check_malloc_workaround.m4 index 9b1c9848..7655c0f7 100644 --- a/infrastructure/m4/ax_check_malloc_workaround.m4 +++ b/infrastructure/m4/ax_check_malloc_workaround.m4 @@ -10,16 +10,16 @@ dnl @license AllPermissive AC_DEFUN([AX_CHECK_MALLOC_WORKAROUND], [ if test "x$GXX" = "xyes"; then - AC_CACHE_CHECK([for gcc version 3 or later], [gcc_3_plus], + AC_CACHE_CHECK([for gcc version 3 or later], [box_cv_gcc_3_plus], [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ #if __GNUC__ < 3 #error "Old GNU C" #endif ]])], - [gcc_3_plus=yes], [gcc_3_plus=no] + [box_cv_gcc_3_plus=yes], [box_cv_gcc_3_plus=no] )]) - if test "x$gcc_3_plus" = "xno"; then - AC_CACHE_CHECK([for malloc workaround], [malloc_workaround], + if test "x$box_cv_gcc_3_plus" = "xno"; then + AC_CACHE_CHECK([for malloc workaround], [box_cv_malloc_workaround], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #define __USE_MALLOC #include @@ -27,9 +27,9 @@ AC_DEFUN([AX_CHECK_MALLOC_WORKAROUND], [ std::string s; s = "test"; ]])], - [malloc_workaround=yes], [malloc_workaround=no] + [box_cv_malloc_workaround=yes], [box_cv_malloc_workaround=no] )]) - if test "x$malloc_workaround" = "xyes"; then + if test "x$box_cv_malloc_workaround" = "xyes"; then AC_DEFINE([__USE_MALLOC], 1, [Define to 1 if __USE_MALLOC is required work around STL memory leaks]) fi diff --git a/infrastructure/m4/ax_check_nonaligned_access.m4 b/infrastructure/m4/ax_check_nonaligned_access.m4 index 8a6cd0c6..ab2d0b7e 100644 --- a/infrastructure/m4/ax_check_nonaligned_access.m4 +++ b/infrastructure/m4/ax_check_nonaligned_access.m4 @@ -12,7 +12,7 @@ dnl @version 2005/07/12 dnl @license AllPermissive AC_DEFUN([AX_CHECK_NONALIGNED_ACCESS], [ - AC_CACHE_CHECK([if non-aligned 16 bit word accesses fail], [have_aligned_only_int16], + AC_CACHE_CHECK([if non-aligned 16 bit word accesses fail], [box_cv_have_aligned_only_int16], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[$ac_includes_default]], [[ #ifndef HAVE_UINT16_T #define uint16_t u_int16_t; @@ -21,12 +21,12 @@ AC_DEFUN([AX_CHECK_NONALIGNED_ACCESS], [ memset(scratch, 0, sizeof(scratch)); return *(uint16_t*)((char*)scratch+1); ]])], - [have_aligned_only_int16=no], [have_aligned_only_int16=yes] + [box_cv_have_aligned_only_int16=no], [box_cv_have_aligned_only_int16=yes] )]) - if test "x$have_aligned_only_int16" = "xyes"; then + if test "x$box_cv_have_aligned_only_int16" = "xyes"; then AC_DEFINE([HAVE_ALIGNED_ONLY_INT16], 1, [Define to 1 if non-aligned int16 access will fail]) fi - AC_CACHE_CHECK([if non-aligned 32 bit word accesses fail], [have_aligned_only_int32], + AC_CACHE_CHECK([if non-aligned 32 bit word accesses fail], [box_cv_have_aligned_only_int32], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[$ac_includes_default]], [[ #ifndef HAVE_UINT32_T #define uint32_t u_int32_t; @@ -35,12 +35,12 @@ AC_DEFUN([AX_CHECK_NONALIGNED_ACCESS], [ memset(scratch, 0, sizeof(scratch)); return *(uint32_t*)((char*)scratch+1); ]])], - [have_aligned_only_int32=no], [have_aligned_only_int32=yes] + [box_cv_have_aligned_only_int32=no], [box_cv_have_aligned_only_int32=yes] )]) - if test "x$have_aligned_only_int32" = "xyes"; then + if test "x$box_cv_have_aligned_only_int32" = "xyes"; then AC_DEFINE([HAVE_ALIGNED_ONLY_INT32], 1, [Define to 1 if non-aligned int32 access will fail]) fi - AC_CACHE_CHECK([if non-aligned 64 bit word accesses fail], [have_aligned_only_int64], + AC_CACHE_CHECK([if non-aligned 64 bit word accesses fail], [box_cv_have_aligned_only_int64], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[$ac_includes_default]], [[ #ifndef HAVE_UINT64_T #define uint64_t u_int64_t; @@ -49,9 +49,9 @@ AC_DEFUN([AX_CHECK_NONALIGNED_ACCESS], [ memset(scratch, 0, sizeof(scratch)); return *(uint64_t*)((char*)scratch+1); ]])], - [have_aligned_only_int64=no], [have_aligned_only_int64=yes] + [box_cv_have_aligned_only_int64=no], [box_cv_have_aligned_only_int64=yes] )]) - if test "x$have_aligned_only_int64" = "xyes"; then + if test "x$box_cv_have_aligned_only_int64" = "xyes"; then AC_DEFINE([HAVE_ALIGNED_ONLY_INT64], 1, [Define to 1 if non-aligned int64 access will fail]) fi ])dnl diff --git a/infrastructure/m4/ax_check_syscall_lseek.m4 b/infrastructure/m4/ax_check_syscall_lseek.m4 index 491cc1ed..7d22c4b0 100644 --- a/infrastructure/m4/ax_check_syscall_lseek.m4 +++ b/infrastructure/m4/ax_check_syscall_lseek.m4 @@ -15,7 +15,7 @@ dnl @license AllPermissive AC_DEFUN([AX_CHECK_SYSCALL_LSEEK], [ AC_REQUIRE([AX_FUNC_SYSCALL])dnl if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then - AC_CACHE_CHECK([[whether syscall lseek requires dummy parameter]], [have_lseek_dummy_param], + AC_CACHE_CHECK([[whether syscall lseek requires dummy parameter]], [box_cv_have_lseek_dummy_param], [AC_RUN_IFELSE( [AC_LANG_PROGRAM([[ $ac_includes_default @@ -50,14 +50,14 @@ AC_DEFUN([AX_CHECK_SYSCALL_LSEEK], [ unlink("lseektest"); return res!=-1; ]])], - [have_lseek_dummy_param=yes], [have_lseek_dummy_param=no] + [box_cv_have_lseek_dummy_param=yes], [box_cv_have_lseek_dummy_param=no] )]) - if test "x$have_lseek_dummy_param" = "xyes"; then + if test "x$box_cv_have_lseek_dummy_param" = "xyes"; then AC_DEFINE([HAVE_LSEEK_DUMMY_PARAM], 1, [Define to 1 if syscall lseek requires a dummy middle parameter]) fi fi - if test "x$have_lseek_dummy_param" = "xno" + if test "x$box_cv_have_lseek_dummy_param" = "xno" then m4_ifvaln([$1],[$1],[:])dnl m4_ifvaln([$2],[else $2])dnl diff --git a/infrastructure/m4/ax_func_syscall.m4 b/infrastructure/m4/ax_func_syscall.m4 index 40496bf0..a0ab503c 100644 --- a/infrastructure/m4/ax_func_syscall.m4 +++ b/infrastructure/m4/ax_func_syscall.m4 @@ -18,7 +18,7 @@ AC_DEFUN([AX_FUNC_SYSCALL], [ AC_CHECK_FUNCS([syscall __syscall]) if test "x$ac_cv_func_syscall" != "xyes" && test "x$ac_cv_func___syscall" != "xyes"; then - AC_CACHE_CHECK([for __syscall needing definition], [have___syscall_need_defn], + AC_CACHE_CHECK([for __syscall needing definition], [box_cv_have___syscall_need_defn], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ $ac_includes_default #ifdef HAVE_SYS_SYSCALL_H @@ -29,9 +29,9 @@ AC_DEFUN([AX_FUNC_SYSCALL], [ __syscall(SYS_exit, 0); return 1; ]])], - [have___syscall_need_defn=yes], [have___syscall_need_defn=no] + [box_cv_have___syscall_need_defn=yes], [box_cv_have___syscall_need_defn=no] )]) - if test "x$have___syscall_need_defn" = "xyes"; then + if test "x$box_cv_have___syscall_need_defn" = "xyes"; then AC_DEFINE([HAVE___SYSCALL_NEED_DEFN], 1, [Define to 1 if __syscall is available but needs a definition]) fi -- cgit v1.2.3