Remove sys_chroot() - libreplace already provides an alternative.
[kai/samba.git] / source3 / configure.in
index 9388ebabc01081d9c77447eab621d4e456686686..c2a5d1a75f7fd2ea5221dfdc460ace2ac83dbb41 100644 (file)
@@ -314,14 +314,6 @@ fi
 fi
 fi
 
-dnl Check if the C compiler understands volatile (it should, being ANSI).
-AC_CACHE_CHECK([that the C compiler understands volatile],samba_cv_volatile, [
-    AC_TRY_COMPILE([#include <sys/types.h>],[volatile int i = 0],
-       samba_cv_volatile=yes,samba_cv_volatile=no)])
-if test x"$samba_cv_volatile" = x"yes"; then
-   AC_DEFINE(HAVE_VOLATILE, 1, [Whether the C compiler understands volatile])
-fi
-
 ############################################
 # check if the compiler can handle negative enum values
 # and don't truncate the values to INT_MAX
@@ -657,9 +649,11 @@ AC_SUBST(LIBREPLACE_OBJS)
 
 # add -ldl to the global LIBS
 LIBS="${LIBS} ${LIBDL} ${LIBREPLACE_NETWORK_LIBS}"
+AUTH_LIBS="${AUTH_LIBS} ${CRYPT_LIBS}"
+
 
 AC_CHECK_HEADERS(aio.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h rpc/nettype.h)
-AC_CHECK_HEADERS(unistd.h utime.h grp.h sys/id.h memory.h alloca.h)
+AC_CHECK_HEADERS(unistd.h grp.h sys/id.h memory.h alloca.h)
 AC_CHECK_HEADERS(limits.h float.h pthread.h)
 AC_CHECK_HEADERS(rpc/rpc.h rpcsvc/nis.h rpcsvc/ypclnt.h)
 AC_CHECK_HEADERS(sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/prctl.h)
@@ -1031,20 +1025,20 @@ if test x"$ac_cv_func_execl" = x"no"; then
     EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/smbrun\$(EXEEXT)"
 fi
 
-AC_CHECK_FUNCS(waitpid getcwd strdup strndup strnlen strerror chown fchown lchown chmod fchmod chroot link mknod mknod64)
+AC_CHECK_FUNCS(waitpid getcwd strdup strndup strnlen strerror fchown chmod fchmod mknod mknod64)
 AC_CHECK_FUNCS(strtol strtoll strtoul strtoull strtouq __strtoull)
-AC_CHECK_FUNCS(fstat strchr utime utimes chflags)
+AC_CHECK_FUNCS(fstat strchr chflags)
 AC_CHECK_FUNCS(getrlimit fsync fdatasync memset strlcpy strlcat setpgid)
 AC_CHECK_FUNCS(memmove setsid glob strpbrk pipe crypt16 getauthuid)
 AC_CHECK_FUNCS(strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent)
-AC_CHECK_FUNCS(initgroups select poll rdchk getgrnam getgrent pathconf realpath)
+AC_CHECK_FUNCS(initgroups select poll rdchk getgrnam getgrent pathconf)
 AC_CHECK_FUNCS(setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate chsize stat64 fstat64)
 AC_CHECK_FUNCS(lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64)
 AC_CHECK_FUNCS(fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf)
 AC_CHECK_FUNCS(opendir64 readdir64 seekdir64 telldir64 rewinddir64 closedir64)
 AC_CHECK_FUNCS(getpwent_r)
 AC_CHECK_FUNCS(getdents getdents64)
-AC_CHECK_FUNCS(srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink)
+AC_CHECK_FUNCS(srandom random srand rand setenv usleep strcasecmp fcvt fcvtl)
 AC_CHECK_FUNCS(syslog vsyslog timegm)
 AC_CHECK_FUNCS(setlocale nl_langinfo)
 AC_CHECK_FUNCS(nanosleep)
@@ -2495,7 +2489,7 @@ if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
 fi
 
 AC_CACHE_CHECK([for inotify support],samba_cv_HAVE_INOTIFY,[
-AC_CHECK_HEADERS(linux/inotify.h asm/unistd.h)
+AC_CHECK_HEADERS(linux/inotify.h asm/unistd.h sys/inotify.h)
 AC_CHECK_FUNCS(inotify_init)
 AC_HAVE_DECL(__NR_inotify_init, [#include <asm/unistd.h>])
 ],
@@ -4318,12 +4312,6 @@ AC_ARG_WITH(pam_smbpass,
 )
 
 
-###############################################
-# test for where we get crypt() from
-AC_SEARCH_LIBS(crypt, [crypt],
-  [test "$ac_cv_search_crypt" = "none required" || AUTH_LIBS="-lcrypt $AUTH_LIBS"
-  AC_DEFINE(HAVE_CRYPT,1,[Whether the system has the crypt() function])])
-
 ##
 ## moved after the check for -lcrypt in order to
 ## ensure that the necessary libraries are included
@@ -6222,6 +6210,8 @@ AC_ARG_ENABLE(merged-build,
 [AS_HELP_STRING([--enable-merged-build], [Build Samba 4 as well])], 
 [ enable_merged_build=$enableval ], [ enable_merged_build=auto ])
 
+m4_include(../lib/zlib/zlib.m4)
+
 if test x$enable_merged_build = xauto; then
        merged_build_possible=yes
 
@@ -6240,7 +6230,10 @@ if test x$enable_merged_build = xauto; then
        AC_MSG_CHECKING([whether it would be possible to do a merged build])
        AC_MSG_RESULT([$merged_build_possible])
 
-       dnl FIXME: enable_merged_build=$merged_build_possible
+       # Enable merged build automatically if possible, when in developer mode
+       if test "x$developer" = xyes; then
+               enable_merged_build=$merged_build_possible
+       fi
 fi
 
 if test x$enable_merged_build = xyes; then
@@ -6248,7 +6241,6 @@ if test x$enable_merged_build = xyes; then
        m4_include(samba4.m4)
 fi
 
-m4_include(../lib/zlib/zlib.m4)
 AC_SUBST(ZLIB_LIBS)
 AC_SUBST(ZLIB_OBJS)
 AC_ZLIB([ZLIB_OBJS=""], [