-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathconfigure.ac
245 lines (199 loc) · 7.11 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
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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
AC_PREREQ(2.62)
m4_define([matewnck_major_version], [1])
m4_define([matewnck_minor_version], [6])
m4_define([matewnck_micro_version], [1])
m4_define([matewnck_version],
[matewnck_major_version.matewnck_minor_version.matewnck_micro_version])
AC_INIT([libmatewnck], [matewnck_version],
[http://www.mate-desktop.org/])
AC_CONFIG_HEADERS(config.h)
AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz tar-ustar])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_CONFIG_MACRO_DIR([m4])
AM_MAINTAINER_MODE
MATE_COMMON_INIT
MATE_MAINTAINER_MODE_DEFINES
dnl libtool versioning for libmatewnck
dnl increment if the interface has additions, changes, removals.
LIBMATEWNCK_CURRENT=0
dnl increment any time the source changes; set to
dnl 0 if you increment CURRENT
LIBMATEWNCK_REVISION=0
dnl increment if any interfaces have been added; set to 0
dnl if any interfaces have been changed or removed. removal has
dnl precedence over adding, so set to 0 if both happened.
LIBMATEWNCK_AGE=0
AC_SUBST(LIBMATEWNCK_CURRENT)
AC_SUBST(LIBMATEWNCK_REVISION)
AC_SUBST(LIBMATEWNCK_AGE)
MATEWNCK_MAJOR_VERSION=matewnck_major_version
MATEWNCK_MINOR_VERSION=matewnck_minor_version
MATEWNCK_MICRO_VERSION=matewnck_micro_version
AC_SUBST(MATEWNCK_MAJOR_VERSION)
AC_SUBST(MATEWNCK_MINOR_VERSION)
AC_SUBST(MATEWNCK_MICRO_VERSION)
IT_PROG_INTLTOOL([0.40.0])
AC_PROG_CC
AC_ISC_POSIX
AC_HEADER_STDC
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
changequote(,)dnl
if test "x$GCC" = "xyes"; then
case " $CFLAGS " in
*[\ \ ]-Wall[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wall" ;;
esac
if test "x$enable_ansi" = "xyes"; then
case " $CFLAGS " in
*[\ \ ]-ansi[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -ansi" ;;
esac
case " $CFLAGS " in
*[\ \ ]-pedantic[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -pedantic" ;;
esac
fi
fi
changequote([,])dnl
MATE_COMPILE_WARNINGS(maximum)
AC_ARG_ENABLE(deprecation_flags,
[AC_HELP_STRING([--enable-deprecation-flags],
[use *_DISABLE_DEPRECATED flags @<:@default=no@:>@])],,
[enable_deprecation_flags=no])
if test "x$enable_deprecation_flags" = "xyes"; then
DISABLE_DEPRECATED_CFLAGS=$DISABLE_DEPRECATED
AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
fi
GETTEXT_PACKAGE=libmatewnck
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Package name])
AM_GLIB_GNU_GETTEXT
# AM_GLIB_GNU_GETTEXT above substs $DATADIRNAME
# this is the directory where the *.{mo,gmo} files are installed
matewncklocaledir='${prefix}/${DATADIRNAME}/locale'
AC_SUBST(matewncklocaledir)
AC_PATH_PROG(PKG_CONFIG, pkg-config)
AC_CHECK_LIBM
AC_SUBST(LIBM)
AC_ARG_ENABLE(startup-notification,
[AC_HELP_STRING([--enable-startup-notification],
[startup notification library @<:@default=auto@:>@])],,
[enable_startup_notification=auto])
STARTUP_NOTIFICATION_PACKAGE=
if test "$enable_startup_notification" != "no"; then
STARTUP_NOTIFICATION_REQUIRED=0.4
PKG_CHECK_MODULES(STARTUP_NOTIFICATION,
[libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_REQUIRED],
[have_sn=yes],
[have_sn=no])
if test "$have_sn" = "no" -a "$enable_start_notification" = "yes"; then
AC_MSG_ERROR([startup-notification support required but not found])
fi
if test "$have_sn" = "yes"; then
AC_DEFINE_UNQUOTED(HAVE_STARTUP_NOTIFICATION, 1, [Define if you have libstartup-notification])
STARTUP_NOTIFICATION_PACKAGE=libstartup-notification-1.0
fi
else
have_sn=no
fi
AC_SUBST(STARTUP_NOTIFICATION_PACKAGE)
PKG_CHECK_MODULES(XLIB, x11,
X11_PACKAGE=x11,
[X11_PACKAGE=
AC_PATH_XTRA
if test "x$no_x" = xyes; then
AC_MSG_ERROR("no (requires X development libraries)")
else
XLIB_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
XLIB_CFLAGS=$X_CFLAGS
fi])
AC_SUBST(X11_PACKAGE)
AC_MSG_CHECKING([if building with X Resource Information Extension Library])
if $PKG_CONFIG xres; then
AC_MSG_RESULT([yes])
have_xres=yes
AC_DEFINE_UNQUOTED(HAVE_XRES, 1, [Define if you have the XRes library])
XRES_PACKAGE=xres
else
AC_CHECK_LIB(XRes, XResQueryExtension,
[XLIB_LIBS="$XLIB_LIBS -lXRes -lXext"
have_xres=yes
AC_DEFINE_UNQUOTED(HAVE_XRES, 1, [Define if you have the XRes library])
AC_MSG_RESULT([yes])],
[have_xres=no
AC_MSG_RESULT([no])],
$XLIB_LIBS -lXext)
XRES_PACKAGE=
fi
AC_SUBST(XRES_PACKAGE)
AC_SUBST(XLIB_CFLAGS)
AC_SUBST(XLIB_LIBS)
AC_MSG_CHECKING([which gtk+ version to compile against])
AC_ARG_WITH([gtk],
[AS_HELP_STRING([--with-gtk=2.0|3.0],[which gtk+ version to compile against (default: 2.0)])],
[case "$with_gtk" in
2.0|3.0) ;;
*) AC_MSG_ERROR([invalid gtk version specified]) ;;
esac],
[with_gtk=2.0])
AC_MSG_RESULT([$with_gtk])
case "$with_gtk" in
2.0) GTK_API_VERSION=2.0
GTK_REQUIRED=2.19.7
;;
3.0) GTK_API_VERSION=3.0
GTK_REQUIRED=3.0.0
;;
esac
PKG_CHECK_MODULES(LIBMATEWNCK, gtk+-$GTK_API_VERSION >= $GTK_REQUIRED glib-2.0 >= 2.16.0 gobject-2.0 >= 2.13.0 $STARTUP_NOTIFICATION_PACKAGE $X11_PACKAGE $XRES_PACKAGE)
AC_SUBST(LIBMATEWNCK_LIBS)
AC_SUBST(LIBMATEWNCK_CFLAGS)
GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
AC_SUBST(GLIB_GENMARSHAL)
AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no)
if test x"$GDK_PIXBUF_CSOURCE" = xno; then
AC_MSG_ERROR([gdk-pixbuf-csource executable not found in your path - should be installed with GTK])
fi
AC_SUBST(GDK_PIXBUF_CSOURCE)
dnl Honor ACLOCAL_FLAGS for --enable-maintainer-mode
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
##################################################
# Checks for gtk-doc and docbook-tools
##################################################
GTK_DOC_CHECK([1.9])
GOBJECT_INTROSPECTION_CHECK([0.6.14])
AC_OUTPUT([
Makefile
doc/Makefile
po/Makefile.in
libmatewnck/Makefile
libmatewnck/version.h
libmatewnck.pc
libmatewnck-uninstalled.pc
])
dnl ---------------------------------------------------------------------------
dnl - Show summary
dnl ---------------------------------------------------------------------------
echo "
libmatewnck $VERSION
`echo libmatewnck $VERSION | sed "s/./=/g"`
prefix: ${prefix}
exec_prefix: ${exec_prefix}
libdir: ${libdir}
bindir: ${bindir}
sbindir: ${sbindir}
sysconfdir: ${sysconfdir}
localstatedir: ${localstatedir}
datadir: ${datadir}
source code location: ${srcdir}
compiler: ${CC}
cflags: ${CFLAGS}
Maintainer mode: ${USE_MAINTAINER_MODE}
Use *_DISABLE_DEPRECATED: ${enable_deprecation_flags}
Gtk+ version: ${GTK_API_VERSION}
Startup notification support: ${have_sn}
XRes support: ${have_xres}
Build introspection support: ${found_introspection}
Build gtk-doc documentation: ${enable_gtk_doc}
"