diff --git a/configure.ac b/configure.ac index d2bcb471..9758d125 100644 --- a/configure.ac +++ b/configure.ac @@ -376,36 +376,6 @@ if test x"$rsync_cv_HAVE_BROKEN_LARGEFILE" != x"yes"; then AC_SYS_LARGEFILE fi -AC_MSG_CHECKING([whether to enable ipv6]) -AC_ARG_ENABLE(ipv6, -AS_HELP_STRING([--disable-ipv6],[disable to omit ipv6 support]), -[ case "$enableval" in - no) - AC_MSG_RESULT(no) - ;; - *) AC_MSG_RESULT(yes) - AC_DEFINE(INET6, 1, [true if you have IPv6]) - ;; - esac ], - - AC_RUN_IFELSE([AC_LANG_SOURCE([[ /* AF_INET6 availability check */ -#include -#include -#include -int main() -{ - if (socket(AF_INET6, SOCK_STREAM, 0) < 0) - exit(1); - else - exit(0); -} -]])], - [AC_MSG_RESULT(yes) - AC_DEFINE(INET6, 1, true if you have IPv6)], - [AC_MSG_RESULT(no)], - [AC_MSG_RESULT(no)] -)) - dnl Do you want to disable use of locale functions AC_ARG_ENABLE([locale], AS_HELP_STRING([--disable-locale],[disable to omit locale features])) @@ -716,6 +686,36 @@ if test x"$ac_cv_func_connect" = x"no"; then fi fi +AC_MSG_CHECKING([whether to enable ipv6]) +AC_ARG_ENABLE(ipv6, +AS_HELP_STRING([--disable-ipv6],[disable to omit ipv6 support]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + ;; + *) AC_MSG_RESULT(yes) + AC_DEFINE(INET6, 1, [true if you have IPv6]) + ;; + esac ], + + AC_RUN_IFELSE([AC_LANG_SOURCE([[ /* AF_INET6 availability check */ +#include +#include +#include +int main() +{ + if (socket(AF_INET6, SOCK_STREAM, 0) < 0) + exit(1); + else + exit(0); +} +]])], + [AC_MSG_RESULT(yes) + AC_DEFINE(INET6, 1, true if you have IPv6)], + [AC_MSG_RESULT(no)], + [AC_MSG_RESULT(no)] +)) + AC_SEARCH_LIBS(inet_ntop, resolv) # For OS X, Solaris, HP-UX, etc.: figure out if -liconv is needed. We'll