[Box Backup-commit] COMMIT r2327 - in box/trunk: . infrastructure/m4

boxbackup-dev@boxbackup.org boxbackup-dev@boxbackup.org
Sun, 5 Oct 2008 14:20:22 +0100 (BST)


Author: jamesog
Date: 2008-10-05 14:20:21 +0100 (Sun, 05 Oct 2008)
New Revision: 2327

Modified:
   box/trunk/configure.ac
   box/trunk/infrastructure/m4/ax_bswap64.m4
   box/trunk/infrastructure/m4/ax_check_define_pragma.m4
   box/trunk/infrastructure/m4/ax_check_dirent_d_type.m4
   box/trunk/infrastructure/m4/ax_check_malloc_workaround.m4
   box/trunk/infrastructure/m4/ax_check_nonaligned_access.m4
   box/trunk/infrastructure/m4/ax_check_syscall_lseek.m4
   box/trunk/infrastructure/m4/ax_func_syscall.m4
Log:
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_


Modified: box/trunk/configure.ac
===================================================================
--- box/trunk/configure.ac	2008-10-04 23:57:38 UTC (rev 2326)
+++ box/trunk/configure.ac	2008-10-05 13:20:21 UTC (rev 2327)
@@ -238,14 +238,14 @@
 
 ## 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 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 @@
 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 @@
 
 ### 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

Modified: box/trunk/infrastructure/m4/ax_bswap64.m4
===================================================================
--- box/trunk/infrastructure/m4/ax_bswap64.m4	2008-10-04 23:57:38 UTC (rev 2326)
+++ box/trunk/infrastructure/m4/ax_bswap64.m4	2008-10-05 13:20:21 UTC (rev 2327)
@@ -13,7 +13,7 @@
   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 <sys/endian.h>
@@ -21,15 +21,15 @@
           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 <asm/byteorder.h>
@@ -37,9 +37,9 @@
           __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

Modified: box/trunk/infrastructure/m4/ax_check_define_pragma.m4
===================================================================
--- box/trunk/infrastructure/m4/ax_check_define_pragma.m4	2008-10-04 23:57:38 UTC (rev 2326)
+++ box/trunk/infrastructure/m4/ax_check_define_pragma.m4	2008-10-05 13:20:21 UTC (rev 2327)
@@ -10,14 +10,14 @@
 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

Modified: box/trunk/infrastructure/m4/ax_check_dirent_d_type.m4
===================================================================
--- box/trunk/infrastructure/m4/ax_check_dirent_d_type.m4	2008-10-04 23:57:38 UTC (rev 2326)
+++ box/trunk/infrastructure/m4/ax_check_dirent_d_type.m4	2008-10-05 13:20:21 UTC (rev 2327)
@@ -15,7 +15,7 @@
 AC_DEFUN([AX_CHECK_DIRENT_D_TYPE], [
   AC_CHECK_MEMBERS([struct dirent.d_type],,, [[#include <dirent.h>]])
   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 @@
           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

Modified: box/trunk/infrastructure/m4/ax_check_malloc_workaround.m4
===================================================================
--- box/trunk/infrastructure/m4/ax_check_malloc_workaround.m4	2008-10-04 23:57:38 UTC (rev 2326)
+++ box/trunk/infrastructure/m4/ax_check_malloc_workaround.m4	2008-10-05 13:20:21 UTC (rev 2327)
@@ -10,16 +10,16 @@
 
 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 <string>
@@ -27,9 +27,9 @@
             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

Modified: box/trunk/infrastructure/m4/ax_check_nonaligned_access.m4
===================================================================
--- box/trunk/infrastructure/m4/ax_check_nonaligned_access.m4	2008-10-04 23:57:38 UTC (rev 2326)
+++ box/trunk/infrastructure/m4/ax_check_nonaligned_access.m4	2008-10-05 13:20:21 UTC (rev 2327)
@@ -12,7 +12,7 @@
 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 @@
         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 @@
         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 @@
         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

Modified: box/trunk/infrastructure/m4/ax_check_syscall_lseek.m4
===================================================================
--- box/trunk/infrastructure/m4/ax_check_syscall_lseek.m4	2008-10-04 23:57:38 UTC (rev 2326)
+++ box/trunk/infrastructure/m4/ax_check_syscall_lseek.m4	2008-10-05 13:20:21 UTC (rev 2327)
@@ -15,7 +15,7 @@
 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 @@
           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

Modified: box/trunk/infrastructure/m4/ax_func_syscall.m4
===================================================================
--- box/trunk/infrastructure/m4/ax_func_syscall.m4	2008-10-04 23:57:38 UTC (rev 2326)
+++ box/trunk/infrastructure/m4/ax_func_syscall.m4	2008-10-05 13:20:21 UTC (rev 2327)
@@ -18,7 +18,7 @@
   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 @@
           __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