-
Notifications
You must be signed in to change notification settings - Fork 16
/
configure.ac.in
165 lines (144 loc) · 5.46 KB
/
configure.ac.in
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
dnl ***************************
dnl *** Version information ***
dnl ***************************
m4_define([mousepad_version_major], [0])
m4_define([mousepad_version_minor], [4])
m4_define([mousepad_version_micro], [2])
m4_define([mousepad_version_nano], []) dnl leave this empty to have no nano version
m4_define([mousepad_version_build], [@REVISION@])
m4_define([mousepad_version_tag], [git])
m4_define([mousepad_version], [mousepad_version_major().mousepad_version_minor().mousepad_version_micro()ifelse(mousepad_version_nano(), [], [], [.mousepad_version_nano()])ifelse(mousepad_version_tag(), [git], [mousepad_version_tag()-mousepad_version_build()], [mousepad_version_tag()])])
dnl *******************************************
dnl *** Debugging support for GIT snapshots ***
dnl *******************************************
m4_define([mousepad_debug_default], [ifelse(mousepad_version_tag(), [git], [yes], [minimum])])
dnl ***************************
dnl *** Initialize autoconf ***
dnl ***************************
AC_COPYRIGHT([Copyright (c) 2007-2020
The Xfce development team. All rights reserved.])
AC_INIT([Mousepad], [mousepad_version], [https://gitlab.xfce.org/apps/mousepad], [mousepad])
AC_PREREQ([2.50])
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_TARGET()
AC_REVISION([])
dnl ***************************
dnl *** Initialize automake ***
dnl ***************************
AM_INIT_AUTOMAKE([1.8 no-dist-gzip dist-bzip2 tar-ustar foreign])
AC_CONFIG_HEADERS([config.h])
AM_MAINTAINER_MODE()
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
dnl *******************************
dnl *** Check for UNIX variants ***
dnl *******************************
AC_AIX()
AC_ISC_POSIX()
AC_MINIX()
dnl ********************************
dnl *** Check for basic programs ***
dnl ********************************
AC_PROG_CC()
AM_PROG_CC_C_O()
AC_PROG_LD()
AC_PROG_INSTALL()
IT_PROG_INTLTOOL([0.35.0])
dnl **************************
dnl *** Initialize libtool ***
dnl **************************
LT_PREREQ([2.2.6])
LT_INIT([disable-static])
dnl **************************************
dnl *** Substitute version information ***
dnl **************************************
MOUSEPAD_VERSION_MAJOR=mousepad_version_major()
MOUSEPAD_VERSION_MINOR=mousepad_version_minor()
MOUSEPAD_VERSION_MICRO=mousepad_version_micro()
MOUSEPAD_VERSION_NANO=mousepad_version_nano()
AC_SUBST([MOUSEPAD_VERSION_MAJOR])
AC_SUBST([MOUSEPAD_VERSION_MINOR])
AC_SUBST([MOUSEPAD_VERSION_MICRO])
AC_SUBST([MOUSEPAD_VERSION_NANO])
dnl **********************************
dnl *** Check for standard headers ***
dnl **********************************
AC_CHECK_HEADERS([errno.h fcntl.h libintl.h memory.h math.h stdlib.h \
string.h sys/types.h sys/stat.h time.h unistd.h])
dnl ******************************
dnl *** Check for i18n support ***
dnl ******************************
XDT_I18N([@LINGUAS@])
dnl ***********************************
dnl *** Check for required packages ***
dnl ***********************************
XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.42.0])
XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.42.0])
XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.12.0])
XDT_CHECK_PACKAGE([GTK], [gtk+-3.0], [3.20.0])
XDT_CHECK_PACKAGE([GTKSOURCEVIEW], [gtksourceview-3.0], [3.20.0])
dnl ************************************
dnl *** Enable support for GSettings ***
dnl ************************************
GLIB_GSETTINGS
AC_ARG_ENABLE([keyfile-settings],
[AS_HELP_STRING([--enable-keyfile-settings],
[Use the GSettings keyfile backend rather than the default])],
[enable_keyfile_settings="yes"],
[enable_keyfile_settings="default"])
AM_CONDITIONAL([WITH_KEYFILE_SETTINGS],
[test "x$enable_keyfile_settings" = "xyes"])
dnl ***********************************
dnl *** Check for gdbus-codegen ***
dnl ***********************************
AC_ARG_ENABLE([dbus],
[AS_HELP_STRING([--enable-dbus],
[Enable DBUS support])],
[enable_dbus=$enableval],
[enable_dbus="yes"])
AM_CONDITIONAL([HAVE_DBUS], [test "x$enable_dbus" = "xyes"])
AS_IF([test "x$enable_dbus" = "xyes"],
[
XDT_CHECK_PACKAGE([GIO_UNIX], [gio-unix-2.0], [2.42.0])
AC_PATH_PROG([GDBUS_CODEGEN], [gdbus-codegen])
AC_DEFINE([HAVE_DBUS], [1], [Define if DBUS support is enabled])
])
dnl ***********************************
dnl *** Check for debugging support ***
dnl ***********************************
XDT_FEATURE_DEBUG([mousepad_debug_default])
dnl **************************************
dnl *** Check for linker optimizations ***
dnl **************************************
XDT_FEATURE_LINKER_OPTS()
dnl *********************************
dnl *** Substitute platform flags ***
dnl *********************************
AC_MSG_CHECKING([PLATFORM_CPPFLAGS])
AC_MSG_RESULT([$PLATFORM_CPPFLAGS])
AC_SUBST([PLATFORM_CPPFLAGS])
AC_MSG_CHECKING([PLATFORM_CFLAGS])
AC_MSG_RESULT([$PLATFORM_CFLAGS])
AC_SUBST([PLATFORM_CFLAGS])
AC_MSG_CHECKING([PLATFORM_LDFLAGS])
AC_MSG_RESULT([$PLATFORM_LDFLAGS])
AC_SUBST([PLATFORM_LDFLAGS])
AC_OUTPUT([
Makefile
mousepad/Makefile
po/Makefile.in
icons/Makefile
icons/16x16/Makefile
icons/48x48/Makefile
icons/128x128/Makefile
icons/scalable/Makefile
])
dnl ***************************
dnl *** Print configuration ***
dnl ***************************
echo
echo "Build Configuration:"
echo
echo "* D-BUS support: $enable_dbus"
echo "* Debug Support: $enable_debug"
echo "* Use keyfile backend: $enable_keyfile_settings"
echo