]> git.sesse.net Git - vlc/blobdiff - configure.in
More WIN32 portability fixes.
[vlc] / configure.in
index 9a1aa2a7d10b512e6a158f300d8268c071f8d414..5de62f0f61bcd154435248608670b347cbafaa41 100644 (file)
@@ -934,51 +934,33 @@ dnl
 dnl  Windows DirectX module
 dnl
 AC_ARG_ENABLE(directx,
-  [  --disable-directx       Windows DirectX support (default enabled on WIN32)],
-  [ if test "x$enableval" != "xno"
-    then
-      if test "x$enableval" = "xyes"
-      then
-        AC_CHECK_HEADERS(directx.h,
-        [ PLUGINS="${PLUGINS} directx"
-          LIB_DIRECTX="-lgdi32 -ldxguid" ] )
-      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
+  [  --disable-directx       Windows DirectX support (default enabled on WIN32)])
+if test "x$enableval" != "xno"
+then
+  if test $SYS = mingw32
+  then
+    AC_ARG_WITH(directx-path, 
+    [  --with-directx-path=path Windows DirectX headers and libraries])
+    if test "x$with_directx_path" = "x"
     then
-      AC_ARG_WITH(directx-path, 
-      [  --with-directx-path=path Windows DirectX headers and libraries])
-      if test "x$with_directx_path" = "x"
+      AC_CHECK_HEADERS(directx.h,
+      [ PLUGINS="${PLUGINS} directx"
+        LIB_DIRECTX="-lgdi32 -ldxguid" ])
+    else
+      AC_MSG_CHECKING(for directX headers in ${withval})
+      if test -f ${withval}/include/directx.h
       then
-        AC_CHECK_HEADERS(directx.h,
-        [ PLUGINS="${PLUGINS} directx"
-          LIB_DIRECTX="-lgdi32 -ldxguid" ])
+        PLUGINS="${PLUGINS} directx"
+        LIB_DIRECTX="-L${withval}/lib -lgdi32 -ldxguid"
+        INCLUDE="${INCLUDE} -I${withval}/include"
+        AC_MSG_RESULT(yes)
       else
-        AC_MSG_CHECKING(for directX headers in ${withval})
-        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"
-          AC_MSG_RESULT(yes)
-        else
-          AC_MSG_RESULT(no)
-          AC_MSG_ERROR([Cannot find ${with_directx_path}/include/directx.h!])
-        fi
+        AC_MSG_RESULT(no)
+        AC_MSG_ERROR([Cannot find ${withval}/include/directx.h!])
       fi
-    fi ])
+    fi
+  fi
+fi
 
 dnl
 dnl  Glide module