configure.ac 32 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042
  1. AC_PREREQ(2.60)
  2. AC_INIT(src/main.c)
  3. AC_CONFIG_AUX_DIR(config)
  4. PACKAGE=claws-mail
  5. dnl version number
  6. MAJOR_VERSION=3
  7. MINOR_VERSION=3
  8. MICRO_VERSION=1
  9. INTERFACE_AGE=0
  10. BINARY_AGE=0
  11. EXTRA_VERSION=0
  12. EXTRA_RELEASE=
  13. EXTRA_GTK2_VERSION=
  14. if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
  15. VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}${EXTRA_RELEASE}${EXTRA_GTK2_VERSION}
  16. else
  17. VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}cvs${EXTRA_VERSION}${EXTRA_GTK2_VERSION}
  18. fi
  19. dnl set $target
  20. AC_CANONICAL_SYSTEM
  21. dnl
  22. AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
  23. dnl AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
  24. dnl AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
  25. AC_SUBST(PACKAGE)
  26. AC_SUBST(VERSION)
  27. AC_SUBST(MAJOR_VERSION)
  28. AC_SUBST(MINOR_VERSION)
  29. AC_SUBST(MICRO_VERSION)
  30. AC_SUBST(EXTRA_VERSION)
  31. dnl GNOME installed?
  32. AC_PATH_PROG(GNOME_CONFIG, gnome-config, no)
  33. if test "$GNOME_CONFIG" != no; then
  34. gnomedatadir="`gnome-config --datadir`"
  35. gnomeprefix="`gnome-config --prefix`"
  36. if test "${prefix}" = "NONE"; then
  37. gnomedatadir="${ac_default_prefix}/${gnomedatadir#${gnomeprefix}}"
  38. else
  39. gnomedatadir="${prefix}/${gnomedatadir#${gnomeprefix}}"
  40. fi
  41. AC_SUBST(gnomedatadir)
  42. fi
  43. AM_CONDITIONAL(CLAWS_GNOME, test -n "$gnomedatadir")
  44. AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
  45. if test x$PKG_CONFIG = xno ; then
  46. AC_MSG_ERROR([*** pkg-config not found. See http://www.freedesktop.org/software/pkgconfig/])
  47. fi
  48. dnl GNOME 2.x installed?
  49. PKG_CHECK_MODULES(GNOME2, libgnome-2.0 >= 2.0, ac_enable_gnome2=yes, ac_enable_gnome2=no)
  50. AM_CONDITIONAL(CLAWS_GNOME2, test x"$ac_enable_gnome2" = x"yes")
  51. dnl libtool versioning
  52. LT_RELEASE=$MAJOR_VERSION.$MINOR_VERSION
  53. LT_CURRENT=`expr $MICRO_VERSION - $INTERFACE_AGE`
  54. LT_REVISION=$INTERFACE_AGE
  55. LT_AGE=`expr $BINARY_AGE - $INTERFACE_AGE`
  56. AC_SUBST(LT_RELEASE)
  57. AC_SUBST(LT_CURRENT)
  58. AC_SUBST(LT_REVISION)
  59. AC_SUBST(LT_AGE)
  60. dnl Specify a header configuration file
  61. AC_CONFIG_HEADERS(config.h)
  62. AM_MAINTAINER_MODE
  63. dnl Checks for programs.
  64. dnl AC_ARG_PROGRAM
  65. AC_PROG_CC
  66. AC_ISC_POSIX
  67. AC_PROG_INSTALL
  68. AC_PROG_LN_S
  69. AC_PROG_MAKE_SET
  70. AC_PROG_CPP
  71. dnl AC_PROG_RANLIB
  72. AM_PROG_LEX
  73. AC_PROG_YACC
  74. AC_LIB_PREFIX
  75. AC_LIBTOOL_WIN32_DLL
  76. AC_LIBTOOL_RC
  77. AC_PROG_LIBTOOL
  78. CLAWS_ACLOCAL_INCLUDE(m4)
  79. dnl ******************************
  80. dnl Checks for host
  81. dnl Not needed anymore because we
  82. dnl do AC_CANONICAL_SYSTEM above
  83. dnl ******************************
  84. dnl AC_CANONICAL_HOST
  85. dnl Copied from the official gtk+-2 configure.in
  86. AC_MSG_CHECKING([for some Win32 platform])
  87. case "$host" in
  88. *-*-mingw*|*-*-cygwin*)
  89. platform_win32=yes
  90. LDFLAGS="$LDFLAGS -mwindows"
  91. ;;
  92. *)
  93. platform_win32=no
  94. ;;
  95. esac
  96. AC_MSG_RESULT([$platform_win32])
  97. AM_CONDITIONAL(PLATFORM_WIN32, test x"$platform_win32" = x"yes")
  98. AC_MSG_CHECKING([for native Win32])
  99. case "$host" in
  100. *-*-mingw*)
  101. os_win32=yes
  102. ;;
  103. *)
  104. os_win32=no
  105. ;;
  106. esac
  107. AC_MSG_RESULT([$os_win32])
  108. AM_CONDITIONAL(OS_WIN32, test x"$os_win32" = x"yes")
  109. AC_MSG_CHECKING([for Cygwin])
  110. case "$host" in
  111. *-*-cygwin*)
  112. env_cygwin=yes
  113. ;;
  114. *)
  115. env_cygwin=no
  116. ;;
  117. esac
  118. AC_MSG_RESULT([$env_cygwin])
  119. AM_CONDITIONAL(CYGWIN, test x"$env_cygwin" = x"yes")
  120. if test "$GCC" = "yes"
  121. then
  122. CFLAGS="$CFLAGS -Wno-unused-function"
  123. fi
  124. CFLAGS="$CFLAGS -Wall"
  125. pthread_name=
  126. case "$target" in
  127. *-darwin*)
  128. CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
  129. ;;
  130. *-*-mingw*)
  131. # Note that we need to link to pthreadGC2 in all cases. This
  132. # is because some locking is used even when pthread support is
  133. # disabled.
  134. pthread_name=pthreadGC2
  135. CFLAGS="$CFLAGS -mms-bitfields"
  136. LIBS="$LIBS -l${pthread_name} -lws2_32 -lregex"
  137. ;;
  138. *-*-solaris*)
  139. CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
  140. CFLAGS="$CFLAGS -DSOLARIS"
  141. ;;
  142. esac
  143. dnl Checks for iconv
  144. AM_ICONV
  145. dnl
  146. dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
  147. dnl
  148. syl_save_LIBS=$LIBS
  149. LIBS="$LIBS $GTK_LIBS"
  150. AC_CHECK_FUNCS(bind_textdomain_codeset)
  151. LIBS=$syl_save_LIBS
  152. dnl for gettext
  153. ALL_LINGUAS="bg ca cs de el en_GB es fi fr he hr hu it ja ko nb nl pl pt_BR ru sk sr sv zh_CN zh_TW"
  154. GETTEXT_PACKAGE=claws-mail
  155. AC_SUBST(GETTEXT_PACKAGE)
  156. AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define text domain.])
  157. AM_GNU_GETTEXT_VERSION([0.15])
  158. AM_GNU_GETTEXT([external])
  159. manualdir='${docdir}/manual'
  160. AC_ARG_WITH(manualdir,
  161. [ --with-manualdir=DIR Manual directory],
  162. [manualdir="$withval"])
  163. AC_SUBST(manualdir)
  164. AC_ARG_ENABLE(manual,
  165. [ --disable-manual do not build manual],
  166. [ac_cv_enable_manual=$enableval], [ac_cv_enable_manual=yes])
  167. AM_CONDITIONAL(BUILD_MANUAL, test x"$ac_cv_enable_manual" = xyes)
  168. dnl Set PACKAGE_DATA_DIR in config.h.
  169. if test "x${datarootdir}" = 'x${prefix}/share'; then
  170. if test "x${prefix}" = "xNONE"; then
  171. AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}",[PACKAGE_DATA_DIR])
  172. else
  173. AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}",[PACKAGE_DATA_DIR])
  174. fi
  175. else
  176. AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datarootdir}/${PACKAGE}",[PACKAGE_DATA_DIR])
  177. fi
  178. AC_CHECK_LIB(xpg4, setlocale)
  179. SM_LIBS=""
  180. dnl Check for LibSM
  181. AC_ARG_ENABLE(libsm,
  182. [ --disable-libsm disable libSM support for session management.],
  183. [ac_cv_enable_libsm=$enableval], [ac_cv_enable_libsm=yes])
  184. AC_MSG_CHECKING([whether to use LibSM])
  185. if test x"$ac_cv_enable_libsm" = xyes; then
  186. AC_MSG_RESULT(yes)
  187. AC_CHECK_LIB(SM, SmcSaveYourselfDone,
  188. [SM_LIBS="$X_LIBS -lSM -lICE"],ac_cv_enable_libsm=no,
  189. $X_LIBS -lICE)
  190. AC_CHECK_HEADERS(X11/SM/SMlib.h,,ac_cv_enable_libsm=no)
  191. if test x"$ac_cv_enable_libsm" = xyes; then
  192. AC_DEFINE(HAVE_LIBSM, 1, [Define to 1 if you have libSM installed])
  193. else
  194. AC_MSG_RESULT(not found)
  195. AC_MSG_WARN([*** LibSM will not be supported ***])
  196. fi
  197. else
  198. AC_MSG_RESULT(no)
  199. fi
  200. AC_SUBST(SM_LIBS)
  201. dnl for GThread support (currently disabled)
  202. dnl AC_ARG_ENABLE(threads,
  203. dnl [ --enable-threads Enable multithread support [default=no]],
  204. dnl [use_threads=$enableval], [use_threads=no])
  205. AC_MSG_CHECKING([whether to use threads])
  206. if test x"$use_threads" = xyes ; then
  207. AC_MSG_RESULT(yes)
  208. if test ! -z `$GLIB_CONFIG --help 2>&1 |grep 'gthread'` ; then
  209. CFLAGS="$CFLAGS `$GLIB_CONFIG --cflags gthread`"
  210. LIBS="$LIBS `$GLIB_CONFIG --libs gthread`"
  211. AC_DEFINE(USE_THREADS, 1, Whether to use multithread or not)
  212. else
  213. AC_MSG_ERROR([Sylpheed requires GThread from GLib to use threading.])
  214. fi
  215. else
  216. AC_MSG_RESULT(no)
  217. fi
  218. dnl Check for d_type member in struct dirent
  219. AC_MSG_CHECKING([whether struct dirent has d_type member])
  220. AC_CACHE_VAL(ac_cv_dirent_d_type,[
  221. AC_TRY_COMPILE([#include <dirent.h>],
  222. [struct dirent d; d.d_type = DT_REG;],
  223. ac_cv_dirent_d_type=yes, ac_cv_dirent_d_type=no)
  224. ])
  225. AC_MSG_RESULT($ac_cv_dirent_d_type)
  226. if test $ac_cv_dirent_d_type = yes; then
  227. AC_DEFINE(HAVE_DIRENT_D_TYPE, 1,
  228. Define if `struct dirent' has `d_type' member.)
  229. fi
  230. # Check whether mkdir does not take the permission argument.
  231. GNUPG_FUNC_MKDIR_TAKES_ONE_ARG
  232. dnl Checks for header files.
  233. AC_HEADER_DIRENT
  234. AC_HEADER_STDC
  235. AC_HEADER_SYS_WAIT
  236. AC_CHECK_HEADERS(fcntl.h sys/file.h unistd.h paths.h \
  237. sys/param.h sys/utsname.h sys/select.h \
  238. wchar.h wctype.h locale.h netdb.h)
  239. dnl alf - Check for apache installation f*ck up. apache may also install an
  240. dnl fnmatch, which includes their own regex stuff if USE_HSREGEX is defined
  241. AC_TRY_COMPILE([#include <stdlib.h>
  242. #include <fnmatch.h>],
  243. [int x = USE_HSREGEX;],
  244. ac_cv_have_apache_fnmatch=yes, ac_cv_have_apache_fnmatch=no)
  245. if test $ac_cv_have_apache_fnmatch = yes; then
  246. AC_DEFINE(HAVE_APACHE_FNMATCH, 1, Define if you need to work around apache regex/fnmatch !KLUDGE!)
  247. fi
  248. AC_MSG_CHECKING([whether to use Apache regex header kludge])
  249. AC_MSG_RESULT($ac_cv_have_apache_fnmatch)
  250. dnl Checks for typedefs, structures, and compiler characteristics.
  251. AC_C_CONST
  252. AC_TYPE_OFF_T
  253. AC_TYPE_PID_T
  254. AC_TYPE_SIZE_T
  255. AC_STRUCT_TM
  256. dnl AC_CHECK_TYPE(wint_t, unsigned int) does not work because wint_t
  257. dnl may be defined only in wchar.h (this happens with gcc-2.96).
  258. dnl So we need to use this extended macro.
  259. CLAWS_CHECK_TYPE(wint_t, unsigned int,
  260. [
  261. #if HAVE_WCHAR_H
  262. #include <wchar.h>
  263. #endif
  264. ], Define to `unsigned int' if <stddef.h> or <wchar.h> doesn't define.)
  265. GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF, Used to test for a u32 typedef)
  266. AC_CHECK_SIZEOF(unsigned short, 2)
  267. AC_CHECK_SIZEOF(unsigned int, 4)
  268. AC_CHECK_SIZEOF(unsigned long, 4)
  269. dnl Checks for library functions.
  270. AC_FUNC_ALLOCA
  271. AC_CHECK_FUNCS(gethostname mkdir mktime socket strstr strchr \
  272. uname flock lockf inet_aton inet_addr \
  273. fchmod mkstemp truncate getuid regcomp)
  274. AC_CHECK_FUNCS(fgets_unlocked fwrite_unlocked)
  275. dnl *****************
  276. dnl ** common code **
  277. dnl *****************
  278. dnl check for glib
  279. PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.6 gmodule-2.0 >= 2.6 gobject-2.0 >= 2.6 gthread-2.0 >= 2.6)
  280. GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0`
  281. AC_SUBST(GLIB_GENMARSHAL)
  282. AC_SUBST(GLIB_CFLAGS)
  283. AC_SUBST(GLIB_LIBS)
  284. dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
  285. syl_save_LIBS=$LIBS
  286. LIBS="$LIBS $GTK_LIBS"
  287. AC_CHECK_FUNCS(bind_textdomain_codeset)
  288. LIBS=$syl_save_LIBS
  289. dnl check for IPv6 option
  290. AC_ARG_ENABLE(ipv6,
  291. [ --disable-ipv6 disable build IPv6 support],
  292. [ac_cv_enable_ipv6=$enableval], [ac_cv_enable_ipv6=yes])
  293. dnl automated checks for IPv6 support.
  294. AC_MSG_CHECKING([whether to use IPv6])
  295. if test x"$ac_cv_enable_ipv6" = xyes; then
  296. AC_MSG_RESULT(yes)
  297. AC_MSG_CHECKING([for IPv6 support])
  298. AC_CACHE_VAL(ac_cv_ipv6,[
  299. AC_TRY_COMPILE([#define INET6
  300. #include <sys/types.h>
  301. #include <netinet/in.h>],
  302. [int x = IPPROTO_IPV6; struct in6_addr a;],
  303. ac_cv_ipv6=yes, ac_cv_ipv6=no)
  304. ])
  305. AC_MSG_RESULT($ac_cv_ipv6)
  306. if test $ac_cv_ipv6 = yes; then
  307. AC_DEFINE(INET6, 1, Define if you want IPv6 support.)
  308. else
  309. AC_MSG_WARN(*** IPv6 will not be supported ***)
  310. ac_cv_enable_ipv6=no
  311. fi
  312. else
  313. AC_MSG_RESULT(no)
  314. fi
  315. dnl Check for OpenSSL
  316. AC_ARG_ENABLE(openssl,
  317. [ --disable-openssl disable OpenSSL support.],
  318. [ac_cv_enable_openssl=$enableval], [ac_cv_enable_openssl=yes])
  319. dnl GNUTLS
  320. AC_ARG_ENABLE(gnutls, [ --enable-gnutls enable GnuTLS support],
  321. [ac_cv_enable_gnutls=$enableval], [ac_cv_enable_gnutls=no])
  322. if test x$ac_cv_enable_openssl = xyes && test x$ac_cv_enable_gnutls != xyes; then
  323. ac_cv_enable_gnutls="no"
  324. fi
  325. if test x$ac_cv_enable_gnutls = xyes; then
  326. ac_cv_enable_openssl="no"
  327. fi
  328. AC_MSG_CHECKING([whether to use OpenSSL])
  329. if test x"$ac_cv_enable_openssl" = xyes; then
  330. AC_MSG_RESULT(yes)
  331. PKG_CHECK_MODULES(OPENSSL, openssl >= 0.9.7, :, ac_cv_enable_openssl=no)
  332. if test x$ac_cv_enable_openssl = xyes; then
  333. AC_DEFINE(USE_OPENSSL, 1, Define if you want OpenSSL support)
  334. else
  335. AC_MSG_RESULT(not found)
  336. AC_MSG_WARN([*** OpenSSL will not be supported ***])
  337. fi
  338. else
  339. AC_MSG_RESULT(no)
  340. fi
  341. AC_SUBST(OPENSSL_CFLAGS)
  342. AC_SUBST(OPENSSL_LIBS)
  343. AC_MSG_CHECKING([whether to use GnuTLS])
  344. if test "x$ac_cv_enable_gnutls" != "xno"; then
  345. OCPPFLAGS="$CPPFLAGS"
  346. OLDFLAGS="$LDFLAGS"
  347. GNUTLS_LIBS=""
  348. AC_CHECK_HEADER(gnutls/gnutls.h, [
  349. AC_CHECK_LIB(gnutls, gnutls_global_deinit,
  350. [AC_DEFINE(USE_GNUTLS, 1, Define to use GnuTLS.)],
  351. [ac_cv_enable_gnutls=no])
  352. ],[ac_cv_enable_gnutls=no])
  353. if test "x$ac_cv_enable_gnutls" != "xyes"; then
  354. CPPFLAGS="$OCPPFLAGS"
  355. LDFLAGS="$OLDFLAGS"
  356. fi
  357. fi
  358. if test "x$ac_cv_enable_gnutls" = "xyes"; then
  359. AC_DEFINE([USE_GNUTLS],1, [Define to use GnuTLS])
  360. GNUTLS_LIBS="-lgnutls"
  361. else
  362. GNUTLS_LIBS=""
  363. fi
  364. AC_SUBST(GNUTLS_LIBS)
  365. dnl password encryption
  366. OLDLIBS=$LIBS
  367. LIBS=
  368. case $host_os in
  369. *dragonfly*)
  370. AC_SEARCH_LIBS(encrypt, cipher, [], AC_MSG_ERROR(['encrypt'-function not found.]))
  371. ;;
  372. *)
  373. AC_SEARCH_LIBS(encrypt, crypt, [], AC_MSG_ERROR(['encrypt'-function not found.]))
  374. ;;
  375. esac
  376. CRYPT_LIBS=$LIBS
  377. AC_SUBST(CRYPT_LIBS)
  378. LIBS=$OLDLIBS
  379. AC_ARG_WITH(passcrypt-key, [ --with-passcrypt-key=KEY Key used to encode passwords (8 byte string)],
  380. with_passcrypt_key="$withval", with_passcrypt_key="passkey0")
  381. AC_SUBST(PASSCRYPT_KEY, $with_passcrypt_key)
  382. dnl RC dir (will be default at a certain point in time)
  383. AC_ARG_WITH(config-dir, [ --with-config-dir=RCDIR Local configuration dir (default: .claws-mail)],
  384. ac_cv_with_config_dir="$withval", ac_cv_with_config_dir=".claws-mail")
  385. if test x"$ac_cv_with_config_dir" = x""; then
  386. ac_cv_with_config_dir=".claws-mail"
  387. fi
  388. AC_DEFINE_UNQUOTED(CFG_RC_DIR, "$ac_cv_with_config_dir", Configuration directory)
  389. dnl ************************
  390. dnl ** GTK user interface **
  391. dnl ************************
  392. dnl Checks for GTK
  393. PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.6)
  394. dnl --disable-deprecated switch for GTK2 purification
  395. AC_ARG_ENABLE(deprecated, [ --disable-deprecated disable deprecated GTK functions. ],
  396. [GTK_CFLAGS="$GTK_CFLAGS -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"], [])
  397. AC_SUBST(GTK_CFLAGS)
  398. AC_SUBST(GTK_LIBS)
  399. dnl GNU/Aspell is used for spell checking
  400. AC_ARG_ENABLE(aspell,
  401. [ --disable-aspell disable GNU/aspell support],
  402. [ac_cv_enable_aspell=$enableval], [ac_cv_enable_aspell=yes])
  403. AC_MSG_CHECKING([whether to use GNU/aspell])
  404. if test $ac_cv_enable_aspell = yes; then
  405. AC_MSG_RESULT(yes)
  406. AM_PATH_ASPELL(0.50, AC_DEFINE(USE_ASPELL, 1, Define if you use ASPELL to support spell checking),
  407. [use_aspell=no ac_cv_enable_aspell=no])
  408. else
  409. AC_MSG_RESULT(no)
  410. fi
  411. dnl want crash dialog
  412. AC_ARG_ENABLE(crash-dialog,
  413. [ --enable-crash-dialog Enable crash dialog [default=no]],
  414. [ac_cv_enable_crash_dialog=$enableval], [ac_cv_enable_crash_dialog=no])
  415. if test $ac_cv_enable_crash_dialog = yes; then
  416. dnl check if GDB is somewhere
  417. AC_CHECK_PROG(ac_cv_enable_crash_dialog, gdb, yes, no)
  418. AC_MSG_CHECKING([whether to use crash dialog])
  419. if test $ac_cv_enable_crash_dialog = yes; then
  420. AC_DEFINE(CRASH_DIALOG, 1, Pop up crash dialog)
  421. fi
  422. AC_MSG_RESULT($ac_cv_enable_crash_dialog)
  423. fi
  424. dnl Maemo platform
  425. AC_ARG_ENABLE(maemo,
  426. [ --enable-maemo build for the Maemo platform [default=no]],
  427. [ac_cv_enable_maemo=$enableval], [ac_cv_enable_maemo=no])
  428. if test $ac_cv_enable_maemo = yes; then
  429. PKG_CHECK_MODULES(MAEMO, libosso hildon-libs hildon-fm gnome-vfs-2.0, ac_cv_enable_maemo=yes,
  430. ac_cv_enable_maemo=no)
  431. AC_SUBST(MAEMO_CFLAGS)
  432. AC_SUBST(MAEMO_LIBS)
  433. if test $ac_cv_enable_maemo = no; then
  434. #test for chinook
  435. PKG_CHECK_MODULES(MAEMO, libosso hildon-1 hildon-fm-2 gnome-vfs-2.0 hal, ac_cv_enable_maemo=yes,
  436. ac_cv_enable_maemo=no)
  437. AC_SUBST(MAEMO_CFLAGS)
  438. AC_SUBST(MAEMO_LIBS)
  439. if test $ac_cv_enable_maemo = no; then
  440. AC_MSG_ERROR(one of libosso hildon-libs hildon-fm hildon-1 hildon-fm-2 not found)
  441. else
  442. AC_DEFINE(MAEMO, 1, Build for maemo)
  443. AC_DEFINE(CHINOOK, 1, Maemo chinook)
  444. fi
  445. else
  446. AC_DEFINE(MAEMO, 1, Build for maemo)
  447. fi
  448. fi
  449. PKG_CHECK_MODULES(CONIC, conic, ac_cv_enable_conic=yes,
  450. ac_cv_enable_conic=no)
  451. AC_SUBST(CONIC_CFLAGS)
  452. AC_SUBST(CONIC_LIBS)
  453. if test $ac_cv_enable_conic = yes; then
  454. AC_DEFINE(CONIC, 1, Have conic lib)
  455. fi
  456. dnl Check for X-Face support
  457. AC_ARG_ENABLE(compface,
  458. [ --disable-compface disable compface (X-Face) support],
  459. [ac_cv_enable_compface=$enableval], [ac_cv_enable_compface=yes])
  460. AC_MSG_CHECKING([whether to use compface])
  461. if test x"$ac_cv_enable_compface" = xyes; then
  462. AC_MSG_RESULT(yes)
  463. AC_CHECK_LIB(compface, uncompface,
  464. [AC_DEFINE(HAVE_LIBCOMPFACE, 1, Define if you want compface support.)],
  465. [ac_cv_enable_compface=no])
  466. if test x"$ac_cv_enable_compface" = xyes; then
  467. COMPFACE_LIBS="-lcompface"
  468. else
  469. COMPFACE_LIBS=""
  470. fi
  471. AC_SUBST(COMPFACE_LIBS)
  472. else
  473. AC_MSG_RESULT(no)
  474. fi
  475. dnl check for pthread support
  476. AC_ARG_ENABLE(pthread,
  477. [ --disable-pthread disable pthread support],
  478. [ac_cv_enable_pthread=$enableval], [ac_cv_enable_pthread=yes])
  479. AC_MSG_CHECKING([whether to use pthread])
  480. if test x$ac_cv_enable_pthread = xno; then
  481. AC_MSG_RESULT(no)
  482. else
  483. AC_MSG_RESULT(yes)
  484. # For W32 we need to use a special ptrhead lib. In this case we can't
  485. # use AC_CHECK_LIB because it has no means of checking for a
  486. # library installed under a different name. Checking for the
  487. # header is okay.
  488. if test -n "${pthread_name}" ; then
  489. ac_cv_enable_pthread=yes
  490. else
  491. AC_CHECK_LIB(pthread, pthread_create, :, ac_cv_enable_pthread=no)
  492. fi
  493. AC_CHECK_HEADERS(pthread.h, :, ac_cv_enable_pthread=no)
  494. if test x$ac_cv_enable_pthread = xyes; then
  495. AC_DEFINE(USE_PTHREAD, 1, Define if you have pthread)
  496. if test -z "${pthread_name}" ; then
  497. PTHREAD_LIBS="-lpthread"
  498. fi
  499. fi
  500. fi
  501. AC_SUBST(PTHREAD_LIBS)
  502. dnl
  503. dnl Check whether we need to pass -lresolv
  504. dnl We know that we don't need it for W32.
  505. dnl
  506. if test x$os_win32 = xno; then
  507. t_oldLibs="$LIBS"
  508. LIBS="$LIBS"
  509. ac_cv_var__res_options=no
  510. AC_TRY_LINK([#include <sys/types.h>
  511. #include <sys/socket.h>
  512. #include <netinet/in.h>
  513. #include <arpa/nameser.h>
  514. #include <resolv.h>],
  515. [_res.options = RES_INIT;],
  516. ac_cv_var__res_options=yes);
  517. if test "$ac_cv_var__res_options" != "yes"; then
  518. LIBRESOLV="-lresolv"
  519. fi
  520. LIBS="$t_oldLibs"
  521. if test "x$LIBRESOLV" = "x"; then
  522. AC_CHECK_LIB(resolv, res_query, [LIBRESOLV=-lresolv])
  523. LIBS="$t_oldLibs"
  524. fi
  525. fi
  526. AC_SUBST(LIBRESOLV)
  527. LIBS="$LIBS $LIBRESOLV"
  528. dnl for LDAP support in addressbook
  529. dnl no check for libraries; dynamically loaded
  530. AC_ARG_ENABLE(ldap,
  531. [ --disable-ldap disable LDAP support],
  532. [ac_cv_enable_ldap=$enableval], [ac_cv_enable_ldap=yes])
  533. AC_MSG_CHECKING([whether to use LDAP])
  534. if test x"$ac_cv_enable_ldap" = xno; then
  535. AC_MSG_RESULT(no)
  536. elif test x"$ac_cv_enable_ldap" = xyes -a x"$ac_cv_enable_pthread" = xno; then
  537. AC_MSG_RESULT(no - LDAP support needs pthread support)
  538. ac_cv_enable_ldap=no
  539. else
  540. AC_MSG_RESULT(yes)
  541. dnl check for available libraries, and pull them in
  542. AC_CHECK_LIB(resolv, res_query, LDAP_LIBS="$LDAP_LIBS -lresolv")
  543. AC_CHECK_LIB(socket, bind, LDAP_LIBS="$LDAP_LIBS -lsocket")
  544. AC_CHECK_LIB(nsl, gethostbyaddr, LDAP_LIBS="$LDAP_LIBS -lnsl")
  545. AC_CHECK_LIB(lber, ber_get_tag, LDAP_LIBS="$LDAP_LIBS -llber",,
  546. $LDAP_LIBS)
  547. AC_CHECK_HEADERS(ldap.h lber.h,
  548. [ ac_cv_enable_ldap=yes ],
  549. [ ac_cv_enable_ldap=no ])
  550. if test "$ac_cv_enable_ldap" = yes; then
  551. AC_CHECK_LIB(ldap, ldap_open,
  552. [ ac_cv_enable_ldap=yes ],
  553. [ ac_cv_enable_ldap=no ],
  554. $LDAP_LIBS)
  555. AC_CHECK_LIB(ldap, ldap_start_tls_s,
  556. [ ac_cv_have_tls=yes ],
  557. [ ac_cv_have_tls=no ])
  558. fi
  559. AC_MSG_CHECKING([whether ldap library is available])
  560. AC_MSG_RESULT($ac_cv_enable_ldap)
  561. AC_MSG_CHECKING([whether TLS library is available])
  562. AC_MSG_RESULT($ac_cv_have_tls)
  563. if test "$ac_cv_enable_ldap" = yes; then
  564. AC_DEFINE(USE_LDAP, 1, Define if you want LDAP support in addressbook.)
  565. LDAP_LIBS="$LDAP_LIBS -lldap"
  566. AC_SUBST(LDAP_LIBS)
  567. if test "$ac_cv_have_tls" = yes; then
  568. AC_DEFINE(USE_LDAP_TLS, 1, Define if you want LDAP TLS support in addressbook.)
  569. fi
  570. fi
  571. fi
  572. dnl for JPilot support in addressbook
  573. dnl no check for libraries; these are dynamically loaded
  574. AC_ARG_ENABLE(jpilot,
  575. [ --disable-jpilot disable JPilot support],
  576. [ac_cv_enable_jpilot=$enableval], [ac_cv_enable_jpilot=yes])
  577. AC_MSG_CHECKING([whether to use JPilot])
  578. if test "$ac_cv_enable_jpilot" = yes; then
  579. AC_MSG_RESULT(yes)
  580. AC_CHECK_HEADERS(pi-args.h pi-appinfo.h pi-address.h pi-version.h,
  581. [ AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.) ],
  582. [ ac_cv_enable_jpilot=no ])
  583. if test "$ac_cv_enable_jpilot" = no; then
  584. AC_CHECK_HEADERS(libpisock/pi-args.h libpisock/pi-appinfo.h libpisock/pi-address.h libpisock/pi-version.h,
  585. [ ac_cv_enable_jpilot=yes
  586. AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.) ])
  587. fi
  588. AC_CHECK_LIB(pisock, unpack_Address, [JPILOT_LIBS="-lpisock"], [JPILOT_LIBS="" ac_cv_enable_jpilot="no"])
  589. if test x"$ac_cv_enable_jpilot" = xyes; then
  590. AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.)
  591. else
  592. AC_MSG_NOTICE([JPilot support not available])
  593. fi
  594. AC_SUBST(JPILOT_LIBS)
  595. else
  596. AC_MSG_RESULT(no)
  597. fi
  598. dnl #######################################################################
  599. dnl # Check for startup notification
  600. dnl #######################################################################
  601. AC_ARG_ENABLE(startup-notification, [ --disable-startup-notification disable startup notification support],,enable_startup_notification=yes)
  602. if test "x$enable_startup_notification" = "xyes"; then
  603. PKG_CHECK_MODULES(STARTUP_NOTIFICATION, libstartup-notification-1.0 >= 0.5,
  604. [
  605. AC_DEFINE(HAVE_STARTUP_NOTIFICATION, 1, [Define if we're using libstartup-notification.])
  606. echo "Building with libstartup-notification"
  607. enable_startup_notification=yes
  608. ],
  609. [
  610. echo "Building without libstartup-notification"
  611. enable_startup_notification=no
  612. ])
  613. AC_SUBST(STARTUP_NOTIFICATION_CFLAGS)
  614. AC_SUBST(STARTUP_NOTIFICATION_LIBS)
  615. fi
  616. dnl #######################################################################
  617. dnl # Check for D-Bus support
  618. dnl #######################################################################
  619. PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.60, dbus-glib-1 >= 0.60],
  620. [
  621. AC_DEFINE(HAVE_DBUS_GLIB, 1, [Define if glib bindings of D-Bus are available])
  622. enable_dbus_glib=yes
  623. ],
  624. [
  625. echo "D-Bus requirements not met. D-Bus support not activated."
  626. enable_dbus_glib=no
  627. ])
  628. AC_SUBST(DBUS_CFLAGS)
  629. AC_SUBST(DBUS_LIBS)
  630. dnl #######################################################################
  631. dnl # Check for NetworkManager support
  632. dnl #######################################################################
  633. if test x"$enable_dbus_glib" = xyes; then
  634. AC_ARG_ENABLE(networkmanager-support, [ --disable-networkmanager-support disable NetworkManager support],,enable_networkmanager_support=yes)
  635. if test x"$enable_networkmanager_support" = xyes; then
  636. PKG_CHECK_MODULES(NETWORKMANAGER_SUPPORT, NetworkManager >= 0.6.2,
  637. [
  638. AC_DEFINE(HAVE_NETWORKMANAGER_SUPPORT, 1, [Define if NetworkManager support is to be included.])
  639. echo "Building with NetworkManager support"
  640. enable_networkmanager_support=yes
  641. ],
  642. [
  643. echo "NetworkManager not found."
  644. enable_networkmanager_support=no
  645. ])
  646. AC_SUBST(NETWORKMANAGER_SUPPORT_CFLAGS)
  647. fi
  648. else
  649. echo "NetworkManager support deactivated as D-Bus requirements were not met."
  650. enable_networkmanager_support=no
  651. fi
  652. dnl *************************
  653. dnl ** section for plugins **
  654. dnl *************************
  655. PLUGINS=""
  656. dnl --- Trayicon ---
  657. AC_MSG_CHECKING([whether to build Trayicon plugin])
  658. AC_ARG_ENABLE(trayicon-plugin,
  659. [ --disable-trayicon-plugin do not build System Tray Icon plugin],
  660. [ac_cv_enable_trayicon_plugin=$enableval], [ac_cv_enable_trayicon_plugin=yes])
  661. if test x"$ac_cv_enable_trayicon_plugin" = xyes; then
  662. AC_MSG_RESULT(yes)
  663. PLUGINS="trayicon $PLUGINS"
  664. else
  665. AC_MSG_RESULT(no)
  666. fi
  667. AM_CONDITIONAL(BUILD_TRAYICON_PLUGIN, test x"$ac_cv_enable_trayicon_plugin" = xyes)
  668. dnl --- SpamAssassin ---
  669. AC_MSG_CHECKING([whether to build SpamAssassin plugin])
  670. AC_ARG_ENABLE(spamassassin-plugin,
  671. [ --disable-spamassassin-plugin do not build SpamAssassin plugin],
  672. [ac_cv_enable_spamassassin_plugin=$enableval], [ac_cv_enable_spamassassin_plugin=yes])
  673. if test x"$ac_cv_enable_spamassassin_plugin" = xyes; then
  674. AC_MSG_RESULT(yes)
  675. AC_SPAMASSASSIN
  676. PLUGINS="spamassassin $PLUGINS"
  677. AC_DEFINE(USE_SPAMASSASSIN_PLUGIN, 1, Define if spamassassin plugin is being built.)
  678. else
  679. AC_MSG_RESULT(no)
  680. fi
  681. AM_CONDITIONAL(BUILD_SPAMASSASSIN_PLUGIN, test x"$ac_cv_enable_spamassassin_plugin" = xyes)
  682. dnl --- Bogofilter ---
  683. AC_MSG_CHECKING([whether to build Bogofilter plugin])
  684. AC_ARG_ENABLE(bogofilter-plugin,
  685. [ --disable-bogofilter-plugin do not build bogofilter plugin],
  686. [ac_cv_enable_bogofilter_plugin=$enableval], [ac_cv_enable_bogofilter_plugin=yes])
  687. if test x"$ac_cv_enable_bogofilter_plugin" = xyes; then
  688. AC_MSG_RESULT(yes)
  689. PLUGINS="bogofilter $PLUGINS"
  690. AC_DEFINE(USE_BOGOFILTER_PLUGIN, 1, Define if bogofilter plugin is being built.)
  691. else
  692. AC_MSG_RESULT(no)
  693. fi
  694. AM_CONDITIONAL(BUILD_BOGOFILTER_PLUGIN, test x"$ac_cv_enable_bogofilter_plugin" = xyes)
  695. dnl --- PGP/CORE ---
  696. AC_MSG_CHECKING([whether to build PGP/CORE plugin])
  697. AC_ARG_ENABLE(pgpcore-plugin,
  698. [ --disable-pgpcore-plugin do not build PGP/Core plugin],
  699. [ac_cv_enable_pgpcore_plugin=$enableval], [ac_cv_enable_pgpcore_plugin=yes])
  700. if test x"$ac_cv_enable_pgpcore_plugin" = xyes; then
  701. AC_MSG_RESULT(yes)
  702. AM_PATH_GPGME(1.0.0, AC_DEFINE(USE_GPGME, 1, Define if you use GPGME to support OpenPGP.),
  703. [ac_cv_enable_pgpcore_plugin=no])
  704. if test x"$ac_cv_enable_pgpcore_plugin" = xyes; then
  705. PLUGINS="pgpcore $PLUGINS"
  706. AM_PATH_GPGME(1.1.1,
  707. AC_DEFINE(HAVE_GPGME_PKA_TRUST, 1,
  708. [Define if GPGME supports PKA.]))
  709. #needed to get GPGME_LIBS and al correctly
  710. AM_PATH_GPGME(1.0.0, AC_DEFINE(USE_GPGME, 1, Define if you use GPGME to support OpenPGP.),
  711. [ac_cv_enable_pgpcore_plugin=no])
  712. else
  713. AC_MSG_WARN([*** PGP/CORE plugin will not be built ***])
  714. fi
  715. else
  716. AC_MSG_RESULT(no)
  717. fi
  718. AM_CONDITIONAL(BUILD_PGPCORE_PLUGIN, test x"$ac_cv_enable_pgpcore_plugin" = xyes)
  719. AC_MSG_CHECKING([whether to build PGP/MIME plugin])
  720. AC_ARG_ENABLE(pgpmime-plugin,
  721. [ --disable-pgpmime-plugin do not build PGP/MIME plugin],
  722. [ac_cv_enable_pgpmime_plugin=$enableval], [ac_cv_enable_pgpmime_plugin=yes])
  723. if test x"$ac_cv_enable_pgpmime_plugin" = xyes; then
  724. AC_MSG_RESULT(yes)
  725. if test x"$ac_cv_enable_pgpcore_plugin" = xyes; then
  726. PLUGINS="pgpmime $PLUGINS"
  727. else
  728. AC_MSG_WARN([*** PGP/MIME plugin cannot be built ***])
  729. AC_MSG_WARN([*** without the PGP/CORE plugin ***])
  730. fi
  731. else
  732. AC_MSG_RESULT(no)
  733. fi
  734. AM_CONDITIONAL(BUILD_PGPMIME_PLUGIN, test x"$ac_cv_enable_pgpmime_plugin" = xyes)
  735. AC_MSG_CHECKING([whether to build PGP/Inline plugin])
  736. AC_ARG_ENABLE(pgpinline-plugin,
  737. [ --disable-pgpinline-plugin do not build PGP/Inline plugin],
  738. [ac_cv_enable_pgpinline_plugin=$enableval], [ac_cv_enable_pgpinline_plugin=yes])
  739. if test x"$ac_cv_enable_pgpinline_plugin" = xyes; then
  740. AC_MSG_RESULT(yes)
  741. if test x"$ac_cv_enable_pgpcore_plugin" = xyes; then
  742. PLUGINS="pgpinline $PLUGINS"
  743. else
  744. AC_MSG_WARN([*** PGP/Inline plugin cannot be built ***])
  745. AC_MSG_WARN([*** without the PGP/CORE plugin ***])
  746. fi
  747. else
  748. AC_MSG_RESULT(no)
  749. fi
  750. AM_CONDITIONAL(BUILD_PGPINLINE_PLUGIN, test x"$ac_cv_enable_pgpinline_plugin" = xyes)
  751. dnl --- Dillo Viewer ---
  752. AC_MSG_CHECKING([whether to build Dillo plugin])
  753. AC_ARG_ENABLE(dillo-viewer-plugin,
  754. [ --disable-dillo-viewer-plugin do not build Dillo plugin for html mail rendering],
  755. [ac_cv_enable_dillo_viewer_plugin=$enableval], [ac_cv_enable_dillo_viewer_plugin=yes])
  756. if test x"$ac_cv_enable_dillo_viewer_plugin" = xyes; then
  757. AC_MSG_RESULT(yes)
  758. PLUGINS="dillo-viewer $PLUGINS"
  759. else
  760. AC_MSG_RESULT(no)
  761. fi
  762. AM_CONDITIONAL(BUILD_DILLO_VIEWER_PLUGIN, test x"$ac_cv_enable_dillo_viewer_plugin" = xyes)
  763. dnl --- Demo ---
  764. AC_ARG_ENABLE(demo-plugin,
  765. [ --enable-demo-plugin build demo plugin],
  766. [ac_cv_enable_demo_plugin=$enableval], [ac_cv_enable_demo_plugin=no])
  767. if test x"$ac_cv_enable_demo_plugin" = xyes; then
  768. PLUGINS="demo $PLUGINS"
  769. fi
  770. AM_CONDITIONAL(BUILD_DEMO_PLUGIN, test x"$ac_cv_enable_demo_plugin" = xyes)
  771. dnl Libetpan
  772. AC_MSG_CHECKING([whether to use libetpan])
  773. AC_ARG_ENABLE(libetpan,
  774. [ --disable-libetpan disable IMAP4/NNTP (libetpan) support],
  775. [ac_cv_enable_libetpan=$enableval], [ac_cv_enable_libetpan=yes])
  776. if test x"$ac_cv_enable_libetpan" = xyes; then
  777. AC_MSG_RESULT(yes)
  778. libetpan_result=no
  779. AC_PATH_PROG(libetpanconfig, [libetpan-config])
  780. if test "x$libetpanconfig" != "x"; then
  781. CPPFLAGS="$CPPFLAGS `$libetpanconfig --cflags 2>/dev/null`"
  782. AC_CHECK_HEADER(libetpan/libetpan.h, [libetpan_result=yes])
  783. if test "x$libetpan_result" = "xyes"; then
  784. AC_MSG_CHECKING([whether libetpan-config hints compiles and links fine])
  785. LIBS="$LIBS `$libetpanconfig --libs 2>/dev/null`"
  786. AC_TRY_LINK([#include <libetpan/dbstorage.h>], [db_mailstorage_init(NULL, NULL);], [libetpan_result=yes], [libetpan_result=no])
  787. AC_MSG_RESULT([$libetpan_result])
  788. fi
  789. fi
  790. if test "x$libetpan_result" = "xyes"; then
  791. LIBETPAN_CPPFLAGS="`$libetpanconfig --cflags`"
  792. LIBETPAN_LIBS="`$libetpanconfig --libs`"
  793. LIBETPAN_VERSION=`$libetpanconfig --version | sed "s/\.//g" | sed "s/-.*$//"`
  794. if test "$LIBETPAN_VERSION" -lt "049"; then
  795. AC_MSG_RESULT([*** Claws Mail requires libetpan 0.49 or newer. See http://www.etpan.org/])
  796. AC_MSG_RESULT([*** You can use --disable-libetpan if you don't need IMAP4 and/or NNTP support.])
  797. AC_MSG_ERROR([libetpan 0.49 not found])
  798. fi
  799. AC_SUBST(LIBETPAN_FLAGS)
  800. AC_SUBST(LIBETPAN_LIBS)
  801. AC_DEFINE(HAVE_LIBETPAN, 1, Define if you want IMAP and/or NNTP support.)
  802. else
  803. AC_MSG_RESULT([*** Claws Mail requires libetpan 0.49 or newer. See http://www.etpan.org/ ])
  804. AC_MSG_RESULT([*** You can use --disable-libetpan if you don't need IMAP4 and/or NNTP support.])
  805. AC_MSG_ERROR([libetpan 0.49 not found])
  806. fi
  807. else
  808. AC_MSG_RESULT(no)
  809. fi
  810. AM_CONDITIONAL(CLAWS_LIBETPAN, test "x$libetpan_result" = "xyes")
  811. dnl Printing support.
  812. PKG_CHECK_MODULES(GTK210, gtk+-2.0 >= 2.10, ac_cv_have_gtk210=yes, ac_cv_have_gtk210=no)
  813. AC_MSG_CHECKING([whether to use libgnomeprint])
  814. AC_ARG_ENABLE(gnomeprint,
  815. [ --disable-gnomeprint disable libgnomeprint support],
  816. [ac_cv_enable_gnomeprint=$enableval], [ac_cv_enable_gnomeprint=auto])
  817. if test x$ac_cv_have_gtk210 = xyes; then
  818. ac_cv_enable_gnomeprint="no"
  819. fi
  820. if test x$ac_cv_enable_gnomeprint = xyes \
  821. -o \( x$ac_cv_enable_gnomeprint = xauto \
  822. -a x$ac_cv_have_gtk210 = xno \); then
  823. AC_MSG_RESULT(yes)
  824. PKG_CHECK_MODULES(GNOMEPRINT, libgnomeprint-2.2 libgnomeprintui-2.2,
  825. ac_cv_enable_gnomeprint=yes, ac_cv_enable_gnomeprint=no)
  826. if test x"$ac_cv_enable_gnomeprint" = xyes; then
  827. AC_DEFINE(USE_GNOMEPRINT, 1, Define if you want libgnomeprint support)
  828. else
  829. AC_MSG_RESULT(not found)
  830. AC_MSG_WARN([*** libgnomeprintui wasn't found ***])
  831. AC_MSG_WARN([*** using built-in printing support ***])
  832. fi
  833. else
  834. ac_cv_enable_gnomeprint=no
  835. AC_MSG_RESULT(no)
  836. fi
  837. AM_CONDITIONAL(CLAWS_GNOMEPRINT, test x"$ac_cv_enable_gnomeprint" = x"yes")
  838. AC_MSG_CHECKING([whether to use valgrind])
  839. AC_ARG_ENABLE(valgrind,
  840. [ --disable-valgrind disable valgrind support for debugging],
  841. [ac_cv_enable_valgrind=$enableval], [ac_cv_enable_valgrind=yes])
  842. if test x$ac_cv_enable_valgrind = xyes; then
  843. AC_MSG_RESULT(yes)
  844. PKG_CHECK_MODULES(VALGRIND, valgrind >= 2.4.0,
  845. ac_cv_enable_valgrind=yes, ac_cv_enable_valgrind=no)
  846. if test x"$ac_cv_enable_valgrind" = xyes; then
  847. AC_DEFINE(HAVE_VALGRIND, 1, Define if you want valgrind support)
  848. else
  849. AC_MSG_RESULT(not found)
  850. fi
  851. else
  852. AC_MSG_RESULT(no)
  853. fi
  854. AM_CONDITIONAL(CLAWS_VALGRIND, test x"$ac_cv_enable_valgrind" = x"yes")
  855. dnl ****************************
  856. dnl ** Final configure output **
  857. dnl ****************************
  858. AC_OUTPUT([
  859. Makefile
  860. m4/Makefile
  861. po/Makefile.in
  862. src/common/version.h
  863. src/Makefile
  864. src/common/Makefile
  865. src/common/passcrypt.h
  866. src/gtk/Makefile
  867. src/etpan/Makefile
  868. src/plugins/Makefile
  869. src/plugins/demo/Makefile
  870. src/plugins/bogofilter/Makefile
  871. src/plugins/spamassassin/Makefile
  872. src/plugins/dillo_viewer/Makefile
  873. src/plugins/trayicon/Makefile
  874. src/plugins/trayicon/libeggtrayicon/Makefile
  875. src/plugins/pgpcore/Makefile
  876. src/plugins/pgpmime/Makefile
  877. src/plugins/pgpinline/Makefile
  878. doc/Makefile
  879. doc/man/Makefile
  880. tools/Makefile
  881. config/Makefile
  882. manual/Makefile
  883. manual/dtd/Makefile
  884. manual/dist/Makefile
  885. manual/dist/pdf/Makefile
  886. manual/dist/ps/Makefile
  887. manual/dist/html/Makefile
  888. manual/dist/txt/Makefile
  889. manual/fr/Makefile
  890. manual/fr/dist/Makefile
  891. manual/fr/dist/pdf/Makefile
  892. manual/fr/dist/ps/Makefile
  893. manual/fr/dist/html/Makefile
  894. manual/fr/dist/txt/Makefile
  895. manual/pl/Makefile
  896. manual/pl/dist/Makefile
  897. manual/pl/dist/pdf/Makefile
  898. manual/pl/dist/ps/Makefile
  899. manual/pl/dist/html/Makefile
  900. manual/pl/dist/txt/Makefile
  901. manual/es/Makefile
  902. manual/es/dist/Makefile
  903. manual/es/dist/pdf/Makefile
  904. manual/es/dist/ps/Makefile
  905. manual/es/dist/html/Makefile
  906. manual/es/dist/txt/Makefile
  907. claws-mail.pc
  908. ])
  909. dnl Output the configuration summary
  910. echo ""
  911. echo "$PACKAGE $VERSION"
  912. echo ""
  913. echo "JPilot : $ac_cv_enable_jpilot"
  914. echo "LDAP : $ac_cv_enable_ldap"
  915. echo "OpenSSL : $ac_cv_enable_openssl"
  916. echo "gnuTLS : $ac_cv_enable_gnutls"
  917. echo "iconv : $am_cv_func_iconv"
  918. echo "compface : $ac_cv_enable_compface"
  919. echo "IPv6 : $ac_cv_enable_ipv6"
  920. echo "GNU/aspell : $ac_cv_enable_aspell"
  921. echo "IMAP4 : $ac_cv_enable_libetpan"
  922. echo "NNTP : $ac_cv_enable_libetpan"
  923. echo "Crash dialog : $ac_cv_enable_crash_dialog"
  924. echo "Libgnomeprint : $ac_cv_enable_gnomeprint"
  925. echo "GTK+ print support: $ac_cv_have_gtk210"
  926. echo "LibSM : $ac_cv_enable_libsm"
  927. echo "NetworkManager : $enable_networkmanager_support"
  928. echo "Manual : $ac_cv_enable_manual"
  929. echo "Plugins : $PLUGINS"
  930. echo "Maemo build : $ac_cv_enable_maemo"
  931. echo "Config dir : $ac_cv_with_config_dir"
  932. echo ""
  933. echo "The binary will be installed in $prefix/bin"
  934. echo ""
  935. echo "Configure finished, type 'make' to build."