In "ignoring unsafe symlink" messages, show only the file-list path.
[rsync/rsync.git] / configure.ac
1 dnl Process this file with autoconf to produce a configure script.
2
3 AC_INIT()
4 AC_CONFIG_SRCDIR([byteorder.h])
5 AC_CONFIG_HEADER(config.h)
6 AC_PREREQ(2.59)
7
8 RSYNC_VERSION=3.1.0dev
9 AC_SUBST(RSYNC_VERSION)
10 AC_MSG_NOTICE([Configuring rsync $RSYNC_VERSION])
11
12 AC_DEFINE_UNQUOTED(RSYNC_VERSION, ["$RSYNC_VERSION"], [rsync release version])
13
14 LDFLAGS=${LDFLAGS-""}
15
16 AC_CANONICAL_HOST
17
18 # We must decide this before testing the compiler.
19
20 # Please allow this to default to yes, so that your users have more
21 # chance of getting a useful stack trace if problems occur.
22
23 AC_MSG_CHECKING([whether to include debugging symbols])
24 AC_ARG_ENABLE(debug,
25         AC_HELP_STRING([--disable-debug],
26                 [disable debugging symbols and features]))
27
28 if test x"$enable_debug" = x"no"; then
29     AC_MSG_RESULT(no)
30     ac_cv_prog_cc_g=no
31 else
32     AC_MSG_RESULT([yes])
33     dnl AC_DEFINE(DEBUG, 1, [Define to turn on debugging code that may slow normal operation])
34     # leave ac_cv_prog_cc_g alone; AC_PROG_CC will try to include -g if it can
35 fi
36
37 dnl Checks for programs.
38 AC_PROG_CC
39 AC_PROG_CPP
40 AC_PROG_EGREP
41 AC_PROG_INSTALL
42 AC_PROG_CC_STDC
43 AC_SUBST(SHELL)
44
45 AC_DEFINE([_GNU_SOURCE], 1,
46           [Define _GNU_SOURCE so that we get all necessary prototypes])
47
48 if test x"$ac_cv_prog_cc_stdc" = x"no"; then
49         AC_MSG_WARN([rsync requires an ANSI C compiler and you don't seem to have one])
50 fi
51
52 AC_ARG_ENABLE(profile,
53         AC_HELP_STRING([--enable-profile],
54                 [turn on CPU profiling]))
55 if test x"$enable_profile" = x"yes"; then
56         CFLAGS="$CFLAGS -pg"
57 fi
58
59
60 # Specifically, this turns on panic_action handling.
61 AC_ARG_ENABLE(maintainer-mode,
62         AC_HELP_STRING([--enable-maintainer-mode],
63                 [turn on extra debug features]))
64 if test x"$enable_maintainer_mode" = x"yes"; then
65         CFLAGS="$CFLAGS -DMAINTAINER_MODE"
66 fi
67
68
69 # This is needed for our included version of popt.  Kind of silly, but
70 # I don't want our version too far out of sync.
71 CFLAGS="$CFLAGS -DHAVE_CONFIG_H"
72
73 # If GCC, turn on warnings.
74 if test x"$GCC" = x"yes"; then
75         CFLAGS="$CFLAGS -Wall -W"
76 fi
77
78 AC_ARG_WITH(included-popt,
79         AC_HELP_STRING([--with-included-popt], [use bundled popt library, not from system]))
80
81 AC_ARG_WITH(protected-args,
82         AC_HELP_STRING([--with-protected-args], [make --protected-args option the default]))
83 if test x"$with_protected_args" = x"yes"; then
84         AC_DEFINE_UNQUOTED(RSYNC_USE_PROTECTED_ARGS, 1, [Define to 1 if --protected-args should be the default])
85 fi
86
87 AC_ARG_WITH(rsync-path,
88         AC_HELP_STRING([--with-rsync-path=PATH], [set default --rsync-path to PATH (default: rsync)]),
89         [ RSYNC_PATH="$with_rsync_path" ],
90         [ RSYNC_PATH="rsync" ])
91
92 AC_DEFINE_UNQUOTED(RSYNC_PATH, "$RSYNC_PATH", [location of rsync on remote machine])
93
94 AC_ARG_WITH(rsyncd-conf,
95         AC_HELP_STRING([--with-rsyncd-conf=PATH], [set configuration file for rsync server to PATH (default: /etc/rsyncd.conf)]),
96         [ if test ! -z "$with_rsyncd_conf" ; then
97                 case $with_rsyncd_conf in
98                         yes|no)
99                                 RSYNCD_SYSCONF="/etc/rsyncd.conf"
100                                 ;;
101                         /*)
102                                 RSYNCD_SYSCONF="$with_rsyncd_conf"
103                                 ;;
104                         *)
105                                 AC_MSG_ERROR(You must specify an absolute path to --with-rsyncd-conf=PATH)
106                                 ;;
107                 esac
108         else
109                 RSYNCD_SYSCONF="/etc/rsyncd.conf"
110         fi ],
111         [ RSYNCD_SYSCONF="/etc/rsyncd.conf" ])
112
113 AC_DEFINE_UNQUOTED(RSYNCD_SYSCONF, "$RSYNCD_SYSCONF", [location of configuration file for rsync server])
114
115 AC_ARG_WITH(rsh,
116         AC_HELP_STRING([--with-rsh=CMD], [set remote shell command to CMD (default: ssh)]))
117
118 AC_CHECK_PROG(HAVE_REMSH, remsh, 1, 0)
119 if test x$HAVE_REMSH = x1; then
120         AC_DEFINE(HAVE_REMSH, 1, [Define to 1 if remote shell is remsh, not rsh])
121 fi
122
123 if test x"$with_rsh" != x; then
124         RSYNC_RSH="$with_rsh"
125 else
126         RSYNC_RSH="ssh"
127 fi
128 AC_DEFINE_UNQUOTED(RSYNC_RSH, "$RSYNC_RSH", [default -e command])
129
130 AC_CHECK_PROG(HAVE_YODL2MAN, yodl2man, 1, 0)
131 if test x$HAVE_YODL2MAN = x1; then
132     MAKE_MAN=man
133 fi
134
135 AC_ARG_WITH(nobody-group,
136     AC_HELP_STRING([--with-nobody-group=GROUP],
137                    [set the default unprivileged group (default nobody or nogroup)]),
138     [ NOBODY_GROUP="$with_nobody_group" ])
139
140 if test x"$with_nobody_group" = x; then
141     AC_MSG_CHECKING([the group for user "nobody"])
142     if grep '^nobody:' /etc/group >/dev/null 2>&1; then
143         NOBODY_GROUP=nobody
144     elif grep '^nogroup:' /etc/group >/dev/null 2>&1; then
145         NOBODY_GROUP=nogroup
146     else
147         NOBODY_GROUP=nobody # test for others?
148     fi
149     AC_MSG_RESULT($NOBODY_GROUP)
150 fi
151
152 AC_DEFINE_UNQUOTED(NOBODY_USER, "nobody", [unprivileged user--e.g. nobody])
153 AC_DEFINE_UNQUOTED(NOBODY_GROUP, "$NOBODY_GROUP", [unprivileged group for unprivileged user])
154
155 # arrgh. libc in some old debian version screwed up the largefile
156 # stuff, getting byte range locking wrong
157 AC_CACHE_CHECK([for broken largefile support],rsync_cv_HAVE_BROKEN_LARGEFILE,[
158 AC_TRY_RUN([
159 #define _FILE_OFFSET_BITS 64
160 #include <stdio.h>
161 #include <fcntl.h>
162 #include <sys/types.h>
163 #include <sys/wait.h>
164
165 int main(void)
166 {
167         struct flock lock;
168         int status;
169         char tpl[32] = "/tmp/locktest.XXXXXX";
170         int fd = mkstemp(tpl);
171         if (fd < 0) {
172                 strcpy(tpl, "conftest.dat");
173                 fd = open(tpl, O_CREAT|O_RDWR, 0600);
174         }
175
176         lock.l_type = F_WRLCK;
177         lock.l_whence = SEEK_SET;
178         lock.l_start = 0;
179         lock.l_len = 1;
180         lock.l_pid = 0;
181         fcntl(fd,F_SETLK,&lock);
182         if (fork() == 0) {
183                 lock.l_start = 1;
184                 _exit(fcntl(fd,F_SETLK,&lock) == 0);
185         }
186         wait(&status);
187         unlink(tpl);
188         exit(WEXITSTATUS(status));
189 }
190 ],
191 rsync_cv_HAVE_BROKEN_LARGEFILE=yes,rsync_cv_HAVE_BROKEN_LARGEFILE=no,rsync_cv_HAVE_BROKEN_LARGEFILE=cross)])
192 if test x"$rsync_cv_HAVE_BROKEN_LARGEFILE" != x"yes"; then
193    AC_SYS_LARGEFILE
194 fi
195
196 ipv6type=unknown
197 ipv6lib=none
198 ipv6trylibc=yes
199
200 AC_ARG_ENABLE(ipv6,
201         AC_HELP_STRING([--disable-ipv6],
202                 [don't even try to use IPv6]))
203 if test x"$enable_ipv6" != x"no"; then
204         AC_MSG_CHECKING([ipv6 stack type])
205         for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta cygwin; do
206                 case $i in
207                 inria)
208                         # http://www.kame.net/
209                         AC_EGREP_CPP(yes, [
210 #include <netinet/in.h>
211 #ifdef IPV6_INRIA_VERSION
212 yes
213 #endif],
214                                 [ipv6type=$i;
215                                 AC_DEFINE(INET6, 1, [true if you have IPv6])
216                                 ])
217                         ;;
218                 kame)
219                         # http://www.kame.net/
220                         AC_EGREP_CPP(yes, [
221 #include <netinet/in.h>
222 #ifdef __KAME__
223 yes
224 #endif],
225                                 [ipv6type=$i;
226                                 AC_DEFINE(INET6, 1, [true if you have IPv6])])
227                         ;;
228                 linux-glibc)
229                         # http://www.v6.linux.or.jp/
230                         AC_EGREP_CPP(yes, [
231 #include <features.h>
232 #if defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
233 yes
234 #endif],
235                                 [ipv6type=$i;
236 AC_DEFINE(INET6, 1, [true if you have IPv6])])
237                         ;;
238                 linux-inet6)
239                         # http://www.v6.linux.or.jp/
240                         if test -d /usr/inet6 -o -f /usr/inet6/lib/libinet6.a; then
241                                 ipv6type=$i
242                                 ipv6lib=inet6
243                                 ipv6libdir=/usr/inet6/lib
244                                 ipv6trylibc=yes;
245                                 AC_DEFINE(INET6, 1, [true if you have IPv6])
246                                 CFLAGS="-I/usr/inet6/include $CFLAGS"
247                         fi
248                         ;;
249                 solaris)
250                         # http://www.sun.com
251                         AC_EGREP_CPP(yes, [
252 #include <netinet/ip6.h>
253 #ifdef __sun
254 yes
255 #endif],
256                                 [ipv6type=$i;
257                                 AC_DEFINE(INET6, 1, [true if you have IPv6])])
258                         ;;
259                 toshiba)
260                         AC_EGREP_CPP(yes, [
261 #include <sys/param.h>
262 #ifdef _TOSHIBA_INET6
263 yes
264 #endif],
265                                 [ipv6type=$i;
266                                 ipv6lib=inet6;
267                                 ipv6libdir=/usr/local/v6/lib;
268                                 AC_DEFINE(INET6, 1, [true if you have IPv6])])
269                         ;;
270                 v6d)
271                         AC_EGREP_CPP(yes, [
272 #include </usr/local/v6/include/sys/v6config.h>
273 #ifdef __V6D__
274 yes
275 #endif],
276                                 [ipv6type=$i;
277                                 ipv6lib=v6;
278                                 ipv6libdir=/usr/local/v6/lib;
279                                 AC_DEFINE(INET6, 1, [true if you have IPv6])])
280                         ;;
281                 zeta)
282                         AC_EGREP_CPP(yes, [
283 #include <sys/param.h>
284 #ifdef _ZETA_MINAMI_INET6
285 yes
286 #endif],
287                                 [ipv6type=$i;
288                                 ipv6lib=inet6;
289                                 ipv6libdir=/usr/local/v6/lib;
290                                 AC_DEFINE(INET6, 1, [true if you have IPv6])])
291                         ;;
292                 cygwin)
293                         AC_EGREP_CPP(yes, [
294 #include <netinet/in.h>
295 #ifdef _CYGWIN_IN6_H
296 yes
297 #endif],
298                                 [ipv6type=$i;
299                                 AC_DEFINE(INET6, 1, [true if you have IPv6])])
300                         ;;
301                 esac
302                 if test "$ipv6type" != "unknown"; then
303                         break
304                 fi
305         done
306         AC_MSG_RESULT($ipv6type)
307
308         AC_SEARCH_LIBS(getaddrinfo, inet6)
309 fi
310
311 dnl Do you want to disable use of locale functions
312 AC_ARG_ENABLE([locale],
313         AC_HELP_STRING([--disable-locale],
314                 [disable locale features]))
315 AH_TEMPLATE([CONFIG_LOCALE],
316 [Undefine if you don't want locale features.  By default this is defined.])
317 if test x"$enable_locale" != x"no"; then
318         AC_DEFINE(CONFIG_LOCALE)
319 fi
320
321 AC_MSG_CHECKING([whether to call shutdown on all sockets])
322 case $host_os in
323         *cygwin* ) AC_MSG_RESULT(yes)
324                    AC_DEFINE(SHUTDOWN_ALL_SOCKETS, 1,
325                             [Define to 1 if sockets need to be shutdown])
326                    ;;
327                * ) AC_MSG_RESULT(no);;
328 esac
329
330 AC_C_BIGENDIAN
331 AC_HEADER_DIRENT
332 AC_HEADER_TIME
333 AC_HEADER_SYS_WAIT
334 AC_CHECK_HEADERS(sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h \
335     unistd.h utime.h grp.h compat.h sys/param.h ctype.h sys/wait.h \
336     sys/ioctl.h sys/filio.h string.h stdlib.h sys/socket.h sys/mode.h \
337     sys/un.h sys/attr.h mcheck.h arpa/inet.h arpa/nameser.h locale.h \
338     netdb.h malloc.h float.h limits.h iconv.h libcharset.h langinfo.h \
339     sys/acl.h acl/libacl.h attr/xattr.h sys/xattr.h sys/extattr.h \
340     popt.h popt/popt.h)
341 AC_HEADER_MAJOR
342
343 AC_CACHE_CHECK([if makedev takes 3 args],rsync_cv_MAKEDEV_TAKES_3_ARGS,[
344 AC_TRY_RUN([
345 #include <sys/types.h>
346 #ifdef MAJOR_IN_MKDEV
347 #include <sys/mkdev.h>
348 # if !defined makedev && (defined mkdev || defined _WIN32 || defined __WIN32__)
349 #  define makedev mkdev
350 # endif
351 #elif defined MAJOR_IN_SYSMACROS
352 #include <sys/sysmacros.h>
353 #endif
354
355 int main(void)
356 {
357         dev_t dev = makedev(0, 5, 7);
358         if (major(dev) != 5 || minor(dev) != 7)
359                 exit(1);
360         return 0;
361 }
362 ],
363 rsync_cv_MAKEDEV_TAKES_3_ARGS=yes,rsync_cv_MAKEDEV_TAKES_3_ARGS=no,rsync_cv_MAKEDEV_TAKES_3_ARGS=no)])
364 if test x"$rsync_cv_MAKEDEV_TAKES_3_ARGS" = x"yes"; then
365    AC_DEFINE(MAKEDEV_TAKES_3_ARGS, 1, [Define to 1 if makedev() takes 3 args])
366 fi
367
368 AC_CHECK_SIZEOF(int)
369 AC_CHECK_SIZEOF(long)
370 AC_CHECK_SIZEOF(long long)
371 AC_CHECK_SIZEOF(short)
372 AC_CHECK_SIZEOF(int16_t)
373 AC_CHECK_SIZEOF(uint16_t)
374 AC_CHECK_SIZEOF(int32_t)
375 AC_CHECK_SIZEOF(uint32_t)
376 AC_CHECK_SIZEOF(int64_t)
377 AC_CHECK_SIZEOF(off_t)
378 AC_CHECK_SIZEOF(off64_t)
379 AC_CHECK_SIZEOF(time_t)
380
381 AC_C_INLINE
382 AC_C_LONG_DOUBLE
383
384 AC_TYPE_SIGNAL
385 AC_TYPE_UID_T
386 AC_CHECK_TYPES([mode_t,off_t,size_t,pid_t,id_t])
387 AC_TYPE_GETGROUPS
388 AC_CHECK_MEMBERS([struct stat.st_rdev,
389                   struct stat.st_mtimensec,
390                   struct stat.st_mtim.tv_nsec],,,[
391 #ifdef HAVE_SYS_TYPES_H
392 #include <sys/types.h>
393 #endif
394 #ifdef HAVE_SYS_STAT_H
395 #include <sys/stat.h>
396 #endif
397 #ifdef HAVE_UNISTD_H
398 #include <unistd.h>
399 #endif])
400
401 TYPE_SOCKLEN_T
402
403 AC_CACHE_CHECK([for errno in errno.h],rsync_cv_errno, [
404     AC_TRY_COMPILE([#include <errno.h>],[int i = errno],
405         rsync_cv_errno=yes,rsync_cv_have_errno_decl=no)])
406 if test x"$rsync_cv_errno" = x"yes"; then
407    AC_DEFINE(HAVE_ERRNO_DECL, 1, [Define to 1 if errno is declared in errno.h])
408 fi
409
410 # The following test taken from the cvs sources
411 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
412 # These need checks to be before checks for any other functions that
413 #    might be in the same libraries.
414 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
415 # libsocket.so which has a bad implementation of gethostbyname (it
416 # only looks in /etc/hosts), so we only look for -lsocket if we need
417 # it.
418 AC_CHECK_FUNCS(connect)
419 if test x"$ac_cv_func_connect" = x"no"; then
420     case "$LIBS" in
421     *-lnsl*) ;;
422     *) AC_CHECK_LIB(nsl_s, printf) ;;
423     esac
424     case "$LIBS" in
425     *-lnsl*) ;;
426     *) AC_CHECK_LIB(nsl, printf) ;;
427     esac
428     case "$LIBS" in
429     *-lsocket*) ;;
430     *) AC_CHECK_LIB(socket, connect) ;;
431     esac
432     case "$LIBS" in
433     *-linet*) ;;
434     *) AC_CHECK_LIB(inet, connect) ;;
435     esac
436     dnl We can't just call AC_CHECK_FUNCS(connect) here, because the value
437     dnl has been cached.
438     if test x"$ac_cv_lib_socket_connect" = x"yes" ||
439        test x"$ac_cv_lib_inet_connect" = x"yes"; then
440         # ac_cv_func_connect=yes
441         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
442         AC_DEFINE(HAVE_CONNECT, 1, [Define to 1 if you have the "connect" function])
443     fi
444 fi
445
446 AC_SEARCH_LIBS(inet_ntop, resolv)
447
448 # Solaris and HP-UX weirdness:
449 # Search for libiconv_open (not iconv_open) to discover if -liconv is needed!
450 AC_SEARCH_LIBS(libiconv_open, iconv)
451
452 AC_MSG_CHECKING([for iconv declaration])
453 AC_CACHE_VAL(am_cv_proto_iconv, [
454     AC_TRY_COMPILE([
455 #include <stdlib.h>
456 #include <iconv.h>
457 extern
458 #ifdef __cplusplus
459 "C"
460 #endif
461 #if defined(__STDC__) || defined(__cplusplus)
462 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
463 #else
464 size_t iconv();
465 #endif
466 ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
467       am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
468     am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
469 AC_MSG_RESULT([$]{ac_t:-
470          }[$]am_cv_proto_iconv)
471 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
472                    [Define as const if the declaration of iconv() needs const.])
473
474 dnl AC_MSG_NOTICE([Looking in libraries: $LIBS])
475
476 AC_CHECK_FUNCS(inet_ntop, , [AC_LIBOBJ(lib/inet_ntop)])
477 AC_CHECK_FUNCS(inet_pton, , [AC_LIBOBJ(lib/inet_pton)])
478
479 AC_HAVE_TYPE([struct addrinfo], [#include <netdb.h>])
480 AC_HAVE_TYPE([struct sockaddr_storage], [#include <sys/types.h>
481 #include <sys/socket.h>])
482
483 # Irix 6.5 has getaddrinfo but not the corresponding defines, so use
484 #   builtin getaddrinfo if one of the defines don't exist
485 AC_CACHE_CHECK([whether defines needed by getaddrinfo exist],
486                rsync_cv_HAVE_GETADDR_DEFINES,[
487                         AC_EGREP_CPP(yes, [
488                         #include <sys/types.h>
489                         #include <sys/socket.h>
490                         #include <netdb.h>
491                         #ifdef AI_PASSIVE
492                         yes
493                         #endif],
494                         rsync_cv_HAVE_GETADDR_DEFINES=yes,
495                         rsync_cv_HAVE_GETADDR_DEFINES=no)])
496 if test x"$rsync_cv_HAVE_GETADDR_DEFINES" = x"yes" -a x"$ac_cv_type_struct_addrinfo" = x"yes"; then
497         # Tru64 UNIX has getaddrinfo() but has it renamed in libc as
498         # something else so we must include <netdb.h> to get the
499         # redefinition.
500         AC_CHECK_FUNCS(getaddrinfo, ,
501                 [AC_MSG_CHECKING([for getaddrinfo by including <netdb.h>])
502                 AC_TRY_LINK([#include <sys/types.h>
503                 #include <sys/socket.h>
504                 #include <netdb.h>],[getaddrinfo(NULL, NULL, NULL, NULL);],
505                         [AC_MSG_RESULT([yes])
506                         AC_DEFINE(HAVE_GETADDRINFO, 1,
507                                 [Define to 1 if you have the "getaddrinfo" function and required types.])],
508                         [AC_MSG_RESULT([no])
509                         AC_LIBOBJ(lib/getaddrinfo)])])
510 else
511         AC_LIBOBJ(lib/getaddrinfo)
512 fi
513
514 AC_CHECK_MEMBER([struct sockaddr.sa_len],
515                 [ AC_DEFINE(HAVE_SOCKADDR_LEN, 1, [Do we have sockaddr.sa_len?]) ],
516                 [],
517                 [
518 #include <sys/types.h>
519 #include <sys/socket.h>
520 ])
521
522 AC_CHECK_MEMBER([struct sockaddr_in.sin_len],
523                 [ AC_DEFINE(HAVE_SOCKADDR_IN_LEN, 1, [Do we have sockaddr_in.sin_len?]) ],
524                 [],
525                 [
526 #include <sys/types.h>
527 #include <sys/socket.h>
528 #include <netinet/in.h>
529 ])
530
531 AC_CHECK_MEMBER([struct sockaddr_un.sun_len],
532                 [ AC_DEFINE(HAVE_SOCKADDR_UN_LEN, 1, [Do we have sockaddr_un.sun_len?]) ],
533                 [],
534                 [
535 #include <sys/types.h>
536 #include <sys/socket.h>
537 #include <netinet/in.h>
538 ])
539
540 AC_CHECK_MEMBER([struct sockaddr_in6.sin6_scope_id],
541                 [ AC_DEFINE(HAVE_SOCKADDR_IN6_SCOPE_ID, 1, [Do we have sockaddr_in6.sin6_scope_id?]) ],
542                 [],
543                 [
544 #include <sys/types.h>
545 #include <sys/socket.h>
546 #include <netinet/in.h>
547 ])
548
549 AC_HAVE_TYPE([struct stat64], [#include <stdio.h>
550 #if HAVE_SYS_TYPES_H
551 # include <sys/types.h>
552 #endif
553 #if HAVE_SYS_STAT_H
554 # include <sys/stat.h>
555 #endif
556 #if STDC_HEADERS
557 # include <stdlib.h>
558 # include <stddef.h>
559 #else
560 # if HAVE_STDLIB_H
561 #  include <stdlib.h>
562 # endif
563 #endif
564 ])
565
566 # if we can't find strcasecmp, look in -lresolv (for Unixware at least)
567 #
568 AC_CHECK_FUNCS(strcasecmp)
569 if test x"$ac_cv_func_strcasecmp" = x"no"; then
570     AC_CHECK_LIB(resolv, strcasecmp)
571 fi
572
573 AC_CHECK_FUNCS(aclsort)
574 if test x"$ac_cv_func_aclsort" = x"no"; then
575     AC_CHECK_LIB(sec, aclsort)
576 fi
577
578 dnl At the moment we don't test for a broken memcmp(), because all we
579 dnl need to do is test for equality, not comparison, and it seems that
580 dnl every platform has a memcmp that can do at least that.
581 dnl AC_FUNC_MEMCMP
582
583 AC_FUNC_UTIME_NULL
584 AC_FUNC_ALLOCA
585 AC_CHECK_FUNCS(waitpid wait4 getcwd strdup chown chmod lchmod mknod mkfifo \
586     fchmod fstat ftruncate strchr readlink link utime utimes lutimes strftime \
587     memmove lchown vsnprintf snprintf vasprintf asprintf setsid strpbrk \
588     strlcat strlcpy strtol mallinfo getgroups setgroups geteuid getegid \
589     setlocale setmode open64 lseek64 mkstemp64 mtrace va_copy __va_copy \
590     seteuid strerror putenv iconv_open locale_charset nl_langinfo getxattr \
591     extattr_get_link sigaction sigprocmask setattrlist getgrouplist \
592     initgroups utimensat)
593
594 dnl cygwin iconv.h defines iconv_open as libiconv_open
595 if test x"$ac_cv_func_iconv_open" != x"yes"; then
596     AC_CHECK_FUNC(libiconv_open, [ac_cv_func_iconv_open=yes; AC_DEFINE(HAVE_ICONV_OPEN, 1)])
597 fi
598
599 AC_CHECK_FUNCS(getpgrp tcgetpgrp)
600 if test $ac_cv_func_getpgrp = yes; then
601     AC_FUNC_GETPGRP
602 fi
603
604 AC_ARG_ENABLE(iconv-open,
605     AC_HELP_STRING([--disable-iconv-open],
606             [disable all use of iconv_open() function]),
607     [], [enable_iconv_open=$ac_cv_func_iconv_open])
608
609 if test x"$enable_iconv_open" != x"no"; then
610     AC_DEFINE(USE_ICONV_OPEN, 1, [Define to 1 if you want rsync to make use of iconv_open()])
611 fi
612
613 AC_ARG_ENABLE(iconv,
614     AC_HELP_STRING([--disable-iconv],
615             [disable rsync's --iconv option]),
616     [], [enable_iconv=$enable_iconv_open])
617 AH_TEMPLATE([ICONV_OPTION],
618 [Define if you want the --iconv option.  Specifing a value will set the
619 default iconv setting (a NULL means no --iconv processing by default).])
620 if test x"$enable_iconv" != x"no"; then
621         if test x"$enable_iconv" = x"yes"; then
622                 AC_DEFINE(ICONV_OPTION, NULL)
623         else
624                 AC_DEFINE_UNQUOTED(ICONV_OPTION, "$enable_iconv")
625         fi
626         AC_DEFINE(UTF8_CHARSET, "UTF-8", [String to pass to iconv() for the UTF-8 charset.])
627 fi
628
629 AC_CACHE_CHECK([whether chown() modifies symlinks],rsync_cv_chown_modifies_symlink,[
630   AC_TRY_RUN([
631 #if HAVE_UNISTD_H
632 # include <unistd.h>
633 #endif
634 #include <stdlib.h>
635 #include <errno.h>
636     main() {
637         char const *dangling_symlink = "conftest.dangle";
638         unlink(dangling_symlink);
639         if (symlink("conftest.no-such", dangling_symlink) < 0) abort();
640         if (chown(dangling_symlink, getuid(), getgid()) < 0 && errno == ENOENT) exit(1);
641         exit(0);
642     }],
643   rsync_cv_chown_modifies_symlink=yes,rsync_cv_chown_modifies_symlink=no,rsync_cv_chown_modifies_symlink=no)])
644 if test $rsync_cv_chown_modifies_symlink = yes; then
645   AC_DEFINE(CHOWN_MODIFIES_SYMLINK, 1, [Define to 1 if chown modifies symlinks.])
646 fi
647
648 AC_CACHE_CHECK([whether link() can hard-link symlinks],rsync_cv_can_hardlink_symlink,[
649   AC_TRY_RUN([
650 #if HAVE_UNISTD_H
651 # include <unistd.h>
652 #endif
653 #include <stdlib.h>
654 #include <errno.h>
655 #define FILENAME "conftest.dangle"
656     main() {
657         unlink(FILENAME);
658         if (symlink("conftest.no-such", FILENAME) < 0) abort();
659         if (link(FILENAME, FILENAME "2") < 0) exit(1);
660         exit(0);
661     }],
662   rsync_cv_can_hardlink_symlink=yes,rsync_cv_can_hardlink_symlink=no,rsync_cv_can_hardlink_symlink=no)])
663 if test $rsync_cv_can_hardlink_symlink = yes; then
664   AC_DEFINE(CAN_HARDLINK_SYMLINK, 1, [Define to 1 if link() can hard-link symlinks.])
665 fi
666
667 AC_CACHE_CHECK([whether link() can hard-link special files],rsync_cv_can_hardlink_special,[
668   AC_TRY_RUN([
669 #if HAVE_UNISTD_H
670 # include <unistd.h>
671 #endif
672 #include <stdlib.h>
673 #include <errno.h>
674 #define FILENAME "conftest.fifi"
675     main() {
676         unlink(FILENAME);
677         if (mkfifo(FILENAME, 0777) < 0) abort();
678         if (link(FILENAME, FILENAME "2") < 0) exit(1);
679         exit(0);
680     }],
681   rsync_cv_can_hardlink_special=yes,rsync_cv_can_hardlink_special=no,rsync_cv_can_hardlink_special=no)])
682 if test $rsync_cv_can_hardlink_special = yes; then
683     AC_DEFINE(CAN_HARDLINK_SPECIAL, 1, [Define to 1 if link() can hard-link special files.])
684 fi
685
686 AC_CACHE_CHECK([for working socketpair],rsync_cv_HAVE_SOCKETPAIR,[
687 AC_TRY_RUN([
688 #include <sys/types.h>
689 #include <sys/socket.h>
690
691 main() {
692        int fd[2];
693        exit((socketpair(AF_UNIX, SOCK_STREAM, 0, fd) != -1) ? 0 : 1);
694 }],
695 rsync_cv_HAVE_SOCKETPAIR=yes,rsync_cv_HAVE_SOCKETPAIR=no,rsync_cv_HAVE_SOCKETPAIR=cross)])
696 if test x"$rsync_cv_HAVE_SOCKETPAIR" = x"yes"; then
697     AC_DEFINE(HAVE_SOCKETPAIR, 1, [Define to 1 if you have the "socketpair" function])
698 fi
699
700 if test x"$with_included_popt" != x"yes"; then
701     AC_CHECK_LIB(popt, poptGetContext, , [with_included_popt=yes])
702 fi
703 if test x"$ac_cv_header_popt_popt_h" = x"yes"; then
704     # If the system has /usr/include/popt/popt.h, we enable the
705     # included popt because an attempt to "#include <popt/popt.h>"
706     # would use our included header file anyway (due to -I.), and
707     # might conflict with the system popt.
708     with_included_popt=yes
709 elif test x"$ac_cv_header_popt_h" != x"yes"; then
710     with_included_popt=yes
711 fi
712
713 AC_MSG_CHECKING([whether to use included libpopt])
714 if test x"$with_included_popt" = x"yes"; then
715     AC_MSG_RESULT($srcdir/popt)
716     BUILD_POPT='$(popt_OBJS)'
717     CFLAGS="$CFLAGS -I$srcdir/popt"
718     if test x"$ALLOCA" != x
719     then
720         # this can be removed when/if we add an included alloca.c;
721         #  see autoconf documentation on AC_FUNC_ALLOCA
722         AC_MSG_WARN([included libpopt will use malloc, not alloca (which wastes a small amount of memory)])
723     fi
724 else
725     AC_MSG_RESULT(no)
726 fi
727
728 AC_CACHE_CHECK([for unsigned char],rsync_cv_SIGNED_CHAR_OK,[
729 AC_TRY_COMPILE([],[signed char *s = ""],
730 rsync_cv_SIGNED_CHAR_OK=yes,rsync_cv_SIGNED_CHAR_OK=no)])
731 if test x"$rsync_cv_SIGNED_CHAR_OK" = x"yes"; then
732     AC_DEFINE(SIGNED_CHAR_OK, 1, [Define to 1 if "signed char" is a valid type])
733 fi
734
735 AC_CACHE_CHECK([for broken readdir],rsync_cv_HAVE_BROKEN_READDIR,[
736 AC_TRY_RUN([#include <sys/types.h>
737 #include <dirent.h>
738 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
739 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
740 di->d_name[0] == 0) exit(0); exit(1);} ],
741 rsync_cv_HAVE_BROKEN_READDIR=yes,rsync_cv_HAVE_BROKEN_READDIR=no,rsync_cv_HAVE_BROKEN_READDIR=cross)])
742 if test x"$rsync_cv_HAVE_BROKEN_READDIR" = x"yes"; then
743     AC_DEFINE(HAVE_BROKEN_READDIR, 1, [Define to 1 if readdir() is broken])
744 fi
745
746 AC_CACHE_CHECK([for utimbuf],rsync_cv_HAVE_STRUCT_UTIMBUF,[
747 AC_TRY_COMPILE([#include <sys/types.h>
748 #include <utime.h>],
749 [struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));],
750 rsync_cv_HAVE_STRUCT_UTIMBUF=yes,rsync_cv_HAVE_STRUCT_UTIMBUF=no)])
751 if test x"$rsync_cv_HAVE_STRUCT_UTIMBUF" = x"yes"; then
752     AC_DEFINE(HAVE_STRUCT_UTIMBUF, 1, [Define to 1 if you have the "struct utimbuf" type])
753 fi
754
755 AC_CACHE_CHECK([if gettimeofday takes tz argument],rsync_cv_HAVE_GETTIMEOFDAY_TZ,[
756 AC_TRY_COMPILE([#include <sys/time.h>
757 #include <unistd.h>],
758 [struct timeval tv; exit(gettimeofday(&tv, NULL));],
759 rsync_cv_HAVE_GETTIMEOFDAY_TZ=yes,rsync_cv_HAVE_GETTIMEOFDAY_TZ=no)])
760 if test x"$rsync_cv_HAVE_GETTIMEOFDAY_TZ" != x"no"; then
761     AC_DEFINE(HAVE_GETTIMEOFDAY_TZ, 1, [Define to 1 if gettimeofday() takes a time-zone arg])
762 fi
763
764 AC_CACHE_CHECK([for C99 vsnprintf],rsync_cv_HAVE_C99_VSNPRINTF,[
765 AC_TRY_RUN([
766 #include <sys/types.h>
767 #include <stdarg.h>
768 void foo(const char *format, ...) {
769        va_list ap;
770        int len;
771        char buf[5];
772
773        va_start(ap, format);
774        len = vsnprintf(0, 0, format, ap);
775        va_end(ap);
776        if (len != 5) exit(1);
777
778        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
779
780        exit(0);
781 }
782 main() { foo("hello"); }
783 ],
784 rsync_cv_HAVE_C99_VSNPRINTF=yes,rsync_cv_HAVE_C99_VSNPRINTF=no,rsync_cv_HAVE_C99_VSNPRINTF=cross)])
785 if test x"$rsync_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
786     AC_DEFINE(HAVE_C99_VSNPRINTF, 1, [Define to 1 if vsprintf has a C99-compatible return value])
787 fi
788
789
790 AC_CACHE_CHECK([for secure mkstemp],rsync_cv_HAVE_SECURE_MKSTEMP,[
791 AC_TRY_RUN([#include <stdlib.h>
792 #include <sys/types.h>
793 #include <sys/stat.h>
794 #include <unistd.h>
795 main() {
796   struct stat st;
797   char tpl[20]="/tmp/test.XXXXXX";
798   int fd = mkstemp(tpl);
799   if (fd == -1) exit(1);
800   unlink(tpl);
801   if (fstat(fd, &st) != 0) exit(1);
802   if ((st.st_mode & 0777) != 0600) exit(1);
803   exit(0);
804 }],
805 rsync_cv_HAVE_SECURE_MKSTEMP=yes,
806 rsync_cv_HAVE_SECURE_MKSTEMP=no,
807 rsync_cv_HAVE_SECURE_MKSTEMP=cross)])
808 if test x"$rsync_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
809     case $host_os in
810     hpux*)
811         dnl HP-UX has a broken mkstemp() implementation they refuse to fix,
812         dnl so we noisily skip using it.  See HP change request JAGaf34426
813         dnl for details. (sbonds)
814         AC_MSG_WARN(Skipping broken HP-UX mkstemp() -- using mktemp() instead)
815         ;;
816     *)
817         AC_DEFINE(HAVE_SECURE_MKSTEMP, 1, [Define to 1 if mkstemp() is available and works right])
818         ;;
819     esac
820 fi
821
822
823 AC_CACHE_CHECK([if mknod creates FIFOs],rsync_cv_MKNOD_CREATES_FIFOS,[
824 AC_TRY_RUN([
825 #include <stdio.h>
826 #include <sys/stat.h>
827 #include <errno.h>
828 main() { int rc, ec; char *fn = "fifo-test";
829 unlink(fn); rc = mknod(fn,S_IFIFO,0600); ec = errno; unlink(fn);
830 if (rc) {printf("(%d %d) ",rc,ec); return ec;}
831 return 0;}],
832            rsync_cv_MKNOD_CREATES_FIFOS=yes,rsync_cv_MKNOD_CREATES_FIFOS=no,rsync_cv_MKNOD_CREATES_FIFOS=cross)])
833 if test x"$rsync_cv_MKNOD_CREATES_FIFOS" = x"yes"; then
834     AC_DEFINE(MKNOD_CREATES_FIFOS, 1, [Define to 1 if mknod() can create FIFOs.])
835 fi
836
837 AC_CACHE_CHECK([if mknod creates sockets],rsync_cv_MKNOD_CREATES_SOCKETS,[
838 AC_TRY_RUN([
839 #include <stdio.h>
840 #include <sys/stat.h>
841 #include <errno.h>
842 main() { int rc, ec; char *fn = "sock-test";
843 unlink(fn); rc = mknod(fn,S_IFSOCK,0600); ec = errno; unlink(fn);
844 if (rc) {printf("(%d %d) ",rc,ec); return ec;}
845 return 0;}],
846            rsync_cv_MKNOD_CREATES_SOCKETS=yes,rsync_cv_MKNOD_CREATES_SOCKETS=no,rsync_cv_MKNOD_CREATES_SOCKETS=cross)])
847 if test x"$rsync_cv_MKNOD_CREATES_SOCKETS" = x"yes"; then
848     AC_DEFINE(MKNOD_CREATES_SOCKETS, 1, [Define to 1 if mknod() can create sockets.])
849 fi
850
851 #
852 # The following test was mostly taken from the tcl/tk plus patches
853 #
854 AC_CACHE_CHECK([whether -c -o works],rsync_cv_DASHC_WORKS_WITH_DASHO,[
855 rm -rf conftest*
856 cat > conftest.$ac_ext <<EOF
857 int main() { return 0; }
858 EOF
859 ${CC-cc} -c -o conftest..o conftest.$ac_ext
860 if test -f conftest..o; then
861     rsync_cv_DASHC_WORKS_WITH_DASHO=yes
862 else
863     rsync_cv_DASHC_WORKS_WITH_DASHO=no
864 fi
865 rm -rf conftest*
866 ])
867 if test x"$rsync_cv_DASHC_WORKS_WITH_DASHO" = x"yes"; then
868     OBJ_SAVE="#"
869     OBJ_RESTORE="#"
870     CC_SHOBJ_FLAG='-o $@'
871 else
872     OBJ_SAVE='  @b=`basename $@ .o`;rm -f $$b.o.sav;if test -f $$b.o; then mv $$b.o $$b.o.sav;fi;'
873     OBJ_RESTORE='       @b=`basename $@ .o`;if test "$$b.o" != "$@"; then mv $$b.o $@; if test -f $$b.o.sav; then mv $$b.o.sav $$b.o; fi; fi'
874     CC_SHOBJ_FLAG=""
875 fi
876
877 AC_SUBST(OBJ_SAVE)
878 AC_SUBST(OBJ_RESTORE)
879 AC_SUBST(CC_SHOBJ_FLAG)
880 AC_SUBST(BUILD_POPT)
881 AC_SUBST(MAKE_MAN)
882
883 AC_CHECK_FUNCS(_acl __acl _facl __facl)
884 #################################################
885 # check for ACL support
886
887 AC_MSG_CHECKING([whether to support ACLs])
888 AC_ARG_ENABLE(acl-support,
889         AC_HELP_STRING([--disable-acl-support],
890                        [disable ACL support]))
891
892 if test x"$enable_acl_support" = x"no"; then
893     AC_MSG_RESULT(no)
894 else
895     case "$host_os" in
896     *sysv5*)
897         AC_MSG_RESULT(Using UnixWare ACLs)
898         AC_DEFINE(HAVE_UNIXWARE_ACLS, 1, [true if you have UnixWare ACLs])
899         AC_DEFINE(SUPPORT_ACLS, 1, [Define to 1 to add support for ACLs])
900         ;;
901     *solaris*|*cygwin*)
902         AC_MSG_RESULT(Using solaris ACLs)
903         AC_DEFINE(HAVE_SOLARIS_ACLS, 1, [true if you have solaris ACLs])
904         AC_DEFINE(SUPPORT_ACLS, 1)
905         ;;
906     *hpux*)
907         AC_MSG_RESULT(Using HPUX ACLs)
908         AC_DEFINE(HAVE_HPUX_ACLS, 1, [true if you have HPUX ACLs])
909         AC_DEFINE(SUPPORT_ACLS, 1)
910         ;;
911     *irix*)
912         AC_MSG_RESULT(Using IRIX ACLs)
913         AC_DEFINE(HAVE_IRIX_ACLS, 1, [true if you have IRIX ACLs])
914         AC_DEFINE(SUPPORT_ACLS, 1)
915         ;;
916     *aix*)
917         AC_MSG_RESULT(Using AIX ACLs)
918         AC_DEFINE(HAVE_AIX_ACLS, 1, [true if you have AIX ACLs])
919         AC_DEFINE(SUPPORT_ACLS, 1)
920         ;;
921     *osf*)
922         AC_MSG_RESULT(Using Tru64 ACLs)
923         AC_DEFINE(HAVE_TRU64_ACLS, 1, [true if you have Tru64 ACLs])
924         AC_DEFINE(SUPPORT_ACLS, 1)
925         LIBS="$LIBS -lpacl"
926         ;;
927     darwin*)
928         AC_MSG_RESULT(Using OS X ACLs)
929         AC_DEFINE(HAVE_OSX_ACLS, 1, [true if you have Mac OS X ACLs])
930         AC_DEFINE(SUPPORT_ACLS, 1)
931         ;;
932     *)
933         AC_MSG_RESULT(running tests:)
934         AC_CHECK_LIB(acl,acl_get_file)
935             AC_CACHE_CHECK([for ACL support],samba_cv_HAVE_POSIX_ACLS,[
936             AC_TRY_LINK([#include <sys/types.h>
937 #include <sys/acl.h>],
938 [ acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);],
939 samba_cv_HAVE_POSIX_ACLS=yes,samba_cv_HAVE_POSIX_ACLS=no)])
940         AC_MSG_CHECKING(ACL test results)
941         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
942             AC_MSG_RESULT(Using posix ACLs)
943             AC_DEFINE(HAVE_POSIX_ACLS, 1, [true if you have posix ACLs])
944             AC_DEFINE(SUPPORT_ACLS, 1)
945             AC_CACHE_CHECK([for acl_get_perm_np],samba_cv_HAVE_ACL_GET_PERM_NP,[
946                 AC_TRY_LINK([#include <sys/types.h>
947 #include <sys/acl.h>],
948 [ acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);],
949 samba_cv_HAVE_ACL_GET_PERM_NP=yes,samba_cv_HAVE_ACL_GET_PERM_NP=no)])
950             if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
951                 AC_DEFINE(HAVE_ACL_GET_PERM_NP, 1, [true if you have acl_get_perm_np])
952             fi
953         else
954             if test x"$enable_acl_support" = x"yes"; then
955                 AC_MSG_ERROR(Failed to find ACL support)
956             else
957                 AC_MSG_RESULT(No ACL support found)
958             fi
959         fi
960         ;;
961     esac
962 fi
963
964 #################################################
965 # check for extended attribute support
966 AC_MSG_CHECKING(whether to support extended attributes)
967 AC_ARG_ENABLE(xattr-support,
968     AC_HELP_STRING([--disable-xattr-support],
969             [disable extended attributes]),
970     [], [case "$ac_cv_func_getxattr$ac_cv_func_extattr_get_link" in
971         *yes*) enable_xattr_support=maybe ;;
972         *) enable_xattr_support=no ;;
973         esac])
974 AH_TEMPLATE([SUPPORT_XATTRS],
975 [Define to 1 to add support for extended attributes])
976 if test x"$enable_xattr_support" = x"no"; then
977     AC_MSG_RESULT(no)
978 else
979     case "$host_os" in
980     *linux*)
981         AC_MSG_RESULT(Using Linux xattrs)
982         AC_DEFINE(HAVE_LINUX_XATTRS, 1, [True if you have Linux xattrs])
983         AC_DEFINE(SUPPORT_XATTRS, 1)
984         ;;
985     darwin*)
986         AC_MSG_RESULT(Using OS X xattrs)
987         AC_DEFINE(HAVE_OSX_XATTRS, 1, [True if you have Mac OS X xattrs])
988         AC_DEFINE(SUPPORT_XATTRS, 1)
989         ;;
990     freebsd*)
991         AC_MSG_RESULT(Using FreeBSD extattrs)
992         AC_DEFINE(HAVE_FREEBSD_XATTRS, 1, [True if you have FreeBSD xattrs])
993         AC_DEFINE(SUPPORT_XATTRS, 1)
994         ;;
995     solaris*)
996         AC_MSG_RESULT(Using Solaris xattrs)
997         AC_DEFINE(HAVE_SOLARIS_XATTRS, 1, [True if you have Solaris xattrs])
998         AC_DEFINE(SUPPORT_XATTRS, 1)
999         AC_DEFINE(NO_SYMLINK_XATTRS, 1, [True if symlinks don't support xattrs])
1000         ;;
1001     *)
1002         if test x"$enable_xattr_support" = x"yes"; then
1003             AC_MSG_ERROR(Failed to find extended attribute support)
1004         else
1005             AC_MSG_RESULT(No extended attribute support found)
1006         fi
1007         ;;
1008     esac
1009 fi
1010
1011 if test x"$enable_acl_support" = x"no" -o x"$enable_xattr_support" = x"no" -o x"$enable_iconv" = x"no"; then
1012     AC_MSG_CHECKING([whether $CC supports -Wno-unused-parameter])
1013     OLD_CFLAGS="$CFLAGS"
1014     CFLAGS="$CFLAGS -Wno-unused-parameter"
1015     AC_TRY_LINK([#include <stdio.h>], [printf("hello\n");], [rsync_warn_flag=yes], [rsync_warn_flag=no])
1016     AC_MSG_RESULT([$rsync_warn_flag])
1017     if test x"$rsync_warn_flag" = x"no"; then
1018         CFLAGS="$OLD_CFLAGS"
1019     fi
1020 fi
1021
1022 case "$CC" in
1023 ' checker'*|checker*)
1024     AC_DEFINE(FORCE_FD_ZERO_MEMSET, 1, [Used to make "checker" understand that FD_ZERO() clears memory.])
1025     ;;
1026 esac
1027
1028 AC_CONFIG_FILES([Makefile lib/dummy zlib/dummy popt/dummy shconfig])
1029 AC_OUTPUT
1030
1031 AC_MSG_RESULT()
1032 AC_MSG_RESULT([    rsync ${RSYNC_VERSION} configuration successful])
1033 AC_MSG_RESULT()