Skip to content

Commit

Permalink
Simplify the forcing of SSE/SSE2/SSSE3
Browse files Browse the repository at this point in the history
  • Loading branch information
ttsiodras committed Jun 3, 2021
1 parent 1599992 commit 319bb10
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 39 deletions.
38 changes: 16 additions & 22 deletions configure
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>.
#
Expand Down Expand Up @@ -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='[email protected]'
PACKAGE_URL=''

Expand Down Expand Up @@ -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]...
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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 $@
Expand Down Expand Up @@ -2902,7 +2902,7 @@ fi

# Define the identity of the package.
PACKAGE='mandelsse'
VERSION='2.3'
VERSION='2.4'


cat >>confdefs.h <<_ACEOF
Expand Down Expand Up @@ -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


Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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\\"
Expand Down
20 changes: 7 additions & 13 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AC_INIT([mandelSSE], [2.3], [[email protected]])
AC_INIT([mandelSSE], [2.4], [[email protected]])

AC_LANG(C)
AC_CONFIG_HEADERS([src/config.h])
Expand Down Expand Up @@ -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])],
Expand Down Expand Up @@ -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.])
Expand All @@ -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

Expand All @@ -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

Expand Down
10 changes: 6 additions & 4 deletions src/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H

/* Define to 1 if you have the <memory.h> 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 <stdint.h> header file. */
#undef HAVE_STDINT_H

/* Define to 1 if you have the <stdio.h> header file. */
#undef HAVE_STDIO_H

/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H

Expand Down Expand Up @@ -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. */
Expand Down

0 comments on commit 319bb10

Please sign in to comment.