dnl Process this file with autoconf to produce a configure script.
-dnl We must use autotools 2.53 or above
-AC_PREREQ(2.53)
+dnl We must use autotools 2.54 or above
+AC_PREREQ(2.54)
AC_INIT([Samba],[3],[samba-technical@samba.org])
AC_SUBST(INSTALLLIBCMD_A)
AC_SUBST(UNINSTALLLIBCMD_SH)
AC_SUBST(UNINSTALLLIBCMD_A)
-AC_SUBST(INSTALL_LIBADDNS)
-AC_SUBST(UNINSTALL_LIBADDNS)
-AC_SUBST(LIBADDNS_SHARED)
-AC_SUBST(LIBADDNS)
AC_SUBST(INSTALL_LIBWBCLIENT)
AC_SUBST(UNINSTALL_LIBWBCLIENT)
+AC_SUBST(LIBWBCLIENT_SHARED_TARGET)
AC_SUBST(LIBWBCLIENT_SHARED)
+AC_SUBST(LIBWBCLIENT_STATIC_TARGET)
AC_SUBST(LIBWBCLIENT_STATIC)
+AC_SUBST(LIBWBCLIENT_SOVER)
AC_SUBST(LIBWBCLIENT)
AC_SUBST(WINBIND_LIBS)
AC_SUBST(LIBSAMBAUTIL_SHARED)
-AC_SUBST(INSTALL_LIBSMBCLIENT)
-AC_SUBST(UNINSTALL_LIBSMBCLIENT)
-AC_SUBST(LIBSMBCLIENT_SHARED)
-AC_SUBST(LIBSMBCLIENT)
-AC_SUBST(INSTALL_LIBSMBSHAREMODES)
-AC_SUBST(UNINSTALL_LIBSMBSHAREMODES)
-AC_SUBST(LIBSMBSHAREMODES_SHARED)
-AC_SUBST(LIBSMBSHAREMODES)
-
AC_SUBST(PRINT_LIBS)
AC_SUBST(AUTH_LIBS)
AC_SUBST(ACL_LIBS)
# and don't truncate the values to INT_MAX
# a runtime test is needed here
AC_SUBST(PIDL_ARGS)
-AC_CACHE_CHECK([that the C compiler understands negative enum values],SMB_BUILD_CC_NEGATIVE_ENUM_VALUES, [
+AC_CACHE_CHECK([that the C compiler understands negative enum values],samba_cv_CC_NEGATIVE_ENUM_VALUES, [
AC_TRY_RUN(
[
#include <stdio.h>
return 0;
}
],
- SMB_BUILD_CC_NEGATIVE_ENUM_VALUES=yes,SMB_BUILD_CC_NEGATIVE_ENUM_VALUES=no)])
-if test x"$SMB_BUILD_CC_NEGATIVE_ENUM_VALUES" != x"yes"; then
+ samba_cv_CC_NEGATIVE_ENUM_VALUES=yes,samba_cv__CC_NEGATIVE_ENUM_VALUES=no)])
+if test x"$samba_cv_CC_NEGATIVE_ENUM_VALUES" != x"yes"; then
AC_MSG_WARN([using --unit-enums for pidl])
PIDL_ARGS="$PIDL_ARGS --uint-enums"
fi
CPPFLAGS="${CPPFLAGS} ${SAMBA_CONFIGURE_CPPFLAGS}"
AC_LIBREPLACE_BROKEN_CHECKS
+AC_LIBREPLACE_NETWORK_CHECKS
CPPFLAGS="${SAVE_CPPFLAGS}"
AC_SUBST(LIBREPLACE_OBJS)
# add -ldl to the global LIBS
-LIBS="${LIBS} ${LIBDL}"
+LIBS="${LIBS} ${LIBDL} ${LIBREPLACE_NETWORK_LIBS}"
-AC_CHECK_HEADERS(aio.h arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h rpc/nettype.h)
+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(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)
-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/un.h ifaddrs.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/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(sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h)
AC_CHECK_HEADERS(sys/sysmacros.h)
AC_CHECK_HEADERS(sys/syslog.h syslog.h)
AC_CHECK_HEADERS(langinfo.h locale.h)
AC_PATH_PROG(CUPS_CONFIG, cups-config)
if test "x$CUPS_CONFIG" != x; then
- AC_DEFINE(HAVE_CUPS,1,[Whether we have CUPS])
+
+ ac_save_CFLAGS=$CFLAGS
+ ac_save_LDFLAGS=$LDFLAGS
+ ac_save_PRINT_LIBS=$PRINT_LIBS
CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`"
LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`"
PRINT_LIBS="$PRINT_LIBS `$CUPS_CONFIG --libs`"
+ AC_CHECK_HEADERS(cups/cups.h cups/language.h)
+ if test x"$ac_cv_header_cups_cups_h" = xyes -a \
+ x"$ac_cv_header_cups_language_h" = xyes; then
+ AC_DEFINE(HAVE_CUPS,1,[Whether we have CUPS])
+ samba_cv_HAVE_CUPS=yes
+ else
+ AC_MSG_WARN([cups-config around but cups-devel not installed])
+ CFLAGS=$ac_save_CFLAGS
+ LDFLAGS=$ac_save_LDFLAGS
+ PRINT_LIBS=$ac_save_PRINT_LIBS
+ fi
+
elif test x"$enable_cups" = x"yes"; then
AC_MSG_ERROR(Cups support required but cups-config not located. Make sure cups-devel related files are installed.)
fi
[AS_HELP_STRING([--enable-iprint], [Turn on iPrint support (default=yes if cups is yes)])])
if test x$enable_iprint != xno; then
- if test "x$CUPS_CONFIG" != x; then
+ if test x"$samba_cv_HAVE_CUPS" = xyes; then
AC_DEFINE(HAVE_IPRINT,1,[Whether we have iPrint])
elif test x"$enable_iprint" = x"yes"; then
AC_MSG_ERROR(iPrint support required but cups not enabled. Make sure cups-devel related files are installed and that cups is enabled.)
AC_DEFINE(HAVE_COMPILER_WILL_OPTIMIZE_OUT_FNS,1,[Whether the compiler will optimize out function calls])
fi
-############################################
-# check for unix domain sockets
-AC_CACHE_CHECK([for unix domain sockets],samba_cv_unixsocket, [
- AC_TRY_COMPILE([
-#include <sys/types.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <sys/socket.h>
-#include <sys/un.h>],
-[
- struct sockaddr_un sunaddr;
- sunaddr.sun_family = AF_UNIX;
-],
- samba_cv_unixsocket=yes,samba_cv_unixsocket=no)])
-if test x"$samba_cv_unixsocket" = x"yes"; then
- AC_DEFINE(HAVE_UNIXSOCKET,1,[If we need to build with unixsocket support])
-fi
-
#############################################
# check for fd passing struct via msg_control
AC_CACHE_CHECK([for fd passing via msg_control],samba_cv_msghdr_msg_control, [
[],
[$TERMLIBS])
-# The following test taken from the cvs sources
-# If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
-# The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
-# libsocket.so which has a bad implementation of gethostbyname (it
-# only looks in /etc/hosts), so we only look for -lsocket if we need
-# it.
-AC_CHECK_FUNCS(connect)
-if test x"$ac_cv_func_connect" = x"no"; then
- case "$LIBS" in
- *-lnsl*) ;;
- *) AC_CHECK_LIB(nsl_s, connect) ;;
- esac
- case "$LIBS" in
- *-lnsl*) ;;
- *) AC_CHECK_LIB(nsl, connect) ;;
- esac
- case "$LIBS" in
- *-lsocket*) ;;
- *) AC_CHECK_LIB(socket, connect) ;;
- esac
- case "$LIBS" in
- *-linet*) ;;
- *) AC_CHECK_LIB(inet, connect) ;;
- esac
- dnl We can't just call AC_CHECK_FUNCS(connect) here, because the value
- dnl has been cached.
- if test x"$ac_cv_lib_socket_connect" = x"yes" ||
- test x"$ac_cv_lib_inet_connect" = x"yes"; then
- # ac_cv_func_connect=yes
- # don't! it would cause AC_CHECK_FUNC to succeed next time configure is run
- AC_DEFINE(HAVE_CONNECT,1,[Whether the system has connect()])
- fi
-fi
-
###############################################
# test for where we get yp_get_default_domain() from
AC_SEARCH_LIBS(yp_get_default_domain, [nsl])
# "struct timespec" or "timespec_t". Linux doesn't have timespec_t, so we
# prefer struct timespec.
-AC_CACHE_CHECK([whether struct stat has sub-second timestamps], samba_stat_hires,
+AC_CACHE_CHECK([whether struct stat has sub-second timestamps], samba_cv_stat_hires,
[
AC_TRY_COMPILE(
[
t.tv_sec = s.st_atim.tv_sec;
t.tv_nsec = s.st_atim.tv_nsec;
],
- samba_stat_hires=yes, samba_stat_hires=no)
+ samba_cv_stat_hires=yes, samba_cv_stat_hires=no)
])
-if test x"$samba_stat_hires" = x"yes" ; then
+if test x"$samba_cv_stat_hires" = x"yes" ; then
AC_DEFINE(HAVE_STAT_ST_MTIM, 1, [whether struct stat contains st_mtim])
AC_DEFINE(HAVE_STAT_ST_ATIM, 1, [whether struct stat contains st_atim])
AC_DEFINE(HAVE_STAT_ST_CTIM, 1, [whether struct stat contains st_ctim])
[whether struct stat has sub-second timestamps])
fi
-AC_CACHE_CHECK([whether struct stat has sub-second timestamps without struct timespec], samba_stat_hires_notimespec,
+AC_CACHE_CHECK([whether struct stat has sub-second timestamps without struct timespec], samba_cv_stat_hires_notimespec,
[
AC_TRY_COMPILE(
[
t.tv_sec = s.st_atime;
t.tv_nsec = s.st_atimensec;
],
- samba_stat_hires=yes, samba_stat_hires=no)
+ samba_cv_stat_hires=yes, samba_cv_stat_hires=no)
])
-if test x"$samba_stat_hires_notimespec" = x"yes" ; then
+if test x"$samba_cv_stat_hires_notimespec" = x"yes" ; then
AC_DEFINE(HAVE_STAT_ST_MTIMENSEC, 1, [whether struct stat contains st_mtimensec])
AC_DEFINE(HAVE_STAT_ST_ATIMENSEC, 1, [whether struct stat contains st_atimensec])
AC_DEFINE(HAVE_STAT_ST_CTIMENSEC, 1, [whether struct stat contains st_ctimensec])
fi
fi
+# Set defaults
+SYMSEXT="syms"
+AC_SUBST(SYMSEXT)
+
# Assume non-shared by default and override below
BLDSHARED="false"
;;
*aix*) AC_DEFINE(AIX,1,[Whether the host os is aix])
BLDSHARED="true"
- LDSHFLAGS="-Wl,-G,-bexpfull,-bbigtoc"
+ # use expfull to export underscored symbols
+ # add rtl to remove /lib/crt0.o warning
+ LDSHFLAGS="-Wl,-G,-bexpfull,-bbigtoc,-brtl"
DYNEXP="-Wl,-brtl,-bexpfull,-bbigtoc"
PICFLAG="-O2"
# as AIX code is always position independent...
AC_DEFINE(HAVE_UNSIGNED_CHAR,1,[Whether the 'unsigned char' type is available])
fi
-AC_CACHE_CHECK([for sin_len in sock],samba_cv_HAVE_SOCK_SIN_LEN,[
-AC_TRY_COMPILE([#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>],
-[struct sockaddr_in sock; sock.sin_len = sizeof(sock);],
-samba_cv_HAVE_SOCK_SIN_LEN=yes,samba_cv_HAVE_SOCK_SIN_LEN=no)])
-if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
- AC_DEFINE(HAVE_SOCK_SIN_LEN,1,[Whether the sockaddr_in struct has a sin_len property])
-fi
-
AC_CACHE_CHECK([whether seekdir returns void],samba_cv_SEEKDIR_RETURNS_VOID,[
AC_TRY_COMPILE([#include <sys/types.h>
#include <dirent.h>
# in both libiconv and in libc. In this case the jm_ICONV test will always
# succeed when the header is found. To counter this, make sure the
# library directory is there and check the ABI directory first (which
- # should be harmless on other systems.
+ # should be harmless on other systems, but causes tons of linker warnings on
+ # 64bit Ubuntu systems).
+ # As the build farm doesn't seem to have any IRIX machines with iconv.h
+ # installed, I've decided to fix the linker warnings.
+ # -- Kai
# For IA64 HPUX systems, the libs are located in lib/hpux32 instead of lib.
- for l in "lib32" "lib" "lib/hpux32"; do
+ for l in "lib" "lib32" "lib/hpux32"; do
if test -d "$i/$l" ; then
LDFLAGS="$save_LDFLAGS -L$i/$l"
LIBS=
AC_DEFINE(HAVE_FTRUNCATE_EXTEND,1,[Truncate extend])
fi
-AC_CACHE_CHECK([for AF_LOCAL socket support], samba_cv_HAVE_WORKING_AF_LOCAL, [
-AC_TRY_RUN([#include "${srcdir-.}/tests/unixsock.c"],
- samba_cv_HAVE_WORKING_AF_LOCAL=yes,
- samba_cv_HAVE_WORKING_AF_LOCAL=no,
- samba_cv_HAVE_WORKING_AF_LOCAL=cross)])
-if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
-then
- AC_DEFINE(HAVE_WORKING_AF_LOCAL, 1, [Define if you have working AF_LOCAL sockets])
-fi
-
AC_CACHE_CHECK([for broken getgroups],samba_cv_HAVE_BROKEN_GETGROUPS,[
AC_TRY_RUN([#include "${srcdir-.}/tests/getgroups.c"],
samba_cv_HAVE_BROKEN_GETGROUPS=yes,samba_cv_HAVE_BROKEN_GETGROUPS=no,samba_cv_HAVE_BROKEN_GETGROUPS=cross)])
SMB_CHECK_SYSCONF(_SC_PAGESIZE)
AC_CHECK_FUNCS(getpagesize)
-dnl test for ipv6
-AC_CACHE_CHECK([for ipv6 support],samba_cv_HAVE_IPV6,[
-AC_TRY_COMPILE([
-#include <stdlib.h> /* for NULL */
-#include <sys/socket.h>
-#include <sys/types.h>
-#include <netdb.h>],
-[
-struct sockaddr_storage sa_store;
-struct addrinfo *ai = NULL;
-struct in6_addr in6addr;
-int s = socket(AF_INET6, SOCK_STREAM, 0);
-int ret = getaddrinfo(NULL, NULL, NULL, &ai);
-if (ret != 0) {
- const char *es = gai_strerror(ret);
-}
-freeaddrinfo(ai);
-],
-samba_cv_HAVE_IPV6=yes,samba_cv_HAVE_IPV6=no)])
-if test x"$samba_cv_HAVE_IPV6" = x"yes"; then
- AC_DEFINE(HAVE_IPV6,1,[Whether the system has IPv6 support])
-fi
-
################################################
# look for a method of setting the effective uid
seteuid=no;
AC_TRY_RUN([
#include <stdio.h>
#include <limits.h>
+#include <signal.h>
+
+void exit_on_core(int ignored) {
+ exit(1);
+}
+
main() {
- char *newpath = realpath("/tmp", NULL);
- exit ((newpath != NULL) ? 0 : 1);
+ char *newpath;
+ signal(SIGSEGV, exit_on_core);
+ newpath = realpath("/tmp", NULL);
+ exit((newpath != NULL) ? 0 : 1);
}
],
samba_cv_REALPATH_TAKES_NULL=yes,samba_cv_REALPATH_TAKES_NULL=no,samba_cv_REALPATH_TAKES_NULL=cross)])
fi
fi
+FAKE_KASERVER_OBJ=""
if test x"$samba_cv_WITH_FAKE_KASERVER" != x"no" && test x"$have_afs_headers" = x"yes"; then
AC_DEFINE(WITH_FAKE_KASERVER,1,[Whether to include AFS fake-kaserver support])
+ FAKE_KASERVER_OBJ="utils/net_afs.o"
fi
+AC_SUBST(FAKE_KASERVER_OBJ)
#################################################
# check whether to compile AFS/NT ACL mapping module
LIBS="$KRB5_LIBS $LIBS"
AC_CACHE_CHECK(whether krb5_ticket contains kvno and enctype,
- smb_krb5_ticket_has_keyinfo,
+ smb_krb5_cv_ticket_has_keyinfo,
[
AC_TRY_COMPILE(
[
enctype = ticket.enc_part.enctype;
kvno = ticket.enc_part.kvno;
],
- [ smb_krb5_ticket_has_keyinfo=yes ],
- [ smb_krb5_ticket_has_keyinfo=no ])
+ [ smb_krb5_cv_ticket_has_keyinfo=yes ],
+ [ smb_krb5_cv_ticket_has_keyinfo=no ])
])
- if test x"$smb_krb5_ticket_has_keyinfo" = x"yes" ; then
+ if test x"$smb_krb5_cv_ticket_has_keyinfo" = x"yes" ; then
AC_DEFINE(KRB5_TICKET_HAS_KEYINFO, 1,
[Whether the krb5_ticket structure contains the kvno and enctype])
fi
AC_CACHE_CHECK(whether krb5_get_init_creds_opt_free takes a context argument,
- smb_krb5_creds_opt_free_context,
+ smb_krb5_cv_creds_opt_free_context,
[
AC_TRY_COMPILE([
#include <krb5.h>],
krb5_get_init_creds_opt *opt = NULL;
krb5_get_init_creds_opt_free(ctx, opt);
],
- [smb_krb5_creds_opt_free_context=yes],
- [smb_krb5_creds_opt_free_context=no]
+ [smb_krb5_cv_creds_opt_free_context=yes],
+ [smb_krb5_cv_creds_opt_free_context=no]
)
])
- if test x"$smb_krb5_creds_opt_free_context" = x"yes" ; then
+ if test x"$smb_krb5_cv_creds_opt_free_context" = x"yes" ; then
AC_DEFINE(KRB5_CREDS_OPT_FREE_REQUIRES_CONTEXT, 1,
[Whether krb5_get_init_creds_opt_free takes a context argument])
fi
- AC_CACHE_CHECK(whether krb5_verify_checksum takes 7 arguments, smb_krb5_verify_checksum, [
+ AC_CACHE_CHECK(whether krb5_verify_checksum takes 7 arguments, smb_krb5_cv_verify_checksum, [
AC_TRY_COMPILE([
#include <krb5.h>],
[krb5_verify_checksum(0, 0, 0, 0, 0, 0, 0);],
- [smb_krb5_verify_checksum=7],
- [smb_krb5_verify_checksum=6],
+ [smb_krb5_cv_verify_checksum=7],
+ [smb_krb5_cv_verify_checksum=6],
)
])
- AC_DEFINE_UNQUOTED(KRB5_VERIFY_CHECKSUM_ARGS, $smb_krb5_verify_checksum, [Number of arguments to krb5_verify_checksum])
+ AC_DEFINE_UNQUOTED(KRB5_VERIFY_CHECKSUM_ARGS, $smb_krb5_cv_verify_checksum, [Number of arguments to krb5_verify_checksum])
AC_CACHE_CHECK([for checksum in krb5_checksum],
samba_cv_HAVE_CHECKSUM_IN_KRB5_CHECKSUM,[
if test x"$ac_cv_func_ext_krb5_enctype_to_string" = x"yes"; then
AC_CACHE_CHECK([for krb5_error_code krb5_enctype_to_string(krb5_context context, krb5_enctype enctype, char **str)],
- smb_krb5_enctype_to_string_takes_krb5_context_arg,[
+ smb_krb5_cv_enctype_to_string_takes_krb5_context_arg,[
AC_TRY_RUN_STRICT([
+ #include <stdlib.h>
#include <krb5.h>
int main(void) {
krb5_context context = NULL;
return 0;
}
],[$Werror_FLAGS],[$CPPFLAGS],[$LDFLAGS],
- smb_krb5_enctype_to_string_takes_krb5_context_arg=yes,
- smb_krb5_enctype_to_string_takes_krb5_context_arg=no)])
+ smb_krb5_cv_enctype_to_string_takes_krb5_context_arg=yes,
+ smb_krb5_cv_enctype_to_string_takes_krb5_context_arg=no)])
- if test x"$smb_krb5_enctype_to_string_takes_krb5_context_arg" = x"yes"; then
+ if test x"$smb_krb5_cv_enctype_to_string_takes_krb5_context_arg" = x"yes"; then
AC_DEFINE(HAVE_KRB5_ENCTYPE_TO_STRING_WITH_KRB5_CONTEXT_ARG,1,
[whether krb5_enctype_to_string takes krb5_context argument])
fi
AC_CACHE_CHECK([for krb5_error_code krb5_enctype_to_string(krb5_enctype enctype, char *str, size_t len)],
- smb_krb5_enctype_to_string_takes_size_t_arg,[
+ smb_krb5_cv_enctype_to_string_takes_size_t_arg,[
AC_TRY_RUN_STRICT([
#include <krb5.h>
int main(void) {
return 0;
}
],[$Werror_FLAGS],[$CPPFLAGS],[$LDFLAGS],
- smb_krb5_enctype_to_string_takes_size_t_arg=yes,
- smb_krb5_enctype_to_string_takes_size_t_arg=no)])
+ smb_krb5_cv_enctype_to_string_takes_size_t_arg=yes,
+ smb_krb5_cv_enctype_to_string_takes_size_t_arg=no)])
- if test x"$smb_krb5_enctype_to_string_takes_size_t_arg" = x"yes"; then
+ if test x"$smb_krb5_cv_enctype_to_string_takes_size_t_arg" = x"yes"; then
AC_DEFINE(HAVE_KRB5_ENCTYPE_TO_STRING_WITH_SIZE_T_ARG,1,
[whether krb5_enctype_to_string takes size_t argument])
fi
use_ads=no
fi
- if test x"$smb_krb5_ticket_has_keyinfo" != x"yes" ; then
+ if test x"$smb_krb5_cv_ticket_has_keyinfo" != x"yes" ; then
# We only need the following functions if we can't get the enctype
# and kvno out of the ticket directly (ie. on Heimdal).
#
# WORKAROUND:
-# until we have organized other internal subsystems (as util, registrt
+# until we have organized other internal subsystems (as util, registry
# and smbconf) into shared libraries, we CAN NOT link libnetapi
# dynamically to samba programs.
#
LINK_LIBNETAPI=STATIC
-SMB_LIBRARY(talloc)
-SMB_LIBRARY(tdb)
-SMB_LIBRARY(netapi)
+LINK_LIBSMBCLIENT=STATIC
+#
+# The library versions are hardcoded here
+# and filled into the LIBFOO_SOVER variable.
+#
+# TODO: for talloc and tdb (at least), these should
+# be extracted from their respective source directories
+#
+SMB_LIBRARY(talloc, 1)
+SMB_LIBRARY(tdb, 1)
+SMB_LIBRARY(netapi, 0)
+SMB_LIBRARY(smbclient, 0)
+SMB_LIBRARY(smbsharemodes, 0)
+SMB_LIBRARY(addns, 0, no, [undefined API])
-#################################################
-# should we build libaddns?
-INSTALL_LIBADDNS=
-UNINSTALL_LIBADDNS=
-LIBADDNS_SHARED=
-LIBADDNS=
-AC_MSG_CHECKING(whether to build the libaddns shared library)
-AC_ARG_WITH(libaddns,
-[AS_HELP_STRING([--with-libaddns], [Build the libaddns shared library (default=no undefined API)])],
-[ case "$withval" in
- *)
- AC_MSG_RESULT(no)
- ;;
- yes)
- if test $BLDSHARED = true; then
- LIBADDNS_SHARED=bin/libaddns.$SHLIBEXT
- LIBADDNS=libaddns
- AC_MSG_RESULT(yes)
- else
- enable_static=yes
- AC_MSG_RESULT(no shared library support -- will supply static library)
- fi
- if test $enable_static = yes; then
- LIBADDNS=libaddns
- fi
- INSTALL_LIBADDNS=installlibaddns
- UNINSTALL_LIBADDNS=uninstalllibaddns
- ;;
- esac ],
-[AC_MSG_RESULT(no)]
-)
-
-#################################################
-# should we build libsmbclient?
-
-INSTALL_LIBSMBCLIENT=
-UNINSTALL_LIBSMBCLIENT=
-LIBSMBCLIENT_SHARED=
-LIBSMBCLIENT=
-AC_MSG_CHECKING(whether to build the libsmbclient shared library)
-AC_ARG_WITH(libsmbclient,
-[AS_HELP_STRING([--with-libsmbclient], [Build the libsmbclient shared library (default=yes if shared libs supported)])],
-[ 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
- enable_static=yes
- AC_MSG_RESULT(no shared library support -- will supply static library)
- fi
- if test $enable_static = yes; then
- LIBSMBCLIENT=libsmbclient
- fi
- INSTALL_LIBSMBCLIENT=installclientlib
- UNINSTALL_LIBSMBCLIENT=uninstallclientlib
- ;;
- esac ],
-[
-# if unspecified, default is to build it if possible.
- if test $BLDSHARED = true; then
- LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
- LIBSMBCLIENT=libsmbclient
- AC_MSG_RESULT(yes)
- else
- enable_static=yes
- AC_MSG_RESULT(no shared library support -- will supply static library)
- fi
- if test $enable_static = yes; then
- LIBSMBCLIENT=libsmbclient
- fi]
- INSTALL_LIBSMBCLIENT=installclientlib
- UNINSTALL_LIBSMBCLIENT=uninstallclientlib
-)
-
-INSTALL_LIBSMBSHAREMODES=
-LIBSMBSHAREMODES_SHARED=
-LIBSMBSHAREMODES=
-AC_MSG_CHECKING(whether to build the libsmbsharemodes shared library)
-AC_ARG_WITH(libsmbsharemodes,
-[AS_HELP_STRING([--with-libsmbsharemodes], [Build the libsmbsharemodes shared library (default=yes if shared libs supported)])],
-[ case "$withval" in
- no)
- AC_MSG_RESULT(no)
- ;;
- *)
- if test $BLDSHARED = true; then
- LIBSMBSHAREMODES_SHARED=bin/libsmbsharemodes.$SHLIBEXT
- LIBSMBSHAREMODES=libsmbsharemodes
- AC_MSG_RESULT(yes)
- else
- enable_static=yes
- AC_MSG_RESULT(no shared library support -- will supply static library)
- fi
- if test $enable_static = yes; then
- LIBSMBSHAREMODES=libsmbsharemodes
- fi
- INSTALL_LIBSMBSHAREMODES=installlibsmbsharemodes
- UNINSTALL_LIBSMBSHAREMODES=uninstalllibsmbsharemodes
- ;;
- esac ],
-[
-# if unspecified, default is to build it if possible.
- if test $BLDSHARED = true; then
- LIBSMBSHAREMODES_SHARED=bin/libsmbsharemodes.$SHLIBEXT
- LIBSMBSHAREMODES=libsmbsharemodes
- AC_MSG_RESULT(yes)
- else
- enable_static=yes
- AC_MSG_RESULT(no shared library support -- will supply static library)
- fi
- if test $enable_static = yes; then
- LIBSMBSHAREMODES=libsmbsharemodes
- fi]
- INSTALL_LIBSMBSHAREMODES=installlibsmbsharemodes
-)
#################################################
[Whether posix_fadvise is available])
fi
+############################################
+# See if we have the Linux splice syscall.
+
+AC_CACHE_CHECK([for Linux splice],
+ samba_cv_HAVE_LINUX_SPLICE,[
+ AC_TRY_LINK([
+#if defined(HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
+#include <fcntl.h>],
+ [long ret = splice(0,0,1,0,400,0);],
+ samba_cv_HAVE_LINUX_SPLICE=yes,
+ samba_cv_HAVE_LINUX_SPLICE=no)])
+
+if test x"$samba_cv_HAVE_LINUX_SPLICE" = x"yes"; then
+ AC_DEFINE(HAVE_LINUX_SPLICE,1,
+ [Whether Linux splice is available])
+fi
+
+AC_HAVE_DECL(splice, [#include <fcntl.h>])
#################################################
NSSSONAMEVERSIONSUFFIX=".1"
WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o \
nsswitch/winbind_nss_linux.o"
- WINBIND_NSS_EXTRA_LIBS="-lsocket"
+ WINBIND_NSS_EXTRA_LIBS="${LIBREPLACE_NETWORK_LIBS}"
+ PAM_WINBIND_EXTRA_LIBS="${LIBREPLACE_NETWORK_LIBS}"
;;
*hpux11*)
WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
# We need unix domain sockets for winbind
if test x"$HAVE_WINBIND" = x"yes"; then
- if test x"$samba_cv_unixsocket" = x"no"; then
+ if test x"$libreplace_cv_HAVE_UNIXSOCKET" = x"no"; then
winbind_no_reason=", no unix domain socket support on $host_os"
HAVE_WINBIND=no
fi
BUILD_LIBWBCLIENT_SHARED=yes
fi
+LIBWBCLIENT_SHARED_TARGET=bin/libwbclient.$SHLIBEXT
+LIBWBCLIENT_STATIC_TARGET=bin/libwbclient.a
+LIBWBCLIENT_SOVER=0
if test $BLDSHARED = true -a x"$HAVE_WINBIND" = x"yes" -a x"$BUILD_LIBWBCLIENT_SHARED" = x"yes"; then
NSS_MODULES="${WINBIND_NSS} ${WINBIND_WINS_NSS}"
## Only worry about libwbclient if we have shared library support
## and winbindd
- LIBWBCLIENT_SHARED=bin/libwbclient.$SHLIBEXT
+ LIBWBCLIENT_SHARED=$LIBWBCLIENT_SHARED_TARGET
LIBWBCLIENT=libwbclient
INSTALL_LIBWBCLIENT=installlibwbclient
UNINSTALL_LIBWBCLIENT=uninstalllibwbclient
WINBIND_LIBS="-lwbclient"
else
- LIBWBCLIENT_STATIC=bin/libwbclient.a
+ LIBWBCLIENT_STATIC=$LIBWBCLIENT_STATIC_TARGET
fi
if test x"$HAVE_WINBIND" = x"yes"; then
AC_SUBST(WINBIND_NSS_EXTRA_OBJS)
AC_SUBST(WINBIND_NSS_EXTRA_LIBS)
AC_SUBST(NSSSONAMEVERSIONSUFFIX)
+AC_SUBST(PAM_WINBIND_EXTRA_LIBS)
AC_SUBST(WINBIND_KRB5_LOCATOR)
SMBD_LIBS="$samba_dmapi_libs"
AC_SUBST(SMBD_LIBS)
-AC_OUTPUT(Makefile library-versions
+AC_OUTPUT(Makefile
script/findsmb smbadduser script/gen-8bit-gap.sh script/installbin.sh script/uninstallbin.sh
lib/netapi/examples/Makefile
pkgconfig/smbclient.pc