summaryrefslogtreecommitdiff
path: root/configure.in
blob: 65c6178505dc96f70bc93660dc5336c1ca22be1a (plain)
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
dnl ***************************************************************************
dnl *** configure.in for libgnomekbd                                        ***
dnl ***************************************************************************
AC_INIT(libgnomekbd, 3.2.0, [http://bugzilla.gnome.org/enter_bug.cgi?product=libgnomekbd])
AC_PREREQ(2.62)

VERSION_INFO=7:0:0
AC_SUBST(VERSION_INFO)

AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE([-Wno-portability])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
AC_CONFIG_MACRO_DIR(m4)

dnl ***************************************************************************
dnl *** Minimum library versions for libgnomekbd                            ***
dnl ***************************************************************************
GLIB_REQUIRED=2.18
GDK_REQUIRED=2.91.7
GTK_REQUIRED=2.90
LIBXKLAVIER_REQUIRED=5.1

AC_SUBST([GDK_REQUIRED])
AC_SUBST([GTK_REQUIRED])
AC_SUBST([LIBXKLAVIER_REQUIRED])

dnl ***************************************************************************

GLIB_GSETTINGS

GNOME_COMMON_INIT
GNOME_COMPILE_WARNINGS

AC_ISC_POSIX
AC_PROG_CC
AC_PROG_CC_C_O
AC_STDC_HEADERS
AM_PROG_LIBTOOL

# ****
# i18n
# ****

GETTEXT_PACKAGE=libgnomekbd
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package])

AM_GLIB_GNU_GETTEXT

IT_PROG_INTLTOOL([0.35.0])

# *****************************************************************************

AC_CHECK_FUNCS(setlocale)

AC_CHECK_LIBM
AC_SUBST(LIBM)

PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED gio-2.0 >= $GLIB_REQUIRED)

AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)

PKG_CHECK_MODULES(GDK, gdk-3.0 >= $GDK_REQUIRED)

AC_SUBST(GDK_CFLAGS)
AC_SUBST(GDK_LIBS)

PKG_CHECK_MODULES(GTK, gtk+-3.0 >= $GTK_REQUIRED)

AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)

PKG_CHECK_MODULES(LIBXKLAVIER, libxklavier >= $LIBXKLAVIER_REQUIRED)

AC_SUBST(LIBXKLAVIER_CFLAGS)
AC_SUBST(LIBXKLAVIER_LIBS)

AC_PATH_XTRA
XLIB_CFLAGS="$X_CFLAGS"
XLIB_LIBS="$X_LIBS -lX11 $X_EXTRA_LIBS"
AC_SUBST(XLIB_CFLAGS)
AC_SUBST(XLIB_LIBS)

AC_ARG_ENABLE([tests],
              AC_HELP_STRING([--disable-tests], [Dont build the test apps]),,
              [enable_tests=yes])

AM_CONDITIONAL(BUILD_TESTS, test "$enable_tests" = "yes")

GOBJECT_INTROSPECTION_CHECK([0.6.7])

AC_OUTPUT([
Makefile
libgnomekbd.pc
libgnomekbdui.pc
po/Makefile.in
libgnomekbd/Makefile
libgnomekbd/org.gnome.libgnomekbd.desktop.gschema.xml.in
libgnomekbd/org.gnome.libgnomekbd.keyboard.gschema.xml.in
libgnomekbd/org.gnome.libgnomekbd.gschema.xml.in
libgnomekbd/gkbd-keyboard-display.desktop.in
test/Makefile
capplet/Makefile
capplet/gkbd-indicator-plugins-capplet.desktop.in
])