From: Po Lu Date: Sat, 18 Dec 2021 13:47:54 +0000 (+0000) Subject: Fix cairo build on haiku X-Git-Tag: emacs-29.0.90~3585 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a1eb71413d107196490425de9b3929d001d775cb;p=emacs.git Fix cairo build on haiku * configure.ac: Move pgtk cairo detection to the correct location. --- diff --git a/configure.ac b/configure.ac index 9a74c52c68a..df9bde6f20d 100644 --- a/configure.ac +++ b/configure.ac @@ -3474,6 +3474,23 @@ if test "${HAVE_X11}" = "yes"; then fi fi fi + +if test "$window_system" = "pgtk"; then + CAIRO_REQUIRED=1.12.0 + CAIRO_MODULE="cairo >= $CAIRO_REQUIRED" + EMACS_CHECK_MODULES(CAIRO, $CAIRO_MODULE) + if test $HAVE_CAIRO = yes; then + AC_DEFINE(USE_CAIRO, 1, [Define to 1 if using cairo.]) + else + AC_MSG_ERROR([cairo required but not found.]) + fi + + CFLAGS="$CFLAGS $CAIRO_CFLAGS" + LIBS="$LIBS $CAIRO_LIBS" + AC_SUBST(CAIRO_CFLAGS) + AC_SUBST(CAIRO_LIBS) +fi + if test "${HAVE_BE_APP}" = "yes"; then if test "${with_be_cairo}" != "no"; then CAIRO_REQUIRED=1.8.0 @@ -3729,25 +3746,6 @@ AC_SUBST(LIBOTF_LIBS) AC_SUBST(M17N_FLT_CFLAGS) AC_SUBST(M17N_FLT_LIBS) -HAVE_CAIRO=no -if test "${HAVE_X11}" = "yes" -o "$window_system" = pgtk; then - if test "${with_cairo}" != "no"; then - CAIRO_REQUIRED=1.12.0 - CAIRO_MODULE="cairo >= $CAIRO_REQUIRED" - EMACS_CHECK_MODULES(CAIRO, $CAIRO_MODULE) - if test $HAVE_CAIRO = yes; then - AC_DEFINE(USE_CAIRO, 1, [Define to 1 if using cairo.]) - else - AC_MSG_ERROR([cairo requested but not found.]) - fi - - CFLAGS="$CFLAGS $CAIRO_CFLAGS" - LIBS="$LIBS $CAIRO_LIBS" - AC_SUBST(CAIRO_CFLAGS) - AC_SUBST(CAIRO_LIBS) - fi -fi - if test "${HAVE_X11}" = "yes"; then AC_CHECK_HEADER(X11/Xlib-xcb.h, AC_CHECK_LIB(xcb, xcb_translate_coordinates, HAVE_XCB=yes)) @@ -5850,15 +5848,12 @@ if test "${HAVE_X_WINDOWS}" = "yes" ; then FONT_OBJ="$FONT_OBJ ftfont.o" fi fi + if test "${window_system}" = "pgtk"; then FONT_OBJ="ftfont.o ftcrfont.o" fi if test "${HAVE_BE_APP}" = "yes" ; then - if test "${HAVE_FREETYPE}" = "yes" || \ - test "${HAVE_CAIRO}" = "yes"; then - FONT_OBJ="$FONT_OBJ ftfont.o" - fi if test "${HAVE_CAIRO}" = "yes"; then FONT_OBJ="$FONT_OBJ ftcrfont.o" fi