Set rsync version in configure.in
authorMartin Pool <mbp@samba.org>
Sat, 24 Nov 2001 04:57:41 +0000 (04:57 +0000)
committerMartin Pool <mbp@samba.org>
Sat, 24 Nov 2001 04:57:41 +0000 (04:57 +0000)
Show IPv6 availability in --version.

Makefile.in
clientserver.c
configure.in
options.c
rsync.h
version.h [deleted file]

index 140f2233ef713bd9c91329d15679b3652bd80bb4..5574842fdc29ec22a8c44cbd6d60c28997dc50f0 100644 (file)
@@ -17,6 +17,8 @@ srcdir=@srcdir@
 VPATH=$(srcdir)
 SHELL=/bin/sh
 
+VERSION=@VERSION@
+
 .SUFFIXES:
 .SUFFIXES: .c .o
 
@@ -132,3 +134,4 @@ installcheck: $(CHECK_PROGS)
 
 $(OBJS): config.h *.h */*.h
 
+# TODO: Add 'dist' target; need to know which files will be included
\ No newline at end of file
index 4a16b6a6b137f58065b00b3954e8dce4d87678e9..318a0ec984bd800f0cb341d8f804c59e80582279 100644 (file)
@@ -508,7 +508,8 @@ int daemon_main(void)
 
        log_init();
 
-       rprintf(FINFO, "rsyncd version %s starting, listening on port %d\n", VERSION,
+       rprintf(FINFO, "rsyncd version %s starting, listening on port %d\n",
+               RSYNC_VERSION,
                 rsync_port);
         /* TODO: If listening on a particular address, then show that
          * address too. */
index a1feacf03085f07d23c8b1759cc148fff341431d..f28eb9c2847e561f90d4fa442ce75c8898a70d8a 100644 (file)
@@ -15,6 +15,10 @@ AC_PROG_CPP
 AC_PROG_INSTALL
 AC_SUBST(SHELL)
 
+RSYNC_VERSION=2.4.7pre2
+AC_SUBST(RSYNC_VERSION)
+AC_DEFINE_UNQUOTED(RSYNC_VERSION, ["$RSYNC_VERSION"], [rsync release version])
+
 # compile with optimisation and without debugging by default, unless
 # --debug is given.  We must decide this before testing the compiler.
 
@@ -120,7 +124,8 @@ if test "$ipv6" = "yes"; then
 yes
 #endif],
                                [ipv6type=$i;
-                               CFLAGS="-DINET6 $CFLAGS"])
+                               AC_DEFINE(INET6, 1, [true if you have IPv6])
+                               ])
                        ;;
                kame)
                        # http://www.kame.net/
@@ -129,8 +134,8 @@ yes
 #ifdef __KAME__
 yes
 #endif],
-                               [ipv6type=$i;
-                               CFLAGS="-DINET6 $CFLAGS"])
+                               [ipv6type=$i; 
+                               AC_DEFINE(INET6, 1, [true if you have IPv6])])
                        ;;
                linux-glibc)
                        # http://www.v6.linux.or.jp/
@@ -140,7 +145,7 @@ yes
 yes
 #endif],
                                [ipv6type=$i;
-                               CFLAGS="-DINET6 $CFLAGS"])
+AC_DEFINE(INET6, 1, [true if you have IPv6])])
                        ;;
                linux-inet6)
                        # http://www.v6.linux.or.jp/
@@ -149,7 +154,8 @@ yes
                                ipv6lib=inet6
                                ipv6libdir=/usr/inet6/lib
                                ipv6trylibc=yes;
-                               CFLAGS="-DINET6 -I/usr/inet6/include $CFLAGS"
+                               AC_DEFINE(INET6, 1, [true if you have IPv6])
+                               CFLAGS="-I/usr/inet6/include $CFLAGS"
                        fi
                        ;;
                toshiba)
@@ -161,7 +167,7 @@ yes
                                [ipv6type=$i;
                                ipv6lib=inet6;
                                ipv6libdir=/usr/local/v6/lib;
-                               CFLAGS="-DINET6 $CFLAGS"])
+                               AC_DEFINE(INET6, 1, [true if you have IPv6])])
                        ;;
                v6d)
                        AC_EGREP_CPP(yes, [
@@ -172,7 +178,7 @@ yes
                                [ipv6type=$i;
                                ipv6lib=v6;
                                ipv6libdir=/usr/local/v6/lib;
-                               CFLAGS="-I/usr/local/v6/include $CFLAGS"])
+                               AC_DEFINE(INET6, 1, [true if you have IPv6])])
                        ;;
                zeta)
                        AC_EGREP_CPP(yes, [
@@ -183,7 +189,7 @@ yes
                                [ipv6type=$i;
                                ipv6lib=inet6;
                                ipv6libdir=/usr/local/v6/lib;
-                               CFLAGS="-DINET6 $CFLAGS"])
+                               AC_DEFINE(INET6, 1, [true if you have IPv6])])
                        ;;
                esac
                if test "$ipv6type" != "unknown"; then
index 0316be7dd7cd50a2e0af9250e0e76452e6875957..01f4d82732a3fb62292630d1e62e6b03d7e283db 100644 (file)
--- a/options.c
+++ b/options.c
@@ -111,6 +111,7 @@ static void print_rsync_version(int f)
         char const *got_socketpair = "no ";
         char const *hardlinks = "no ";
         char const *links = "no ";
+       char const *ipv6 = "no ";
 
 #ifdef HAVE_SOCKETPAIR
         got_socketpair = "";
@@ -124,16 +125,19 @@ static void print_rsync_version(int f)
         links = "";
 #endif
 
+#if INET6
+       ipv6 = "";
+#endif       
+
         rprintf(f, "%s  version %s  protocol version %d\n",
-                RSYNC_NAME, VERSION, PROTOCOL_VERSION);
+                RSYNC_NAME, RSYNC_VERSION, PROTOCOL_VERSION);
         rprintf(f,
                 "Copyright (C) 1996-2001 by Andrew Tridgell and others\n");
        rprintf(f, "<http://rsync.samba.org/>\n");
         rprintf(f, "Capabilities: %d-bit files, %ssocketpairs, "
-                "%shard links, %ssymlinks, batchfiles\n\n",
+                "%shard links, %ssymlinks, batchfiles, %sIPv6\n\n",
                 (int) (sizeof(OFF_T) * 8),
-                got_socketpair,
-                hardlinks, links);
+                got_socketpair, hardlinks, links, ipv6);
 
 #ifdef NO_INT64
         rprintf(f, "WARNING: no 64-bit integers on this platform!\n");
diff --git a/rsync.h b/rsync.h
index 5091a9e5696a5a8b59f14611e3fb51ccac67d89e..c634bc39765b3c52d19ab589266d8647971515f0 100644 (file)
--- a/rsync.h
+++ b/rsync.h
@@ -387,7 +387,6 @@ static inline int flist_up(struct file_list *flist, int i)
 }
 
 #include "byteorder.h"
-#include "version.h"
 #include "proto.h"
 #include "lib/mdfour.h"
 
diff --git a/version.h b/version.h
deleted file mode 100644 (file)
index 84c9535..0000000
--- a/version.h
+++ /dev/null
@@ -1 +0,0 @@
-#define VERSION "2.4.6dev"