1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
From: Tomasz Buchert <tomasz@debian.org>
Date: Sat, 25 Apr 2020 15:18:27 +0200
Subject: make HAVE_SSE fully configurable
---
configure.in | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/configure.in b/configure.in
index 44b5024..b0c7135 100644
--- a/configure.in
+++ b/configure.in
@@ -66,9 +66,14 @@ AC_CHECK_HEADERS([omp.h],[
# check for supported SIMD extensions (gcc specific)
# if SSE is supported, HAVE_SSE will be set
-AX_EXT_SSE
-CFLAGS="$CFLAGS $SIMD_FLAGS -I/usr/local/include"
-LDFLAGS="$SIMD_FLAGS $LDFLAGS -L/usr/local/lib"
+
+AC_ARG_WITH(sse, AC_HELP_STRING([--with-sse], [use SSE]), [], [with_sse=no])
+SIMD_FLAGS=
+if test x"$with_sse" != xno ; then
+ AC_DEFINE(HAVE_SSE,,[Support SSE (Streaming SIMD Extensions) instructions])
+ CFLAGS="$CFLAGS -msse"
+ LDFLAGS="-msse $LDFLAGS"
+fi
# windows gcc needs -mstackrealign (to avoid crash on XP)
if test x"$ax_cv_c_compiler_vendor" = x"gnu" ; then
@@ -368,8 +373,8 @@ then
AC_CHECK_LIB([ag_gui], [AG_DestroyGUI], [have_agar_lib=yes; LIBS="-lag_gui -lag_core $LIBS -lfreetype"], [], [-lag_core -lfreetype])
fi
fi
-
- #check if agar header files can be found
+
+ #check if agar header files can be found
AC_CHECK_HEADER([agar/core.h], [have_agar_hdr=yes])
if test x"$have_agar_hdr" = x -o x"$have_agar_lib" = x
then
@@ -390,4 +395,3 @@ AC_CHECK_LIB([dl], [dlerror])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
-
|