Commit caa99b31 authored by Christophe Massiot's avatar Christophe Massiot

More WIN32 portability fixes.

parent cb700a8d
...@@ -5308,92 +5308,36 @@ fi ...@@ -5308,92 +5308,36 @@ fi
# Check whether --enable-directx or --disable-directx was given. # Check whether --enable-directx or --disable-directx was given.
if test "${enable_directx+set}" = set; then if test "${enable_directx+set}" = set; then
enableval="$enable_directx" enableval="$enable_directx"
if test "x$enableval" != "xno" :
then
if test "x$enableval" = "xyes"
then
for ac_hdr in directx.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:5320: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 5325 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
PLUGINS="${PLUGINS} directx"
LIB_DIRECTX="-lgdi32 -ldxguid"
else
echo "$ac_t""no" 1>&6
fi fi
done
else if test "x$enableval" != "xno"
echo $ac_n "checking for directX headers in ${enableval}""... $ac_c" 1>&6 then
echo "configure:5359: checking for directX headers in ${enableval}" >&5 if test $SYS = mingw32
if test -f ${enableval}/include/directx.h then
then # Check whether --with-directx-path or --without-directx-path was given.
PLUGINS="${PLUGINS} directx"
LIB_DIRECTX="-L${enableval}/lib -lgdi32 -ldxguid"
INCLUDE="${INCLUDE} -I${enableval}/include"
echo "$ac_t""yes" 1>&6
else
echo "$ac_t""no" 1>&6
{ echo "configure: error: Cannot find ${enableval}/include/directx.h!" 1>&2; exit 1; }
fi
fi
fi
else
if test $SYS = mingw32
then
# Check whether --with-directx-path or --without-directx-path was given.
if test "${with_directx_path+set}" = set; then if test "${with_directx_path+set}" = set; then
withval="$with_directx_path" withval="$with_directx_path"
: :
fi fi
if test "x$with_directx_path" = "x" if test "x$with_directx_path" = "x"
then then
for ac_hdr in directx.h for ac_hdr in directx.h
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:5387: checking for $ac_hdr" >&5 echo "configure:5331: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 5392 "configure" #line 5336 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5397: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:5341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -5414,30 +5358,29 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then ...@@ -5414,30 +5358,29 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
#define $ac_tr_hdr 1 #define $ac_tr_hdr 1
EOF EOF
PLUGINS="${PLUGINS} directx" PLUGINS="${PLUGINS} directx"
LIB_DIRECTX="-lgdi32 -ldxguid" LIB_DIRECTX="-lgdi32 -ldxguid"
else else
echo "$ac_t""no" 1>&6 echo "$ac_t""no" 1>&6
fi fi
done done
else
echo $ac_n "checking for directX headers in ${withval}""... $ac_c" 1>&6
echo "configure:5370: checking for directX headers in ${withval}" >&5
if test -f ${withval}/include/directx.h
then
PLUGINS="${PLUGINS} directx"
LIB_DIRECTX="-L${withval}/lib -lgdi32 -ldxguid"
INCLUDE="${INCLUDE} -I${withval}/include"
echo "$ac_t""yes" 1>&6
else else
echo $ac_n "checking for directX headers in ${withval}""... $ac_c" 1>&6 echo "$ac_t""no" 1>&6
echo "configure:5426: checking for directX headers in ${withval}" >&5 { echo "configure: error: Cannot find ${withval}/include/directx.h!" 1>&2; exit 1; }
if test -f ${with_directx_path}/include/directx.h
then
PLUGINS="${PLUGINS} directx"
LIB_DIRECTX="-L${with_directx_path}/lib -lgdi32 -ldxguid"
INCLUDE="${INCLUDE} -I${with_directx_path}/include"
echo "$ac_t""yes" 1>&6
else
echo "$ac_t""no" 1>&6
{ echo "configure: error: Cannot find ${with_directx_path}/include/directx.h!" 1>&2; exit 1; }
fi
fi fi
fi fi
fi
fi fi
# Check whether --with-glide or --without-glide was given. # Check whether --with-glide or --without-glide was given.
if test "${with_glide+set}" = set; then if test "${with_glide+set}" = set; then
withval="$with_glide" withval="$with_glide"
...@@ -5506,7 +5449,7 @@ if test "${enable_gnome+set}" = set; then ...@@ -5506,7 +5449,7 @@ if test "${enable_gnome+set}" = set; then
# Extract the first word of "gnome-config", so it can be a program name with args. # Extract the first word of "gnome-config", so it can be a program name with args.
set dummy gnome-config; ac_word=$2 set dummy gnome-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:5510: checking for $ac_word" >&5 echo "configure:5453: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -5551,17 +5494,17 @@ fi ...@@ -5551,17 +5494,17 @@ fi
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:5555: checking for $ac_hdr" >&5 echo "configure:5498: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 5560 "configure" #line 5503 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5565: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:5508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -5621,7 +5564,7 @@ fi ...@@ -5621,7 +5564,7 @@ fi
# Extract the first word of "gtk-config", so it can be a program name with args. # Extract the first word of "gtk-config", so it can be a program name with args.
set dummy gtk-config; ac_word=$2 set dummy gtk-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:5625: checking for $ac_word" >&5 echo "configure:5568: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -5666,17 +5609,17 @@ fi ...@@ -5666,17 +5609,17 @@ fi
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:5670: checking for $ac_hdr" >&5 echo "configure:5613: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 5675 "configure" #line 5618 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:5623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -5728,17 +5671,17 @@ if test x$enable_x11 != xno && ...@@ -5728,17 +5671,17 @@ if test x$enable_x11 != xno &&
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:5732: checking for $ac_hdr" >&5 echo "configure:5675: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 5737 "configure" #line 5680 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:5685: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -5791,17 +5734,17 @@ if test x$enable_xvideo != xno && ...@@ -5791,17 +5734,17 @@ if test x$enable_xvideo != xno &&
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:5795: checking for $ac_hdr" >&5 echo "configure:5738: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 5800 "configure" #line 5743 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5805: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:5748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -5841,17 +5784,17 @@ if test "${enable_alsa+set}" = set; then ...@@ -5841,17 +5784,17 @@ if test "${enable_alsa+set}" = set; then
then then
ac_safe=`echo "sys/asoundlib.h" | sed 'y%./+-%__p_%'` ac_safe=`echo "sys/asoundlib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/asoundlib.h""... $ac_c" 1>&6 echo $ac_n "checking for sys/asoundlib.h""... $ac_c" 1>&6
echo "configure:5845: checking for sys/asoundlib.h" >&5 echo "configure:5788: checking for sys/asoundlib.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 5850 "configure" #line 5793 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/asoundlib.h> #include <sys/asoundlib.h>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:5798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -5868,7 +5811,7 @@ fi ...@@ -5868,7 +5811,7 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6 echo "$ac_t""yes" 1>&6
echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6 echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
echo "configure:5872: checking for main in -lasound" >&5 echo "configure:5815: checking for main in -lasound" >&5
ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'` ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -5876,14 +5819,14 @@ else ...@@ -5876,14 +5819,14 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lasound $LIBS" LIBS="-lasound $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 5880 "configure" #line 5823 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
main() main()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:5887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:5830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
......
...@@ -934,51 +934,33 @@ dnl ...@@ -934,51 +934,33 @@ dnl
dnl Windows DirectX module dnl Windows DirectX module
dnl dnl
AC_ARG_ENABLE(directx, AC_ARG_ENABLE(directx,
[ --disable-directx Windows DirectX support (default enabled on WIN32)], [ --disable-directx Windows DirectX support (default enabled on WIN32)])
[ if test "x$enableval" != "xno" if test "x$enableval" != "xno"
then then
if test "x$enableval" = "xyes" if test $SYS = mingw32
then then
AC_CHECK_HEADERS(directx.h, AC_ARG_WITH(directx-path,
[ PLUGINS="${PLUGINS} directx" [ --with-directx-path=path Windows DirectX headers and libraries])
LIB_DIRECTX="-lgdi32 -ldxguid" ] ) if test "x$with_directx_path" = "x"
else
AC_MSG_CHECKING(for directX headers in ${enableval})
if test -f ${enableval}/include/directx.h
then
PLUGINS="${PLUGINS} directx"
LIB_DIRECTX="-L${enableval}/lib -lgdi32 -ldxguid"
INCLUDE="${INCLUDE} -I${enableval}/include"
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
AC_MSG_ERROR([Cannot find ${enableval}/include/directx.h!])
fi
fi
fi ],
[ if test $SYS = mingw32
then then
AC_ARG_WITH(directx-path, AC_CHECK_HEADERS(directx.h,
[ --with-directx-path=path Windows DirectX headers and libraries]) [ PLUGINS="${PLUGINS} directx"
if test "x$with_directx_path" = "x" LIB_DIRECTX="-lgdi32 -ldxguid" ])
else
AC_MSG_CHECKING(for directX headers in ${withval})
if test -f ${withval}/include/directx.h
then then
AC_CHECK_HEADERS(directx.h, PLUGINS="${PLUGINS} directx"
[ PLUGINS="${PLUGINS} directx" LIB_DIRECTX="-L${withval}/lib -lgdi32 -ldxguid"
LIB_DIRECTX="-lgdi32 -ldxguid" ]) INCLUDE="${INCLUDE} -I${withval}/include"
AC_MSG_RESULT(yes)
else else
AC_MSG_CHECKING(for directX headers in ${withval}) AC_MSG_RESULT(no)
if test -f ${with_directx_path}/include/directx.h AC_MSG_ERROR([Cannot find ${withval}/include/directx.h!])
then
PLUGINS="${PLUGINS} directx"
LIB_DIRECTX="-L${with_directx_path}/lib -lgdi32 -ldxguid"
INCLUDE="${INCLUDE} -I${with_directx_path}/include"
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
AC_MSG_ERROR([Cannot find ${with_directx_path}/include/directx.h!])
fi
fi fi
fi ]) fi
fi
fi
dnl dnl
dnl Glide module dnl Glide module
......
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