78
79
AC_ARG_WITH(included-popt,
79
80
AC_HELP_STRING([--with-included-popt], [use bundled popt library, not from system]))
82
AC_ARG_WITH(included-zlib,
83
AC_HELP_STRING([--with-included-zlib], [use bundled zlib library, not from system]))
85
AC_ARG_WITH(protected-args,
86
AC_HELP_STRING([--with-protected-args], [make --protected-args option the default]))
87
if test x"$with_protected_args" = x"yes"; then
88
AC_DEFINE_UNQUOTED(RSYNC_USE_PROTECTED_ARGS, 1, [Define to 1 if --protected-args should be the default])
81
91
AC_ARG_WITH(rsync-path,
82
92
AC_HELP_STRING([--with-rsync-path=PATH], [set default --rsync-path to PATH (default: rsync)]),
83
93
[ RSYNC_PATH="$with_rsync_path" ],
124
134
AC_CHECK_PROG(HAVE_YODL2MAN, yodl2man, 1, 0)
125
135
if test x$HAVE_YODL2MAN = x1; then
141
# Some programs on solaris are only found in /usr/xpg4/bin (or work better than others versions).
142
AC_PATH_PROG(SHELL_PATH, sh, /bin/sh, [/usr/xpg4/bin$PATH_SEPARATOR$PATH])
143
AC_PATH_PROG(FAKEROOT_PATH, fakeroot, /usr/bin/fakeroot, [/usr/xpg4/bin$PATH_SEPARATOR$PATH])
129
145
AC_ARG_WITH(nobody-group,
130
146
AC_HELP_STRING([--with-nobody-group=GROUP],
131
147
[set the default unprivileged group (default nobody or nogroup)]),
331
347
sys/un.h sys/attr.h mcheck.h arpa/inet.h arpa/nameser.h locale.h \
332
348
netdb.h malloc.h float.h limits.h iconv.h libcharset.h langinfo.h \
333
349
sys/acl.h acl/libacl.h attr/xattr.h sys/xattr.h sys/extattr.h \
334
popt.h popt/popt.h netinet/in_systm.h netinet/ip.h)
350
popt.h popt/popt.h linux/falloc.h netinet/in_systm.h netinet/ip.h \
337
354
AC_CACHE_CHECK([if makedev takes 3 args],rsync_cv_MAKEDEV_TAKES_3_ARGS,[
380
397
AC_CHECK_TYPES([mode_t,off_t,size_t,pid_t,id_t])
381
398
AC_TYPE_GETGROUPS
382
AC_CHECK_MEMBERS([struct stat.st_rdev])
399
AC_CHECK_MEMBERS([struct stat.st_rdev,
400
struct stat.st_mtimensec,
401
struct stat.st_mtim.tv_nsec],,,[
402
#ifdef HAVE_SYS_TYPES_H
403
#include <sys/types.h>
405
#ifdef HAVE_SYS_STAT_H
406
#include <sys/stat.h>
573
601
strlcat strlcpy strtol mallinfo getgroups setgroups geteuid getegid \
574
602
setlocale setmode open64 lseek64 mkstemp64 mtrace va_copy __va_copy \
575
603
seteuid strerror putenv iconv_open locale_charset nl_langinfo getxattr \
576
extattr_get_link sigaction sigprocmask setattrlist \
604
extattr_get_link sigaction sigprocmask setattrlist getgrouplist \
605
initgroups utimensat posix_fallocate attropen setvbuf)
579
607
dnl cygwin iconv.h defines iconv_open as libiconv_open
580
608
if test x"$ac_cv_func_iconv_open" != x"yes"; then
581
609
AC_CHECK_FUNC(libiconv_open, [ac_cv_func_iconv_open=yes; AC_DEFINE(HAVE_ICONV_OPEN, 1)])
612
dnl Preallocation stuff (also fallocate, posix_fallocate function tests above):
614
AC_CACHE_CHECK([for useable fallocate],rsync_cv_have_fallocate,[
615
AC_TRY_LINK([#include <fcntl.h>
616
#include <sys/types.h>],
617
[fallocate(0, 0, 0, 0);],
618
rsync_cv_have_fallocate=yes,rsync_cv_have_fallocate=no)])
619
if test x"$rsync_cv_have_fallocate" = x"yes"; then
620
AC_DEFINE(HAVE_FALLOCATE, 1, [Define to 1 if you have the fallocate function and it compiles and links without error])
623
AC_CACHE_CHECK([for SYS_fallocate],rsync_cv_have_sys_fallocate,[
624
AC_TRY_COMPILE([#include <sys/syscall.h>
625
#include <sys/types.h>],
626
[syscall(SYS_fallocate, 0, 0, (loff_t)0, (loff_t)0);],
627
rsync_cv_have_sys_fallocate=yes,rsync_cv_have_sys_fallocate=no)])
628
if test x"$rsync_cv_have_sys_fallocate" = x"yes"; then
629
AC_DEFINE(HAVE_SYS_FALLOCATE, 1, [Define to 1 if you have the SYS_fallocate syscall number])
632
if test x"$ac_cv_func_posix_fallocate" = x"yes"; then
633
AC_MSG_CHECKING([whether posix_fallocate is efficient])
637
AC_DEFINE(HAVE_EFFICIENT_POSIX_FALLOCATE, 1,
638
[Define if posix_fallocate is efficient (Cygwin)])
646
dnl End of preallocation stuff
584
648
AC_CHECK_FUNCS(getpgrp tcgetpgrp)
585
649
if test $ac_cv_func_getpgrp = yes; then
686
750
AC_DEFINE(HAVE_SOCKETPAIR, 1, [Define to 1 if you have the "socketpair" function])
753
AC_CHECK_FUNCS(getpass, , [AC_LIBOBJ(lib/getpass)])
689
755
if test x"$with_included_popt" != x"yes"; then
690
756
AC_CHECK_LIB(popt, poptGetContext, , [with_included_popt=yes])
714
780
AC_MSG_RESULT(no)
783
# We default to using our zlib unless --with-included-zlib=no is given.
784
if test x"$with_included_zlib" != x"no"; then
785
with_included_zlib=yes
786
elif test x"$ac_cv_header_zlib_h" != x"yes"; then
787
with_included_zlib=yes
789
if test x"$with_included_zlib" != x"yes"; then
790
AC_CHECK_LIB(z, deflateParams, , [with_included_zlib=yes])
793
AC_MSG_CHECKING([whether to use included zlib])
794
if test x"$with_included_zlib" = x"yes"; then
795
AC_MSG_RESULT($srcdir/zlib)
796
BUILD_ZLIB='$(zlib_OBJS)'
797
CFLAGS="$CFLAGS -I$srcdir/zlib"
717
802
AC_CACHE_CHECK([for unsigned char],rsync_cv_SIGNED_CHAR_OK,[
718
803
AC_TRY_COMPILE([],[signed char *s = ""],
719
804
rsync_cv_SIGNED_CHAR_OK=yes,rsync_cv_SIGNED_CHAR_OK=no)])
867
952
AC_SUBST(OBJ_RESTORE)
868
953
AC_SUBST(CC_SHOBJ_FLAG)
869
954
AC_SUBST(BUILD_POPT)
870
956
AC_SUBST(MAKE_MAN)
958
AC_PATH_PROG([STUNNEL], [stunnel], [stunnel], [$PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin])
959
AC_PATH_PROG([STUNNEL4], [stunnel4], [$STUNNEL], [$PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin])
872
961
AC_CHECK_FUNCS(_acl __acl _facl __facl)
873
962
#################################################
874
963
# check for ACL support
887
976
AC_DEFINE(HAVE_UNIXWARE_ACLS, 1, [true if you have UnixWare ACLs])
888
977
AC_DEFINE(SUPPORT_ACLS, 1, [Define to 1 to add support for ACLs])
891
980
AC_MSG_RESULT(Using solaris ACLs)
892
981
AC_DEFINE(HAVE_SOLARIS_ACLS, 1, [true if you have solaris ACLs])
893
982
AC_DEFINE(SUPPORT_ACLS, 1)
956
1045
AC_ARG_ENABLE(xattr-support,
957
1046
AC_HELP_STRING([--disable-xattr-support],
958
1047
[disable extended attributes]),
959
[], [case "$ac_cv_func_getxattr$ac_cv_func_extattr_get_link" in
1048
[], [case "$ac_cv_func_getxattr$ac_cv_func_extattr_get_link$ac_cv_func_attropen" in
960
1049
*yes*) enable_xattr_support=maybe ;;
961
1050
*) enable_xattr_support=no ;;
970
1059
AC_MSG_RESULT(Using Linux xattrs)
971
1060
AC_DEFINE(HAVE_LINUX_XATTRS, 1, [True if you have Linux xattrs])
972
1061
AC_DEFINE(SUPPORT_XATTRS, 1)
1062
AC_DEFINE(NO_SYMLINK_USER_XATTRS, 1, [True if symlinks do not support user xattrs])
975
1065
AC_MSG_RESULT(Using OS X xattrs)
984
1074
AC_DEFINE(SUPPORT_XATTRS, 1)
987
# Better Solaris support coming in 3.1.0...
1077
AC_MSG_RESULT(Using Solaris xattrs)
1078
AC_DEFINE(HAVE_SOLARIS_XATTRS, 1, [True if you have Solaris xattrs])
1079
AC_DEFINE(SUPPORT_XATTRS, 1)
988
1080
AC_DEFINE(NO_SYMLINK_XATTRS, 1, [True if symlinks do not support xattrs])