2008-11-07 00:12:55 +00:00
|
|
|
dnl These functions still require wxWidgets.m4
|
2017-10-25 08:09:10 +00:00
|
|
|
|
2008-11-07 00:12:55 +00:00
|
|
|
AC_DEFUN([BOINC_OPTIONS_WXWIDGETS],[
|
2009-01-13 23:06:02 +00:00
|
|
|
|
2017-10-25 08:09:10 +00:00
|
|
|
AC_ARG_ENABLE(unicode,
|
2009-01-13 23:06:02 +00:00
|
|
|
AS_HELP_STRING([--enable-unicode/--disable-unicode],
|
|
|
|
[enable/disable building the manager with unicode support]),
|
|
|
|
[enable_unicode="$enableval"],
|
|
|
|
[])
|
|
|
|
|
2019-02-09 12:17:20 +00:00
|
|
|
WX_CONFIG_OPTIONS
|
|
|
|
WX_CONFIG_CHECK([$1],
|
2017-10-25 08:09:47 +00:00
|
|
|
[_ac_cv_have_wxwidgets=yes],
|
2019-02-09 15:28:50 +00:00
|
|
|
[AC_MSG_ERROR([No suitable wxWidgets library found.])],
|
|
|
|
[std], ,
|
|
|
|
[webview])
|
2008-11-07 00:12:55 +00:00
|
|
|
AC_CACHE_CHECK([if wxWidgets works],[ac_cv_have_wxwidgets],
|
|
|
|
[ac_cv_have_wxwidgets="${_ac_cv_have_wxwidgets}"])
|
|
|
|
AC_CACHE_SAVE
|
2009-01-22 21:39:40 +00:00
|
|
|
if test "x$ac_cv_path_WX_CONFIG_PATH" != "x" ; then
|
|
|
|
WX_CONFIG="$ac_cv_path_WX_CONFIG_PATH"
|
|
|
|
elif test "x$WX_CONFIG_PATH" != "x" ; then
|
|
|
|
WX_CONFIG="$WX_CONFIG_PATH"
|
|
|
|
fi
|
2008-11-07 00:12:55 +00:00
|
|
|
if test "x${ac_cv_have_wxwidgets}" = "xyes" ; then
|
|
|
|
dnl Find the default wxWidgets options.
|
|
|
|
wx_default_config="`$WX_CONFIG --selected-config`"
|
|
|
|
AC_MSG_CHECKING(for default wxWidgets config)
|
|
|
|
AC_MSG_RESULT($wx_default_config)
|
|
|
|
AC_CACHE_CHECK([for wxwidgets options],[ac_cv_wxwidgets_options],[
|
|
|
|
ac_cv_wxwidgets_options=""
|
2009-01-13 23:06:02 +00:00
|
|
|
wx_default_config="`$WX_CONFIG ${ac_cv_wxwidgets_options} --selected-config`"
|
|
|
|
if test "x${enable_unicode}" = x ; then
|
2017-10-25 08:09:10 +00:00
|
|
|
isuc="`echo ${wx_default_config} | grep unicode`"
|
2010-02-10 19:39:13 +00:00
|
|
|
if test "x${isuc}" = x ; then
|
|
|
|
enable_unicode=no
|
|
|
|
else
|
|
|
|
enable_unicode=yes
|
|
|
|
fi
|
2009-01-13 23:06:02 +00:00
|
|
|
fi
|
2017-10-25 08:09:10 +00:00
|
|
|
|
2008-11-07 00:12:55 +00:00
|
|
|
if test "x${enable_unicode}" != x ; then
|
|
|
|
if $WX_CONFIG ${ac_cv_wxwidgets_options} --unicode=${enable_unicode} --selected-config 2>&1 >/dev/null ; then
|
|
|
|
ac_cv_wxwidgets_options="${ac_cv_wxwidgets_options} --unicode=${enable_unicode}"
|
|
|
|
else
|
2010-02-10 19:39:13 +00:00
|
|
|
if test "x${enable_unicode}" = xno ; then
|
|
|
|
uprf="ascii"
|
|
|
|
nprf="unicode"
|
|
|
|
else
|
|
|
|
uprf="unicode"
|
|
|
|
nprf="ascii"
|
2017-10-25 08:09:10 +00:00
|
|
|
fi
|
2008-11-07 00:12:55 +00:00
|
|
|
AC_MSG_WARN([
|
|
|
|
===============================================================================
|
|
|
|
WARNING: No ${uprf} libraries for wxWidgets are installed.
|
2015-11-06 12:57:02 +00:00
|
|
|
==> building with ${nprf} libraries.
|
2017-10-25 08:09:10 +00:00
|
|
|
|
|
|
|
You requested a ${uprf} build, but configure is unable to find ${uprf}
|
2008-11-07 00:12:55 +00:00
|
|
|
wxWidgets libraries. We will build with the default ${nprf} libraries.
|
|
|
|
===============================================================================
|
|
|
|
])
|
|
|
|
ac_cv_wxwidgets_options="${ac_cv_wxwidgets_options}"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
])
|
2009-01-13 23:06:02 +00:00
|
|
|
wx_default_config="`$WX_CONFIG ${ac_cv_wxwidgets_options} --selected-config`"
|
|
|
|
AC_MSG_CHECKING([wxWidgets config to use])
|
|
|
|
AC_MSG_RESULT([$wx_default_config])
|
|
|
|
if test "x${ac_cv_wxwidgets_options}" != "x" ; then
|
2019-02-09 15:28:50 +00:00
|
|
|
WX_CONFIG_CHECK($1, wxWin=1, wxWin=0, [std], ${ac_cv_wxwidgets_options}, [webview])
|
2008-11-07 00:12:55 +00:00
|
|
|
fi
|
|
|
|
fi
|
2014-06-18 21:57:26 +00:00
|
|
|
|
|
|
|
AC_MSG_CHECKING([if wxWidgets uses the GTK+ toolkit])
|
|
|
|
gtkver=none
|
|
|
|
AM_CONDITIONAL([GUI_GTK], echo $wx_default_config | grep -i ^gtk 2>&1 >/dev/null)
|
|
|
|
if echo $wx_default_config | grep -i gtk 2>&1 >/dev/null ; then
|
2017-10-25 08:09:10 +00:00
|
|
|
case ${wx_default_config} in
|
2020-12-07 19:40:36 +00:00
|
|
|
gtk3-*|*-gtk3-*) gtkver=gtk+-3.0
|
2014-06-18 21:57:26 +00:00
|
|
|
;;
|
2020-12-07 19:40:36 +00:00
|
|
|
gtk2-*|*-gtk2-*) gtkver=gtk+-2.0
|
2014-06-18 21:57:26 +00:00
|
|
|
;;
|
2020-12-07 19:40:36 +00:00
|
|
|
gtk-*|*-gtk-*) gtkver=gtk+
|
2014-06-18 21:57:26 +00:00
|
|
|
;;
|
2017-10-25 08:09:10 +00:00
|
|
|
esac
|
2014-06-18 21:57:26 +00:00
|
|
|
GTK_CFLAGS="`pkg-config --cflags $gtkver`"
|
2022-06-17 19:53:58 +00:00
|
|
|
if test "x$GTK_LIBS" = "x" ; then
|
|
|
|
GTK_LIBS="`pkg-config --libs $gtkver`"
|
|
|
|
fi
|
2017-10-25 08:09:10 +00:00
|
|
|
fi
|
2014-06-18 21:57:26 +00:00
|
|
|
AC_SUBST([GTK_CFLAGS])
|
|
|
|
AC_SUBST([GTK_LIBS])
|
|
|
|
AC_MSG_RESULT([$gtkver])
|
2008-11-07 00:12:55 +00:00
|
|
|
])
|