AC_CONFIG_HEADER(config.h)
AC_PREREQ(2.59)
-RSYNC_VERSION=2.6.5
+RSYNC_VERSION=2.6.7pre1
AC_SUBST(RSYNC_VERSION)
AC_MSG_NOTICE([Configuring rsync $RSYNC_VERSION])
AC_DEFINE([_GNU_SOURCE], 1,
[Define _GNU_SOURCE so that we get all necessary prototypes])
-if test "x$ac_cv_prog_cc_stdc" = xno
-then
+if test x"$ac_cv_prog_cc_stdc" = x"no"; then
AC_MSG_WARN([rsync requires an ANSI C compiler and you don't seem to have one])
fi
AC_MSG_CHECKING([whether to include debugging symbols])
AC_ARG_ENABLE(debug,
- AC_HELP_STRING([--enable-debug],
- [including debugging symbols and features (default yes)]),
- [], [])
+ AC_HELP_STRING([--disable-debug],
+ [turn off debugging symbols and features]))
-if test x"$enable_debug" = x"no"
-then
+if test x"$enable_debug" = x"no"; then
AC_MSG_RESULT(no)
CFLAGS=${CFLAGS-"-O"}
else
fi
-
-
AC_ARG_ENABLE(profile,
AC_HELP_STRING([--enable-profile],
- [turn on CPU profiling (default no)],
- [], []))
-if test x"$enable_profile" = xyes
-then
+ [turn on CPU profiling]))
+if test x"$enable_profile" = x"yes"; then
CFLAGS="$CFLAGS -pg"
fi
# Specifically, this turns on panic_action handling.
AC_ARG_ENABLE(maintainer-mode,
AC_HELP_STRING([--enable-maintainer-mode],
- [turn on extra debug features],
- [], []))
-if test x"$enable_maintainer_mode" = xyes
-then
+ [turn on extra debug features]))
+if test x"$enable_maintainer_mode" = x"yes"; then
CFLAGS="$CFLAGS -DMAINTAINER_MODE"
fi
CFLAGS="$CFLAGS -DHAVE_CONFIG_H"
# If GCC, turn on warnings.
-if test x"$GCC" = x"yes"
-then
+if test x"$GCC" = x"yes"; then
CFLAGS="$CFLAGS -Wall -W"
fi
AC_ARG_WITH(included-popt,
- [ --with-included-popt use bundled popt library, not from system])
+ AC_HELP_STRING([--with-included-popt], [use bundled popt library, not from system]))
AC_ARG_WITH(rsync-path,
- [ --with-rsync-path=PATH set default --rsync-path to PATH (default: rsync)],
+ AC_HELP_STRING([--with-rsync-path=PATH], [set default --rsync-path to PATH (default: rsync)]),
[ RSYNC_PATH="$with_rsync_path" ],
[ RSYNC_PATH="rsync" ])
AC_DEFINE(HAVE_REMSH, 1, [Define to 1 if remote shell is remsh, not rsh])
fi
-if test x"$with_rsh" != x
-then
+if test x"$with_rsh" != x; then
RSYNC_RSH="$with_rsh"
else
RSYNC_RSH="ssh"
fi
-
AC_DEFINE_UNQUOTED(RSYNC_RSH, "$RSYNC_RSH", [default -e command])
-# arrgh. libc in the current debian stable screws up the largefile
+AC_MSG_CHECKING([the group for user "nobody"])
+if grep '^nobody:' /etc/group >/dev/null 2>&1; then
+ NOBODY_GROUP=nobody
+elif grep '^nogroup:' /etc/group >/dev/null 2>&1; then
+ NOBODY_GROUP=nogroup
+else
+ NOBODY_GROUP=nobody # test for others?
+fi
+AC_MSG_RESULT($NOBODY_GROUP)
+AC_DEFINE_UNQUOTED(NOBODY_USER, "nobody", [unprivileged user--e.g. nobody])
+AC_DEFINE_UNQUOTED(NOBODY_GROUP, "$NOBODY_GROUP", [unprivileged group for unprivileged user])
+
+# arrgh. libc in some old debian version screwed up the largefile
# stuff, getting byte range locking wrong
AC_CACHE_CHECK([for broken largefile support],rsync_cv_HAVE_BROKEN_LARGEFILE,[
AC_TRY_RUN([
ipv6trylibc=yes
AC_ARG_ENABLE(ipv6,
- AC_HELP_STRING([--disable-ipv6], [don't even try to use IPv6]))
-
-dnl Do you want to disable use of locale functions
-AH_TEMPLATE([CONFIG_LOCALE],
-[Undefine if you don't want locale features. By default this is defined.])
-AC_ARG_ENABLE([locale],
- AC_HELP_STRING([--disable-locale], [turn off locale features]),
-[if test x$enableval = xyes; then
- AC_DEFINE(CONFIG_LOCALE)
-fi],
-AC_DEFINE(CONFIG_LOCALE)
-)
-
-if test "x$enable_ipv6" != xno
-then
+ AC_HELP_STRING([--disable-ipv6],
+ [don't even try to use IPv6]))
+if test x"$enable_ipv6" != x"no"; then
AC_MSG_CHECKING([ipv6 stack type])
for i in inria kame linux-glibc linux-inet6 toshiba v6d zeta; do
case $i in
AC_SEARCH_LIBS(getaddrinfo, inet6)
fi
+dnl Do you want to disable use of locale functions
+AC_ARG_ENABLE([locale],
+ AC_HELP_STRING([--disable-locale],
+ [turn off locale features]))
+AH_TEMPLATE([CONFIG_LOCALE],
+[Undefine if you don't want locale features. By default this is defined.])
+if test x"$enable_locale" != x"no"; then
+ AC_DEFINE(CONFIG_LOCALE)
+fi
+
AC_MSG_CHECKING([whether to call shutdown on all sockets])
case $host_os in
*cygwin* ) AC_MSG_RESULT(yes)
unistd.h utime.h grp.h compat.h sys/param.h ctype.h sys/wait.h \
sys/ioctl.h sys/filio.h string.h stdlib.h sys/socket.h sys/mode.h \
sys/un.h glob.h mcheck.h arpa/inet.h arpa/nameser.h locale.h \
- netdb.h malloc.h float.h)
+ netdb.h malloc.h float.h limits.h iconv.h libcharset.h langinfo.h)
AC_HEADER_MAJOR
AC_CHECK_SIZEOF(int)
fi
fi
-AC_CHECK_LIB(resolv, inet_ntop)
+AC_SEARCH_LIBS(inet_ntop, resolv)
+
+# Solaris and HP-UX weirdness:
+# Search for libiconv_open (not iconv_open) to discover if -liconv is needed!
+AC_SEARCH_LIBS(libiconv_open, iconv)
dnl AC_MSG_NOTICE([Looking in libraries: $LIBS])
AC_FUNC_UTIME_NULL
AC_FUNC_ALLOCA
-AC_CHECK_FUNCS(waitpid wait4 getcwd strdup strerror chown chmod mknod mkfifo \
- fchmod fstat strchr readlink link utime utimes strftime mtrace ftruncate \
+AC_CHECK_FUNCS(waitpid wait4 getcwd strdup chown chmod lchmod mknod mkfifo \
+ fchmod fstat ftruncate strchr readlink link utime utimes lutimes strftime \
memmove lchown vsnprintf snprintf vasprintf asprintf setsid glob strpbrk \
strlcat strlcpy strtol mallinfo getgroups setgroups geteuid getegid \
- setlocale setmode open64 lseek64 mkstemp64 va_copy __va_copy)
+ setlocale setmode open64 lseek64 mkstemp64 mtrace va_copy __va_copy \
+ strerror putenv iconv_open locale_charset nl_langinfo \
+ sigaction sigprocmask)
AC_CHECK_FUNCS(getpgrp tcgetpgrp)
if test $ac_cv_func_getpgrp = yes; then
AC_DEFINE(HAVE_SOCKETPAIR, 1, [Define to 1 if you have the "socketpair" function])
fi
-if test x"$with_included_popt" != x"yes"
-then
+if test x"$with_included_popt" != x"yes"; then
AC_CHECK_LIB(popt, poptGetContext, , [with_included_popt=yes])
fi
AC_MSG_CHECKING([whether to use included libpopt])
-if test x"$with_included_popt" = x"yes"
-then
+if test x"$with_included_popt" = x"yes"; then
AC_MSG_RESULT($srcdir/popt)
BUILD_POPT='$(popt_OBJS)'
CFLAGS="$CFLAGS -I$srcdir/popt"
#include <errno.h>
main() { int rc, ec; char *fn = "fifo-test";
unlink(fn); rc = mknod(fn,S_IFIFO,0600); ec = errno; unlink(fn);
-if (rc) {printf("%d %d\n",rc,ec); return ec;}
+if (rc) {printf("(%d %d) ",rc,ec); return ec;}
return 0;}],
rsync_cv_MKNOD_CREATES_FIFOS=yes,rsync_cv_MKNOD_CREATES_FIFOS=no,rsync_cv_MKNOD_CREATES_FIFOS=cross)])
if test x"$rsync_cv_MKNOD_CREATES_FIFOS" = x"yes"; then
#include <errno.h>
main() { int rc, ec; char *fn = "sock-test";
unlink(fn); rc = mknod(fn,S_IFSOCK,0600); ec = errno; unlink(fn);
-if (rc) {printf("%d %d\n",rc,ec); return ec;}
+if (rc) {printf("(%d %d) ",rc,ec); return ec;}
return 0;}],
rsync_cv_MKNOD_CREATES_SOCKETS=yes,rsync_cv_MKNOD_CREATES_SOCKETS=no,rsync_cv_MKNOD_CREATES_SOCKETS=cross)])
if test x"$rsync_cv_MKNOD_CREATES_SOCKETS" = x"yes"; then