229
229
AC_DEFINE_UNQUOTED ( NOBODY_USER , "$NOBODY_USER" , [ unprivileged user--e.g. nobody] )
230
230
AC_DEFINE_UNQUOTED ( NOBODY_GROUP , "$NOBODY_GROUP" , [ unprivileged group for unprivileged user] )
231
231
232
- # SIMD optimizations
233
- SIMD =
232
+ # rolling-checksum SIMD optimizations
233
+ ROLL_SIMD =
234
234
235
- AC_MSG_CHECKING ( [ whether to enable SIMD optimizations] )
236
- AC_ARG_ENABLE ( simd ,
237
- AS_HELP_STRING ( [ --enable-simd] ,[ enable/disable to control SIMD optimizations (requires c++)] ) )
235
+ AC_MSG_CHECKING ( [ whether to enable rolling-checksum SIMD optimizations] )
236
+ AC_ARG_ENABLE ( roll- simd ,
237
+ AS_HELP_STRING ( [ --enable-roll- simd] ,[ enable/disable to control rolling-checksum SIMD optimizations (requires c++)] ) )
238
238
239
239
# Clag is crashing with -g -O2, so we'll get rid of -g for now.
240
240
CXXFLAGS=`echo "$CXXFLAGS" | sed 's/-g //'`
@@ -263,14 +263,14 @@ __attribute__ ((target("ssse3"))) void more_testing(char* buf, int len)
263
263
}
264
264
] ] )
265
265
266
- if test x"$enable_simd " = x""; then
266
+ if test x"$enable_roll_simd " = x""; then
267
267
case "$host_os" in
268
268
*linux*) ;;
269
- *) enable_simd =no ;;
269
+ *) enable_roll_simd =no ;;
270
270
esac
271
271
fi
272
272
273
- if test x"$enable_simd " != x"no"; then
273
+ if test x"$enable_roll_simd " != x"no"; then
274
274
# For x86-64 SIMD, g++ >=5 or clang++ >=7 is required
275
275
if test x"$host_cpu" = x"x86_64" || test x"$host_cpu" = x"amd64"; then
276
276
AC_LANG ( C++ )
@@ -283,23 +283,23 @@ if test x"$enable_simd" != x"no"; then
283
283
AC_LANG ( C )
284
284
if test x"$CXX_OK" = x"yes"; then
285
285
# AC_MSG_RESULT() is called below.
286
- SIMD ="$host_cpu"
287
- elif test x"$enable_simd " = x"yes"; then
286
+ ROLL_SIMD ="$host_cpu"
287
+ elif test x"$enable_roll_simd " = x"yes"; then
288
288
AC_MSG_RESULT ( error )
289
- AC_MSG_ERROR ( The SIMD compilation test failed.
290
- Omit -- enable-simd to continue without it. )
289
+ AC_MSG_ERROR ( The rolling-checksum SIMD compilation test failed.
290
+ Omit -- enable-roll- simd to continue without it. )
291
291
fi
292
- elif test x"$enable_simd " = x"yes"; then
292
+ elif test x"$enable_roll_simd " = x"yes"; then
293
293
AC_MSG_RESULT ( unavailable )
294
- AC_MSG_ERROR ( The SIMD optimizations are currently x86_64|amd64 only.
295
- Omit -- enable-simd to continue without it. )
294
+ AC_MSG_ERROR ( The rolling-checksum SIMD optimizations are currently x86_64|amd64 only.
295
+ Omit -- enable-roll- simd to continue without it. )
296
296
fi
297
297
fi
298
298
299
- if test x"$SIMD " != x""; then
300
- AC_MSG_RESULT ( [ yes ($SIMD )] )
301
- AC_DEFINE ( HAVE_SIMD , 1 , [ Define to 1 to enable SIMD optimizations] )
302
- SIMD ='$(SIMD_ '"$SIMD )"
299
+ if test x"$ROLL_SIMD " != x""; then
300
+ AC_MSG_RESULT ( [ yes ($ROLL_SIMD )] )
301
+ AC_DEFINE ( USE_ROLL_SIMD , 1 , [ Define to 1 to enable rolling-checksum SIMD optimizations] )
302
+ ROLL_SIMD ='$(ROLL_SIMD_ '"$ROLL_SIMD )"
303
303
# We only use c++ for its target attribute dispatching, disable unneeded bulky features
304
304
CXXFLAGS="$CXXFLAGS -fno-exceptions -fno-rtti"
305
305
# Apple often has "g++" as a symlink for clang. Try to find out the truth.
311
311
AC_MSG_RESULT ( no )
312
312
fi
313
313
314
- AC_SUBST ( SIMD )
314
+ AC_SUBST ( ROLL_SIMD )
315
315
316
316
AC_MSG_CHECKING ( [ if assembler accepts noexecstack] )
317
317
OLD_CFLAGS="$CFLAGS"
@@ -433,45 +433,66 @@ if test x"$enable_openssl" != x"no"; then
433
433
err_msg="$err_msg$nl- Failed to find openssl/md4.h and openssl/md5.h for openssl crypto lib support."
434
434
no_lib="$no_lib openssl"
435
435
fi
436
- if test x"$enable_asm " != x"yes"; then
437
- enable_asm =no
436
+ if test x"$enable_md5_asm " != x"yes"; then
437
+ enable_md5_asm =no
438
438
fi
439
439
else
440
440
AC_MSG_RESULT ( no )
441
441
fi
442
442
443
- ASM =
443
+ MD5_ASM =
444
444
445
- AC_MSG_CHECKING ( [ whether to enable ASM optimizations] )
446
- AC_ARG_ENABLE ( asm ,
447
- AS_HELP_STRING ( [ --enable-asm] ,[ enable/disable to control ASM optimizations] ) )
445
+ AC_MSG_CHECKING ( [ whether to enable MD5 ASM optimizations] )
446
+ AC_ARG_ENABLE ( md5- asm ,
447
+ AS_HELP_STRING ( [ --enable-md5- asm] ,[ enable/disable to control MD5 ASM optimizations] ) )
448
448
449
- if test x"$enable_asm " = x""; then
449
+ if test x"$enable_md5_asm " = x""; then
450
450
case "$host_os" in
451
451
*linux*) ;;
452
- *) enable_asm =no ;;
452
+ *) enable_md5_asm =no ;;
453
453
esac
454
454
fi
455
455
456
- if test x"$enable_asm " != x"no"; then
456
+ if test x"$enable_md5_asm " != x"no"; then
457
457
if test x"$host_cpu" = x"x86_64" || test x"$host_cpu" = x"amd64"; then
458
- ASM ="$host_cpu"
459
- elif test x"$enable_asm " = x"yes"; then
458
+ MD5_ASM ="$host_cpu"
459
+ elif test x"$enable_md5_asm " = x"yes"; then
460
460
AC_MSG_RESULT ( unavailable )
461
461
AC_MSG_ERROR ( The ASM optimizations are currently x86_64|amd64 only.
462
- Omit -- enable-asm to continue without it. )
462
+ Omit -- enable-md5- asm to continue without it. )
463
463
fi
464
464
fi
465
465
466
- if test x"$ASM " != x""; then
467
- AC_MSG_RESULT ( [ yes ($ASM )] )
468
- AC_DEFINE ( HAVE_ASM , 1 , [ Define to 1 to enable ASM optimizations] )
469
- ASM ='$(ASM_ '"$ASM )"
466
+ if test x"$MD5_ASM " != x""; then
467
+ AC_MSG_RESULT ( [ yes ($MD5_ASM )] )
468
+ AC_DEFINE ( USE_MD5_ASM , 1 , [ Define to 1 to enable MD5 ASM optimizations] )
469
+ MD5_ASM ='$(MD5_ASM_ '"$MD5_ASM )"
470
470
else
471
471
AC_MSG_RESULT ( no )
472
472
fi
473
473
474
- AC_SUBST ( ASM )
474
+ AC_SUBST ( MD5_ASM )
475
+
476
+ ROLL_ASM=
477
+
478
+ AC_MSG_CHECKING ( [ whether to enable rolling-checksum ASM optimizations] )
479
+ AC_ARG_ENABLE ( roll-asm ,
480
+ AS_HELP_STRING ( [ --enable-roll-asm] ,[ enable/disable to control rolling-checksum ASM optimizations (requires --enable-roll-simd)] ) )
481
+
482
+ if test x"$ROLL_SIMD" = x""; then
483
+ enable_roll_asm=no
484
+ fi
485
+
486
+ if test x"$enable_roll_asm" = x"yes"; then
487
+ ROLL_ASM="$host_cpu"
488
+ AC_MSG_RESULT ( [ yes ($ROLL_ASM)] )
489
+ AC_DEFINE ( USE_ROLL_ASM , 1 , [ Define to 1 to enable rolling-checksum ASM optimizations (requires --enable-roll-simd)] )
490
+ ROLL_ASM='$(ROLL_ASM_'"$ROLL_ASM)"
491
+ else
492
+ AC_MSG_RESULT ( no )
493
+ fi
494
+
495
+ AC_SUBST ( ROLL_ASM )
475
496
476
497
AC_MSG_CHECKING ( [ whether to enable xxhash checksum support] )
477
498
AC_ARG_ENABLE ( [ xxhash] ,
@@ -1421,10 +1442,6 @@ esac
1421
1442
AC_CONFIG_FILES ( [ Makefile lib/dummy zlib/dummy popt/dummy shconfig] )
1422
1443
AC_OUTPUT
1423
1444
1424
- if test "$enable_openssl" = yes && test "$enable_asm" = yes; then
1425
- echo "*** Ignoring --enable-asm option -- using openssl for MD5 checksums ***"
1426
- fi
1427
-
1428
1445
AC_MSG_RESULT ( )
1429
1446
AC_MSG_RESULT ( [ rsync $PACKAGE_VERSION configuration successful] )
1430
1447
AC_MSG_RESULT ( )
0 commit comments