From 319bb1065b58456cfb992a5699e23702e40323c4 Mon Sep 17 00:00:00 2001 From: Thanassis Tsiodras Date: Thu, 3 Jun 2021 20:01:14 +0200 Subject: [PATCH] Simplify the forcing of SSE/SSE2/SSSE3 --- configure | 38 ++++++++++++++++---------------------- configure.ac | 20 +++++++------------- src/config.h.in | 10 ++++++---- 3 files changed, 29 insertions(+), 39 deletions(-) diff --git a/configure b/configure index 06f54b5..e02bf4e 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for mandelSSE 2.3. +# Generated by GNU Autoconf 2.69 for mandelSSE 2.4. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='mandelSSE' PACKAGE_TARNAME='mandelsse' -PACKAGE_VERSION='2.3' -PACKAGE_STRING='mandelSSE 2.3' +PACKAGE_VERSION='2.4' +PACKAGE_STRING='mandelSSE 2.4' PACKAGE_BUGREPORT='ttsiodras@gmail.com' PACKAGE_URL='' @@ -1303,7 +1303,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures mandelSSE 2.3 to adapt to many kinds of systems. +\`configure' configures mandelSSE 2.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1375,7 +1375,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of mandelSSE 2.3:";; + short | recursive ) echo "Configuration of mandelSSE 2.4:";; esac cat <<\_ACEOF @@ -1479,7 +1479,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -mandelSSE configure 2.3 +mandelSSE configure 2.4 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1848,7 +1848,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by mandelSSE $as_me 2.3, which was +It was created by mandelSSE $as_me 2.4, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2902,7 +2902,7 @@ fi # Define the identity of the package. PACKAGE='mandelsse' - VERSION='2.3' + VERSION='2.4' cat >>confdefs.h <<_ACEOF @@ -3045,25 +3045,19 @@ fi # Check whether --enable-sse was given. if test "${enable_sse+set}" = set; then : - enableval=$enable_sse; enable_sse="$enableval" -else - enable_sse="yes" + enableval=$enable_sse; fi # Check whether --enable-sse2 was given. if test "${enable_sse2+set}" = set; then : - enableval=$enable_sse2; enable_sse2="$enableval" -else - enable_sse2="yes" + enableval=$enable_sse2; fi # Check whether --enable-ssse3 was given. if test "${enable_ssse3+set}" = set; then : - enableval=$enable_ssse3; enable_ssse3="$enableval" -else - enable_ssse3="yes" + enableval=$enable_ssse3; fi @@ -4547,7 +4541,7 @@ $as_echo "#define SIMD_SSE 1" >>confdefs.h fi else - HAVESSE=${enable_sse} # forced + HAVESSE=yes # forced { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVESSE" >&5 $as_echo "$HAVESSE" >&6; } if test x"${HAVESSE}" = xyes ; then @@ -4589,7 +4583,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVESSE2" >&5 $as_echo "$HAVESSE2" >&6; } else - HAVESSE2=${enable_sse2} # forced + HAVESSE2=yes # forced { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVESSE2" >&5 $as_echo "$HAVESSE2" >&6; } fi @@ -4626,7 +4620,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVESSSE3" >&5 $as_echo "$HAVESSSE3" >&6; } else - HAVESSSE3=${enable_ssse3} # forced + HAVESSSE3=yes # forced { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVESSSE3" >&5 $as_echo "$HAVESSSE3" >&6; } fi @@ -6470,7 +6464,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by mandelSSE $as_me 2.3, which was +This file was extended by mandelSSE $as_me 2.4, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -6536,7 +6530,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -mandelSSE config.status 2.3 +mandelSSE config.status 2.4 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index af082dc..356a54c 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([mandelSSE], [2.3], [ttsiodras@gmail.com]) +AC_INIT([mandelSSE], [2.4], [ttsiodras@gmail.com]) AC_LANG(C) AC_CONFIG_HEADERS([src/config.h]) @@ -26,19 +26,13 @@ AC_ARG_ENABLE(openmp, [enable_openmp="yes"]) AC_ARG_ENABLE(sse, - [AS_HELP_STRING([--enable-sse],[Force use of SSE])], - [enable_sse="$enableval"], - [enable_sse="yes"]) + [AS_HELP_STRING([--enable-sse],[Force use of SSE])]) AC_ARG_ENABLE(sse2, - [AS_HELP_STRING([--enable-sse2],[Force use of SSE2])], - [enable_sse2="$enableval"], - [enable_sse2="yes"]) + [AS_HELP_STRING([--enable-sse2],[Force use of SSE2])]) AC_ARG_ENABLE(ssse3, - [AS_HELP_STRING([--enable-ssse3],[Force use of SSSE3])], - [enable_ssse3="$enableval"], - [enable_ssse3="yes"]) + [AS_HELP_STRING([--enable-ssse3],[Force use of SSSE3])]) AC_ARG_ENABLE(debug, [AS_HELP_STRING([--enable-debug],[Compile in debug mode])], @@ -77,7 +71,7 @@ __asm__ volatile ("xorps %%xmm0, %%xmm0":::"memory"); return 0; AC_DEFINE([SIMD_SSE], 1, [Define this to use SSE intrinsics.]) fi else - HAVESSE=${enable_sse} # forced + HAVESSE=yes # forced AC_MSG_RESULT($HAVESSE) if test x"${HAVESSE}" = xyes ; then AC_DEFINE([SIMD_SSE], 1, [Define this to use SSE intrinsics.]) @@ -96,7 +90,7 @@ __asm__ volatile ("xorpd %%xmm0, %%xmm0":::"memory"); return 0; ])], [HAVESSE2=yes], [HAVESSE2=no]) AC_MSG_RESULT($HAVESSE2) else - HAVESSE2=${enable_sse2} # forced + HAVESSE2=yes # forced AC_MSG_RESULT($HAVESSE2) fi @@ -112,7 +106,7 @@ __asm__ volatile ("pabsd %%xmm0, %%xmm0":::"memory"); return 0; ])], [HAVESSSE3=yes], [HAVESSSE3=no]) AC_MSG_RESULT($HAVESSSE3) else - HAVESSSE3=${enable_ssse3} # forced + HAVESSSE3=yes # forced AC_MSG_RESULT($HAVESSSE3) fi diff --git a/src/config.h.in b/src/config.h.in index 61972d7..05a21a4 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -9,15 +9,15 @@ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H +/* Define to 1 if you have the header file. */ +#undef HAVE_STDIO_H + /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H @@ -63,7 +63,9 @@ /* Define this to use SSE intrinsics. */ #undef SIMD_SSE -/* Define to 1 if you have the ANSI C header files. */ +/* Define to 1 if all of the C90 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ #undef STDC_HEADERS /* Define this to use OpenMP. */