diff options
| author | František Dvořák <valtri@users.sourceforge.net> | 2004-09-06 18:34:37 +0000 |
|---|---|---|
| committer | František Dvořák <valtri@users.sourceforge.net> | 2004-09-06 18:34:37 +0000 |
| commit | 261088452aebcd55874ba9cfdea8bbc6534122a0 (patch) | |
| tree | a02f0717c43f30d7fb55e6a9f4e0d4134798ba63 /m4 | |
| parent | e1ea9c13f9d15c4f9bf1372678fe9827be626be0 (diff) | |
| download | xine-lib-261088452aebcd55874ba9cfdea8bbc6534122a0.tar.gz xine-lib-261088452aebcd55874ba9cfdea8bbc6534122a0.tar.bz2 | |
Updates:
- usability MSVC for frontends
- remove unistd.h from public headers
- add configure option "--with-dxheaders"
- install .def file under WIN32
- MSVC port update (some people might want it)
CVS patchset: 6944
CVS date: 2004/09/06 18:34:37
Diffstat (limited to 'm4')
| -rw-r--r-- | m4/Makefile.am | 4 | ||||
| -rw-r--r-- | m4/directx.m4 | 72 |
2 files changed, 74 insertions, 2 deletions
diff --git a/m4/Makefile.am b/m4/Makefile.am index a3d8c3000..5274e73b0 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -15,6 +15,7 @@ EXTRA_DIST = \ as.m4 \ caca.m4 \ codeset.m4 \ + directx.m4 \ dl.m4 \ dvdnav.m4 \ esd.m4 \ @@ -38,5 +39,4 @@ EXTRA_DIST = \ theora.m4 \ xine.m4 \ _xine.m4 \ - xvid.m4 \ - vcd.m4 + xvid.m4 diff --git a/m4/directx.m4 b/m4/directx.m4 new file mode 100644 index 000000000..11725123f --- /dev/null +++ b/m4/directx.m4 @@ -0,0 +1,72 @@ +dnl +dnl autoconf script for DirectX +dnl +dnl written by Frantisek Dvorak <valtri@users.sourceforge.net> +dnl +dnl +dnl AM_PATH_DIRECTX([ACTION IF FOUND [, ACTION IF NOT FOUND]])) +dnl +dnl It looks for DirectX, defines DIRECTX_CPPFLAGS, DIRECTX_AUDIO_LIBS and +dnl DIRECTX_VIDEO_LIBS. +dnl +AC_DEFUN([AM_PATH_DIRECTX], [ + +AC_ARG_WITH(dxheaders, AC_HELP_STRING([--with-dxheaders], [specify location of DirectX headers]), + [dxheaders_prefix="$withval"], + [dxheaders_prefix="no"] +) + +if test x"$dxheaders_prefix" != "xno"; then + DIRECTX_CPPFLAGS="-I${dxheaders_prefix} ${DIRECTX_CPPFLAGS}" +fi + +AC_MSG_CHECKING(for DirectX) +DIRECTX_VIDEO_LIBS="$DIRECTX_LIBS -lgdi32 -lddraw" +DIRECTX_AUDIO_LIBS="$DIRECTX_LIBS -ldsound" +AC_LANG_SAVE() +AC_LANG_C() +ac_save_CPPFLAGS="$CPPFLAGS" +ac_save_LIBS="$LIBS" +CPPFLAGS="$CPPFLAGS $DIRECTX_CPPFLAGS" +LIBS="$LIBS $DIRECTX_VIDEO_LIBS $DIRECTX_AUDIO_LIBS" +AC_COMPILE_IFELSE( + [ +#include <stddef.h> + +#include <windows.h> +#include <ddraw.h> +#include <dsound.h> + +int main() { + DirectDrawCreate(0, NULL, 0); + DirectsoundCreate(0, NULL, 0); + + return 0; +} + ], + [have_directx=yes + AC_DEFINE(HAVE_DIRECTX,1,[Define this if you have DirectX])],,) +CPPFLAGS=$ac_save_CPPFLAGS +LIBS=$ac_save_LIBS +AC_LANG_RESTORE() + +if test x$have_directx = xyes ; then + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) + AC_MSG_RESULT(*** All DirectX dependent parts will be disabled ***) +fi + +AC_SUBST(DIRECTX_CPPFLAGS) +AC_SUBST(DIRECTX_AUDIO_LIBS) +AC_SUBST(DIRECTX_VIDEO_LIBS) +AM_CONDITIONAL(HAVE_DIRECTX, test x$have_directx = "xyes") + +dnl result +if test x"$have_directx" = "xyes"; then + ifelse([$1], , :, [$1]) +else + ifelse([$2], , :, [$2]) +fi + +]) |
