Minor cleanup: use AC_CHECK_DECLS for the gtk_icon_size_lookup check instead of
AC_TRY_COMPILE. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41247 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
47
configure
vendored
47
configure
vendored
@@ -28555,22 +28555,25 @@ libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
|
|||||||
CFLAGS="$wx_cv_cflags_gtk $CFLAGS"
|
CFLAGS="$wx_cv_cflags_gtk $CFLAGS"
|
||||||
LIBS="$LIBS $wx_cv_libs_gtk"
|
LIBS="$LIBS $wx_cv_libs_gtk"
|
||||||
|
|
||||||
echo "$as_me:$LINENO: checking if gtk_icon_size_lookup is missing" >&5
|
echo "$as_me:$LINENO: checking whether gtk_icon_size_lookup is declared" >&5
|
||||||
echo $ECHO_N "checking if gtk_icon_size_lookup is missing... $ECHO_C" >&6
|
echo $ECHO_N "checking whether gtk_icon_size_lookup is declared... $ECHO_C" >&6
|
||||||
cat >conftest.$ac_ext <<_ACEOF
|
if test "${ac_cv_have_decl_gtk_icon_size_lookup+set}" = set; then
|
||||||
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
|
else
|
||||||
|
cat >conftest.$ac_ext <<_ACEOF
|
||||||
/* confdefs.h. */
|
/* confdefs.h. */
|
||||||
_ACEOF
|
_ACEOF
|
||||||
cat confdefs.h >>conftest.$ac_ext
|
cat confdefs.h >>conftest.$ac_ext
|
||||||
cat >>conftest.$ac_ext <<_ACEOF
|
cat >>conftest.$ac_ext <<_ACEOF
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
|
#include <gtk/gtk.h>
|
||||||
#include <gtk/gtk.h>
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
|
#ifndef gtk_icon_size_lookup
|
||||||
void *f = gtk_icon_size_lookup;
|
char *p = (char *) gtk_icon_size_lookup;
|
||||||
|
#endif
|
||||||
|
|
||||||
;
|
;
|
||||||
return 0;
|
return 0;
|
||||||
@@ -28598,24 +28601,36 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||||||
ac_status=$?
|
ac_status=$?
|
||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
(exit $ac_status); }; }; then
|
(exit $ac_status); }; }; then
|
||||||
|
ac_cv_have_decl_gtk_icon_size_lookup=yes
|
||||||
echo "$as_me:$LINENO: result: no" >&5
|
|
||||||
echo "${ECHO_T}no" >&6
|
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "$as_me: failed program was:" >&5
|
echo "$as_me: failed program was:" >&5
|
||||||
sed 's/^/| /' conftest.$ac_ext >&5
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
|
|
||||||
|
ac_cv_have_decl_gtk_icon_size_lookup=no
|
||||||
|
fi
|
||||||
|
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
|
fi
|
||||||
|
echo "$as_me:$LINENO: result: $ac_cv_have_decl_gtk_icon_size_lookup" >&5
|
||||||
|
echo "${ECHO_T}$ac_cv_have_decl_gtk_icon_size_lookup" >&6
|
||||||
|
if test $ac_cv_have_decl_gtk_icon_size_lookup = yes; then
|
||||||
|
|
||||||
cat >>confdefs.h <<\_ACEOF
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
#define HAVE_DECL_GTK_ICON_SIZE_LOOKUP 1
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
|
||||||
|
else
|
||||||
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
#define HAVE_DECL_GTK_ICON_SIZE_LOOKUP 0
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
cat >>confdefs.h <<\_ACEOF
|
||||||
#define NEED_GTK_ICON_SIZE_LOOKUP 1
|
#define NEED_GTK_ICON_SIZE_LOOKUP 1
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
echo "$as_me:$LINENO: result: yes" >&5
|
|
||||||
echo "${ECHO_T}yes" >&6
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
|
||||||
|
|
||||||
|
|
||||||
echo "$as_me:$LINENO: checking if GTK+ is version >= 2.6" >&5
|
echo "$as_me:$LINENO: checking if GTK+ is version >= 2.6" >&5
|
||||||
echo $ECHO_N "checking if GTK+ is version >= 2.6... $ECHO_C" >&6
|
echo $ECHO_N "checking if GTK+ is version >= 2.6... $ECHO_C" >&6
|
||||||
|
17
configure.in
17
configure.in
@@ -3012,20 +3012,9 @@ libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
|
|||||||
dnl that have shipped with some versions of Sun's JDS. Not using
|
dnl that have shipped with some versions of Sun's JDS. Not using
|
||||||
dnl AC_CHECK_FUNCS here since it only checks the function exists
|
dnl AC_CHECK_FUNCS here since it only checks the function exists
|
||||||
dnl in the lib (not the header).
|
dnl in the lib (not the header).
|
||||||
AC_MSG_CHECKING([if gtk_icon_size_lookup is missing])
|
AC_CHECK_DECLS([gtk_icon_size_lookup], [],
|
||||||
AC_TRY_COMPILE([
|
[AC_DEFINE(NEED_GTK_ICON_SIZE_LOOKUP)],
|
||||||
#include <gtk/gtk.h>
|
[#include <gtk/gtk.h>])
|
||||||
],
|
|
||||||
[
|
|
||||||
void *f = gtk_icon_size_lookup;
|
|
||||||
],
|
|
||||||
[
|
|
||||||
AC_MSG_RESULT([no])
|
|
||||||
],
|
|
||||||
[
|
|
||||||
AC_DEFINE(NEED_GTK_ICON_SIZE_LOOKUP)
|
|
||||||
AC_MSG_RESULT([yes])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl test if we have at least GTK+ 2.6:
|
dnl test if we have at least GTK+ 2.6:
|
||||||
AC_MSG_CHECKING([if GTK+ is version >= 2.6])
|
AC_MSG_CHECKING([if GTK+ is version >= 2.6])
|
||||||
|
Reference in New Issue
Block a user