Simplify configure check for Cairo
Instead of checking for Cairo and then checking for a function in Cairo 1.2, just check for Cairo 1.2.
This commit is contained in:
parent
fc9e188116
commit
471c642979
2 changed files with 17 additions and 49 deletions
42
configure
vendored
42
configure
vendored
|
|
@ -40126,12 +40126,12 @@ if test -n "$PKG_CONFIG"; then
|
|||
pkg_cv_CAIRO_CFLAGS="$CAIRO_CFLAGS"
|
||||
else
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "cairo") 2>&5
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo >= 1.2\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "cairo >= 1.2") 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_CAIRO_CFLAGS=`$PKG_CONFIG --cflags "cairo" 2>/dev/null`
|
||||
pkg_cv_CAIRO_CFLAGS=`$PKG_CONFIG --cflags "cairo >= 1.2" 2>/dev/null`
|
||||
else
|
||||
pkg_failed=yes
|
||||
fi
|
||||
|
|
@ -40144,12 +40144,12 @@ if test -n "$PKG_CONFIG"; then
|
|||
pkg_cv_CAIRO_LIBS="$CAIRO_LIBS"
|
||||
else
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "cairo") 2>&5
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo >= 1.2\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "cairo >= 1.2") 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_CAIRO_LIBS=`$PKG_CONFIG --libs "cairo" 2>/dev/null`
|
||||
pkg_cv_CAIRO_LIBS=`$PKG_CONFIG --libs "cairo >= 1.2" 2>/dev/null`
|
||||
else
|
||||
pkg_failed=yes
|
||||
fi
|
||||
|
|
@ -40168,9 +40168,9 @@ else
|
|||
_pkg_short_errors_supported=no
|
||||
fi
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
CAIRO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "cairo"`
|
||||
CAIRO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "cairo >= 1.2"`
|
||||
else
|
||||
CAIRO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "cairo"`
|
||||
CAIRO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "cairo >= 1.2"`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$CAIRO_PKG_ERRORS" >&5
|
||||
|
|
@ -40187,28 +40187,8 @@ else
|
|||
CAIRO_LIBS=$pkg_cv_CAIRO_LIBS
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
wx_has_cairo=1
|
||||
fi
|
||||
if test "$wx_has_cairo" = 1; then
|
||||
save_LIBS="$LIBS"
|
||||
LIBS="$LIBS $CAIRO_LIBS"
|
||||
for ac_func in cairo_push_group
|
||||
do :
|
||||
ac_fn_c_check_func "$LINENO" "cairo_push_group" "ac_cv_func_cairo_push_group"
|
||||
if test "x$ac_cv_func_cairo_push_group" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_CAIRO_PUSH_GROUP 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
done
|
||||
|
||||
LIBS="$save_LIBS"
|
||||
if test "$ac_cv_func_cairo_push_group" = "no"; then
|
||||
wx_has_cairo=0
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cairo library is too old and misses cairo_push_group()" >&5
|
||||
$as_echo "$as_me: WARNING: Cairo library is too old and misses cairo_push_group()" >&2;}
|
||||
else
|
||||
wx_has_cairo=1
|
||||
$as_echo "#define wxUSE_CAIRO 1" >>confdefs.h
|
||||
|
||||
|
||||
|
|
@ -40216,8 +40196,8 @@ $as_echo "$as_me: WARNING: Cairo library is too old and misses cairo_push_group(
|
|||
CXXFLAGS="$CXXFLAGS $CAIRO_CFLAGS"
|
||||
GUI_TK_LIBRARY="$GUI_TK_LIBRARY $CAIRO_LIBS"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$wxUSE_GRAPHICS_CONTEXT" = "yes"; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue