Allow the user to override which wx-config script to use with the WX_CONFIG environment variable.

This commit is contained in:
Moritz Bunkus 2005-09-21 10:57:05 +00:00
parent 19227e0ea6
commit 3b07dcbe73

View File

@ -816,13 +816,18 @@ dnl Check for wxWindows
dnl
AC_ARG_ENABLE([gui],
[ --enable-gui compile mkvinfo's GUI and mmg (yes)])
AC_MSG_CHECKING(for wxWidgets)
wxw_ver_req_major=2
wxw_ver_req_minor=4
wxw_ver_req_micro=0
wxw_min_ver=$wxw_ver_req_major.$wxw_ver_req_minor.$wxw_ver_req_micro
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`
wxw_ver_req_major=2
wxw_ver_req_minor=4
wxw_ver_req_micro=0
AC_PATH_PROG(WX_CONFIG, wx-config, no, $PATH:/usr/local/bin)
if test x"$WX_CONFIG" != "xno" ; then
AC_MSG_CHECKING(for wxWidgets $wxw_min_ver or newer)
wxwversion=`$WX_CONFIG --version`
set - `echo $wxwversion | sed 's/\./\ /g'`
if test "x$1" = "x" -o $1 -lt ${wxw_ver_req_major} ; then
wxwver_ok=0
@ -843,8 +848,8 @@ dnl
fi
if test "$wxwver_ok" = "1" ; then
WXWINDOWS_CFLAGS=`wx-config --cxxflags`
WXWINDOWS_LIBS=`wx-config --libs | \
WXWINDOWS_CFLAGS=`$WX_CONFIG --cxxflags`
WXWINDOWS_LIBS=`$WX_CONFIG --libs | \
sed -e 's/-Wl,--subsystem,windows//' -e 's/-mwindows//'`
AC_CACHE_VAL(am_cv_wx_compilation, [
AC_LANG_PUSH(C++)
@ -892,7 +897,7 @@ wxTreeItemId id;
AC_MSG_RESULT(no: wx-config was not found)
fi
else
AC_MSG_RESULT(no: disabled by user request)
echo '*** Not checking for wxWidgets: disabled by user request'
fi
if test x"$have_wxwindows" != "xyes" ; then