Commit 73833c16 authored by Michel Lespinasse's avatar Michel Lespinasse
Browse files

small configure fixes.

parent d201c02a
......@@ -9,7 +9,6 @@ AM_INIT_AUTOMAKE([mpeg2dec],[0.2.2-cvs])
AM_CONFIG_HEADER(include/config.h)
AM_MAINTAINER_MODE
AC_CANONICAL_HOST
if test x"$host_alias" = x""; then host_alias="$host"; fi
dnl Checks for compiler
AC_PROG_CC
......@@ -39,10 +38,10 @@ elif test x"$GCC" = x"yes"; then
AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS])
dnl arch-specific flags
case "$host_alias" in
case "$host" in
i?86-* | k?-*)
AC_DEFINE([ARCH_X86],,[x86 architecture])
case "$host_alias" in
case "$host" in
i386-*) OPT_CFLAGS="$CFLAGS -mcpu=i386";;
i486-*) OPT_CFLAGS="$CFLAGS -mcpu=i486";;
i586-*) OPT_CFLAGS="$CFLAGS -mcpu=pentium";;
......@@ -73,7 +72,7 @@ elif test x"$CC" = x"icc" -a x"`$CC -V 2>&1 | grep Intel`" != x""; then
CFLAGS="-g -O3 -unroll -ip"
else
dnl non-gcc flags - we probably need exact configuration triplets here.
case "$host_alias" in
case "$host" in
mips-sgi-irix6.*)
OPT_CFLAGS="$CFLAGS -64"
AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);;
......
......@@ -18,18 +18,19 @@ if test x"$no_x" != x"yes"; then
fi
dnl check for DirectX
AC_ARG_WITH([directx],[ --with-directx use Win32 DirectX])
case $with_directx in
AC_ARG_ENABLE([directx],
[ --enable-directx=DIR use Win32 DirectX headers in DIR])
case $enable_directx in
""|yes) AC_CHECK_HEADERS([ddraw.h],
[AC_DEFINE([LIBVO_DX],,[libvo DirectX support])
LIBVO_LIBS="$LIBVO_LIBS -lgdi32"]);;
no) ;;
*) if test -f "$with_directx/ddraw.h"; then
*) if test -f "$enable_directx/ddraw.h"; then
AC_DEFINE([LIBVO_DX],,[libvo DirectX support])
LIBVO_CFLAGS="$LIBVO_CFLAGS -I${with_directx}"
LIBVO_CFLAGS="$LIBVO_CFLAGS -I$enable_directx"
LIBVO_LIBS="$LIBVO_LIBS -lgdi32"
else
AC_MSG_ERROR([Cannot find $with_directx/ddraw.h])
AC_MSG_ERROR([Cannot find $enable_directx/ddraw.h])
fi;;
esac
......
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