r18219: move some more portability checks out of samba4 and info lib/replace
authorAndrew Tridgell <tridge@samba.org>
Thu, 7 Sep 2006 12:10:06 +0000 (12:10 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:17:52 +0000 (14:17 -0500)
(This used to be commit 50318dc55ed5eb70adb02a5680498fad3c3e590d)

source4/build/m4/rewrite.m4 [deleted file]
source4/configure.ac
source4/lib/replace/libreplace.m4

diff --git a/source4/build/m4/rewrite.m4 b/source4/build/m4/rewrite.m4
deleted file mode 100644 (file)
index 62804a8..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-AC_SYS_LARGEFILE
-
-case "$host_os" in
-       *linux*)   AC_DEFINE(LINUX,1,[Whether the host os is linux])
-               ;;
-       *solaris*) AC_DEFINE(SUNOS5,1,[Whether the host os is solaris])
-               AC_DEFINE(BROKEN_GETGRNAM,1,[Does getgrnam work correctly])
-               ;;
-       *sunos*) AC_DEFINE(SUNOS4,1,[Whether the host os is sunos4])
-               AC_DEFINE(BROKEN_GETGRNAM,1,[Does getgrnam work correctly])
-               ;;
-       *netbsd* | *freebsd* | *dragonfly* )  
-               AC_DEFINE(BROKEN_GETGRNAM,1,[Does getgrnam work correctly])
-               ;;
-       *openbsd*)
-               AC_DEFINE(BROKEN_GETGRNAM,1,[Does getgrnam work correctly])
-               ;;
-       *irix*) AC_DEFINE(IRIX,1,[Whether the host os is irix])
-               case "$host_os" in
-               *irix6*) AC_DEFINE(IRIX6,1,[Whether the host os is irix6])
-               ;;
-               esac
-               ;;
-       *aix*) AC_DEFINE(AIX,1,[Whether the host os is aix])
-               AC_DEFINE(BROKEN_STRNLEN,1,[Does strnlen work correctly])
-               AC_DEFINE(BROKEN_STRNDUP,1,[Does strndup work correctly])
-               ;;
-       *hpux*) AC_DEFINE(HPUX,1,[Whether the host os is HPUX])
-               ;;
-       *qnx*) AC_DEFINE(QNX,1,[Whether the host os is qnx])
-               ;;
-       *osf*) AC_DEFINE(OSF1,1,[Whether the host os is osf1])
-               AC_DEFINE(BROKEN_GETGRNAM,1,[Does getgrnam work correctly])
-               ;;
-       *sco*) AC_DEFINE(SCO,1,[Whether the host os is sco unix])
-               ;;
-       *unixware*) AC_DEFINE(UNIXWARE,1,[Whether the host os is unixware])
-               ;;
-       *next2*) AC_DEFINE(NEXT2,1,[Whether the host os is NeXT v2])
-               ;;
-       *dgux*) AC_CHECK_PROG( ROFF, groff, [groff -etpsR -Tascii -man])
-               ;;
-       *sysv4*) AC_DEFINE(SYSV,1,[Whether this is a system V system])
-               case "$host" in
-                       *-univel-*)
-                               if [ test "$GCC" != yes ]; then
-                                       AC_DEFINE(HAVE_MEMSET,1,[Whether memset() is available])
-                               fi
-                               ;;
-                       *mips-sni-sysv4*) AC_DEFINE(RELIANTUNIX,1,[Whether the host os is reliantunix]);;
-               esac
-               ;;
-       *sysv5*) AC_DEFINE(SYSV,1,[Whether this is a system V system])
-               if [ test "$GCC" != yes ]; then
-                       AC_DEFINE(HAVE_MEMSET,1,[Whether memset() is available])
-               fi
-               ;;
-       *vos*)
-               ;;
-       *darwin*)   AC_DEFINE(DARWINOS,1,[Whether the host os is Darwin/MacOSX])
-               ;;
-esac
-
-
-AC_CHECK_HEADERS(stdarg.h string.h)
-
-AC_TYPE_SIGNAL
-AC_TYPE_UID_T
-AC_TYPE_MODE_T
-AC_TYPE_OFF_T
-AC_TYPE_SIZE_T
-AC_TYPE_PID_T
-AC_STRUCT_ST_RDEV
-AC_CHECK_TYPE(ino_t,unsigned)
-AC_CHECK_TYPE(loff_t,off_t)
-AC_CHECK_TYPE(offset_t,loff_t)
-AC_CHECK_TYPES(long long)
-
-AC_FUNC_MEMCMP
-
-AC_CHECK_FUNCS(pipe strftime srandom random srand rand usleep setbuffer)
-
-AC_CACHE_CHECK([for working mmap],samba_cv_HAVE_MMAP,[
-AC_TRY_RUN([#include "${srcdir-.}/build/tests/shared_mmap.c"],
-           samba_cv_HAVE_MMAP=yes,samba_cv_HAVE_MMAP=no,samba_cv_HAVE_MMAP=cross)])
-if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
-    AC_DEFINE(HAVE_MMAP,1,[Whether mmap works])
-fi
-
-AC_CACHE_CHECK([for O_DIRECT flag to open(2)],samba_cv_HAVE_OPEN_O_DIRECT,[
-AC_TRY_COMPILE([
-#include <unistd.h>
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif],
-[int fd = open("/dev/null", O_DIRECT);],
-samba_cv_HAVE_OPEN_O_DIRECT=yes,samba_cv_HAVE_OPEN_O_DIRECT=no)])
-if test x"$samba_cv_HAVE_OPEN_O_DIRECT" = x"yes"; then
-    AC_DEFINE(HAVE_OPEN_O_DIRECT,1,[Whether the open(2) accepts O_DIRECT])
-fi 
index 9bf9ef866561a3a2dc63d2d7336b814b1650d7d9..029921baa0e26983b906724b636b69d3284288cd 100644 (file)
@@ -16,7 +16,6 @@ SMB_EXT_LIB(DL, $LIBDL)
 m4_include(lib/replace/win32/config.m4)
 m4_include(lib/replace/repdir/config.m4)
 m4_include(lib/smbreadline/readline.m4)
-m4_include(build/m4/rewrite.m4)
 m4_include(heimdal_build/config.m4)
 m4_include(lib/util/fault.m4)
 m4_include(lib/util/signal.m4)
index 1b3258e184703db0057338244e7201fa315c79c8..c72de29b1efc44aa4109409b26e4186efda275a1 100644 (file)
@@ -14,6 +14,8 @@ done
 LIBREPLACEOBJ="dlfcn.o getpass.o replace.o snprintf.o timegm.o"
 AC_SUBST(LIBREPLACEOBJ)
 
+AC_SYS_LARGEFILE
+
 AC_CHECK_HEADERS([stdint.h inttypes.h])
 AC_CHECK_TYPE(uint_t, unsigned int)
 AC_CHECK_TYPE(uint8_t, unsigned char)
@@ -25,6 +27,22 @@ AC_CHECK_TYPE(intptr_t, unsigned long long)
 AC_CHECK_TYPE(uint32_t, unsigned long)
 AC_CHECK_TYPE(ssize_t, int)
 
+AC_TYPE_SIGNAL
+AC_TYPE_UID_T
+AC_TYPE_MODE_T
+AC_TYPE_OFF_T
+AC_TYPE_SIZE_T
+AC_TYPE_PID_T
+AC_STRUCT_ST_RDEV
+AC_CHECK_TYPE(ino_t,unsigned)
+AC_CHECK_TYPE(loff_t,off_t)
+AC_CHECK_TYPE(offset_t,loff_t)
+AC_CHECK_TYPES(long long)
+
+AC_FUNC_MEMCMP
+
+AC_CHECK_FUNCS(pipe strftime srandom random srand rand usleep setbuffer)
+
 AC_CHECK_HEADERS(stdbool.h)
 
 AC_CHECK_TYPE(bool, 
@@ -229,3 +247,16 @@ if test x"$samba_cv_sig_atomic_t" = x"yes"; then
 fi
 
 
+AC_CACHE_CHECK([for O_DIRECT flag to open(2)],samba_cv_HAVE_OPEN_O_DIRECT,[
+AC_TRY_COMPILE([
+#include <unistd.h>
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif],
+[int fd = open("/dev/null", O_DIRECT);],
+samba_cv_HAVE_OPEN_O_DIRECT=yes,samba_cv_HAVE_OPEN_O_DIRECT=no)])
+if test x"$samba_cv_HAVE_OPEN_O_DIRECT" = x"yes"; then
+    AC_DEFINE(HAVE_OPEN_O_DIRECT,1,[Whether the open(2) accepts O_DIRECT])
+fi 
+
+