~ubuntu-branches/ubuntu/trusty/rsync/trusty

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Package Import Robot
  • Author(s): Paul Slootman
  • Date: 2013-10-27 12:01:10 UTC
  • mfrom: (1.1.13) (2.1.11 sid)
  • Revision ID: package-import@ubuntu.com-20131027120110-mpr03n5scqmf40mi
Tags: 3.1.0-2
fix build failure if zlib1g-dev package is not installed;
solved by building without the included zlib source and adding a
build-depends on zlib1g-dev >= 1:1.2.8
closes:32379

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
AC_CONFIG_HEADER(config.h)
6
6
AC_PREREQ(2.59)
7
7
 
8
 
RSYNC_VERSION=3.0.9
 
8
RSYNC_VERSION=3.1.0
9
9
AC_SUBST(RSYNC_VERSION)
10
10
AC_MSG_NOTICE([Configuring rsync $RSYNC_VERSION])
11
11
 
39
39
AC_PROG_CPP
40
40
AC_PROG_EGREP
41
41
AC_PROG_INSTALL
 
42
AC_PROG_MKDIR_P
42
43
AC_PROG_CC_STDC
43
44
AC_SUBST(SHELL)
44
45
 
78
79
AC_ARG_WITH(included-popt,
79
80
        AC_HELP_STRING([--with-included-popt], [use bundled popt library, not from system]))
80
81
 
 
82
AC_ARG_WITH(included-zlib,
 
83
        AC_HELP_STRING([--with-included-zlib], [use bundled zlib library, not from system]))
 
84
 
 
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])
 
89
fi
 
90
 
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
126
136
    MAKE_MAN=man
 
137
else
 
138
    MAKE_MAN=man-copy
127
139
fi
128
140
 
 
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])
 
144
 
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 \
 
351
    zlib.h)
335
352
AC_HEADER_MAJOR
336
353
 
337
354
AC_CACHE_CHECK([if makedev takes 3 args],rsync_cv_MAKEDEV_TAKES_3_ARGS,[
379
396
AC_TYPE_UID_T
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>
 
404
#endif
 
405
#ifdef HAVE_SYS_STAT_H
 
406
#include <sys/stat.h>
 
407
#endif
 
408
#ifdef HAVE_UNISTD_H
 
409
#include <unistd.h>
 
410
#endif])
383
411
 
384
412
TYPE_SOCKLEN_T
385
413
 
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 \
577
 
    utimensat)
 
604
    extattr_get_link sigaction sigprocmask setattrlist getgrouplist \
 
605
    initgroups utimensat posix_fallocate attropen setvbuf)
578
606
 
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)])
582
610
fi
583
611
 
 
612
dnl Preallocation stuff (also fallocate, posix_fallocate function tests above):
 
613
 
 
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])
 
621
fi
 
622
 
 
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])
 
630
fi
 
631
 
 
632
if test x"$ac_cv_func_posix_fallocate" = x"yes"; then
 
633
    AC_MSG_CHECKING([whether posix_fallocate is efficient])
 
634
    case $host_os in
 
635
    *cygwin*)
 
636
        AC_MSG_RESULT(yes)
 
637
        AC_DEFINE(HAVE_EFFICIENT_POSIX_FALLOCATE, 1,
 
638
                  [Define if posix_fallocate is efficient (Cygwin)])
 
639
        ;;
 
640
    *)
 
641
        AC_MSG_RESULT(no)
 
642
        ;;
 
643
    esac
 
644
fi
 
645
 
 
646
dnl End of preallocation stuff
 
647
 
584
648
AC_CHECK_FUNCS(getpgrp tcgetpgrp)
585
649
if test $ac_cv_func_getpgrp = yes; then
586
650
    AC_FUNC_GETPGRP
686
750
    AC_DEFINE(HAVE_SOCKETPAIR, 1, [Define to 1 if you have the "socketpair" function])
687
751
fi
688
752
 
 
753
AC_CHECK_FUNCS(getpass, , [AC_LIBOBJ(lib/getpass)])
 
754
 
689
755
if test x"$with_included_popt" != x"yes"; then
690
756
    AC_CHECK_LIB(popt, poptGetContext, , [with_included_popt=yes])
691
757
fi
714
780
    AC_MSG_RESULT(no)
715
781
fi
716
782
 
 
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
 
788
fi
 
789
if test x"$with_included_zlib" != x"yes"; then
 
790
    AC_CHECK_LIB(z, deflateParams, , [with_included_zlib=yes])
 
791
fi
 
792
 
 
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"
 
798
else
 
799
    AC_MSG_RESULT(no)
 
800
fi
 
801
 
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)
 
955
AC_SUBST(BUILD_ZLIB)
870
956
AC_SUBST(MAKE_MAN)
871
957
 
 
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])
 
960
 
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])
889
978
        ;;
890
 
    *solaris*|*cygwin*)
 
979
    solaris*|*cygwin*)
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 ;;
962
1051
        esac])
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])
973
1063
        ;;
974
1064
    darwin*)
975
1065
        AC_MSG_RESULT(Using OS X xattrs)
984
1074
        AC_DEFINE(SUPPORT_XATTRS, 1)
985
1075
        ;;
986
1076
    solaris*)
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])
989
1081
        ;;
990
1082
    *)