Add a configure option.
authorWayne Davison <wayne@opencoder.net>
Sat, 20 Aug 2022 16:20:54 +0000 (09:20 -0700)
committerWayne Davison <wayne@opencoder.net>
Sat, 20 Aug 2022 16:20:54 +0000 (09:20 -0700)
fix-checksums.diff

index a30cad24842ab09175762917b01b60256dad7813..1f6af3049e898f2afa30647b6021960165821324 100644 (file)
@@ -9,10 +9,11 @@ This patch fixes various issues with the checksum code, such as:
 To use this patch, run these commands for a successful build:
 
     patch -p1 <patches/fix-checksums.diff
-    ./configure                                 (optional if already run)
+    ./prepare-source
+    ./configure [--with-openssl-conf=/path/to/openssl-rsync.cnf]
     make
 
-based-on: 2c1204032b15bd0c4c7ce54b65090867492557e2
+based-on: 706bff9176ccf6976e27040eb5729ce34c0058eb
 diff --git a/authenticate.c b/authenticate.c
 --- a/authenticate.c
 +++ b/authenticate.c
@@ -1079,6 +1080,26 @@ diff --git a/compat.c b/compat.c
 +      return 0;
 +#endif
 +}
+diff --git a/configure.ac b/configure.ac
+--- a/configure.ac
++++ b/configure.ac
+@@ -136,6 +136,16 @@ if test x"$GCC" = x"yes"; then
+       CFLAGS="$CFLAGS -Wall -W"
+ fi
++AC_ARG_WITH(openssl-conf,
++      AS_HELP_STRING([--with-openssl-conf=PATH],[set default OPENSSL_CONF path for rsync]))
++case "$with_openssl_conf" in
++    *[^-/a-zA-Z0-9.,=@+_]*) AC_MSG_ERROR([Invalid path given to --with-openssl-conf]) ;;
++    /*) CFLAGS="$CFLAGS -DSET_OPENSSL_CONF=$with_openssl_conf" ;;
++    no|'') ;;
++    yes) AC_MSG_ERROR([No path given to --with-openssl-conf]) ;;
++    *) AC_MSG_ERROR([Non absolute path given to --with-openssl-conf]) ;;
++esac
++
+ AC_ARG_WITH(rrsync,
+         AS_HELP_STRING([--with-rrsync],[also install the rrsync script and its manpage]))
+ if test x"$with_rrsync" != x"yes"; then
 diff --git a/flist.c b/flist.c
 --- a/flist.c
 +++ b/flist.c