autotools: Teach about tracker3 search engine

Add --enable-tracker3 option (off by default, like in meson) and
hook the tracker3 search engine to build. Also, make sure it's part
of dist.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2912
This commit is contained in:
Carlos Garnacho
2020-07-07 23:07:11 +02:00
parent 0ebceebe37
commit b999c8d826
2 changed files with 33 additions and 0 deletions

View File

@@ -1552,6 +1552,30 @@ else
fi
fi
# Checks to see if we should compile with tracker3 search engine
#
AC_ARG_ENABLE(tracker3,
[AS_HELP_STRING([--enable-tracker3],
[enable tracker3 search engine])],
[enable_tracker3=yes],
[enable_tracker3=no])
if test "x$enable_tracker3" = "xyes"; then
PKG_CHECK_MODULES(TRACKER3, [tracker-sparql-3.0], have_tracker3=yes, have_tracker3=no)
GTK_DEP_CFLAGS="$GTK_DEP_CFLAGS $TRACKER3_CFLAGS"
GTK_DEP_LIBS="$GTK_DEP_LIBS $TRACKER3_LIBS"
if test "x$have_tracker3" = "xyes"; then
AC_DEFINE([HAVE_TRACKER3], [], [Define if tracker3 is available])
else
AC_MSG_ERROR([
*** tracker3 not found.
])
fi
fi
AM_CONDITIONAL(HAVE_TRACKER3, test "x$have_tracker3" = "xyes")
# Checks to see if we should compile with cloudprint backend for GTK+
#

View File

@@ -1030,6 +1030,13 @@ gtk_private_h_sources += \
gtkprinteroptionwidget.h \
gtksearchenginetracker.h
if HAVE_TRACKER3
gtk_private_h_sources += \
gtksearchenginetracker3.h
gtk_os_unix_c_sources += \
gtksearchenginetracker3.c
endif
gtk_c_sources += $(gtk_os_unix_c_sources)
endif
@@ -1770,6 +1777,8 @@ EXTRA_DIST += \
gtkwin32embedwidget.c \
gtkprint-win32.h \
gtkprint-win32.c \
gtksearchenginetracker3.c \
gtksearchenginetracker3.h \
gtksearchenginequartz.h \
gtkdbusinterfaces.xml \
gtk-keys.css.default \