common/autoconf/toolchain_windows.m4

changeset 637
52741ab7c601
parent 525
bd32ef0789ca
child 639
145dbc56f931
     1.1 --- a/common/autoconf/toolchain_windows.m4	Mon Mar 04 16:45:07 2013 +0100
     1.2 +++ b/common/autoconf/toolchain_windows.m4	Wed Mar 06 10:50:37 2013 +0100
     1.3 @@ -262,3 +262,59 @@
     1.4    AC_MSG_RESULT([$MSVCR_DLL])
     1.5    BASIC_FIXUP_PATH(MSVCR_DLL)
     1.6  ])
     1.7 +
     1.8 +
     1.9 +# Setup the DXSDK paths
    1.10 +AC_DEFUN([TOOLCHAIN_SETUP_DXSDK],
    1.11 +[
    1.12 +  AC_ARG_WITH(dxsdk, [AS_HELP_STRING([--with-dxsdk],
    1.13 +      [the DirectX SDK (Windows only) @<:@probed@:>@])])
    1.14 +  AC_ARG_WITH(dxsdk-lib, [AS_HELP_STRING([--with-dxsdk-lib],
    1.15 +      [the DirectX SDK lib directory (Windows only) @<:@probed@:>@])])
    1.16 +  AC_ARG_WITH(dxsdk-include, [AS_HELP_STRING([--with-dxsdk-include],
    1.17 +      [the DirectX SDK include directory (Windows only) @<:@probed@:>@])])
    1.18 +
    1.19 +  AC_MSG_CHECKING([for DirectX SDK])
    1.20 +
    1.21 +  if test "x$with_dxsdk" != x; then
    1.22 +    dxsdk_path="$with_dxsdk"
    1.23 +  elif test "x$DXSDK_DIR" != x; then
    1.24 +    dxsdk_path="$DXSDK_DIR"
    1.25 +  else
    1.26 +    AC_MSG_ERROR([Could not find the DirectX SDK])
    1.27 +  fi
    1.28 +  AC_MSG_RESULT([$dxsdk_path])
    1.29 +  BASIC_FIXUP_PATH(dxsdk_path)
    1.30 +
    1.31 +  AC_MSG_CHECKING([for DirectX SDK lib dir])
    1.32 +  if test "x$with_dxsdk_lib" != x; then
    1.33 +    DXSDK_LIB_PATH="$with_dxsdk_lib"
    1.34 +  elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
    1.35 +    DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
    1.36 +  else
    1.37 +    DXSDK_LIB_PATH="$dxsdk_path/Lib"
    1.38 +  fi
    1.39 +  # dsound.lib is linked to in jsoundds
    1.40 +  if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
    1.41 +    AC_MSG_ERROR([Invalid DirectX SDK lib dir])
    1.42 +  fi
    1.43 +  AC_MSG_RESULT([$DXSDK_LIB_PATH])
    1.44 +  BASIC_FIXUP_PATH(DXSDK_LIB_PATH)
    1.45 +
    1.46 +  AC_MSG_CHECKING([for DirectX SDK include dir])
    1.47 +  if test "x$with_dxsdk_include" != x; then
    1.48 +    DXSDK_INCLUDE_PATH="$with_dxsdk_include"
    1.49 +  else
    1.50 +    DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
    1.51 +  fi
    1.52 +  # dsound.h is included in jsoundds
    1.53 +  if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
    1.54 +    AC_MSG_ERROR([Invalid DirectX SDK lib dir])
    1.55 +  fi
    1.56 +  AC_MSG_RESULT([$DXSDK_INCLUDE_PATH])
    1.57 +  BASIC_FIXUP_PATH(DXSDK_INCLUDE_PATH)
    1.58 +
    1.59 +  AC_SUBST(DXSDK_LIB_PATH)
    1.60 +  AC_SUBST(DXSDK_INCLUDE_PATH)
    1.61 +  LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
    1.62 +])

mercurial