forked from codebrainz/mousepad
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac.in
177 lines (151 loc) · 5.81 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
166
167
168
169
170
171
172
173
174
175
176
177
dnl ***************************
dnl *** Version information ***
dnl ***************************
m4_define([mousepad_version_major], [0])
m4_define([mousepad_version_minor], [4])
m4_define([mousepad_version_micro], [0])
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-2010
The Xfce development team. All rights reserved.])
AC_INIT([Mousepad], [mousepad_version], [http://bugzilla.xfce.org/], [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])
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()
AC_PROG_INTLTOOL()
AC_CHECK_PROGS([PERL], [perl5 perl])
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.30.0])
XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.30.0])
dnl **********************
dnl *** GTK+ 3 support ***
dnl **********************
AC_ARG_ENABLE([gtk3],
[AS_HELP_STRING([--enable-gtk3],
[Build against GTK+ 3 instead of GTK+ 2])],
[enable_gtk3=$enableval],
[enable_gtk3=auto])
AS_IF([test "x$enable_gtk3" = "xyes"],
[PKG_CHECK_MODULES([GTK], [gtk+-3.0])])
AS_IF([test "x$enable_gtk3" = "xauto"],
[PKG_CHECK_MODULES([GTK], [gtk+-3.0],
[enable_gtk3=yes], [enable_gtk3=no])])
AS_IF([test "x$enable_gtk3" = "xno"],
[PKG_CHECK_MODULES([GTK], [gtk+-2.0 >= 2.24])])
AS_IF([test "x$enable_gtk3" = "xyes"],
[PKG_CHECK_MODULES([GTKSOURCEVIEW], [gtksourceview-3.0])],
[PKG_CHECK_MODULES([GTKSOURCEVIEW], [gtksourceview-2.0])])
AM_CONDITIONAL([WITH_GTK3], [test "x$enable_gtk3" = "xyes"])
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 *** Optional support for D-BUS ***
dnl **********************************
XDT_CHECK_OPTIONAL_PACKAGE([DBUS], [dbus-glib-1],
[0.34], [dbus], [D-BUS support])
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
])
dnl ***************************
dnl *** Print configuration ***
dnl ***************************
echo
echo "Build Configuration:"
echo
if test x"$DBUS_FOUND" = x"yes"; then
echo "* D-BUS support: yes"
else
echo "* D-BUS support: no"
fi
echo "* Debug Support: $enable_debug"
echo "* Use keyfile backend: $enable_keyfile_settings"
echo "* Build with GTK+ 3: $enable_gtk3"
echo