Statistics
| Revision:

root / configure.ac

History | View | Annotate | Download (15.5 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 3420 hiro
MINOR_VERSION=5
9
MICRO_VERSION=0
10
INTERFACE_AGE=0
11
BINARY_AGE=0
12
EXTRA_VERSION=beta1
13
BUILD_REVISION=1161
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 3420 hiro
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 3392 hiro
	if test $ac_cv_enable_gpgme = yes; then
186
		AC_CHECK_LIB(gpgme, gpgme_io_writen, AC_DEFINE(HAVE_GPGME_IO_WRITEN, 1, Define if GPGME has gpgme_io_writen function.))
187
	fi
188 1 hiro
else
189
	AC_MSG_RESULT(no)
190
fi
191
192
dnl for JPilot support in addressbook
193
dnl no check for libraries; these are dynamically loaded
194
AC_ARG_ENABLE(jpilot,
195 355 hiro
	[  --enable-jpilot         Enable JPilot support [[default=no]]],
196 1 hiro
	[ac_cv_enable_jpilot=$enableval], [ac_cv_enable_jpilot=no])
197
AC_MSG_CHECKING([whether to use JPilot])
198
if test "$ac_cv_enable_jpilot" = yes; then
199
	AC_MSG_RESULT(yes)
200
	AC_CHECK_HEADERS(pi-args.h pi-appinfo.h pi-address.h,
201
			 [ AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.) ],
202
			 [ ac_cv_enable_jpilot=no ])
203
	if test "$ac_cv_enable_jpilot" = no; then
204
		AC_CHECK_HEADERS(libpisock/pi-args.h libpisock/pi-appinfo.h libpisock/pi-address.h,
205
				 [ ac_cv_enable_jpilot=yes
206
				   AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.) ])
207
	fi
208
	AC_MSG_CHECKING([whether jpilot is available])
209
	AC_MSG_RESULT($ac_cv_enable_jpilot)
210
211
	if test "$ac_cv_enable_jpilot" = yes; then
212
		LIBS="$LIBS -lpisock"
213
	fi
214
else
215
	AC_MSG_RESULT(no)
216
fi
217
218
dnl for LDAP support in addressbook
219
dnl no check for libraries; dynamically loaded
220
AC_ARG_ENABLE(ldap,
221 355 hiro
	[  --enable-ldap           Enable LDAP support [[default=no]]],
222 1 hiro
	[ac_cv_enable_ldap=$enableval], [ac_cv_enable_ldap=no])
223
AC_MSG_CHECKING([whether to use LDAP])
224
if test "$ac_cv_enable_ldap" = yes; then
225
	AC_MSG_RESULT(yes)
226
227
	dnl check for available libraries, and pull them in
228
	AC_CHECK_LIB(resolv, res_query, LDAP_LIBS="$LDAP_LIBS -lresolv")
229
	AC_CHECK_LIB(socket, bind, LDAP_LIBS="$LDAP_LIBS -lsocket")
230
	AC_CHECK_LIB(nsl, gethostbyaddr, LDAP_LIBS="$LDAP_LIBS -lnsl")
231
	AC_CHECK_LIB(lber, ber_get_tag, LDAP_LIBS="$LDAP_LIBS -llber",,
232
		     $LDAP_LIBS)
233
234
	dnl we need libpthread for sylpheed ldap,  until we find
235
	dnl a better way to handle ldap requests asynchronously...
236
	AC_CHECK_LIB(pthread, pthread_create, LDAP_LIBS="$LDAP_LIBS -lpthread")
237
238
	AC_CHECK_HEADERS(ldap.h lber.h pthread.h,
239
			 [ ac_cv_enable_ldap=yes ],
240
			 [ ac_cv_enable_ldap=no ])
241
242
	if test "$ac_cv_enable_ldap" = yes; then
243
		AC_CHECK_LIB(ldap, ldap_open,
244
			     [ ac_cv_enable_ldap=yes ],
245
			     [ ac_cv_enable_ldap=no ],
246
			     $LDAP_LIBS)
247
	fi
248
249
	AC_MSG_CHECKING([whether ldap library is available])
250
	AC_MSG_RESULT($ac_cv_enable_ldap)
251
252
	if test "$ac_cv_enable_ldap" = yes; then
253 138 hiro
		CFLAGS="$CFLAGS `$PKG_CONFIG --cflags gthread-2.0`"
254
		LDAP_LIBS="$LDAP_LIBS -lldap `$PKG_CONFIG --libs gthread-2.0`"
255 1 hiro
		AC_DEFINE(USE_LDAP, 1, Define if you want LDAP support in addressbook.)
256 2256 hiro
		AC_DEFINE(USE_THREADS, 1, Whether to use multithread or not)
257 1 hiro
		AC_SUBST(LDAP_LIBS)
258
	fi
259
else
260
	AC_MSG_RESULT(no)
261
fi
262
263
dnl Check for OpenSSL
264
AC_ARG_ENABLE(ssl,
265 355 hiro
	[  --disable-ssl           Disable SSL support using OpenSSL],
266
	[ac_cv_enable_ssl=$enableval], [ac_cv_enable_ssl=yes])
267 1 hiro
AC_MSG_CHECKING([whether to use OpenSSL])
268
if test $ac_cv_enable_ssl = yes; then
269
	AC_MSG_RESULT(yes)
270 355 hiro
	dnl First check with pkg-config
271
	PKG_CHECK_MODULES(OPENSSL, openssl, [:], [:])
272
	if test "x$OPENSSL_LIBS" != "x"; then
273
		CFLAGS="$CFLAGS $OPENSSL_CFLAGS"
274
		LIBS="$LIBS $OPENSSL_LIBS"
275
		AC_MSG_CHECKING([if openssl is available])
276
		AC_MSG_RESULT(yes)
277
		AC_DEFINE(USE_SSL, 1, Define if you use OpenSSL to support SSL.)
278
	else
279
		dnl If pkg-config fails, run compile/link test.
280
		AC_MSG_CHECKING([if openssl is available])
281 1114 hiro
		ac_save_LIBS="$LIBS"
282 621 hiro
		if test "$native_win32" = yes; then
283
			LIBS="$LIBS -lssl32 -leay32"
284
		else
285
			LIBS="$LIBS -lssl -lcrypto"
286
		fi
287 355 hiro
		AC_TRY_LINK([
288 1 hiro
#include <openssl/opensslv.h>
289 355 hiro
],		[ return OPENSSL_VERSION_NUMBER; ],
290
		[ AC_MSG_RESULT(yes)
291
		  AC_DEFINE(USE_SSL, 1, Define if you use OpenSSL to support SSL.) ],
292
		[ AC_MSG_RESULT(no)
293
		  LIBS="$ac_save_LIBS"
294
		  ac_cv_enable_ssl=no ])
295
	fi
296 1 hiro
else
297
	AC_MSG_RESULT(no)
298
fi
299
300
dnl Check for X-Face support
301
AC_ARG_ENABLE(compface,
302
	[  --disable-compface      Do not use compface (X-Face)],
303
	[ac_cv_enable_compface=$enableval], [ac_cv_enable_compface=yes])
304
if test "$ac_cv_enable_compface" = yes; then
305
	AC_CHECK_LIB(compface, uncompface,,[ac_cv_enable_compface=no])
306
fi
307
308 754 hiro
dnl Check for GtkSpell support
309
AC_MSG_CHECKING([whether to use GtkSpell])
310
AC_ARG_ENABLE(gtkspell,
311 1010 hiro
	[  --disable-gtkspell      Do not use GtkSpell in editor],
312
	[ac_cv_enable_gtkspell=$enableval], [ac_cv_enable_gtkspell=yes])
313 754 hiro
if test "$ac_cv_enable_gtkspell" = yes; then
314
	AC_MSG_RESULT(yes)
315
	AC_MSG_CHECKING([whether GtkSpell is available])
316
	if $PKG_CONFIG gtkspell-2.0 ; then
317
		AC_MSG_RESULT(yes)
318
		CFLAGS="$CFLAGS `$PKG_CONFIG --cflags gtkspell-2.0`"
319
		LIBS="$LIBS `$PKG_CONFIG --libs gtkspell-2.0`"
320 2022 hiro
		if $PKG_CONFIG --atleast-version 2.0.13 gtkspell-2.0 ; then
321
			AC_DEFINE(USE_ENCHANT, 1, Use Enchant with GtkSpell)
322 2867 hiro
			LIBS="$LIBS `$PKG_CONFIG --libs enchant`"
323 2420 hiro
324
			dnl Workaroud for zemberek crash
325
			if $PKG_CONFIG --atleast-version 1.4.2 enchant ; then
326
				CFLAGS="$CFLAGS `$PKG_CONFIG --cflags dbus-glib-1`"
327
				LIBS="$LIBS `$PKG_CONFIG --libs dbus-glib-1`"
328
			fi
329 2022 hiro
		elif $PKG_CONFIG --atleast-version 2.0.12 gtkspell-2.0 ; then
330
			LIBS="$LIBS -laspell"
331
		fi
332 754 hiro
		AC_DEFINE(USE_GTKSPELL, 1, Use GtkSpell in editor)
333
	else
334
		AC_MSG_RESULT(no)
335 755 hiro
		ac_cv_enable_gtkspell=no
336 754 hiro
	fi
337
else
338
	AC_MSG_RESULT(no)
339
fi
340
341 1113 hiro
dnl Check for Oniguruma support in message filtering
342
AC_ARG_ENABLE(oniguruma,
343
	[  --enable-oniguruma      Use Oniguruma instead of system's regex [[default=no]]],
344
	[ac_cv_enable_oniguruma=$enableval], [ac_cv_enable_oniguruma=no])
345
AC_MSG_CHECKING([whether to use Oniguruma])
346
if test "$ac_cv_enable_oniguruma" = yes; then
347
	AC_MSG_RESULT(yes)
348 1118 hiro
	AC_MSG_CHECKING([whether Oniguruma is available])
349
        dnl AC_CHECK_PROG(ONIG_CONFIG, onig-config, onig-config)
350
	ONIG_CONFIG=onig-config
351 1119 hiro
	ONIG_VERSION=`$ONIG_CONFIG --version 2>/dev/null`
352
	if test "x$ONIG_VERSION" != "x"; then
353 1118 hiro
		AC_MSG_RESULT(yes)
354
		CFLAGS="$CFLAGS `$ONIG_CONFIG --cflags`"
355
		LIBS="$LIBS `$ONIG_CONFIG --libs`"
356
		AC_DEFINE(USE_ONIGURUMA, 1, Define if you want to use Oniguruma.)
357
	else
358
		AC_MSG_RESULT(no)
359
		ac_cv_enable_oniguruma=no
360 1113 hiro
	fi
361
else
362
	AC_MSG_RESULT(no)
363
fi
364
365 1463 hiro
dnl check additional libraries
366 1 hiro
AC_CHECK_LIB(xpg4, setlocale)
367 1463 hiro
AC_CHECK_LIB(resolv, res_init)
368
AC_CHECK_LIB(socket, bind)
369
AC_CHECK_LIB(nsl, gethostbyname)
370 1 hiro
371 2256 hiro
dnl for GThread support
372
AC_ARG_ENABLE(threads,
373 2294 hiro
	[  --disable-threads       Disable multithread support],
374
	[use_threads=$enableval], [use_threads=yes])
375 1 hiro
376
AC_MSG_CHECKING([whether to use threads])
377
if test x"$use_threads" = xyes ; then
378
	AC_MSG_RESULT(yes)
379 2256 hiro
	if $PKG_CONFIG --exists gthread-2.0 ; then
380 138 hiro
		CFLAGS="$CFLAGS `$PKG_CONFIG --cflags gthread-2.0`"
381
		LIBS="$LIBS `$PKG_CONFIG --libs gthread-2.0`"
382 1 hiro
		AC_DEFINE(USE_THREADS, 1, Whether to use multithread or not)
383
	else
384 2256 hiro
		AC_MSG_ERROR([Sylpheed requires GThread from GLib to enable threading.])
385 1 hiro
	fi
386
else
387
	AC_MSG_RESULT(no)
388
fi
389
390
dnl check for IPv6 option
391
AC_ARG_ENABLE(ipv6,
392
	[  --disable-ipv6          Disable IPv6 support],
393
	[ac_cv_enable_ipv6=$enableval], [ac_cv_enable_ipv6=yes])
394
395
dnl automated checks for IPv6 support.
396
AC_MSG_CHECKING([whether to use IPv6])
397
if test x"$ac_cv_enable_ipv6" = xyes; then
398
	AC_MSG_RESULT(yes)
399
	AC_MSG_CHECKING([for IPv6 support])
400 932 hiro
	if test "$native_win32" = yes; then
401
		AC_CACHE_VAL(ac_cv_ipv6,[
402
			AC_TRY_COMPILE([#define INET6
403
					#include <sys/types.h>
404
					#include <winsock2.h>
405
					#include <ws2tcpip.h>],
406
				[int x = IPPROTO_IPV6; struct in6_addr a;],
407
				ac_cv_ipv6=yes, ac_cv_ipv6=no)
408
		])
409
	else
410
		AC_CACHE_VAL(ac_cv_ipv6,[
411
			AC_TRY_COMPILE([#define INET6
412
					#include <sys/types.h>
413
					#include <netinet/in.h>],
414
				[int x = IPPROTO_IPV6; struct in6_addr a;],
415
				ac_cv_ipv6=yes, ac_cv_ipv6=no)
416
		])
417
	fi
418 1 hiro
	AC_MSG_RESULT($ac_cv_ipv6)
419
	if test $ac_cv_ipv6 = yes; then
420
		AC_DEFINE(INET6, 1, Define if you want IPv6 support.)
421
	else
422
		AC_MSG_WARN(*** IPv6 will not be supported ***)
423
		ac_cv_enable_ipv6=no
424
	fi
425
else
426
	AC_MSG_RESULT(no)
427
fi
428
429 2407 hiro
dnl for update check feature
430
AC_ARG_ENABLE(updatecheck,
431
	[  --disable-updatecheck   Disable update check feature],
432
	[ac_cv_enable_updatecheck=$enableval], [ac_cv_enable_updatecheck=yes])
433
if test x"$ac_cv_enable_updatecheck" = xyes ; then
434
	AC_DEFINE(USE_UPDATE_CHECK, 1, Define if you want update check feature.)
435
436 2744 hiro
  dnl for update check feature (requires update check enabled)
437
  AC_ARG_ENABLE(updatecheckplugin,
438 2707 hiro
	[  --disable-updatecheckplugin   Disable update check plugin feature],
439
	[ac_cv_enable_updatecheckplugin=$enableval], [ac_cv_enable_updatecheckplugin=yes])
440 2744 hiro
  if test x"$ac_cv_enable_updatecheckplugin" = xyes ; then
441 2707 hiro
	AC_DEFINE(USE_UPDATE_CHECK_PLUGIN, 1, Define if you want update check plugin feature.)
442 2744 hiro
  fi
443 2707 hiro
fi
444
445 1 hiro
dnl Check for d_type member in struct dirent
446
AC_MSG_CHECKING([whether struct dirent has d_type member])
447
AC_CACHE_VAL(ac_cv_dirent_d_type,[
448
	AC_TRY_COMPILE([#include <dirent.h>],
449
		       [struct dirent d; d.d_type = DT_REG;],
450
		       ac_cv_dirent_d_type=yes, ac_cv_dirent_d_type=no)
451
])
452
AC_MSG_RESULT($ac_cv_dirent_d_type)
453
if test $ac_cv_dirent_d_type = yes; then
454
	AC_DEFINE(HAVE_DIRENT_D_TYPE, 1,
455
		  Define if `struct dirent' has `d_type' member.)
456
fi
457
458 3407 hiro
dnl Checks for liblockfile
459
AC_CHECK_HEADERS(lockfile.h)
460
AC_CHECK_LIB(lockfile, lockfile_create)
461 1 hiro
462 3407 hiro
463 1 hiro
dnl Checks for header files.
464
AC_HEADER_DIRENT
465
AC_HEADER_STDC
466
AC_HEADER_SYS_WAIT
467
AC_CHECK_HEADERS(fcntl.h sys/file.h unistd.h paths.h \
468
		 sys/param.h sys/utsname.h sys/select.h \
469 733 hiro
		 netdb.h regex.h sys/mman.h)
470 1 hiro
471
dnl Checks for typedefs, structures, and compiler characteristics.
472
AC_C_CONST
473
AC_TYPE_OFF_T
474
AC_TYPE_PID_T
475
AC_TYPE_SIZE_T
476
AC_STRUCT_TM
477
478 56 hiro
AC_SYS_LARGEFILE
479
AC_FUNC_FSEEKO
480
481 1 hiro
GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF, Used to test for a u32 typedef)
482
AC_CHECK_SIZEOF(unsigned short, 2)
483
AC_CHECK_SIZEOF(unsigned int, 4)
484
AC_CHECK_SIZEOF(unsigned long, 4)
485 3386 hiro
AC_CHECK_SIZEOF(time_t)
486
AC_CHECK_SIZEOF(off_t)
487 1 hiro
488 3386 hiro
if test "x$ac_cv_sizeof_time_t" = "x8"; then
489
	AC_DEFINE(HAVE_64BIT_TIME_T, 1, Define if time_t is 64-bit)
490
fi
491
492 1 hiro
dnl Checks for library functions.
493
AC_FUNC_ALLOCA
494
AC_CHECK_FUNCS(gethostname mkdir mktime socket strstr strchr \
495
	       uname flock lockf inet_aton inet_addr \
496 2121 hiro
	       fchmod truncate getuid regcomp mlock fsync)
497 1 hiro
498
AC_OUTPUT([
499
Makefile
500
sylpheed.spec
501
ac/Makefile
502 528 hiro
libsylph/Makefile
503 1 hiro
src/version.h
504 1115 hiro
src/sylpheed.rc
505 1 hiro
src/Makefile
506 491 hiro
src/icons/Makefile
507 2164 hiro
plugin/Makefile
508 2656 hiro
plugin/attachment_tool/Makefile
509 2164 hiro
plugin/test/Makefile
510 528 hiro
po/Makefile.in
511 1 hiro
faq/Makefile
512
faq/de/Makefile
513
faq/en/Makefile
514
faq/es/Makefile
515
faq/fr/Makefile
516
faq/it/Makefile
517
manual/Makefile
518
manual/en/Makefile
519
manual/ja/Makefile
520 2732 hiro
nsis/Makefile
521 3317 hiro
macosx/Makefile
522
macosx/bundle/Makefile
523 1 hiro
])
524
525
dnl Output the configuration summary
526
echo ""
527
echo "$PACKAGE $VERSION"
528
echo ""
529
echo "GnuPG         : $ac_cv_enable_gpgme"
530
echo "JPilot        : $ac_cv_enable_jpilot"
531
echo "LDAP          : $ac_cv_enable_ldap"
532
echo "OpenSSL       : $ac_cv_enable_ssl"
533
echo "iconv         : $am_cv_func_iconv"
534
echo "compface      : $ac_cv_enable_compface"
535
echo "IPv6          : $ac_cv_enable_ipv6"
536 754 hiro
echo "GtkSpell      : $ac_cv_enable_gtkspell"
537 1113 hiro
echo "Oniguruma     : $ac_cv_enable_oniguruma"
538 2256 hiro
echo "GThread       : $use_threads"
539 1 hiro
echo ""
540
echo "The binary will be installed in $prefix/bin"
541
echo ""
542
echo "Configure finished, type 'make' to build."