Statistics
| Revision:

root / configure.in

History | View | Annotate | Download (15.3 KB)

1 1 hiro
dnl Process this file with autoconf to produce a configure script.
2
AC_PREREQ(2.50)
3
AC_INIT(src/main.c)
4
PACKAGE=sylpheed
5
6
dnl version number
7 2294 hiro
MAJOR_VERSION=3
8 3198 hiro
MINOR_VERSION=4
9 3386 hiro
MICRO_VERSION=2
10
INTERFACE_AGE=2
11
BINARY_AGE=2
12 3367 hiro
EXTRA_VERSION=
13 3386 hiro
BUILD_REVISION=1158
14 1 hiro
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
15
16 2494 hiro
dnl define if this is a development release
17 3367 hiro
dnl DEVEL_VERSION=1
18 2164 hiro
19 1 hiro
dnl set $target
20
AC_CANONICAL_SYSTEM
21
22
dnl
23
AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
24 3386 hiro
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
25 1 hiro
dnl AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
26
dnl AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
27
AC_SUBST(PACKAGE)
28
AC_SUBST(VERSION)
29 1116 hiro
AC_SUBST(MAJOR_VERSION)
30
AC_SUBST(MINOR_VERSION)
31
AC_SUBST(MICRO_VERSION)
32 2164 hiro
AC_SUBST(EXTRA_VERSION)
33 1116 hiro
AC_SUBST(BUILD_REVISION)
34 1 hiro
35 2164 hiro
dnl development or release version
36
AC_SUBST(DEVEL_VERSION)
37
if test "x$DEVEL_VERSION" != "x"; then
38
  AC_DEFINE(DEVEL_VERSION, 1, [Define if this is a development release])
39
fi
40
41 1 hiro
dnl libtool versioning
42
LT_RELEASE=$MAJOR_VERSION.$MINOR_VERSION
43 2591 hiro
dnl LT_CURRENT=`expr 1 + $MICRO_VERSION - $INTERFACE_AGE`
44
dnl LT_REVISION=$INTERFACE_AGE
45
dnl LT_AGE=`expr $BINARY_AGE - $INTERFACE_AGE`
46 3367 hiro
LT_CURRENT=3
47 2591 hiro
LT_REVISION=0
48 3367 hiro
LT_AGE=2
49 1 hiro
AC_SUBST(LT_RELEASE)
50
AC_SUBST(LT_CURRENT)
51
AC_SUBST(LT_REVISION)
52
AC_SUBST(LT_AGE)
53
54
dnl Specify a header configuration file
55
AM_CONFIG_HEADER(config.h)
56
57
AM_MAINTAINER_MODE
58
59
dnl Checks for programs.
60
dnl AC_ARG_PROGRAM
61
AC_PROG_CC
62 2164 hiro
AM_DISABLE_STATIC
63 1 hiro
AC_ISC_POSIX
64
AM_PROG_CC_STDC
65
AC_PROG_INSTALL
66
AC_PROG_LN_S
67
AC_PROG_MAKE_SET
68
AC_PROG_CPP
69
dnl AC_PROG_RANLIB
70
AM_PROG_LEX
71
AC_PROG_YACC
72
AM_PROG_LIBTOOL
73
74
SYLPHEED_ACLOCAL_INCLUDE(ac)
75
76 621 hiro
native_win32=no
77 3387 hiro
os_osx=no
78 621 hiro
79 1 hiro
case "$target" in
80
*-darwin*)
81 3387 hiro
	os_osx=yes
82 200 hiro
	CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
83 3316 hiro
	LIBSYLPH_CFLAGS="$LIBSYLPH_CFLAGS -xobjective-c"
84 1 hiro
	;;
85 466 hiro
*-*-mingw*)
86 621 hiro
	native_win32=yes
87 631 hiro
	CFLAGS="$CFLAGS -mms-bitfields -mwindows"
88 3383 hiro
	LIBS="$LIBS"
89
	LIBSYLPH_LIBS="-lws2_32 -lwinmm"
90
	SYLPHEED_LIBS="-lole32 -Wl,-luuid"
91 1946 hiro
	AC_CHECK_PROG(WINDRES, windres, windres)
92 466 hiro
	;;
93 1 hiro
esac
94
95 3316 hiro
AC_SUBST(LIBSYLPH_CFLAGS)
96 3383 hiro
AC_SUBST(LIBSYLPH_LIBS)
97 3316 hiro
98 1946 hiro
AM_CONDITIONAL(NATIVE_WIN32, test "$native_win32" = "yes")
99
100 137 hiro
dnl Checks for libraries.
101 3170 hiro
AM_PATH_GLIB_2_0(2.8.0,, AC_MSG_ERROR(Test for GLib failed. See the 'INSTALL' for help.), gobject gmodule)
102 137 hiro
103
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
104
105 3170 hiro
AM_PATH_GTK_2_0(2.8.0,, AC_MSG_ERROR(Test for Gtk failed. See the 'INSTALL' for help.))
106 137 hiro
107
dnl --disable-deprecated switch for GTK2 purification
108 149 hiro
AC_ARG_ENABLE(deprecated, [  --disable-deprecated    Disable deprecated GTK functions. ],
109 137 hiro
			  [GTK_CFLAGS="$GTK_CFLAGS -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"], [])
110
111
AC_SUBST(GTK_CFLAGS)
112
AC_SUBST(GTK_LIBS)
113
114 3387 hiro
if test "$os_osx" == yes; then
115
	AC_CHECK_LIB(gtkmacintegration, gtkosx_application_ready, [ ac_have_gtkmacintegration=yes ], [ ac_have_gtkmacintegration=no ])
116
	AC_MSG_CHECKING([if gtkmacintegration is available])
117
	AC_MSG_RESULT($ac_have_gtkmacintegration)
118
	if test "$ac_have_gtkmacintegration" = yes; then
119
		SYLPHEED_LIBS="$SYLPHEED_LIBS -lgtkmacintegration"
120
		AC_DEFINE(USE_GTKMACINTEGRATION, 1, Define if you use gtkmacintegration library.)
121
	fi
122
fi
123
124
AC_SUBST(SYLPHEED_LIBS)
125
126 1 hiro
dnl checks for iconv
127
AM_ICONV
128
129
AC_CHECK_FUNCS(bind_textdomain_codeset)
130
131
dnl for gettext
132 3274 hiro
ALL_LINGUAS="be bg cs da de el es et eu fi fr gl hr hu it ja ko lt nl pl pt_BR ro ru sk sl sr sv tr uk vi zh_CN zh_TW"
133 1 hiro
GETTEXT_PACKAGE=sylpheed
134
AC_SUBST(GETTEXT_PACKAGE)
135
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define text domain.])
136 93 hiro
137
AM_GLIB_GNU_GETTEXT
138
dnl AM_GNU_GETTEXT
139 1 hiro
dnl AC_CHECK_FUNC(gettext, AC_CHECK_LIB(intl, gettext))
140 585 hiro
141
if test "x$DATADIRNAME" != "x"; then
142
	localedir='${prefix}/${DATADIRNAME}/locale'
143
else
144
	localedir='${datadir}/locale'
145
fi
146 490 hiro
AC_ARG_WITH(localedir,
147
	[  --with-localedir=DIR    Locale directory],
148
	[localedir="$withval"])
149 1 hiro
AC_SUBST(localedir)
150
151 558 hiro
manualdir='${datadir}/${PACKAGE}/manual'
152 490 hiro
AC_ARG_WITH(manualdir,
153
	[  --with-manualdir=DIR    Manual directory],
154
	[manualdir="$withval"])
155 1 hiro
AC_SUBST(manualdir)
156 490 hiro
157 558 hiro
faqdir='${datadir}/${PACKAGE}/faq'
158 490 hiro
AC_ARG_WITH(faqdir,
159
	[  --with-faqdir=DIR       FAQ directory],
160
	[faqdir="$withval"])
161 1 hiro
AC_SUBST(faqdir)
162
163 2164 hiro
plugindir='${exec_prefix}/lib/${PACKAGE}/plugins'
164
AC_ARG_WITH(plugindir,
165
	[  --with-plugindir=DIR    Plug-in directory],
166
	[plugindir="$withval"])
167
AC_SUBST(plugindir)
168
169 3284 hiro
themedir='${datadir}/${PACKAGE}/icons'
170
AC_ARG_WITH(themedir,
171
	[  --with-themedir=DIR     Icon theme directory],
172
	[themedir="$withval"])
173
AC_SUBST(themedir)
174
175 1 hiro
dnl GPGME is used to support OpenPGP
176
AC_ARG_ENABLE(gpgme,
177 355 hiro
	[  --disable-gpgme         Disable GnuPG support using GPGME],
178
	[ac_cv_enable_gpgme=$enableval], [ac_cv_enable_gpgme=yes])
179 1 hiro
AC_MSG_CHECKING([whether to use GPGME])
180
if test $ac_cv_enable_gpgme = yes; then
181
	AC_MSG_RESULT(yes)
182 2006 hiro
	AM_PATH_GPGME(1.0.0, AC_DEFINE(USE_GPGME, 1, Define if you use GPGME to support OpenPGP.),
183 1 hiro
		      [use_gpgme=no
184
		       ac_cv_enable_gpgme=no])
185
else
186
	AC_MSG_RESULT(no)
187
fi
188
189
dnl for JPilot support in addressbook
190
dnl no check for libraries; these are dynamically loaded
191
AC_ARG_ENABLE(jpilot,
192 355 hiro
	[  --enable-jpilot         Enable JPilot support [[default=no]]],
193 1 hiro
	[ac_cv_enable_jpilot=$enableval], [ac_cv_enable_jpilot=no])
194
AC_MSG_CHECKING([whether to use JPilot])
195
if test "$ac_cv_enable_jpilot" = yes; then
196
	AC_MSG_RESULT(yes)
197
	AC_CHECK_HEADERS(pi-args.h pi-appinfo.h pi-address.h,
198
			 [ AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.) ],
199
			 [ ac_cv_enable_jpilot=no ])
200
	if test "$ac_cv_enable_jpilot" = no; then
201
		AC_CHECK_HEADERS(libpisock/pi-args.h libpisock/pi-appinfo.h libpisock/pi-address.h,
202
				 [ ac_cv_enable_jpilot=yes
203
				   AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.) ])
204
	fi
205
	AC_MSG_CHECKING([whether jpilot is available])
206
	AC_MSG_RESULT($ac_cv_enable_jpilot)
207
208
	if test "$ac_cv_enable_jpilot" = yes; then
209
		LIBS="$LIBS -lpisock"
210
	fi
211
else
212
	AC_MSG_RESULT(no)
213
fi
214
215
dnl for LDAP support in addressbook
216
dnl no check for libraries; dynamically loaded
217
AC_ARG_ENABLE(ldap,
218 355 hiro
	[  --enable-ldap           Enable LDAP support [[default=no]]],
219 1 hiro
	[ac_cv_enable_ldap=$enableval], [ac_cv_enable_ldap=no])
220
AC_MSG_CHECKING([whether to use LDAP])
221
if test "$ac_cv_enable_ldap" = yes; then
222
	AC_MSG_RESULT(yes)
223
224
	dnl check for available libraries, and pull them in
225
	AC_CHECK_LIB(resolv, res_query, LDAP_LIBS="$LDAP_LIBS -lresolv")
226
	AC_CHECK_LIB(socket, bind, LDAP_LIBS="$LDAP_LIBS -lsocket")
227
	AC_CHECK_LIB(nsl, gethostbyaddr, LDAP_LIBS="$LDAP_LIBS -lnsl")
228
	AC_CHECK_LIB(lber, ber_get_tag, LDAP_LIBS="$LDAP_LIBS -llber",,
229
		     $LDAP_LIBS)
230
231
	dnl we need libpthread for sylpheed ldap,  until we find
232
	dnl a better way to handle ldap requests asynchronously...
233
	AC_CHECK_LIB(pthread, pthread_create, LDAP_LIBS="$LDAP_LIBS -lpthread")
234
235
	AC_CHECK_HEADERS(ldap.h lber.h pthread.h,
236
			 [ ac_cv_enable_ldap=yes ],
237
			 [ ac_cv_enable_ldap=no ])
238
239
	if test "$ac_cv_enable_ldap" = yes; then
240
		AC_CHECK_LIB(ldap, ldap_open,
241
			     [ ac_cv_enable_ldap=yes ],
242
			     [ ac_cv_enable_ldap=no ],
243
			     $LDAP_LIBS)
244
	fi
245
246
	AC_MSG_CHECKING([whether ldap library is available])
247
	AC_MSG_RESULT($ac_cv_enable_ldap)
248
249
	if test "$ac_cv_enable_ldap" = yes; then
250 138 hiro
		CFLAGS="$CFLAGS `$PKG_CONFIG --cflags gthread-2.0`"
251
		LDAP_LIBS="$LDAP_LIBS -lldap `$PKG_CONFIG --libs gthread-2.0`"
252 1 hiro
		AC_DEFINE(USE_LDAP, 1, Define if you want LDAP support in addressbook.)
253 2256 hiro
		AC_DEFINE(USE_THREADS, 1, Whether to use multithread or not)
254 1 hiro
		AC_SUBST(LDAP_LIBS)
255
	fi
256
else
257
	AC_MSG_RESULT(no)
258
fi
259
260
dnl Check for OpenSSL
261
AC_ARG_ENABLE(ssl,
262 355 hiro
	[  --disable-ssl           Disable SSL support using OpenSSL],
263
	[ac_cv_enable_ssl=$enableval], [ac_cv_enable_ssl=yes])
264 1 hiro
AC_MSG_CHECKING([whether to use OpenSSL])
265
if test $ac_cv_enable_ssl = yes; then
266
	AC_MSG_RESULT(yes)
267 355 hiro
	dnl First check with pkg-config
268
	PKG_CHECK_MODULES(OPENSSL, openssl, [:], [:])
269
	if test "x$OPENSSL_LIBS" != "x"; then
270
		CFLAGS="$CFLAGS $OPENSSL_CFLAGS"
271
		LIBS="$LIBS $OPENSSL_LIBS"
272
		AC_MSG_CHECKING([if openssl is available])
273
		AC_MSG_RESULT(yes)
274
		AC_DEFINE(USE_SSL, 1, Define if you use OpenSSL to support SSL.)
275
	else
276
		dnl If pkg-config fails, run compile/link test.
277
		AC_MSG_CHECKING([if openssl is available])
278 1114 hiro
		ac_save_LIBS="$LIBS"
279 621 hiro
		if test "$native_win32" = yes; then
280
			LIBS="$LIBS -lssl32 -leay32"
281
		else
282
			LIBS="$LIBS -lssl -lcrypto"
283
		fi
284 355 hiro
		AC_TRY_LINK([
285 1 hiro
#include <openssl/opensslv.h>
286 355 hiro
],		[ return OPENSSL_VERSION_NUMBER; ],
287
		[ AC_MSG_RESULT(yes)
288
		  AC_DEFINE(USE_SSL, 1, Define if you use OpenSSL to support SSL.) ],
289
		[ AC_MSG_RESULT(no)
290
		  LIBS="$ac_save_LIBS"
291
		  ac_cv_enable_ssl=no ])
292
	fi
293 1 hiro
else
294
	AC_MSG_RESULT(no)
295
fi
296
297
dnl Check for X-Face support
298
AC_ARG_ENABLE(compface,
299
	[  --disable-compface      Do not use compface (X-Face)],
300
	[ac_cv_enable_compface=$enableval], [ac_cv_enable_compface=yes])
301
if test "$ac_cv_enable_compface" = yes; then
302
	AC_CHECK_LIB(compface, uncompface,,[ac_cv_enable_compface=no])
303
fi
304
305 754 hiro
dnl Check for GtkSpell support
306
AC_MSG_CHECKING([whether to use GtkSpell])
307
AC_ARG_ENABLE(gtkspell,
308 1010 hiro
	[  --disable-gtkspell      Do not use GtkSpell in editor],
309
	[ac_cv_enable_gtkspell=$enableval], [ac_cv_enable_gtkspell=yes])
310 754 hiro
if test "$ac_cv_enable_gtkspell" = yes; then
311
	AC_MSG_RESULT(yes)
312
	AC_MSG_CHECKING([whether GtkSpell is available])
313
	if $PKG_CONFIG gtkspell-2.0 ; then
314
		AC_MSG_RESULT(yes)
315
		CFLAGS="$CFLAGS `$PKG_CONFIG --cflags gtkspell-2.0`"
316
		LIBS="$LIBS `$PKG_CONFIG --libs gtkspell-2.0`"
317 2022 hiro
		if $PKG_CONFIG --atleast-version 2.0.13 gtkspell-2.0 ; then
318
			AC_DEFINE(USE_ENCHANT, 1, Use Enchant with GtkSpell)
319 2867 hiro
			LIBS="$LIBS `$PKG_CONFIG --libs enchant`"
320 2420 hiro
321
			dnl Workaroud for zemberek crash
322
			if $PKG_CONFIG --atleast-version 1.4.2 enchant ; then
323
				CFLAGS="$CFLAGS `$PKG_CONFIG --cflags dbus-glib-1`"
324
				LIBS="$LIBS `$PKG_CONFIG --libs dbus-glib-1`"
325
			fi
326 2022 hiro
		elif $PKG_CONFIG --atleast-version 2.0.12 gtkspell-2.0 ; then
327
			LIBS="$LIBS -laspell"
328
		fi
329 754 hiro
		AC_DEFINE(USE_GTKSPELL, 1, Use GtkSpell in editor)
330
	else
331
		AC_MSG_RESULT(no)
332 755 hiro
		ac_cv_enable_gtkspell=no
333 754 hiro
	fi
334
else
335
	AC_MSG_RESULT(no)
336
fi
337
338 1113 hiro
dnl Check for Oniguruma support in message filtering
339
AC_ARG_ENABLE(oniguruma,
340
	[  --enable-oniguruma      Use Oniguruma instead of system's regex [[default=no]]],
341
	[ac_cv_enable_oniguruma=$enableval], [ac_cv_enable_oniguruma=no])
342
AC_MSG_CHECKING([whether to use Oniguruma])
343
if test "$ac_cv_enable_oniguruma" = yes; then
344
	AC_MSG_RESULT(yes)
345 1118 hiro
	AC_MSG_CHECKING([whether Oniguruma is available])
346
        dnl AC_CHECK_PROG(ONIG_CONFIG, onig-config, onig-config)
347
	ONIG_CONFIG=onig-config
348 1119 hiro
	ONIG_VERSION=`$ONIG_CONFIG --version 2>/dev/null`
349
	if test "x$ONIG_VERSION" != "x"; then
350 1118 hiro
		AC_MSG_RESULT(yes)
351
		CFLAGS="$CFLAGS `$ONIG_CONFIG --cflags`"
352
		LIBS="$LIBS `$ONIG_CONFIG --libs`"
353
		AC_DEFINE(USE_ONIGURUMA, 1, Define if you want to use Oniguruma.)
354
	else
355
		AC_MSG_RESULT(no)
356
		ac_cv_enable_oniguruma=no
357 1113 hiro
	fi
358
else
359
	AC_MSG_RESULT(no)
360
fi
361
362 1463 hiro
dnl check additional libraries
363 1 hiro
AC_CHECK_LIB(xpg4, setlocale)
364 1463 hiro
AC_CHECK_LIB(resolv, res_init)
365
AC_CHECK_LIB(socket, bind)
366
AC_CHECK_LIB(nsl, gethostbyname)
367 1 hiro
368 2256 hiro
dnl for GThread support
369
AC_ARG_ENABLE(threads,
370 2294 hiro
	[  --disable-threads       Disable multithread support],
371
	[use_threads=$enableval], [use_threads=yes])
372 1 hiro
373
AC_MSG_CHECKING([whether to use threads])
374
if test x"$use_threads" = xyes ; then
375
	AC_MSG_RESULT(yes)
376 2256 hiro
	if $PKG_CONFIG --exists gthread-2.0 ; then
377 138 hiro
		CFLAGS="$CFLAGS `$PKG_CONFIG --cflags gthread-2.0`"
378
		LIBS="$LIBS `$PKG_CONFIG --libs gthread-2.0`"
379 1 hiro
		AC_DEFINE(USE_THREADS, 1, Whether to use multithread or not)
380
	else
381 2256 hiro
		AC_MSG_ERROR([Sylpheed requires GThread from GLib to enable threading.])
382 1 hiro
	fi
383
else
384
	AC_MSG_RESULT(no)
385
fi
386
387
dnl check for IPv6 option
388
AC_ARG_ENABLE(ipv6,
389
	[  --disable-ipv6          Disable IPv6 support],
390
	[ac_cv_enable_ipv6=$enableval], [ac_cv_enable_ipv6=yes])
391
392
dnl automated checks for IPv6 support.
393
AC_MSG_CHECKING([whether to use IPv6])
394
if test x"$ac_cv_enable_ipv6" = xyes; then
395
	AC_MSG_RESULT(yes)
396
	AC_MSG_CHECKING([for IPv6 support])
397 932 hiro
	if test "$native_win32" = yes; then
398
		AC_CACHE_VAL(ac_cv_ipv6,[
399
			AC_TRY_COMPILE([#define INET6
400
					#include <sys/types.h>
401
					#include <winsock2.h>
402
					#include <ws2tcpip.h>],
403
				[int x = IPPROTO_IPV6; struct in6_addr a;],
404
				ac_cv_ipv6=yes, ac_cv_ipv6=no)
405
		])
406
	else
407
		AC_CACHE_VAL(ac_cv_ipv6,[
408
			AC_TRY_COMPILE([#define INET6
409
					#include <sys/types.h>
410
					#include <netinet/in.h>],
411
				[int x = IPPROTO_IPV6; struct in6_addr a;],
412
				ac_cv_ipv6=yes, ac_cv_ipv6=no)
413
		])
414
	fi
415 1 hiro
	AC_MSG_RESULT($ac_cv_ipv6)
416
	if test $ac_cv_ipv6 = yes; then
417
		AC_DEFINE(INET6, 1, Define if you want IPv6 support.)
418
	else
419
		AC_MSG_WARN(*** IPv6 will not be supported ***)
420
		ac_cv_enable_ipv6=no
421
	fi
422
else
423
	AC_MSG_RESULT(no)
424
fi
425
426 2407 hiro
dnl for update check feature
427
AC_ARG_ENABLE(updatecheck,
428
	[  --disable-updatecheck   Disable update check feature],
429
	[ac_cv_enable_updatecheck=$enableval], [ac_cv_enable_updatecheck=yes])
430
if test x"$ac_cv_enable_updatecheck" = xyes ; then
431
	AC_DEFINE(USE_UPDATE_CHECK, 1, Define if you want update check feature.)
432
433 2744 hiro
  dnl for update check feature (requires update check enabled)
434
  AC_ARG_ENABLE(updatecheckplugin,
435 2707 hiro
	[  --disable-updatecheckplugin   Disable update check plugin feature],
436
	[ac_cv_enable_updatecheckplugin=$enableval], [ac_cv_enable_updatecheckplugin=yes])
437 2744 hiro
  if test x"$ac_cv_enable_updatecheckplugin" = xyes ; then
438 2707 hiro
	AC_DEFINE(USE_UPDATE_CHECK_PLUGIN, 1, Define if you want update check plugin feature.)
439 2744 hiro
  fi
440 2707 hiro
fi
441
442 1 hiro
dnl Check for d_type member in struct dirent
443
AC_MSG_CHECKING([whether struct dirent has d_type member])
444
AC_CACHE_VAL(ac_cv_dirent_d_type,[
445
	AC_TRY_COMPILE([#include <dirent.h>],
446
		       [struct dirent d; d.d_type = DT_REG;],
447
		       ac_cv_dirent_d_type=yes, ac_cv_dirent_d_type=no)
448
])
449
AC_MSG_RESULT($ac_cv_dirent_d_type)
450
if test $ac_cv_dirent_d_type = yes; then
451
	AC_DEFINE(HAVE_DIRENT_D_TYPE, 1,
452
		  Define if `struct dirent' has `d_type' member.)
453
fi
454
455
456
dnl Checks for header files.
457
AC_HEADER_DIRENT
458
AC_HEADER_STDC
459
AC_HEADER_SYS_WAIT
460
AC_CHECK_HEADERS(fcntl.h sys/file.h unistd.h paths.h \
461
		 sys/param.h sys/utsname.h sys/select.h \
462 733 hiro
		 netdb.h regex.h sys/mman.h)
463 1 hiro
464
dnl Checks for typedefs, structures, and compiler characteristics.
465
AC_C_CONST
466
AC_TYPE_OFF_T
467
AC_TYPE_PID_T
468
AC_TYPE_SIZE_T
469
AC_STRUCT_TM
470
471 56 hiro
AC_SYS_LARGEFILE
472
AC_FUNC_FSEEKO
473
474 1 hiro
GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF, Used to test for a u32 typedef)
475
AC_CHECK_SIZEOF(unsigned short, 2)
476
AC_CHECK_SIZEOF(unsigned int, 4)
477
AC_CHECK_SIZEOF(unsigned long, 4)
478 3386 hiro
AC_CHECK_SIZEOF(time_t)
479
AC_CHECK_SIZEOF(off_t)
480 1 hiro
481 3386 hiro
if test "x$ac_cv_sizeof_time_t" = "x8"; then
482
	AC_DEFINE(HAVE_64BIT_TIME_T, 1, Define if time_t is 64-bit)
483
fi
484
485 1 hiro
dnl Checks for library functions.
486
AC_FUNC_ALLOCA
487
AC_CHECK_FUNCS(gethostname mkdir mktime socket strstr strchr \
488
	       uname flock lockf inet_aton inet_addr \
489 2121 hiro
	       fchmod truncate getuid regcomp mlock fsync)
490 1 hiro
491
AC_OUTPUT([
492
Makefile
493
sylpheed.spec
494
ac/Makefile
495 528 hiro
libsylph/Makefile
496 1 hiro
src/version.h
497 1115 hiro
src/sylpheed.rc
498 1 hiro
src/Makefile
499 491 hiro
src/icons/Makefile
500 2164 hiro
plugin/Makefile
501 2656 hiro
plugin/attachment_tool/Makefile
502 2164 hiro
plugin/test/Makefile
503 528 hiro
po/Makefile.in
504 1 hiro
faq/Makefile
505
faq/de/Makefile
506
faq/en/Makefile
507
faq/es/Makefile
508
faq/fr/Makefile
509
faq/it/Makefile
510
manual/Makefile
511
manual/en/Makefile
512
manual/ja/Makefile
513 2732 hiro
nsis/Makefile
514 3317 hiro
macosx/Makefile
515
macosx/bundle/Makefile
516 1 hiro
])
517
518
dnl Output the configuration summary
519
echo ""
520
echo "$PACKAGE $VERSION"
521
echo ""
522
echo "GnuPG         : $ac_cv_enable_gpgme"
523
echo "JPilot        : $ac_cv_enable_jpilot"
524
echo "LDAP          : $ac_cv_enable_ldap"
525
echo "OpenSSL       : $ac_cv_enable_ssl"
526
echo "iconv         : $am_cv_func_iconv"
527
echo "compface      : $ac_cv_enable_compface"
528
echo "IPv6          : $ac_cv_enable_ipv6"
529 754 hiro
echo "GtkSpell      : $ac_cv_enable_gtkspell"
530 1113 hiro
echo "Oniguruma     : $ac_cv_enable_oniguruma"
531 2256 hiro
echo "GThread       : $use_threads"
532 1 hiro
echo ""
533
echo "The binary will be installed in $prefix/bin"
534
echo ""
535
echo "Configure finished, type 'make' to build."