aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure33
1 files changed, 30 insertions, 3 deletions
diff --git a/configure b/configure
index 32a0c2075a..8dfe200647 100755
--- a/configure
+++ b/configure
@@ -62,6 +62,7 @@ _build_cine=no
_need_memalign=no
_build_plugins=no
_nasm=auto
+_altivec=auto
_build_hq_scalers=yes
_build_scalers=yes
# more defaults
@@ -248,6 +249,9 @@ CheckNASM()
mingw* | cygwin*)
NASMFLAGS="-f win32"
;;
+ darwin*)
+ NASMFLAGS="-f macho"
+ ;;
*)
NASMFLAGS="-f elf"
;;
@@ -343,6 +347,7 @@ Optional Libraries:
--with-nasm-prefix=DIR Prefix where nasm executable is installed (optional)
--disable-nasm disable assembly language optimizations [autodetect]
+ --disable-altivec disable altivec optimizations [autodetect]
Some influential environment variables:
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
@@ -395,6 +400,7 @@ for ac_option in $@; do
--enable-plugins) _build_plugins=yes ;;
--enable-mt32emu) _mt32emu=yes ;;
--disable-mt32emu) _mt32emu=no ;;
+ --disable-altivec) _altivec=no ;;
--with-fluidsynth-prefix=*)
arg=`echo $ac_option | cut -d '=' -f 2`
FLUIDSYNTH_CFLAGS="-I$arg/include"
@@ -782,9 +788,6 @@ else
darwin*)
DEFINES="$DEFINES -DUNIX -DMACOSX"
LIBS="$LIBS -framework QuickTime -framework AudioUnit -framework AudioToolbox -framework Carbon -framework CoreMIDI"
- # TODO: Add proper check for Altivec support in the compiler...
- DEFINES="$DEFINES -DHAS_ALTIVEC"
- CXXFLAGS="$CXXFLAGS -faltivec"
;;
mingw*)
DEFINES="$DEFINES -DWIN32"
@@ -1230,6 +1233,30 @@ test -z "$_bindir" && _bindir="$_prefix/bin"
test -z "$_mandir" && _mandir="$_prefix/man"
#
+# Check for Altivec, if on MacOS X
+#
+case $_host_os in
+ darwin*)
+ echocheck "Altivec"
+ if test "$_altivec" = auto ; then
+ _altivec=no
+ cat > $TMPC << EOF
+int main(void) { return 0; }
+EOF
+ cc_check $LDFLAGS $CXXFLAGS -maltivec && _altivec=yes
+ fi
+ if test "$_altivec" = yes ; then
+ DEFINES="$DEFINES -DHAS_ALTIVEC"
+ CXXFLAGS="$CXXFLAGS -faltivec"
+ CFLAGS="$CFLAGS -faltivec"
+ fi
+ echo "$_altivec"
+ rm -f $TMPC $TMPO$EXEEXT
+ ;;
+esac
+
+
+#
# Check which engines ("frontends") are to be built
#
echo