summaryrefslogtreecommitdiff
path: root/source3/configure.in
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2002-07-15 10:35:28 +0000
committerAndrew Tridgell <tridge@samba.org>2002-07-15 10:35:28 +0000
commite90b65284812aaa5ff9e9935ce9bbad7791cbbcd (patch)
tree9e744d1dc2f93934a4b49166a37383d3cb2b2139 /source3/configure.in
parentec167dc9cc0ec2ee461837c25a371d2981744208 (diff)
downloadsamba-e90b65284812aaa5ff9e9935ce9bbad7791cbbcd.tar.gz
samba-e90b65284812aaa5ff9e9935ce9bbad7791cbbcd.tar.bz2
samba-e90b65284812aaa5ff9e9935ce9bbad7791cbbcd.zip
updated the 3.0 branch from the head branch - ready for alpha18
(This used to be commit 03ac082dcb375b6f3ca3d810a6a6367542bc23ce)
Diffstat (limited to 'source3/configure.in')
-rw-r--r--source3/configure.in461
1 files changed, 269 insertions, 192 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 9806594449..915c91e585 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -2,44 +2,172 @@ dnl -*- mode: m4-mode -*-
dnl Process this file with autoconf to produce a configure script.
AC_INIT(include/includes.h)
AC_CONFIG_HEADER(include/config.h)
-# we want to be compatible with older versions of Samba
+
+#################################################
+# Directory handling stuff to support both the
+# legacy SAMBA directories and FHS compliant
+# ones...
AC_PREFIX_DEFAULT(/usr/local/samba)
+AC_ARG_WITH(fhs,
+[ --with-fhs Use FHS-compliant paths (default=no)],
+ configdir="${sysconfdir}/samba"
+ lockdir="\${VARDIR}/cache/samba"
+ piddir="\$(VARDIR)/run/samba"
+ logfilebase="\${VARDIR}/log/samba"
+ privatedir="\${CONFIGDIR}/private"
+ swatdir="\${DATADIR}/samba/swat",
+ configdir="\$(LIBDIR)"
+ logfilebase="\$(VARDIR)"
+ lockdir="\${VARDIR}/locks"
+ piddir="\$(VARDIR)/locks"
+ privatedir="\${prefix}/private"
+ swatdir="\${prefix}/swat")
+
+#################################################
+# set private directory location
+AC_ARG_WITH(privatedir,
+[ --with-privatedir=DIR Where to put smbpasswd ($ac_default_prefix/private)],
+[ case "$withval" in
+ yes|no)
+ #
+ # Just in case anybody calls it without argument
+ #
+ AC_MSG_WARN([--with-privatedir called without argument - will use default])
+ ;;
+ * )
+ privatedir="$withval"
+ ;;
+ esac])
+
+#################################################
+# set lock directory location
+AC_ARG_WITH(lockdir,
+[ --with-lockdir=DIR Where to put lock files ($ac_default_prefix/var/locks)],
+[ case "$withval" in
+ yes|no)
+ #
+ # Just in case anybody calls it without argument
+ #
+ AC_MSG_WARN([--with-lockdir called without argument - will use default])
+ ;;
+ * )
+ lockdir="$withval"
+ ;;
+ esac])
+
+#################################################
+# set pid directory location
+AC_ARG_WITH(piddir,
+[ --with-piddir=DIR Where to put pid files ($ac_default_prefix/var/locks)],
+[ case "$withval" in
+ yes|no)
+ #
+ # Just in case anybody calls it without argument
+ #
+ AC_MSG_WARN([--with-piddir called without argument - will use default])
+ ;;
+ * )
+ piddir="$withval"
+ ;;
+ esac])
+
+#################################################
+# set SWAT directory location
+AC_ARG_WITH(swatdir,
+[ --with-swatdir=DIR Where to put SWAT files ($ac_default_prefix/swat)],
+[ case "$withval" in
+ yes|no)
+ #
+ # Just in case anybody does it
+ #
+ AC_MSG_WARN([--with-swatdir called without argument - will use default])
+ ;;
+ * )
+ swatdir="$withval"
+ ;;
+ esac])
+
+#################################################
+# set configuration directory location
+AC_ARG_WITH(configdir,
+[ --with-configdir=DIR Where to put configuration files (\$libdir)],
+[ case "$withval" in
+ yes|no)
+ #
+ # Just in case anybody does it
+ #
+ AC_MSG_WARN([--with-configdir called without argument - will use default])
+ ;;
+ * )
+ configdir="$withval"
+ ;;
+ esac])
+
+#################################################
+# set log directory location
+AC_ARG_WITH(logfilebase,
+[ --with-logfilebase=DIR Where to put log files (\$(VARDIR))],
+[ case "$withval" in
+ yes|no)
+ #
+ # Just in case anybody does it
+ #
+ AC_MSG_WARN([--with-logfilebase called without argument - will use default])
+ ;;
+ * )
+ logfilebase="$withval"
+ ;;
+ esac])
+
+AC_SUBST(configdir)
+AC_SUBST(lockdir)
+AC_SUBST(piddir)
+AC_SUBST(logfilebase)
+AC_SUBST(privatedir)
+AC_SUBST(swatdir)
+AC_SUBST(bindir)
+AC_SUBST(sbindir)
+
dnl Unique-to-Samba variables we'll be playing with.
AC_SUBST(SHELL)
AC_SUBST(RUNPROG)
AC_SUBST(MPROGS)
AC_SUBST(LDSHFLAGS)
+AC_SUBST(SONAMEFLAG)
AC_SUBST(SHLD)
AC_SUBST(HOST_OS)
AC_SUBST(PAM_MOD)
AC_SUBST(WRAP)
AC_SUBST(WRAP32)
+AC_SUBST(WRAPPROG)
AC_SUBST(PICFLAG)
AC_SUBST(PICSUFFIX)
AC_SUBST(POBAD_CC)
AC_SUBST(SHLIBEXT)
AC_SUBST(LIBSMBCLIENT_SHARED)
+AC_SUBST(LIBSMBCLIENT)
-# compile with optimisation and without debugging by default
+# compile with optimization and without debugging by default
CFLAGS="-O ${CFLAGS}"
-AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging [default=no]],
+AC_ARG_ENABLE(debug,
+[ --enable-debug Turn on compiler debugging information (default=no)],
[if eval "test x$enable_debug = xyes"; then
CFLAGS="${CFLAGS} -g"
fi])
-AC_ARG_ENABLE(developer, [ --enable-developer turn on developer warnings and debugging [default=no]],
+AC_ARG_ENABLE(developer, [ --enable-developer Turn on developer warnings and debugging (default=no)],
[if eval "test x$enable_developer = xyes"; then
CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
fi])
-AC_ARG_ENABLE(krb5developer, [ --enable-krb5developer turn on developer warnings and debugging, except -Wstrict-prototypes [default=no]],
+AC_ARG_ENABLE(krb5developer, [ --enable-krb5developer Turn on developer warnings and debugging, except -Wstrict-prototypes (default=no)],
[if eval "test x$enable_krb5developer = xyes"; then
CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
fi])
-AC_ARG_ENABLE(dmalloc, [ --enable-dmalloc enable heap debugging [default=no]])
+AC_ARG_ENABLE(dmalloc, [ --enable-dmalloc Enable heap debugging [default=no]])
if test "x$enable_dmalloc" = xyes
then
@@ -54,6 +182,10 @@ AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_AWK
+dnl Check if we use GNU ld
+LD=ld
+AC_PROG_LD_GNU
+
dnl needed before AC_TRY_COMPILE
AC_ISC_POSIX
@@ -175,7 +307,6 @@ case "$host_os" in
;;
esac
else
- DYNEXP="-dc -dp"
CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
AC_DEFINE(_LARGEFILE64_SOURCE)
AC_DEFINE(_FILE_OFFSET_BITS,64)
@@ -299,7 +430,7 @@ AC_CHECK_HEADERS(sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/i
AC_CHECK_HEADERS(sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h sys/socket.h)
AC_CHECK_HEADERS(sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h)
AC_CHECK_HEADERS(sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h)
-AC_CHECK_HEADERS(security/pam_modules.h security/_pam_macros.h ldap.h lber.h)
+AC_CHECK_HEADERS(security/pam_modules.h security/_pam_macros.h ldap.h lber.h dlfcn.h)
#
# HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
@@ -355,23 +486,28 @@ AC_CHECK_TYPE(wchar_t, unsigned short)
############################################
# for cups support we need libcups, and a handful of header files
-AC_CHECK_LIB(cups,httpConnect)
+AC_ARG_ENABLE(cups,
+[ --enable-cups Turn on CUPS support (default=auto)])
-# I wonder if there is a nicer way of doing this?
+if test x$enable_cups != xno; then
+ AC_PATH_PROG(CUPS_CONFIG, cups-config)
-if test x"$ac_cv_lib_cups_httpConnect" = x"yes"; then
- AC_CHECK_HEADERS(cups/cups.h cups/language.h)
- if test x"$ac_cv_header_cups_cups_h" = x"yes"; then
- if test x"$ac_cv_header_cups_language_h" = x"yes"; then
+ if test "x$CUPS_CONFIG" != x; then
AC_DEFINE(HAVE_CUPS)
- fi
+ CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`"
+ LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`"
+ LIBS="$LIBS `$CUPS_CONFIG --libs`"
fi
fi
############################################
-# we need libdl for PAM, the password database plugins and the new VFS code
-AC_CHECK_LIB(dl, dlopen, [LIBS="$LIBS -ldl";
- AC_DEFINE(HAVE_LIBDL)])
+# we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the new VFS code
+AC_CHECK_FUNCS(dlopen)
+if test x"$ac_cv_func_dlopen" = x"no"; then
+ AC_CHECK_LIB(dl, dlopen, [LIBS="$LIBS -ldl";
+ AC_DEFINE(HAVE_DLOPEN)])
+fi
+# dlopen/dlclose/dlsym/dlerror will be checked again later and defines will be set then
############################################
# check if the compiler can do immediate structures
@@ -601,7 +737,7 @@ else
RUNPROG=""
fi
-AC_CHECK_FUNCS(dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64)
+AC_CHECK_FUNCS(dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64)
AC_CHECK_FUNCS(fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid)
AC_CHECK_FUNCS(memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid)
AC_CHECK_FUNCS(strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent)
@@ -713,6 +849,7 @@ AC_LIBTESTFUNC(sec, getprpwnam)
# these are the defaults, good for lots of systems
HOST_OS="$host_os"
LDSHFLAGS="-shared"
+SONAMEFLAG="#"
SHLD="\${CC}"
PICFLAG=""
PICSUFFIX="po"
@@ -729,16 +866,23 @@ case "$host_os" in
LDSHFLAGS="-shared"
DYNEXP="-Wl,--export-dynamic"
PICFLAG="-fPIC"
+ SONAMEFLAG="-Wl,-soname="
AC_DEFINE(STAT_ST_BLOCKSIZE,512)
;;
- *solaris*)
- AC_DEFINE(SUNOS5)
+ *solaris*) AC_DEFINE(SUNOS5)
BLDSHARED="true"
- LDSHFLAGS="-h \$@ -G"
- if test "${ac_cv_prog_CC}" = "gcc"; then
+ LDSHFLAGS="-G"
+ SONAMEFLAG="-h "
+ if test "${GCC}" = "yes"; then
PICFLAG="-fPIC"
+ if test "${ac_cv_prog_gnu_ld}" = "yes"; then
+ DYNEXP="-Wl,-E"
+ fi
else
PICFLAG="-KPIC"
+ ## ${CFLAGS} added for building 64-bit shared
+ ## libs using Sun's Compiler
+ LDSHFLAGS="-G \${CFLAGS}"
POBAD_CC=""
PICSUFFIX="po.o"
fi
@@ -746,11 +890,14 @@ case "$host_os" in
;;
*sunos*) AC_DEFINE(SUNOS4)
BLDSHARED="true"
- LDSHFLAGS="-Wl,-h,\$@ -G"
+ LDSHFLAGS="-G"
+ SONAMEFLAG="-Wl,-h,"
PICFLAG="-KPIC" # Is this correct for SunOS
;;
*bsd*) BLDSHARED="true"
- LDSHFLAGS="-Wl,-soname,\$@ -shared"
+ LDSHFLAGS="-shared"
+ DYNEXP="-Wl,-Bdynamic"
+ SONAMEFLAG="-Wl,-soname,"
PICFLAG="-fPIC"
AC_DEFINE(STAT_ST_BLOCKSIZE,512)
;;
@@ -761,9 +908,10 @@ case "$host_os" in
esac
ATTEMPT_WRAP32_BUILD=yes
BLDSHARED="true"
- LDSHFLAGS="-soname \$@ -shared"
+ LDSHFLAGS="-set_version sgi1.0 -shared"
+ SONAMEFLAG="-soname "
SHLD="\${LD}"
- if test "${ac_cv_prog_CC}" = "gcc"; then
+ if test "${GCC}" = "yes"; then
PICFLAG="-fPIC"
else
PICFLAG="-KPIC"
@@ -773,16 +921,25 @@ case "$host_os" in
*aix*) AC_DEFINE(AIX)
BLDSHARED="true"
LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
+ DYNEXP="-Wl,-brtl,-bexpall"
+ if test "${GCC}" = "yes"; then
+ PICFLAG="-O2"
+ else
PICFLAG="-O2 -qmaxmem=6000"
+ ## for funky AIX compiler using strncpy()
+ CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT"
+ fi
+
AC_DEFINE(STAT_ST_BLOCKSIZE,DEV_BSIZE)
;;
*hpux*) AC_DEFINE(HPUX)
SHLIBEXT="sl"
# Use special PIC flags for the native HP-UX compiler.
if test $ac_cv_prog_cc_Ae = yes; then
- SHLD="/usr/bin/ld"
BLDSHARED="true"
- LDSHFLAGS="-B symbolic -b -z +h \$@"
+ SHLD="/usr/bin/ld"
+ LDSHFLAGS="-B symbolic -b -z"
+ SONAMEFLAG="+h "
PICFLAG="+z"
fi
DYNEXP="-Wl,-E"
@@ -791,31 +948,28 @@ case "$host_os" in
*qnx*) AC_DEFINE(QNX);;
*osf*) AC_DEFINE(OSF1)
BLDSHARED="true"
- LDSHFLAGS="-Wl,-soname,\$@ -shared"
+ LDSHFLAGS="-shared"
+ SONAMEFLAG="-Wl,-soname,"
PICFLAG="-fPIC"
;;
- *sco*)
- AC_DEFINE(SCO)
- ;;
+ *sco*) AC_DEFINE(SCO);;
*unixware*) AC_DEFINE(UNIXWARE)
BLDSHARED="true"
- LDSHFLAGS="-Wl,-soname,\$@ -shared"
+ LDSHFLAGS="-shared"
+ SONAMEFLAG="-Wl,-soname,"
PICFLAG="-KPIC"
;;
*next2*) AC_DEFINE(NEXT2);;
*dgux*) AC_CHECK_PROG( ROFF, groff, [groff -etpsR -Tascii -man]);;
*sysv4*)
case "$host" in
- *-univel-*)
- if [ test "$GCC" != yes ]; then
+ *-univel-*) if [ test "$GCC" != yes ]; then
AC_DEFINE(HAVE_MEMSET)
fi
LDSHFLAGS="-G"
DYNEXP="-Bexport"
;;
- *mips-sni-sysv4*)
- AC_DEFINE(RELIANTUNIX)
- ;;
+ *mips-sni-sysv4*) AC_DEFINE(RELIANTUNIX);;
esac
;;
@@ -946,7 +1100,7 @@ AC_TRY_COMPILE([
#include <dirent.h>],
[struct dirent64 de;],
samba_cv_HAVE_STRUCT_DIRENT64=yes,samba_cv_HAVE_STRUCT_DIRENT64=no)])
-if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
+if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes" && test x"$ac_cv_func_readdir64" = x"yes"; then
AC_DEFINE(HAVE_STRUCT_DIRENT64)
fi
@@ -1025,6 +1179,14 @@ if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
AC_DEFINE(HAVE_GETTIMEOFDAY_TZ)
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)
+fi
+
AC_CACHE_CHECK([for C99 vsnprintf],samba_cv_HAVE_C99_VSNPRINTF,[
AC_TRY_RUN([
#include <sys/types.h>
@@ -1417,7 +1579,7 @@ fi
AC_CACHE_CHECK([whether getpass should be replaced],samba_cv_REPLACE_GETPASS,[
SAVE_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
+CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/popt -I${srcdir-.}/smbwrapper"
AC_TRY_COMPILE([
#define REPLACE_GETPASS 1
#define NO_CONFIG_H 1
@@ -1697,7 +1859,8 @@ AC_ARG_WITH(smbwrapper,
yes)
AC_MSG_RESULT(yes)
AC_DEFINE(WITH_SMBWRAPPER)
- WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
+ WRAPPROG="bin/smbsh"
+ WRAP="bin/smbwrapper.$SHLIBEXT"
if test x$ATTEMPT_WRAP32_BUILD = x; then
WRAP32=""
@@ -1709,10 +1872,12 @@ AC_ARG_WITH(smbwrapper,
if test x$PICFLAG = x; then
echo No support for PIC code - disabling smbwrapper and smbsh
+ WRAPPROG=""
WRAP=""
WRAP32=""
elif test x$ac_cv_func_syscall = xno; then
AC_MSG_RESULT([No syscall() -- disabling smbwrapper and smbsh])
+ WRAPPROG=""
WRAP=""
WRAP32=""
fi
@@ -1827,6 +1992,16 @@ AC_CHECK_LIB(lber, ber_scanf, [LIBS="$LIBS -llber"])
if test x$have_ldap != xyes; then
AC_CHECK_LIB(ldap, ldap_domain2hostlist, [LIBS="$LIBS -lldap";
AC_DEFINE(HAVE_LDAP)])
+
+ ########################################################
+ # If we have LDAP, does it's rebind procedure take 2 or 3 arguments?
+ # Check found in pam_ldap 145.
+ AC_CHECK_FUNCS(ldap_set_rebind_proc)
+ AC_CACHE_CHECK(whether ldap_set_rebind_proc takes 3 arguments, pam_ldap_cv_ldap_set_rebind_proc, [
+ AC_TRY_COMPILE([
+ #include <lber.h>
+ #include <ldap.h>], [ldap_set_rebind_proc(0, 0, 0);], [pam_ldap_cv_ldap_set_rebind_proc=3], [pam_ldap_cv_ldap_set_rebind_proc=2]) ])
+ AC_DEFINE_UNQUOTED(LDAP_SET_REBIND_PROC_ARGS, $pam_ldap_cv_ldap_set_rebind_proc)
fi
#################################################
@@ -1978,24 +2153,6 @@ AC_ARG_WITH(tdbsam,
)
#################################################
-# check for a LDAP password database
-AC_MSG_CHECKING(whether to use LDAP SAM database)
-AC_ARG_WITH(ldapsam,
-[ --with-ldapsam Include experimental LDAP SAM support (default=no)],
-[ case "$withval" in
- yes)
- AC_MSG_RESULT(yes)
- AC_DEFINE(WITH_LDAP_SAM)
- LIBS="-lldap -llber $LIBS"
- ;;
- *)
- AC_MSG_RESULT(no)
- ;;
- esac ],
- AC_MSG_RESULT(no)
-)
-
-#################################################
# check for a NISPLUS password database
AC_MSG_CHECKING(whether to use NISPLUS SAM database)
AC_ARG_WITH(nisplussam,
@@ -2036,74 +2193,6 @@ AC_ARG_WITH(nisplus-home,
)
#################################################
-# check for the secure socket layer
-AC_MSG_CHECKING(whether to use SSL)
-AC_ARG_WITH(ssl,
-[ --with-ssl Include SSL support (default=no)
- --with-sslinc=DIR Where the SSL includes are (defaults to /usr/local/ssl/include)
- --with-ssllib=DIR Where the SSL libraries are (defaults to /usr/local/ssl/lib)],
-[ case "$withval" in
- yes)
- AC_MSG_RESULT(yes)
- AC_DEFINE(WITH_SSL)
- withval="/usr/local/ssl" # default
-
- if test "${with_sslinc+set}" = set; then
-
- withval="$with_sslinc"
- case "$withval" in
- yes|no)
- echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w
- CFLAGS="-I/usr/local/ssl/include $CFLAGS"
- ;;
- * )
- CFLAGS="-I${withval} $CFLAGS"
- ;;
- esac
-
- else
-
- CFLAGS="-I/usr/local/ssl/include $CFLAGS"
-
- fi
-
- if test "${with_ssllib+set}" = set; then
-
- withval="$with_ssllib"
- case "$withval" in
- yes|no)
- echo "configure: warning: --with-ssllib called without argument - will use default" 1>&w
- LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
- ;;
- * )
- LDFLAGS="-L${withval}/lib $LDFLAGS"
- ;;
- esac
-
- else
-
- LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
-
- fi
-
- LIBS="-lssl -lcrypto $LIBS"
-
-# if test ! -d ${withval}; then
-# echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
-# exit 1
-# fi
-
- CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS" # Damn, SSLeay defines its own
-
- ;;
- *)
- AC_MSG_RESULT(no)
- ;;
- esac ],
- AC_MSG_RESULT(no)
-)
-
-#################################################
# check for syslog logging
AC_MSG_CHECKING(whether to use syslog logging)
AC_ARG_WITH(syslog,
@@ -2198,69 +2287,6 @@ AC_ARG_WITH(utmp,
)
#################################################
-# set private directory location
-AC_ARG_WITH(privatedir,
-[ --with-privatedir=DIR Where to put smbpasswd ($ac_default_prefix/private)],
-[ case "$withval" in
- yes|no)
- #
- # Just in case anybody calls it without argument
- #
- AC_MSG_WARN([--with-privatedir called without argument - will use default])
- privatedir='${prefix}/private'
- ;;
- * )
- privatedir="$withval"
- ;;
- esac
- AC_SUBST(privatedir)],
- [privatedir='${prefix}/private'
- AC_SUBST(privatedir)]
-)
-
-#################################################
-# set lock directory location
-AC_ARG_WITH(lockdir,
-[ --with-lockdir=DIR Where to put lock files ($ac_default_prefix/var/locks)],
-[ case "$withval" in
- yes|no)
- #
- # Just in case anybody calls it without argument
- #
- AC_MSG_WARN([--with-lockdir called without argument - will use default])
- lockdir='$(VARDIR)/locks'
- ;;
- * )
- lockdir="$withval"
- ;;
- esac
- AC_SUBST(lockdir)],
- [lockdir='$(VARDIR)/locks'
- AC_SUBST(lockdir)]
-)
-
-#################################################
-# set SWAT directory location
-AC_ARG_WITH(swatdir,
-[ --with-swatdir=DIR Where to put SWAT files ($ac_default_prefix/swat)],
-[ case "$withval" in
- yes|no)
- #
- # Just in case anybody does it
- #
- AC_MSG_WARN([--with-swatdir called without argument - will use default])
- swatdir='${prefix}/swat'
- ;;
- * )
- swatdir="$withval"
- ;;
- esac
- AC_SUBST(swatdir)],
- [swatdir='${prefix}/swat'
- AC_SUBST(swatdir)]
-)
-
-#################################################
# choose native language(s) of man pages
AC_MSG_CHECKING(chosen man pages' language(s))
AC_ARG_WITH(manpages-langs,
@@ -2285,6 +2311,32 @@ AC_ARG_WITH(manpages-langs,
)
#################################################
+# should we build libsmbclient?
+
+LIBSMBCLIENT_SHARED=
+LIBSMBCLIENT=
+AC_MSG_CHECKING(whether to build the libsmbclient shared library)
+AC_ARG_WITH(libsmbclient,
+[ --with-libsmbclient Build the libsmbclient shared library (default=yes)],
+[ case "$withval" in
+ no)
+ AC_MSG_RESULT(no)
+ ;;
+ *)
+ if test $BLDSHARED = true; then
+ LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
+ LIBSMBCLIENT=libsmbclient
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no shared library support)
+ fi
+ ;;
+ esac ],
+ AC_MSG_RESULT(yes)
+)
+
+
+#################################################
# these tests are taken from the GNU fileutils package
AC_CHECKING(how to get filesystem space usage)
space=no
@@ -2656,6 +2708,31 @@ else
AC_MSG_RESULT(no$winbind_no_reason)
fi
+
+# Check for FreeBSD problem with getgroups
+# It returns EGID too many times in the list of groups
+# and causes a security problem
+AC_CACHE_CHECK([whether or not getgroups returns EGID too many times],
+ samba_cv_have_getgroups_too_many_egids,[AC_TRY_RUN([
+#include <sys/types.h>
+#include <stdio.h>
+
+int main(int argc, char *argv[])
+{
+ gid_t groups[10];
+ int n = 10;
+
+ n = getgroups(n, &groups);
+ /* Could actually pass back the number of EGIDs there ... */
+ exit((n > 1 && groups[0] == getegid() && groups[1] == getegid()) ? 1 : 0);
+}],
+ samba_cv_have_getgroups_too_many_egids=no,samba_cv_have_getgroups_too_many_egids=yes, samba_cv_have_getgroups_too_many_egids=cross)])
+if test x"$samba_cv_have_getgroups_too_many_egids" = x"yes"; then
+ AC_DEFINE(HAVE_GETGROUPS_TOO_MANY_EGIDS)
+fi
+
+
+
# Substitution time!
AC_SUBST(WINBIND_TARGETS)
@@ -2743,7 +2820,7 @@ AC_TRY_RUN([#include "${srcdir-.}/tests/summary.c"],
builddir=`pwd`
AC_SUBST(builddir)
-AC_OUTPUT(include/stamp-h Makefile)
+AC_OUTPUT(include/stamp-h Makefile script/findsmb)
#################################################
# Print very concise instructions on building/use