-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
114 lines (89 loc) · 2.44 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
dnl Process this file with autoconf to produce a configure script.
m4_define([gtk_wltextinputv1_major_version], [0])
m4_define([gtk_wltextinputv1_minor_version], [1])
m4_define([gtk_wltextinputv1_micro_version], [5])
m4_define([gtk_wltextinputv1_version],
gtk_wltextinputv1_major_version.gtk_wltextinputv1_minor_version.gtk_wltextinputv1_micro_version)
AC_INIT([gtk-wayland-textinputv1],
[gtk_wltextinputv1_version],
[https://github.com/ashie/gtk-wayland-textinputv1/issues],
[gtk-wayland-textinputv1])
AC_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE([1.11 foreign])
AM_SILENT_RULES([yes])
dnl
dnl Checks for programs.
dnl
AC_LANG([C])
AC_PROG_CC
AC_PROG_AWK
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
dnl
dnl Checks for host
dnl
AC_CANONICAL_HOST
dnl
dnl libtool
dnl
AC_ENABLE_SHARED(yes)
AC_ENABLE_STATIC(no)
AM_PROG_LIBTOOL
dnl
dnl Checks for gtk
dnl
GTK3_REQUIRED=3.0.0
PKG_CHECK_MODULES(GTK3, gtk+-3.0 >= GTK3_REQUIRED,
[have_gtk3=yes], [have_gtk3=no])
AM_CONDITIONAL(HAVE_GTK3, test $have_gtk3 = "yes")
if test $have_gtk3 = "yes"; then
gtk3_binary_version=`$PKG_CONFIG --variable=gtk_binary_version gtk+-3.0`
gtk3_libdir=`$PKG_CONFIG --variable=libdir gtk+-3.0`
GTK3_IM_MODULEDIR="$gtk3_libdir"/gtk-3.0/$gtk3_binary_version/immodules
AC_SUBST(GTK3_IM_MODULEDIR)
fi
dnl
dnl Checks for header files.
dnl
AC_HEADER_STDC
AC_CHECK_HEADERS([string.h])
dnl
dnl Checks for typedefs, structures, and compiler characteristics.
dnl
dnl
dnl Checks for library functions.
dnl
m4_define([wayland_required_version], [1.13.0])
m4_define([wayland_protocols_required_version], [1.10])
AC_PATH_PROG(
[WAYLAND_SCANNER],
[wayland-scanner],
[no])
if test "x$WAYLAND_SCANNER" = "xno"; then
AC_MSG_ERROR([Could not find wayland-scanner])
fi
AC_SUBST([WAYLAND_SCANNER])
PKG_CHECK_EXISTS(
[wayland-client >= wayland_required_version
wayland-protocols >= wayland_protocols_required_version],
[have_wayland_deps=yes],
[have_wayland_deps=no])
if test "x$have_wayland_deps" = "xno"; then
AC_MSG_ERROR([Could not find wayland dependencies])
fi
AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, `$PKG_CONFIG --variable=pkgdatadir wayland-protocols`)
dnl
dnl Options to enable some features
dnl
AC_CONFIG_FILES([
Makefile
src/Makefile
])
AC_OUTPUT
AC_MSG_RESULT([
Configure result:
GTK3: ${have_gtk3}
])