Merged 2293

This commit is contained in:
Moritz Bunkus 2004-10-06 08:26:17 +00:00
parent 87ce579c97
commit dab5685402

View File

@ -701,7 +701,7 @@ dnl Check for wxWindows
dnl
AC_ARG_ENABLE([gui],
[ --enable-gui compile mkvinfo's GUI and mmg (yes)])
AC_MSG_CHECKING(for wxWindows)
AC_MSG_CHECKING(for wxWidgets)
if test x"$enable_gui" = x"yes" -o x"$enable_gui" = "x"; then
if wx-config --cxxflags > /dev/null 2>&1; then
wxwversion=`wx-config --version`
@ -731,11 +731,32 @@ dnl
WXWINDOWS_CFLAGS=`wx-config --cxxflags`
WXWINDOWS_LDFLAGS=`wx-config --ldflags`
WXWINDOWS_LIBS=`wx-config --libs`
AC_DEFINE(HAVE_WXWINDOWS, 1, [Define if wxWindows is present])
MMG_SUBDIRS=mmg
AC_MSG_RESULT($wxwversion ok)
have_wxwindows=yes
USE_WXWINDOWS=yes
AC_CACHE_VAL(am_cv_wx_compilation, [
AC_LANG_PUSH(C++)
ac_save_CXXFLAGS="$CXXFLAGS"
ac_save_LIBS="$LIBS"
CXXFLAGS="$CXXFLAGS $WXWINDOWS_CFLAGS"
LIBS="$LDFLAGS $WXWINDOWS_LDFLAGS $WXWINDOWS_LIBS"
AC_TRY_LINK([
#include <wx/dnd.h>
#include <wx/treectrl.h>
], [
wxDragResult result = wxDragError;
wxTreeItemId id;
], [ am_cv_wx_compilation=1 ], [ am_cv_wx_compilation=0 ])
AC_LANG_POP()
CXXFLAGS="$ac_save_CXXFLAGS"
LIBS="$ac_save_LIBS"
])
if test x"$am_cv_wx_compilation" = x1; then
AC_DEFINE(HAVE_WXWINDOWS, 1, [Define if wxWindows is present])
MMG_SUBDIRS=mmg
AC_MSG_RESULT($wxwversion ok)
have_wxwindows=yes
USE_WXWINDOWS=yes
else
AC_MSG_RESULT(no: test program could not be compiled)
fi
else
AC_MSG_RESULT(no: version $wxwversion is too old)
fi