summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorWayne Davison <wayne@opencoder.net>2022-02-21 16:39:16 -0800
committerWayne Davison <wayne@opencoder.net>2022-02-21 16:41:50 -0800
commit26f4dbe12c63d77ce8dcb7623b53bcf76be5c277 (patch)
treed16b6fc5d36abc65c31abb6bbd5f5e2efcbebad9 /configure.ac
parentb3f1970f18578fc4bbbc965f31d32a3ba677ef32 (diff)
downloadrsync-26f4dbe12c63d77ce8dcb7623b53bcf76be5c277.tar.gz
Change usage (--version) output to note when ASM isn't really being used.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac76
1 files changed, 42 insertions, 34 deletions
diff --git a/configure.ac b/configure.ac
index 7031283a..9960fafc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -322,39 +322,6 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[return 0;]])],
CFLAGS="$OLD_CFLAGS"
AC_SUBST(NOEXECSTACK)
-ASM=
-
-AC_MSG_CHECKING([whether to enable ASM optimizations])
-AC_ARG_ENABLE(asm,
- AS_HELP_STRING([--enable-asm],[enable/disable to control ASM optimizations]))
-
-if test x"$enable_asm" = x""; then
- case "$host_os" in
- *linux*) ;;
- *) enable_asm=no ;;
- esac
-fi
-
-if test x"$enable_asm" != x"no"; then
- if test x"$host_cpu" = x"x86_64" || test x"$host_cpu" = x"amd64"; then
- ASM="$host_cpu"
- elif test x"$enable_asm" = x"yes"; then
- AC_MSG_RESULT(unavailable)
- AC_MSG_ERROR(The ASM optimizations are currently x86_64|amd64 only.
-Omit --enable-asm to continue without it.)
- fi
-fi
-
-if test x"$ASM" != x""; then
- AC_MSG_RESULT([yes ($ASM)])
- AC_DEFINE(HAVE_ASM, 1, [Define to 1 to enable ASM optimizations])
- ASM='$(ASM_'"$ASM)"
-else
- AC_MSG_RESULT(no)
-fi
-
-AC_SUBST(ASM)
-
# 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,[
@@ -457,7 +424,8 @@ if test x"$enable_openssl" != x"no"; then
if test x"$ac_cv_header_openssl_md4_h" = x"yes" && test x"$ac_cv_header_openssl_md5_h" = x"yes"; then
AC_MSG_RESULT(yes)
AC_SEARCH_LIBS(MD5_Init, crypto,
- [AC_DEFINE(USE_OPENSSL)],
+ [AC_DEFINE(USE_OPENSSL)
+ enable_openssl=yes],
[err_msg="$err_msg$nl- Failed to find MD5_Init function in openssl crypto lib.";
no_lib="$no_lib openssl"])
else
@@ -465,10 +433,46 @@ if test x"$enable_openssl" != x"no"; then
err_msg="$err_msg$nl- Failed to find openssl/md4.h and openssl/md5.h for openssl crypto lib support."
no_lib="$no_lib openssl"
fi
+ if test x"$enable_asm" != x"yes"; then
+ enable_asm=no
+ fi
else
AC_MSG_RESULT(no)
fi
+ASM=
+
+AC_MSG_CHECKING([whether to enable ASM optimizations])
+AC_ARG_ENABLE(asm,
+ AS_HELP_STRING([--enable-asm],[enable/disable to control ASM optimizations]))
+
+if test x"$enable_asm" = x""; then
+ case "$host_os" in
+ *linux*) ;;
+ *) enable_asm=no ;;
+ esac
+fi
+
+if test x"$enable_asm" != x"no"; then
+ if test x"$host_cpu" = x"x86_64" || test x"$host_cpu" = x"amd64"; then
+ ASM="$host_cpu"
+ elif test x"$enable_asm" = x"yes"; then
+ AC_MSG_RESULT(unavailable)
+ AC_MSG_ERROR(The ASM optimizations are currently x86_64|amd64 only.
+Omit --enable-asm to continue without it.)
+ fi
+fi
+
+if test x"$ASM" != x""; then
+ AC_MSG_RESULT([yes ($ASM)])
+ AC_DEFINE(HAVE_ASM, 1, [Define to 1 to enable ASM optimizations])
+ ASM='$(ASM_'"$ASM)"
+else
+ AC_MSG_RESULT(no)
+fi
+
+AC_SUBST(ASM)
+
AC_MSG_CHECKING([whether to enable xxhash checksum support])
AC_ARG_ENABLE([xxhash],
AS_HELP_STRING([--disable-xxhash],[disable to omit xxhash checksums]))
@@ -1417,6 +1421,10 @@ esac
AC_CONFIG_FILES([Makefile lib/dummy zlib/dummy popt/dummy shconfig])
AC_OUTPUT
+if test "$enable_openssl" = yes && test "$enable_asm" = yes; then
+ echo "*** Ignoring --enable-asm option -- using openssl for MD5 checksums ***"
+fi
+
AC_MSG_RESULT()
AC_MSG_RESULT([ rsync $PACKAGE_VERSION configuration successful])
AC_MSG_RESULT()