armv5te="default"
iwmmxt="default"
altivec="default"
+dcbzl="no"
mmi="default"
case "$cpu" in
i386|i486|i586|i686|i86pc|BePC)
fi
fi
-# check armv5te instructions support
-if test $armv5te = "default" -a $cpu = "armv4l"; then
- armv5te=no
- check_cc <<EOF && armv5te=yes
- int main(void) {
- __asm__ __volatile__ ("qadd r0, r0, r0");
- }
-EOF
-fi
-
-# check iwmmxt support
-if test $iwmmxt = "default" -a $cpu = "armv4l"; then
- iwmmxt=no
- check_cc <<EOF && iwmmxt=yes
- int main(void) {
- __asm__ __volatile__ ("wunpckelub wr6, wr4");
- }
-EOF
-fi
-
#Darwin CC versions
needmdynamicnopic="no"
if test $targetos = Darwin; then
;;
esac
fi
- if test $optimize != "no"; then
- add_cflags "-fomit-frame-pointer"
- fi
+fi
+
+if test $optimize != "no"; then
+ add_cflags "-fomit-frame-pointer"
fi
# Can only do AltiVec on PowerPC
TUNECPU=ppc970
POWERPCMODE="64bits"
;;
- i[3456]86|pentium|pentiumpro|pentium-mmx|pentium[234]|prescott|k6|k6-[23]|athlon|athlon-tbird|athlon-4|athlon-[mx]p|winchip-c6|winchip2|c3|nocona|athlon64|k8|opteron|athlon-fx)
+ i[3456]86|pentium|pentiumpro|pentium-mmx|pentium[234]|pentium-m|prescott|k6|k6-[23]|athlon|athlon-tbird|athlon-4|athlon-[mx]p|winchip-c6|winchip2|c3|nocona|athlon64|k8|opteron|athlon-fx)
add_cflags "-march=$tune"
;;
sparc64)
esac
fi
+# make sure we can execute files in $TMPDIR
+cat >$TMPE 2>>$logfile <<EOF
+#! /bin/sh
+EOF
+chmod +x $TMPE >>$logfile 2>&1
+if ! $TMPE >>$logfile 2>&1; then
+ cat <<EOF
+Unable to create and execute files in $TMPDIR1. Set the TMPDIR environment
+variable to another directory.
+EOF
+ die "Sanity test failed."
+fi
+rm $TMPE
+
# compiler sanity check
check_exec <<EOF
int main(){
die "C compiler test failed."
fi
+# check for assembler specific support
+
+if test $cpu = "powerpc"; then
+check_cc <<EOF && dcbzl=yes
+int main(void) {
+ register long zero = 0;
+ char data[1024];
+ asm volatile("dcbzl %0, %1" : : "b" (data), "r" (zero));
+return 0;
+}
+EOF
+fi
+
# check for SIMD availability
# AltiVec flags: The FSF version of GCC differs from the Apple version
EOF
fi
+# check armv5te instructions support
+if test $armv5te = "default" -a $cpu = "armv4l"; then
+ armv5te=no
+ check_cc <<EOF && armv5te=yes
+ int main(void) {
+ __asm__ __volatile__ ("qadd r0, r0, r0");
+ }
+EOF
+fi
+
+# check iwmmxt support
+if test $iwmmxt = "default" -a $cpu = "armv4l"; then
+ iwmmxt=no
+ check_cc <<EOF && iwmmxt=yes
+ int main(void) {
+ __asm__ __volatile__ ("wunpckelub wr6, wr4");
+ }
+EOF
+fi
+
# mmi only available on mips
if test $mmi = "default"; then
if test $cpu = "mips"; then
fi
if test $cpu = "powerpc"; then
echo "AltiVec enabled $altivec"
+ echo "dcbzl available $dcbzl"
fi
echo "gprof enabled $gprof"
echo "zlib enabled $zlib"
echo "TARGET_MMI=yes" >> config.mak
echo "#define HAVE_MMI 1" >> $TMPH
fi
+
+if test "$dcbzl" = "yes" ; then
+ echo "#define HAVE_DCBZL 1" >> $TMPH
+else
+ echo "#undef HAVE_DCBZL" >> $TMPH
+fi
+
if test "$altivec" = "yes" ; then
echo "TARGET_ALTIVEC=yes" >> config.mak
echo "#define HAVE_ALTIVEC 1" >> $TMPH
- echo "// Enable the next line to use the reference C code instead of AltiVec" >> $TMPH
- echo "// #define ALTIVEC_USE_REFERENCE_C_CODE 1" >> $TMPH
if test "$_altivec_h" = "yes" ; then
echo "#define HAVE_ALTIVEC_H 1" >> $TMPH
else
libavcodec \
libavcodec/alpha \
libavcodec/armv4l \
+ libavcodec/bfin \
libavcodec/i386 \
libavcodec/sparc \
libavcodec/mlib \