svn commit: samba r14998 - in branches/SAMBA_4_0/source: . build/m4 lib/replace lib/util

jelmer at samba.org jelmer at samba.org
Sat Apr 8 15:27:00 GMT 2006


Author: jelmer
Date: 2006-04-08 15:26:59 +0000 (Sat, 08 Apr 2006)
New Revision: 14998

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14998

Log:
Remove unused autoconf test, move others to proper places

Added:
   branches/SAMBA_4_0/source/lib/util/fsusage.m4
Modified:
   branches/SAMBA_4_0/source/build/m4/rewrite.m4
   branches/SAMBA_4_0/source/configure.in
   branches/SAMBA_4_0/source/lib/replace/config.m4


Changeset:
Modified: branches/SAMBA_4_0/source/build/m4/rewrite.m4
===================================================================
--- branches/SAMBA_4_0/source/build/m4/rewrite.m4	2006-04-08 14:49:59 UTC (rev 14997)
+++ branches/SAMBA_4_0/source/build/m4/rewrite.m4	2006-04-08 15:26:59 UTC (rev 14998)
@@ -52,16 +52,18 @@
 AC_HEADER_DIRENT
 AC_HEADER_TIME
 AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS(sys/select.h fcntl.h sys/fcntl.h sys/time.h)
+AC_CHECK_HEADERS(sys/select.h fcntl.h sys/fcntl.h sys/time.h stdarg.h)
 AC_CHECK_HEADERS(utime.h grp.h sys/id.h limits.h memory.h compat.h math.h)
 AC_CHECK_HEADERS(sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h)
 AC_CHECK_HEADERS(sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h)
 AC_CHECK_HEADERS(sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h)
-AC_CHECK_HEADERS(fnmatch.h pwd.h sys/termio.h sys/time.h sys/statfs.h sys/statvfs.h stdarg.h)
+AC_CHECK_HEADERS(fnmatch.h pwd.h sys/termio.h sys/time.h)
 AC_CHECK_HEADERS(locale.h shadow.h)
 AC_CHECK_HEADERS(nss.h nss_common.h ns_api.h sys/security.h)
-AC_CHECK_HEADERS(sys/capability.h sys/acl.h)
+AC_CHECK_HEADERS(sys/acl.h)
 
+AC_CHECK_HEADERS(sys/capability.h)
+
 AC_CHECK_HEADERS(sys/mount.h, , , [AC_INCLUDES_DEFAULT
 #ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>
@@ -319,25 +321,7 @@
     AC_DEFINE(HAVE_GETTIMEOFDAY_TZ,1,[Whether gettimeofday() is available])
 fi
 
-AC_CACHE_CHECK([for va_copy],samba_cv_HAVE_VA_COPY,[
-AC_TRY_LINK([#include <stdarg.h>
-va_list ap1,ap2;], [va_copy(ap1,ap2);],
-samba_cv_HAVE_VA_COPY=yes,samba_cv_HAVE_VA_COPY=no)])
-if test x"$samba_cv_HAVE_VA_COPY" = x"yes"; then
-    AC_DEFINE(HAVE_VA_COPY,1,[Whether va_copy() is available])
-fi
 
-if test x"$samba_cv_HAVE_VA_COPY" != x"yes"; then
-AC_CACHE_CHECK([for __va_copy],samba_cv_HAVE___VA_COPY,[
-AC_TRY_LINK([#include <stdarg.h>
-va_list ap1,ap2;], [__va_copy(ap1,ap2);],
-samba_cv_HAVE___VA_COPY=yes,samba_cv_HAVE___VA_COPY=no)])
-if test x"$samba_cv_HAVE___VA_COPY" = x"yes"; then
-    AC_DEFINE(HAVE___VA_COPY,1,[Whether __va_copy() is available])
-fi
-fi
-
-
 AC_CACHE_CHECK([for utimbuf],samba_cv_HAVE_UTIMBUF,[
 AC_TRY_COMPILE([#include <sys/types.h>
 #include <utime.h>],
@@ -530,187 +514,3 @@
 	AC_DEFINE(HAVE_TRUNCATED_SALT,1,[Whether crypt needs truncated salt])
 fi
 fi
-
-#################################################
-# these tests are taken from the GNU fileutils package
-AC_CHECKING(how to get filesystem space usage)
-space=no
-
-# Test for statvfs64.
-if test $space = no; then
-  # SVR4
-  AC_CACHE_CHECK([statvfs64 function (SVR4)], fu_cv_sys_stat_statvfs64,
-  [AC_TRY_RUN([
-#if defined(HAVE_UNISTD_H)
-#include <unistd.h>
-#endif
-#include <sys/types.h>
-#include <sys/statvfs.h>
-  main ()
-  {
-    struct statvfs64 fsd;
-    exit (statvfs64 (".", &fsd));
-  }],
-  fu_cv_sys_stat_statvfs64=yes,
-  fu_cv_sys_stat_statvfs64=no,
-  fu_cv_sys_stat_statvfs64=cross)])
-  if test $fu_cv_sys_stat_statvfs64 = yes; then
-    space=yes
-    AC_DEFINE(STAT_STATVFS64,1,[Whether statvfs64() is available])
-  fi
-fi
-
-# Perform only the link test since it seems there are no variants of the
-# statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
-# because that got a false positive on SCO OSR5.  Adding the declaration
-# of a `struct statvfs' causes this test to fail (as it should) on such
-# systems.  That system is reported to work fine with STAT_STATFS4 which
-# is what it gets when this test fails.
-if test $space = no; then
-  # SVR4
-  AC_CACHE_CHECK([statvfs function (SVR4)], fu_cv_sys_stat_statvfs,
-		 [AC_TRY_LINK([#include <sys/types.h>
-#include <sys/statvfs.h>],
-			      [struct statvfs fsd; statvfs (0, &fsd);],
-			      fu_cv_sys_stat_statvfs=yes,
-			      fu_cv_sys_stat_statvfs=no)])
-  if test $fu_cv_sys_stat_statvfs = yes; then
-    space=yes
-    AC_DEFINE(STAT_STATVFS,1,[Whether statvfs() is available])
-  fi
-fi
-
-if test $space = no; then
-  # DEC Alpha running OSF/1
-  AC_MSG_CHECKING([for 3-argument statfs function (DEC OSF/1)])
-  AC_CACHE_VAL(fu_cv_sys_stat_statfs3_osf1,
-  [AC_TRY_RUN([
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/mount.h>
-  main ()
-  {
-    struct statfs fsd;
-    fsd.f_fsize = 0;
-    exit (statfs (".", &fsd, sizeof (struct statfs)));
-  }],
-  fu_cv_sys_stat_statfs3_osf1=yes,
-  fu_cv_sys_stat_statfs3_osf1=no,
-  fu_cv_sys_stat_statfs3_osf1=no)])
-  AC_MSG_RESULT($fu_cv_sys_stat_statfs3_osf1)
-  if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
-    space=yes
-    AC_DEFINE(STAT_STATFS3_OSF1,1,[Whether statfs requires 3 arguments])
-  fi
-fi
-
-if test $space = no; then
-# AIX
-  AC_MSG_CHECKING([for two-argument statfs with statfs.bsize dnl
-member (AIX, 4.3BSD)])
-  AC_CACHE_VAL(fu_cv_sys_stat_statfs2_bsize,
-  [AC_TRY_RUN([
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#ifdef HAVE_SYS_MOUNT_H
-#include <sys/mount.h>
-#endif
-#ifdef HAVE_SYS_VFS_H
-#include <sys/vfs.h>
-#endif
-  main ()
-  {
-  struct statfs fsd;
-  fsd.f_bsize = 0;
-  exit (statfs (".", &fsd));
-  }],
-  fu_cv_sys_stat_statfs2_bsize=yes,
-  fu_cv_sys_stat_statfs2_bsize=no,
-  fu_cv_sys_stat_statfs2_bsize=no)])
-  AC_MSG_RESULT($fu_cv_sys_stat_statfs2_bsize)
-  if test $fu_cv_sys_stat_statfs2_bsize = yes; then
-    space=yes
-    AC_DEFINE(STAT_STATFS2_BSIZE,1,[Whether statfs requires two arguments and struct statfs has bsize property])
-  fi
-fi
-
-if test $space = no; then
-# SVR3
-  AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)])
-  AC_CACHE_VAL(fu_cv_sys_stat_statfs4,
-  [AC_TRY_RUN([#include <sys/types.h>
-#include <sys/statfs.h>
-  main ()
-  {
-  struct statfs fsd;
-  exit (statfs (".", &fsd, sizeof fsd, 0));
-  }],
-    fu_cv_sys_stat_statfs4=yes,
-    fu_cv_sys_stat_statfs4=no,
-    fu_cv_sys_stat_statfs4=no)])
-  AC_MSG_RESULT($fu_cv_sys_stat_statfs4)
-  if test $fu_cv_sys_stat_statfs4 = yes; then
-    space=yes
-    AC_DEFINE(STAT_STATFS4,1,[Whether statfs requires 4 arguments])
-  fi
-fi
-
-if test $space = no; then
-# 4.4BSD and NetBSD
-  AC_MSG_CHECKING([for two-argument statfs with statfs.fsize dnl
-member (4.4BSD and NetBSD)])
-  AC_CACHE_VAL(fu_cv_sys_stat_statfs2_fsize,
-  [AC_TRY_RUN([#include <sys/types.h>
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#ifdef HAVE_SYS_MOUNT_H
-#include <sys/mount.h>
-#endif
-  main ()
-  {
-  struct statfs fsd;
-  fsd.f_fsize = 0;
-  exit (statfs (".", &fsd));
-  }],
-  fu_cv_sys_stat_statfs2_fsize=yes,
-  fu_cv_sys_stat_statfs2_fsize=no,
-  fu_cv_sys_stat_statfs2_fsize=no)])
-  AC_MSG_RESULT($fu_cv_sys_stat_statfs2_fsize)
-  if test $fu_cv_sys_stat_statfs2_fsize = yes; then
-    space=yes
-	AC_DEFINE(STAT_STATFS2_FSIZE,1,[Whether statfs requires 2 arguments and struct statfs has fsize])
-  fi
-fi
-
-if test $space = no; then
-  # Ultrix
-  AC_MSG_CHECKING([for two-argument statfs with struct fs_data (Ultrix)])
-  AC_CACHE_VAL(fu_cv_sys_stat_fs_data,
-  [AC_TRY_RUN([#include <sys/types.h>
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#ifdef HAVE_SYS_MOUNT_H
-#include <sys/mount.h>
-#endif
-#ifdef HAVE_SYS_FS_TYPES_H
-#include <sys/fs_types.h>
-#endif
-  main ()
-  {
-  struct fs_data fsd;
-  /* Ultrix's statfs returns 1 for success,
-     0 for not mounted, -1 for failure.  */
-  exit (statfs (".", &fsd) != 1);
-  }],
-  fu_cv_sys_stat_fs_data=yes,
-  fu_cv_sys_stat_fs_data=no,
-  fu_cv_sys_stat_fs_data=no)])
-  AC_MSG_RESULT($fu_cv_sys_stat_fs_data)
-  if test $fu_cv_sys_stat_fs_data = yes; then
-    space=yes
-    AC_DEFINE(STAT_STATFS2_FS_DATA,1,[Whether statfs requires 2 arguments and struct fs_data is available])
-  fi
-fi

Modified: branches/SAMBA_4_0/source/configure.in
===================================================================
--- branches/SAMBA_4_0/source/configure.in	2006-04-08 14:49:59 UTC (rev 14997)
+++ branches/SAMBA_4_0/source/configure.in	2006-04-08 15:26:59 UTC (rev 14998)
@@ -16,6 +16,7 @@
 sinclude(lib/replace/win32/config.m4)
 sinclude(lib/replace/repdir/config.m4)
 sinclude(heimdal_build/config.m4)
+sinclude(lib/util/fsusage.m4)
 sinclude(lib/popt/config.m4)
 sinclude(lib/charset/config.m4)
 sinclude(lib/socket/config.m4)

Modified: branches/SAMBA_4_0/source/lib/replace/config.m4
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/config.m4	2006-04-08 14:49:59 UTC (rev 14997)
+++ branches/SAMBA_4_0/source/lib/replace/config.m4	2006-04-08 15:26:59 UTC (rev 14998)
@@ -132,3 +132,24 @@
 
 sinclude(lib/replace/readline.m4)
 sinclude(lib/replace/getpass.m4)
+
+dnl VA_COPY
+AC_CACHE_CHECK([for va_copy],samba_cv_HAVE_VA_COPY,[
+AC_TRY_LINK([#include <stdarg.h>
+va_list ap1,ap2;], [va_copy(ap1,ap2);],
+samba_cv_HAVE_VA_COPY=yes,samba_cv_HAVE_VA_COPY=no)])
+if test x"$samba_cv_HAVE_VA_COPY" = x"yes"; then
+    AC_DEFINE(HAVE_VA_COPY,1,[Whether va_copy() is available])
+fi
+
+if test x"$samba_cv_HAVE_VA_COPY" != x"yes"; then
+AC_CACHE_CHECK([for __va_copy],samba_cv_HAVE___VA_COPY,[
+AC_TRY_LINK([#include <stdarg.h>
+va_list ap1,ap2;], [__va_copy(ap1,ap2);],
+samba_cv_HAVE___VA_COPY=yes,samba_cv_HAVE___VA_COPY=no)])
+if test x"$samba_cv_HAVE___VA_COPY" = x"yes"; then
+    AC_DEFINE(HAVE___VA_COPY,1,[Whether __va_copy() is available])
+fi
+fi
+
+

Added: branches/SAMBA_4_0/source/lib/util/fsusage.m4
===================================================================
--- branches/SAMBA_4_0/source/lib/util/fsusage.m4	2006-04-08 14:49:59 UTC (rev 14997)
+++ branches/SAMBA_4_0/source/lib/util/fsusage.m4	2006-04-08 15:26:59 UTC (rev 14998)
@@ -0,0 +1,184 @@
+#################################################
+# these tests are taken from the GNU fileutils package
+AC_CHECKING(how to get filesystem space usage)
+AC_CHECK_HEADERS(sys/statfs.h sys/statvfs.h)
+space=no
+
+# Test for statvfs64.
+if test $space = no; then
+  # SVR4
+  AC_CACHE_CHECK([statvfs64 function (SVR4)], fu_cv_sys_stat_statvfs64,
+  [AC_TRY_RUN([
+#if defined(HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
+#include <sys/types.h>
+#include <sys/statvfs.h>
+  main ()
+  {
+    struct statvfs64 fsd;
+    exit (statvfs64 (".", &fsd));
+  }],
+  fu_cv_sys_stat_statvfs64=yes,
+  fu_cv_sys_stat_statvfs64=no,
+  fu_cv_sys_stat_statvfs64=cross)])
+  if test $fu_cv_sys_stat_statvfs64 = yes; then
+    space=yes
+    AC_DEFINE(STAT_STATVFS64,1,[Whether statvfs64() is available])
+  fi
+fi
+
+# Perform only the link test since it seems there are no variants of the
+# statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
+# because that got a false positive on SCO OSR5.  Adding the declaration
+# of a `struct statvfs' causes this test to fail (as it should) on such
+# systems.  That system is reported to work fine with STAT_STATFS4 which
+# is what it gets when this test fails.
+if test $space = no; then
+  # SVR4
+  AC_CACHE_CHECK([statvfs function (SVR4)], fu_cv_sys_stat_statvfs,
+		 [AC_TRY_LINK([#include <sys/types.h>
+#include <sys/statvfs.h>],
+			      [struct statvfs fsd; statvfs (0, &fsd);],
+			      fu_cv_sys_stat_statvfs=yes,
+			      fu_cv_sys_stat_statvfs=no)])
+  if test $fu_cv_sys_stat_statvfs = yes; then
+    space=yes
+    AC_DEFINE(STAT_STATVFS,1,[Whether statvfs() is available])
+  fi
+fi
+
+if test $space = no; then
+  # DEC Alpha running OSF/1
+  AC_MSG_CHECKING([for 3-argument statfs function (DEC OSF/1)])
+  AC_CACHE_VAL(fu_cv_sys_stat_statfs3_osf1,
+  [AC_TRY_RUN([
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/mount.h>
+  main ()
+  {
+    struct statfs fsd;
+    fsd.f_fsize = 0;
+    exit (statfs (".", &fsd, sizeof (struct statfs)));
+  }],
+  fu_cv_sys_stat_statfs3_osf1=yes,
+  fu_cv_sys_stat_statfs3_osf1=no,
+  fu_cv_sys_stat_statfs3_osf1=no)])
+  AC_MSG_RESULT($fu_cv_sys_stat_statfs3_osf1)
+  if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
+    space=yes
+    AC_DEFINE(STAT_STATFS3_OSF1,1,[Whether statfs requires 3 arguments])
+  fi
+fi
+
+if test $space = no; then
+# AIX
+  AC_MSG_CHECKING([for two-argument statfs with statfs.bsize dnl
+member (AIX, 4.3BSD)])
+  AC_CACHE_VAL(fu_cv_sys_stat_statfs2_bsize,
+  [AC_TRY_RUN([
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+#ifdef HAVE_SYS_MOUNT_H
+#include <sys/mount.h>
+#endif
+#ifdef HAVE_SYS_VFS_H
+#include <sys/vfs.h>
+#endif
+  main ()
+  {
+  struct statfs fsd;
+  fsd.f_bsize = 0;
+  exit (statfs (".", &fsd));
+  }],
+  fu_cv_sys_stat_statfs2_bsize=yes,
+  fu_cv_sys_stat_statfs2_bsize=no,
+  fu_cv_sys_stat_statfs2_bsize=no)])
+  AC_MSG_RESULT($fu_cv_sys_stat_statfs2_bsize)
+  if test $fu_cv_sys_stat_statfs2_bsize = yes; then
+    space=yes
+    AC_DEFINE(STAT_STATFS2_BSIZE,1,[Whether statfs requires two arguments and struct statfs has bsize property])
+  fi
+fi
+
+if test $space = no; then
+# SVR3
+  AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)])
+  AC_CACHE_VAL(fu_cv_sys_stat_statfs4,
+  [AC_TRY_RUN([#include <sys/types.h>
+#include <sys/statfs.h>
+  main ()
+  {
+  struct statfs fsd;
+  exit (statfs (".", &fsd, sizeof fsd, 0));
+  }],
+    fu_cv_sys_stat_statfs4=yes,
+    fu_cv_sys_stat_statfs4=no,
+    fu_cv_sys_stat_statfs4=no)])
+  AC_MSG_RESULT($fu_cv_sys_stat_statfs4)
+  if test $fu_cv_sys_stat_statfs4 = yes; then
+    space=yes
+    AC_DEFINE(STAT_STATFS4,1,[Whether statfs requires 4 arguments])
+  fi
+fi
+
+if test $space = no; then
+# 4.4BSD and NetBSD
+  AC_MSG_CHECKING([for two-argument statfs with statfs.fsize dnl
+member (4.4BSD and NetBSD)])
+  AC_CACHE_VAL(fu_cv_sys_stat_statfs2_fsize,
+  [AC_TRY_RUN([#include <sys/types.h>
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+#ifdef HAVE_SYS_MOUNT_H
+#include <sys/mount.h>
+#endif
+  main ()
+  {
+  struct statfs fsd;
+  fsd.f_fsize = 0;
+  exit (statfs (".", &fsd));
+  }],
+  fu_cv_sys_stat_statfs2_fsize=yes,
+  fu_cv_sys_stat_statfs2_fsize=no,
+  fu_cv_sys_stat_statfs2_fsize=no)])
+  AC_MSG_RESULT($fu_cv_sys_stat_statfs2_fsize)
+  if test $fu_cv_sys_stat_statfs2_fsize = yes; then
+    space=yes
+	AC_DEFINE(STAT_STATFS2_FSIZE,1,[Whether statfs requires 2 arguments and struct statfs has fsize])
+  fi
+fi
+
+if test $space = no; then
+  # Ultrix
+  AC_MSG_CHECKING([for two-argument statfs with struct fs_data (Ultrix)])
+  AC_CACHE_VAL(fu_cv_sys_stat_fs_data,
+  [AC_TRY_RUN([#include <sys/types.h>
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+#ifdef HAVE_SYS_MOUNT_H
+#include <sys/mount.h>
+#endif
+#ifdef HAVE_SYS_FS_TYPES_H
+#include <sys/fs_types.h>
+#endif
+  main ()
+  {
+  struct fs_data fsd;
+  /* Ultrix's statfs returns 1 for success,
+     0 for not mounted, -1 for failure.  */
+  exit (statfs (".", &fsd) != 1);
+  }],
+  fu_cv_sys_stat_fs_data=yes,
+  fu_cv_sys_stat_fs_data=no,
+  fu_cv_sys_stat_fs_data=no)])
+  AC_MSG_RESULT($fu_cv_sys_stat_fs_data)
+  if test $fu_cv_sys_stat_fs_data = yes; then
+    space=yes
+    AC_DEFINE(STAT_STATFS2_FS_DATA,1,[Whether statfs requires 2 arguments and struct fs_data is available])
+  fi
+fi



More information about the samba-cvs mailing list