mirror of
https://github.com/RPCS3/soundtouch.git
synced 2024-11-09 12:22:51 +01:00
Revised autoconf/automake scripts for easier adding of custom CXXFLAGS
This commit is contained in:
parent
cbfec4188e
commit
708f1d7e0b
22
configure.ac
22
configure.ac
@ -113,7 +113,7 @@ fi
|
||||
|
||||
if test "x$enable_openmp" = "xyes"; then
|
||||
echo "****** openmp optimizations enabled ******"
|
||||
CXXFLAGS="-fopenmp $CXXFLAGS"
|
||||
AM_CXXFLAGS="-fopenmp $AM_CXXFLAGS"
|
||||
else
|
||||
echo "****** openmp optimizations disabled ******"
|
||||
fi
|
||||
@ -123,10 +123,9 @@ fi
|
||||
if test "x$enable_x86_optimizations" = "xyes" -a "x$ac_cv_header_cpuid_h" = "xyes"; then
|
||||
echo "****** x86 optimizations enabled ******"
|
||||
|
||||
original_saved_CXXFLAGS=$CXXFLAGS
|
||||
original_saved_CXXFLAGS=$AM_CXXFLAGS
|
||||
have_mmx_intrinsics=no
|
||||
OPT_CXXFLAGS="-mmmx -Winline"
|
||||
CXXFLAGS="$OPT_CXXFLAGS $CXXFLAGS"
|
||||
AM_CXXFLAGS="-mmmx -Winline $AM_CXXFLAGS"
|
||||
|
||||
# Check if the user can compile MMX code using intrinsics.
|
||||
# GCC supports MMX intrinsics since version 3.3
|
||||
@ -140,7 +139,7 @@ if test "x$enable_x86_optimizations" = "xyes" -a "x$ac_cv_header_cpuid_h" = "xye
|
||||
__m64 loop = _mm_cvtsi32_si64 (1);
|
||||
return _mm_cvtsi64_si32 (loop);
|
||||
}]])],[have_mmx_intrinsics=yes])
|
||||
CXXFLAGS=$original_saved_CXXFLAGS
|
||||
AM_CXXFLAGS=$original_saved_CXXFLAGS
|
||||
|
||||
# Inform the user if we did or did not find MMX support.
|
||||
#
|
||||
@ -157,9 +156,9 @@ if test "x$enable_x86_optimizations" = "xyes" -a "x$ac_cv_header_cpuid_h" = "xye
|
||||
fi
|
||||
|
||||
|
||||
# SSE support
|
||||
have_sse_intrinsics=no
|
||||
OPT_CXXFLAGS="-msse -Winline"
|
||||
CXXFLAGS="$OPT_CXXFLAGS $CXXFLAGS"
|
||||
AM_CXXFLAGS="-msse -Winline $AM_CXXFLAGS"
|
||||
|
||||
# Check if the user can compile SSE code using intrinsics.
|
||||
# GCC supports SSE intrinsics since version 3.3
|
||||
@ -173,7 +172,7 @@ if test "x$enable_x86_optimizations" = "xyes" -a "x$ac_cv_header_cpuid_h" = "xye
|
||||
_mm_setzero_ps();
|
||||
return 0;
|
||||
}]])],[have_sse_intrinsics=yes])
|
||||
CXXFLAGS=$original_saved_CXXFLAGS
|
||||
AM_CXXFLAGS=$original_saved_CXXFLAGS
|
||||
|
||||
# Inform the user if we did or did not find SSE support.
|
||||
#
|
||||
@ -195,6 +194,13 @@ else
|
||||
AC_DEFINE([SOUNDTOUCH_DISABLE_X86_OPTIMIZATIONS],[1],[Do not use x86 optimizations])
|
||||
fi
|
||||
|
||||
# Set AM_CXXFLAGS
|
||||
AC_SUBST([AM_CXXFLAGS], [$AM_CXXFLAGS])
|
||||
|
||||
# Empty default CXXFLAGS so user can set them if desirable
|
||||
AC_SUBST([CXXFLAGS], [ ])
|
||||
|
||||
|
||||
# SSTypes.h by default enables optimizations. Those already got disabled if
|
||||
# the user requested for it or if the system does not support them.
|
||||
#
|
||||
|
@ -48,7 +48,7 @@ soundstretch_LDADD=../SoundTouch/libSoundTouch.la -lm
|
||||
#soundstretch_LDFLAGS=-s
|
||||
|
||||
## additional compiler flags
|
||||
soundstretch_CXXFLAGS=-O3
|
||||
soundstretch_CXXFLAGS=-O3 $(AM_CXXFLAGS)
|
||||
|
||||
#clean-local:
|
||||
# -rm -f additional-files-to-remove-on-make-clean
|
||||
|
@ -34,7 +34,7 @@ libSoundTouch_la_SOURCES=AAFilter.cpp FIRFilter.cpp FIFOSampleBuffer.cpp \
|
||||
InterpolateShannon.cpp
|
||||
|
||||
# Compiler flags
|
||||
AM_CXXFLAGS=-O3 -I../../include
|
||||
AM_CXXFLAGS+=-O3
|
||||
|
||||
# Compile the files that need MMX and SSE individually.
|
||||
libSoundTouch_la_LIBADD=libSoundTouchMMX.la libSoundTouchSSE.la
|
||||
|
Loading…
Reference in New Issue
Block a user