-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
357 lines (259 loc) · 8.69 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
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.63)
AC_INIT([bibledit-gtk],[4.9.6],[http://www.nongnu.org/bibledit])
AC_CANONICAL_TARGET
AC_CANONICAL_SYSTEM
ac_default_prefix=/usr
AC_CONFIG_SRCDIR([src])
AM_INIT_AUTOMAKE([1.9 tar-ustar])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
LT_INIT
CXXFLAGS="-g -O2 ${CXXFLAGS}"
AC_PROG_CC
AC_PROG_CC_STDC
AC_PROG_CPP
AC_LANG([C++])
AC_PROG_CXX
AX_CXX_COMPILE_STDCXX_11([noext],[mandatory])
AC_PROG_CC
AC_HEADER_STDC
PKG_CHECK_MODULES(GTK, gtk+-2.0 gdk-2.0,,AC_MSG_ERROR(Gtk2 development version is needed.))
AC_SUBST(GTK_LIBS)
AC_SUBST(GTK_CFLAGS)
PKG_PROG_PKG_CONFIG
AC_PATH_PROG(PKG_CONFIG_PATH, pkg-config, no)
if test x$PKG_CONFIG_PATH = xno; then
AC_MSG_ERROR(Program "pkg-config" is needed. Install this first.)
fi
AC_PATH_PROG(GREP_PATH, grep, no)
if test x$GREP_PATH = xno; then
AC_MSG_ERROR(Program "grep" is needed. Install this first.)
fi
AC_PATH_PROG(TEE_TOUCH, touch, no)
if test x$TOUCH_PATH = xno; then
AC_MSG_ERROR(Program "touch" is needed. Install this first.)
fi
AC_PATH_PROG(DATE_PATH, date, no)
if test x$DATE_PATH = xno; then
AC_MSG_ERROR(Program "date" is needed. Install this first.)
fi
AC_PATH_PROG(TAIL_PATH, tail, no)
if test x$TAIL_PATH = xno; then
AC_MSG_ERROR(Program "tail" is needed. Install this first.)
fi
AC_PATH_PROG(GZIP_PATH, gzip, no)
if test x$GZIP_PATH = xno; then
AC_MSG_ERROR(Program "gzip" is needed. Install this first.)
fi
AC_PATH_PROG(GUNZIP_PATH, gunzip, no)
if test x$GUNZIP_PATH = xno; then
AC_MSG_ERROR(Program "gunzip" is needed. Install this first.)
fi
AC_PATH_PROG(ICONV_PATH, iconv, no)
if test x$ICONV_PATH = xno; then
AC_MSG_ERROR(Program "iconv" is needed. Install this first.)
fi
AC_PATH_PROG(STRINGS_PATH, strings, no)
if test x$STRINGS_PATH = xno; then
AC_MSG_ERROR(Program "strings" is needed. Install this first.)
fi
AC_PATH_PROG(CAT_PATH, cat, no)
if test x$CAT_PATH = xno; then
AC_MSG_ERROR(Program "cat" is needed. Install this first.)
fi
AC_PATH_PROG(SORT_PATH, sort, no)
if test x$SORT_PATH = xno; then
AC_MSG_ERROR(Program "sort" is needed. Install this first.)
fi
AC_PATH_PROG(HEAD_PATH, head, no)
if test x$HEAD_PATH = xno; then
AC_MSG_ERROR(Program "head" is needed. Install this first.)
fi
AC_PATH_PROG(MAKE_PATH, make, no)
if test x$MAKE_PATH = xno; then
AC_MSG_ERROR(Program "make" is needed. Install this first.)
fi
AC_PATH_PROG(FIND_PATH, find, no)
if test x$FIND_PATH = xno; then
AC_MSG_ERROR(Program "find" is needed. Install this first.)
fi
AC_PATH_PROG(FIND_XARGS, xargs, no)
if test x$FIND_XARGS = xno; then
AC_MSG_ERROR(Program "xargs" is needed. Install this first.)
fi
AC_PATH_PROG(FIND_GPP, g++, no)
if test x$FIND_GPP = xno; then
AC_MSG_ERROR(Program "g++" is needed. Install this first.)
fi
AC_PATH_PROG(FIND_DIFF, diff, no)
if test x$FIND_DIFF = xno; then
AC_MSG_ERROR(Program "diff" is needed. Install this first.)
fi
AC_PATH_PROG(FIND_PATCH, patch, no)
if test x$FIND_PATCH = xno; then
AC_MSG_ERROR(Program "patch" is needed. Install this first.)
fi
AC_PATH_PROG(FIND_MERGE, merge, no)
if test x$FIND_MERGE = xno; then
AC_MSG_ERROR(Program "merge" (in package rcs) is needed. Install this first.)
fi
AC_PATH_PROG(FIND_TAR, tar, no)
if test x$FIND_TAR = xno; then
AC_MSG_ERROR(Program "tar" is needed. Install this first.)
fi
AC_PATH_PROG(FIND_CURL, curl, no)
if test x$FIND_CURL = xno; then
AC_MSG_ERROR(Program "curl" is needed. Install this first.)
fi
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16.0,,AC_MSG_ERROR(glib development version >= 2.16.0 is needed.))
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.12.0,,AC_MSG_ERROR(gtk+ development version >= 2.12.0 is needed.))
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16.0,,AC_MSG_ERROR(gthread development version >= 2.16.0 is needed.))
AC_SUBST(GTHREAD_CFLAGS)
AC_SUBST(GTHREAD_LIBS)
PKG_CHECK_MODULES(GOBJECT, gobject-2.0 >= 2.16.0,,AC_MSG_ERROR(gobject development version >= 2.16.0 is needed.))
AC_SUBST(GOBJECT_CFLAGS)
AC_SUBST(GOBJECT_LIBS)
PKG_CHECK_MODULES(SQLITE, sqlite3 >= 3.0.0,,AC_MSG_ERROR(sqlite development version >= 3.0.0 is needed.))
AC_SUBST(SQLITE_CFLAGS)
AC_SUBST(SQLITE_LIBS)
PKG_CHECK_MODULES(GLIBMM, glibmm-2.4 giomm-2.4,,AC_MSG_ERROR(glibmm version 2.4.0 is needed.))
AC_SUBST(GLIBMM_CFLAGS)
AC_SUBST(GLIBMM_LIBS)
AM_PATH_XML2(2.5.0, , AC_MSG_ERROR(Library libxml2-dev is needed. Install this first.))
PKG_CHECK_MODULES(ENCHANT, enchant >= 1.2.0)
AC_SUBST(ENCHANT_CFLAGS)
AC_SUBST(ENCHANT_LIBS)
PKG_CHECK_MODULES(PANGO, [pango >= 1.3.5],
[AC_DEFINE(HAVE_PANGO_UNDERLINE_ERROR, 1, [Define to 1 if PANGO_UNDERLINE_ERROR is available.])],
[AC_MSG_WARN([Disabling new error underlining since pango < 1.3.5])])
PKG_CHECK_MODULES(PANGO, [pango >= 1.8.0],
[AC_DEFINE(FIXED_PANGO, 1, [Define to 1 if pango >= 1.8.0.])],
[AC_MSG_WARN([Enabling word-breaking workarounds since pango < 1.8.0])])
PKG_CHECK_MODULES(GTKSOURCEVIEW, gtksourceview-2.0 >= 2.2.0)
AC_SUBST(GTKSOURCEVIEW_CFLAGS)
AC_SUBST(GTKSOURCEVIEW_LIBS)
PKG_CHECK_MODULES(WEBKIT, webkit-1.0 >= 1.0.0,,AC_MSG_ERROR(libwebkit development version >= 1.0.0 is needed.))
AC_SUBST(WEBKIT_CFLAGS)
AC_SUBST(WEBKIT_LIBS)
PKG_CHECK_MODULES(LIBSOUP, libsoup-2.4 >= 2.4,,AC_MSG_ERROR(libsoup-2.4 development version >= 2.4 is needed.))
AC_SUBST(LIBSOUP_CFLAGS)
AC_SUBST(LIBSOUP_LIBS)
AC_CHECK_HEADER(sqlite3.h, , AC_MSG_ERROR([Header file sqlite3.h was not found. Usually this is in libsqlite3-dev.]))
#-------------------------------------------------------------------------------
# Internationalization
#-------------------------------------------------------------------------------
IT_PROG_INTLTOOL([0.35.0])
GETTEXT_PACKAGE=bibledit
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"],
[The domain to use with gettext])
AM_GLIB_GNU_GETTEXT
BIBLEDIT_LOCALEDIR=[${datadir}/locale]
AC_SUBST(BIBLEDIT_LOCALEDIR)
if test "x${datarootdir}" = 'x${prefix}/share'; then
if test "x${prefix}" = "xNONE"; then
AC_DEFINE_UNQUOTED(BIBLEDIT_LOCALEDIR, "${ac_default_prefix}/share/locale",[BIBLEDIT_LOCALEDIR])
else
AC_DEFINE_UNQUOTED(BIBLEDIT_LOCALEDIR, "${prefix}/share/locale",[BIBLEDIT_LOCALEDIR])
fi
else
AC_DEFINE_UNQUOTED(BIBLEDIT_LOCALEDIR, "${datarootdir}/locale",[BIBLEDIT_LOCALEDIR])
fi
# This code is kept to learn from.
# AC_CHECK_HEADER(aspell.h, [AC_DEFINE(HAVE_ASPELL_H,1,
# [Define to 1 if you have the <aspell.h> header file.] )] )
# AC_CHECK_HEADER(pspell/pspell.h, [AC_DEFINE(HAVE_PSPELL_H,1,
# [Define to 1 if you have the <pspell/pspell.h> header file.] )] )
# AC_SUBST(SPELLER_LIB)
if test "x${prefix}" = "xNONE"; then
packageprefix=${ac_default_prefix}
else
packageprefix=${prefix}
fi
AC_MSG_CHECKING([whether to enable LINUX specific flags])
case "$host_os" in
*linux*)
linux=true
AC_MSG_RESULT([yes])
AC_DEFINE_UNQUOTED(LINUX, "1",[LINUX])
;;
*)
linux=false
AC_MSG_RESULT([no])
;;
esac
AM_CONDITIONAL(LINUX, test x$linux = xtrue)
AC_MSG_CHECKING([whether to enable DARWIN specific flags])
case "$host_os" in
*darwin*)
darwin=true
AC_MSG_RESULT([yes])
AC_DEFINE_UNQUOTED(DARWIN, "1",[DARWIN])
;;
*)
darwin=false
AC_MSG_RESULT([no])
;;
esac
AM_CONDITIONAL(DARWIN, test x$darwin = xtrue)
AC_MSG_CHECKING([whether to enable WIN32 specific flags])
case "$host_os" in
*mingw*)
win32=true
AC_MSG_RESULT([yes])
AC_DEFINE_UNQUOTED(WIN32, "1",[WIN32])
;;
*)
win32=false
AC_MSG_RESULT([no])
;;
esac
AM_CONDITIONAL(WIN32, test x$win32 = xtrue)
packagedatadir=share/${PACKAGE}
packagedocdir=doc/${PACKAGE}
AC_SUBST(packagedatadir)
packagepixmapsdir=${packagedatadir}/pixmaps
packagehelpdir=${packagedatadir}/help
packagemenudir=${packagedatadir}
packagelocalstatedir=var/${PACKAGE}
if test "x${datarootdir}" = 'x${prefix}/share'; then
if test "x${prefix}" = "xNONE"; then
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}",[PACKAGE_DATA_DIR])
else
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}",[PACKAGE_DATA_DIR])
fi
else
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datarootdir}/${PACKAGE}",[PACKAGE_DATA_DIR])
fi
AC_CONFIG_FILES([Makefile
man/Makefile
pix/Makefile
doc/Makefile
src/Makefile
scripts/Makefile
templates/Makefile
olpc/Makefile
desktop/Makefile
windows/Makefile
tests/Makefile
shutdown/Makefile
usfm/Makefile
kjv/Makefile
xetex/Makefile
git/Makefile
php/Makefile
po/Makefile.in
])
AC_OUTPUT
echo "
Bibledit-Gtk $VERSION configuration summary:
Host operating system : ${host_os}
Version : ${PACKAGE_VERSION}
Installation prefix : ${prefix}
"