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
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_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"
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 the current debian stable screws up the largefile
+# 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 limits.h)
+ netdb.h malloc.h float.h limits.h iconv.h libcharset.h langinfo.h)
AC_HEADER_MAJOR
AC_CHECK_SIZEOF(int)
memmove lchown vsnprintf snprintf vasprintf asprintf setsid glob strpbrk \
strlcat strlcpy strtol mallinfo getgroups setgroups geteuid getegid \
setlocale setmode open64 lseek64 mkstemp64 mtrace va_copy __va_copy \
- strerror putenv)
+ strerror putenv iconv_open locale_charset nl_langinfo)
AC_CHECK_FUNCS(getpgrp tcgetpgrp)
if test $ac_cv_func_getpgrp = yes; then
AC_FUNC_GETPGRP
fi
+AC_ARG_ENABLE(iconv,
+ AC_HELP_STRING([--disable-iconv],
+ [disable rsync's --iconv option]),
+ [], [enable_iconv=$ac_cv_func_iconv_open])
+AH_TEMPLATE([ICONV_OPTION],
+[Define if you want the --iconv option. Specifing a value will set the
+default iconv setting (a NULL means no --iconv processing by default).])
+if test x"$enable_iconv" != x"no"; then
+ if test x"$enable_iconv" = x"yes"; then
+ AC_DEFINE(ICONV_OPTION, NULL)
+ else
+ AC_DEFINE_UNQUOTED(ICONV_OPTION, "$enable_iconv")
+ fi
+ AC_DEFINE(UTF8_CHARSET, "UTF-8", [String to pass to iconv() for the UTF-8 charset.])
+fi
+
+
# Determine whether chown follows symlinks (it should).
AC_CACHE_CHECK([whether chown() dereferences symlinks],rsync_cv_chown_follows_symlink,[
AC_TRY_RUN([
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"