Commit 8ed3168e authored by Christophe Massiot's avatar Christophe Massiot

Miscellaneous updates to configure, especially for cross-compilation.

parent b1c218b2
This diff is collapsed.
...@@ -2,7 +2,7 @@ dnl Autoconf settings for vlc and libdvdcss ...@@ -2,7 +2,7 @@ dnl Autoconf settings for vlc and libdvdcss
AC_INIT(include/common.h) AC_INIT(include/common.h)
AC_CONFIG_HEADER(include/defs.h) AC_CONFIG_HEADER(include/defs.h)
AC_CANONICAL_HOST AC_CANONICAL_SYSTEM
HAVE_VLC=0 HAVE_VLC=0
if test -r src/interface/main.c; then if test -r src/interface/main.c; then
...@@ -203,7 +203,7 @@ fi ...@@ -203,7 +203,7 @@ fi
ARCH=${host_cpu} ARCH=${target_cpu}
dnl dnl
dnl default modules dnl default modules
...@@ -220,30 +220,45 @@ THREEDNOW_MODULES="imdct3dn downmix3dn" ...@@ -220,30 +220,45 @@ THREEDNOW_MODULES="imdct3dn downmix3dn"
SSE_MODULES="imdctsse downmixsse" SSE_MODULES="imdctsse downmixsse"
ALTIVEC_MODULES="idctaltivec motionaltivec" ALTIVEC_MODULES="idctaltivec motionaltivec"
AC_MSG_CHECKING([if \$CC groks MMX inline assembly]) AC_CACHE_CHECK([if \$CC groks MMX inline assembly],
AC_TRY_COMPILE([void quux(){void *p;asm("packuswb %%mm1,%%mm2"::"r"(p));}],, [ac_cv_mmx_inline],
[AC_TRY_COMPILE([void quux(){void *p;asm("packuswb %%mm1,%%mm2"::"r"(p));}],,
ac_cv_mmx_inline=yes, ac_cv_mmx_inline=no)])
if test x"$ac_cv_mmx_inline" != x"no"; then
ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}" ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}"
AC_MSG_RESULT(yes), AC_MSG_RESULT(no)) fi
AC_MSG_CHECKING([if \$CC groks MMX EXT inline assembly]) AC_CACHE_CHECK([if \$CC groks MMX EXT inline assembly],
AC_TRY_COMPILE([void quux(){void *p;asm("maskmovq %%mm1,%%mm2"::"r"(p));}],, [ac_cv_mmxext_inline],
[AC_TRY_COMPILE([void quux(){void *p;asm("maskmovq %%mm1,%%mm2"::"r"(p));}],,
ac_cv_mmxext_inline=yes, ac_cv_mmxext_inline=no)])
if test x"$ac_cv_mmxext_inline" != x"no"; then
ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}" ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}"
AC_MSG_RESULT(yes), AC_MSG_RESULT(no)) fi
AC_MSG_CHECKING([if \$CC groks 3D Now! inline assembly]) AC_CACHE_CHECK([if \$CC groks 3D Now! inline assembly],
AC_TRY_COMPILE([void quux(){void *p;asm("pfadd %%mm1,%%mm2"::"r"(p));}],, [ac_cv_3dnow_inline],
[AC_TRY_COMPILE([void quux(){void *p;asm("pfadd %%mm1,%%mm2"::"r"(p));}],,
ac_cv_3dnow_inline=yes, ac_cv_3dnow_inline=no)])
if test x"$ac_cv_3dnow_inline" != x"no"; then
ACCEL_MODULES="${ACCEL_MODULES} ${THREEDNOW_MODULES}" ACCEL_MODULES="${ACCEL_MODULES} ${THREEDNOW_MODULES}"
AC_MSG_RESULT(yes), AC_MSG_RESULT(no)) fi
AC_MSG_CHECKING([if \$CC groks SSE inline assembly]) AC_CACHE_CHECK([if \$CC groks SSE inline assembly],
AC_TRY_COMPILE([void quux(){void *p;asm("xorps %%xmm1,%%xmm2"::"r"(p));}],, [ac_cv_sse_inline],
[AC_TRY_COMPILE([void quux(){void *p;asm("xorps %%xmm1,%%xmm2"::"r"(p));}],,
ac_cv_sse_inline=yes, ac_cv_sse_inline=no)])
if test x"$ac_cv_sse_inline" != x"no"; then
ACCEL_MODULES="${ACCEL_MODULES} ${SSE_MODULES}" ACCEL_MODULES="${ACCEL_MODULES} ${SSE_MODULES}"
AC_MSG_RESULT(yes), AC_MSG_RESULT(no)) fi
AC_MSG_CHECKING([if \$CC groks Altivec code]) AC_CACHE_CHECK([if \$CC groks Altivec inline assembly],
AC_TRY_COMPILE([void quux(){vec_mtvscr( (vector unsigned int)(0) );}],, [ac_cv_altivec_inline],
[AC_TRY_COMPILE([void quux(){asm("mtspr 256,%0"::"r"(-1));}],,
ac_cv_altivec_inline=yes, ac_cv_altivec_inline=no)])
if test x"$ac_cv_altivec_inline" != x"no"; then
ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}" ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
AC_MSG_RESULT(yes), AC_MSG_RESULT(no)) fi
dnl dnl
dnl libdvdcss: check for DVD ioctls dnl libdvdcss: check for DVD ioctls
...@@ -334,7 +349,7 @@ AC_CHECK_HEADERS(sys/ioctl.h,[ ...@@ -334,7 +349,7 @@ AC_CHECK_HEADERS(sys/ioctl.h,[
dnl dnl
dnl Check the operating system dnl Check the operating system
dnl dnl
case ${host_os} in case ${_os} in
bsdi*) bsdi*)
SYS=bsdi SYS=bsdi
;; ;;
...@@ -342,7 +357,7 @@ case ${host_os} in ...@@ -342,7 +357,7 @@ case ${host_os} in
SYS=darwin SYS=darwin
;; ;;
*) *)
SYS=${host_os} SYS=${target_os}
;; ;;
esac esac
...@@ -352,7 +367,7 @@ dnl ...@@ -352,7 +367,7 @@ dnl
AC_ARG_ENABLE(ppro, AC_ARG_ENABLE(ppro,
[ --disable-ppro Disable PentiumPro optimizations (default enabled for x86)], [ --disable-ppro Disable PentiumPro optimizations (default enabled for x86)],
[ if test x$enableval = xyes; then ARCH="${ARCH} ppro"; fi ], [ if test x$enableval = xyes; then ARCH="${ARCH} ppro"; fi ],
[ if test x${host_cpu} = xi686; then ARCH="${ARCH} ppro"; fi ]) [ if test x$ARCH = xi686; then ARCH="${ARCH} ppro"; fi ])
dnl dnl
dnl MMX acceleration dnl MMX acceleration
...@@ -361,7 +376,7 @@ AC_ARG_ENABLE(mmx, ...@@ -361,7 +376,7 @@ AC_ARG_ENABLE(mmx,
[ --disable-mmx Disable MMX optimizations (default enabled for x86)], [ --disable-mmx Disable MMX optimizations (default enabled for x86)],
[ if test x$enableval = xyes; then ARCH="${ARCH} mmx"; [ if test x$enableval = xyes; then ARCH="${ARCH} mmx";
BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ], BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ],
[ if test x${host_cpu} = xi686 -o x${host_cpu} = xi586 -o x${host_cpu} = xx86 -o x${host_cpu} = xi386; then ARCH="${ARCH} mmx"; [ if test x${target_cpu} = xi686 -o x${target_cpu} = xi586 -o x${target_cpu} = xx86 -o x${target_cpu} = xi386; then ARCH="${ARCH} mmx";
BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ]) BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ])
dnl dnl
...@@ -371,7 +386,7 @@ AC_ARG_ENABLE(altivec, ...@@ -371,7 +386,7 @@ AC_ARG_ENABLE(altivec,
[ --disable-altivec Disable altivec optimizations (default enabled on PPC)], [ --disable-altivec Disable altivec optimizations (default enabled on PPC)],
[ if test x$enableval = xyes; then ARCH="${ARCH} altivec"; [ if test x$enableval = xyes; then ARCH="${ARCH} altivec";
BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ], BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ],
[ if test x${host_cpu} = xpowerpc; then ARCH="${ARCH} altivec"; [ if test x${target_cpu} = xpowerpc; then ARCH="${ARCH} altivec";
BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ]) BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ])
dnl dnl
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment