properly detect gstreamer and libxml headers and libs, reflect that wxMediaCtrl now on unix

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31953 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Ryan Norton
2005-02-12 01:30:39 +00:00
parent 68985f0e57
commit ce756cb06a
5 changed files with 509 additions and 117 deletions

View File

@@ -1982,6 +1982,11 @@ SEARCH_INCLUDE="\
/usr/include/wine \
/usr/local/include/wine \
\
/usr/include/gstreamer-0.8 \
/usr/local/include/gstreamer-0.8 \
/usr/include/libxml2 \
/usr/local/include/libxml2 \
\
/usr/unsupported/include \
/usr/athena/include \
/usr/local/x11r5/include \
@@ -3230,33 +3235,6 @@ dnl ---------------------------------------------------------------------------
fi
fi
dnl ---------------------------------------------------------------------------
dnl wxMediaCtrl
dnl ---------------------------------------------------------------------------
if test "$wxUSE_MEDIACTRL" = "yes"; then
if test "$wxUSE_MSW" = 1; then
dnl ---------------------------------------------------------------------------
dnl DirectShow MSW
dnl ---------------------------------------------------------------------------
wxUSE_DIRECTSHOW="yes"
AC_CHECK_HEADERS([dshow.h], [],
[
wxUSE_DIRECTSHOW="no"
AC_MSG_WARN([DirectShow not installed; consider installing the DirectX7 SDK or higher])
],
[#include <windows.h>])
if test "$wxUSE_DIRECTSHOW" = "yes"; then
AC_DEFINE(wxUSE_DIRECTSHOW)
LIBS="$LIBS -lstrmiids"
fi
fi
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS mediaplayer"
AC_DEFINE(wxUSE_MEDIACTRL)
fi
dnl ---------------------------------------------------------------------------
dnl OpenGL libraries
dnl ---------------------------------------------------------------------------
@@ -5997,6 +5975,155 @@ if test "$wxUSE_WIZARDDLG" = "yes"; then
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS wizard"
fi
dnl ---------------------------------------------------------------------------
dnl wxMediaCtrl
dnl ---------------------------------------------------------------------------
if test "$wxUSE_MEDIACTRL" = "yes"; then
if test "$wxUSE_MSW" = 1; then
dnl -----------------------------------------------------------------------
dnl DirectShow MSW
dnl -----------------------------------------------------------------------
wxUSE_DIRECTSHOW="yes"
AC_CHECK_HEADERS([dshow.h], [],
[
wxUSE_DIRECTSHOW="no"
AC_MSG_WARN([DirectShow not installed; consider installing the DirectX7 SDK or higher])
],
[#include <windows.h>])
if test "$wxUSE_DIRECTSHOW" = "yes"; then
AC_DEFINE(wxUSE_DIRECTSHOW)
LIBS="$LIBS -lstrmiids"
fi
fi
dnl -----------------------------------------------------------------------
dnl GStreamer
dnl -----------------------------------------------------------------------
if test "$wxUSE_GTK" = 1; then
wxUSE_GSTREAMER="yes"
dnl ---------------------------------------------------------------
dnl check for libxml2 lib
dnl ---------------------------------------------------------------
AC_MSG_CHECKING([for libxml2])
WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],xml2)
if test "$ac_find_libraries" != "" ; then
dnl -----------------------------------------------------------
dnl Check for libxml2's xmlstring.h header
dnl Break out if not found
dnl -----------------------------------------------------------
AC_MSG_RESULT([yes])
AC_MSG_CHECKING(for libxml2 headers)
WX_PATH_FIND_INCLUDES($SEARCH_INCLUDE, libxml/xmlstring.h)
if test "$ac_find_includes" != "" ; then
AC_MSG_RESULT(found in $ac_find_includes)
WX_INCLUDE_PATH_EXIST($ac_find_includes, $TOOLKIT_INCLUDE)
TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE$ac_path_to_include"
else
AC_TRY_COMPILE(
[
#include <libxml/xmlstring.h>
],
[],
[AC_MSG_RESULT(found in default search path)],
[wxUSE_GSTREAMER="no"])
fi
else
dnl -----------------------------------------------------------
dnl libxml2 lib not found - break out
dnl -----------------------------------------------------------
wxUSE_GSTREAMER="no"
fi
if test "$wxUSE_GSTREAMER" = "yes"; then
dnl -----------------------------------------------------------
dnl test for gstreamer main lib
dnl -----------------------------------------------------------
AC_MSG_CHECKING([for gstreamer 0.8])
WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],gstreamer-0.8)
if test "$ac_find_libraries" != "" ; then
dnl -------------------------------------------------------
dnl Check for GStreamer gstplay lib
dnl -------------------------------------------------------
AC_MSG_RESULT([yes])
AC_MSG_CHECKING([for gstplay 0.8])
WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],gstplay-0.8)
if test "$ac_find_libraries" != "" ; then
dnl ---------------------------------------------------
dnl gstplay lib found - check for gstinterfaces lib
dnl ---------------------------------------------------
AC_MSG_RESULT([yes])
AC_MSG_CHECKING([for gstinterfaces 0.8])
WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],gstinterfaces-0.8)
if test "$ac_find_libraries" != "" ; then
dnl -----------------------------------------------
dnl GStreamer libs found - check for gstreamer
dnl include path and header
dnl -----------------------------------------------
AC_MSG_RESULT([yes])
AC_MSG_CHECKING(for GStreamer headers)
WX_PATH_FIND_INCLUDES($SEARCH_INCLUDE, gst/gst.h)
if test "$ac_find_includes" != "" ; then
AC_MSG_RESULT(found in $ac_find_includes)
WX_INCLUDE_PATH_EXIST($ac_find_includes, $TOOLKIT_INCLUDE)
TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE$ac_path_to_include"
else
AC_TRY_COMPILE(
[
#include <gst/gst.h>
],
[],
[AC_MSG_RESULT(found in default search path)],
[wxUSE_GSTREAMER="no"])
fi
else
dnl -----------------------------------------------
dnl gstinterfaces lib not found - break out
dnl -----------------------------------------------
wxUSE_GSTREAMER="no"
fi
else
dnl ---------------------------------------------------
dnl gstplay lib not found - break out
dnl ---------------------------------------------------
wxUSE_GSTREAMER="no"
fi
else
dnl -------------------------------------------------------
dnl Main GStreamer lib not found - break out
dnl -------------------------------------------------------
wxUSE_GSTREAMER="no"
fi
dnl -----------------------------------------------------------
dnl Check if everything went ok - if not then print no
dnl and break out
dnl -----------------------------------------------------------
if test "$wxUSE_GSTREAMER" = "yes"; then
dnl -------------------------------------------------------
dnl Success! Define wxUSE_GSTREAMER to 1 so that
dnl src/unix/mediactrl.cpp will build with GStreamer
dnl enabled, and add the 3 gstreamer libs and the libxml2
dnl to the linker's library includes
dnl -------------------------------------------------------
AC_DEFINE(wxUSE_GSTREAMER)
LIBS="$LIBS -lgstreamer-0.8 -lgstplay-0.8"
LIBS="$LIBS -lgstinterfaces-0.8 -lxml2"
else
dnl -------------------------------------------------------
dnl Generic "NO" message - triggered if any of the above
dnl conditions doesn't pan out
dnl -------------------------------------------------------
AC_MSG_RESULT([no])
fi
fi
fi
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS mediaplayer"
AC_DEFINE(wxUSE_MEDIACTRL)
fi
dnl ---------------------------------------------------------------------------
dnl get the string with OS info - used by wxGetOsDescription() on MacOS X
dnl ---------------------------------------------------------------------------