forked from flatpak/xdg-desktop-portal-gtk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
86 lines (70 loc) · 2.86 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
AC_PREREQ([2.63])
AC_INIT([xdg-desktop-portal-gtk],[1.7.1])
AC_PROG_CC
AM_PROG_CC_C_O
AC_DISABLE_STATIC
LT_PREREQ([2.2.6])
LT_INIT([disable-static])
AC_CONFIG_SRCDIR([src/xdg-desktop-portal-gtk.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.11 no-define no-dist-gzip dist-xz tar-ustar foreign subdir-objects])
AC_PROG_SED
# Enable silent rules is available
AM_SILENT_RULES([yes])
AM_MAINTAINER_MODE([enable])
if test "x$GCC" = "xyes"; then
case " $CFLAGS " in
*[[\ \ ]]-Wall[[\ \ ]]*) ;;
*) CFLAGS="$CFLAGS -Wall" ;;
esac
fi
# i18n stuff
GETTEXT_PACKAGE=xdg-desktop-portal-gtk
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
[The prefix for our gettext translation domains.])
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION(0.18.3)
PKG_PROG_PKG_CONFIG([0.24])
AC_ARG_WITH(dbus_service_dir,
AS_HELP_STRING([--with-dbus-service-dir=PATH],[choose directory for dbus service files, [default=PREFIX/share/dbus-1/services]]),
with_dbus_service_dir="$withval", with_dbus_service_dir=$datadir/dbus-1/services)
DBUS_SERVICE_DIR=$with_dbus_service_dir
AC_SUBST(DBUS_SERVICE_DIR)
AC_ARG_WITH([systemduserunitdir],
[AS_HELP_STRING([--with-systemduserunitdir=DIR],
[Directory for systemd user service files (default=PREFIX/lib/systemd/user)])],
[],
dnl This is deliberately not ${libdir}: systemd units always go in
dnl .../lib, never .../lib64 or .../lib/x86_64-linux-gnu
[with_systemduserunitdir='${prefix}/lib/systemd/user'])
AC_SUBST([systemduserunitdir], [$with_systemduserunitdir])
AC_SUBST([DESKTOP_PORTAL_INTERFACES_DIR], [`$PKG_CONFIG --variable=interfaces_dir xdg-desktop-portal`])
AC_SUBST([DBUS_INTERFACES_DIR], [`$PKG_CONFIG --variable=interfaces_dir dbus-1`])
AC_SUBST([GDBUS_CODEGEN], [`$PKG_CONFIG --variable gdbus_codegen gio-2.0`])
AC_SUBST([GLIB_COMPILE_RESOURCES], [`$PKG_CONFIG --variable glib_compile_resources gio-2.0`])
PKG_CHECK_MODULES(GTK, [xdg-desktop-portal >= 1.5 glib-2.0 >= 2.44 gio-unix-2.0 gtk+-3.0 >= 3.14 gtk+-unix-print-3.0 fontconfig gnome-desktop-3.0 gsettings-desktop-schemas])
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
PKG_CHECK_MODULES(GTK_X11, gtk+-x11-3.0,
have_gtk_x11=yes, have_gtk_x11=no)
if test "$have_gtk_x11" = "yes"; then
AC_DEFINE(HAVE_GTK_X11, 1, [define if we we have gtk+-x11])
AC_SUBST(GTK_X11_CFLAGS)
AC_SUBST(GTK_X11_LIBS)
fi
AM_CONDITIONAL([HAVE_GTK_X11], [test "$have_gtk_x11" = "yes"])
PKG_CHECK_MODULES(GTK_WAYLAND, gtk+-wayland-3.0 >= 3.21.5,
have_gtk_wayland=yes, have_gtk_wayland=no)
if test "$have_gtk_wayland" = "yes"; then
AC_DEFINE(HAVE_GTK_WAYLAND, 1, [define if we we have gtk+-wayland])
AC_SUBST(GTK_WAYLAND_CFLAGS)
AC_SUBST(GTK_WAYLAND_LIBS)
fi
AM_CONDITIONAL([HAVE_GTK_WAYLAND], [test "$have_gtk_wayland" = "yes"])
AC_CONFIG_FILES([
Makefile
po/Makefile.in
])
AC_OUTPUT