Preparing for release of 2.6.1pre-1
[rsync/rsync.git] / configure.in
index 021f485..50668ed 100644 (file)
@@ -5,7 +5,7 @@ AC_CONFIG_SRCDIR([byteorder.h])
 AC_CONFIG_HEADER(config.h)
 AC_PREREQ(2.52)
 
-RSYNC_VERSION=2.6.1cvs
+RSYNC_VERSION=2.6.1pre-1
 AC_SUBST(RSYNC_VERSION)
 AC_MSG_NOTICE([Configuring rsync $RSYNC_VERSION])
 
@@ -97,6 +97,27 @@ AC_ARG_WITH(rsync-path,
 
 AC_DEFINE_UNQUOTED(RSYNC_PATH, "$RSYNC_PATH", [location of rsync on remote machine])
 
+AC_ARG_WITH(rsyncd-conf,
+       AC_HELP_STRING([--with-rsyncd-conf=PATH], [set configuration file for rsync server to PATH (default: /etc/rsyncd.conf)]),
+       [ if test ! -z "$with_rsyncd_conf" ; then
+               case $with_rsyncd_conf in
+                       yes|no)
+                               RSYNCD_SYSCONF="/etc/rsyncd.conf"
+                               ;;
+                       /*)
+                               RSYNCD_SYSCONF="$with_rsyncd_conf"
+                               ;;
+                       *)
+                                AC_MSG_ERROR(You must specify an absolute path to --with-rsyncd-conf=PATH)
+                               ;;
+               esac
+       else
+               RSYNCD_SYSCONF="/etc/rsyncd.conf"
+       fi ],
+       [ RSYNCD_SYSCONF="/etc/rsyncd.conf" ])
+
+AC_DEFINE_UNQUOTED(RSYNCD_SYSCONF, "$RSYNCD_SYSCONF", [location of configuration file for rsync server])
+
 AC_ARG_WITH(rsh,
        AC_HELP_STRING([--with-rsh=CMD], [set remote shell command to CMD (default: ssh)]))
 
@@ -367,13 +388,21 @@ else
        AC_LIBOBJ(lib/getnameinfo)
 fi
 
-
 AC_CHECK_MEMBER([struct sockaddr.sa_len],
-               [ AC_DEFINE(HAVE_SOCKADDR_LEN) ],
+               [ AC_DEFINE(HAVE_SOCKADDR_LEN, 1, [Do we have sockaddr.sa_len?]) ],
+               [],
+               [
+#include <sys/types.h>
+#include <sys/socket.h>
+])
+
+AC_CHECK_MEMBER([struct sockaddr_in.sin_len],
+               [ AC_DEFINE(HAVE_SOCKADDR_IN_LEN, 1, [Do we have sockaddr_in.sin_len?]) ],
                [],
                [
 #include <sys/types.h>
 #include <sys/socket.h>
+#include <netinet/in.h>
 ])
 
 AC_MSG_CHECKING(struct sockaddr_storage)
@@ -386,7 +415,7 @@ AC_TRY_COMPILE([#include <sys/types.h>
        AC_MSG_RESULT(no))
 
 AC_CHECK_MEMBER([struct sockaddr_in6.sin6_scope_id],
-               [ AC_DEFINE(HAVE_SOCKADDR_IN6_SCOPE_ID) ],
+               [ AC_DEFINE(HAVE_SOCKADDR_IN6_SCOPE_ID, 1, [Do we have sockaddr_in6.sin6_scope_id?]) ],
                [],
                [
 #include <sys/types.h>
@@ -408,10 +437,10 @@ dnl AC_FUNC_MEMCMP
 
 AC_FUNC_UTIME_NULL
 AC_FUNC_ALLOCA
-AC_CHECK_FUNCS(waitpid wait4 getcwd strdup strerror chown chmod mknod mkfifo)
-AC_CHECK_FUNCS(fchmod fstat strchr readlink link utime utimes strftime)
-AC_CHECK_FUNCS(memmove lchown vsnprintf snprintf asprintf setsid glob strpbrk)
-AC_CHECK_FUNCS(strlcat strlcpy strtol mtrace mallinfo setgroups)
+AC_CHECK_FUNCS(waitpid wait4 getcwd strdup strerror chown chmod mknod mkfifo \
+    fchmod fstat strchr readlink link utime utimes strftime mtrace \
+    memmove lchown vsnprintf snprintf asprintf setsid glob strpbrk \
+    strlcat strlcpy strtol mallinfo getgroups setgroups geteuid getegid)
 
 AC_CACHE_CHECK([for working socketpair],rsync_cv_HAVE_SOCKETPAIR,[
 AC_TRY_RUN([