configure.ac 65 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039
  1. AC_PREREQ(2.59)
  2. AC_INIT(src/main.c)
  3. AC_CONFIG_AUX_DIR(config)
  4. AC_CONFIG_MACRO_DIR([m4])
  5. PACKAGE=claws-mail
  6. dnl version number
  7. INTERFACE_AGE=0
  8. BINARY_AGE=0
  9. EXTRA_RELEASE=
  10. EXTRA_GTK2_VERSION=
  11. if test \( -d .git \); then
  12. AC_CHECK_PROG([GIT], [git], [yes], [no], [$PATH])
  13. if test \( "$GIT" = "no" \); then
  14. AC_MSG_ERROR([*** git not found. See http://git-scm.com/])
  15. else
  16. GIT_VERSION=`git describe --abbrev=6 --dirty --always`
  17. echo "echo ${GIT_VERSION}" > ./version
  18. fi
  19. else
  20. GIT_VERSION=`sh -c ". ./$srcdir/version"`
  21. fi
  22. MAJOR_VERSION=${GIT_VERSION%%.*}
  23. MINOR_VERSION=${GIT_VERSION#*.}
  24. MINOR_VERSION=${MINOR_VERSION%%.*}
  25. MICRO_VERSION=${GIT_VERSION##*.}
  26. MICRO_VERSION=${MICRO_VERSION%%-*}
  27. EXTRA_VERSION=${GIT_VERSION#*-}
  28. EXTRA_VERSION=${EXTRA_VERSION%%-*}
  29. if test \( "x$EXTRA_VERSION" != "x" -a `echo -n $EXTRA_VERSION | wc -c` -lt 5 \); then
  30. VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}git${EXTRA_VERSION}
  31. else
  32. VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}
  33. EXTRA_VERSION=0
  34. fi
  35. if test \( "x$EXTRA_RELEASE" != "x" \); then
  36. VERSION=${VERSION}${EXTRA_RELEASE}${EXTRA_GTK2_VERSION}
  37. fi
  38. dnl set $target
  39. AC_CANONICAL_SYSTEM
  40. dnl
  41. AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
  42. dnl AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
  43. dnl AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
  44. AC_SUBST(PACKAGE)
  45. AC_SUBST(VERSION)
  46. AC_SUBST(MAJOR_VERSION)
  47. AC_SUBST(MINOR_VERSION)
  48. AC_SUBST(MICRO_VERSION)
  49. AC_SUBST(EXTRA_VERSION)
  50. AC_SUBST(GIT_VERSION)
  51. AC_CHECK_PROG(HAVE_GTK_ICON_CACHE, gtk-update-icon-cache, yes, no)
  52. AM_CONDITIONAL(UPDATE_GTK_ICON_CACHE, test x"$HAVE_GTK_ICON_CACHE" = xyes)
  53. AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
  54. if test x$PKG_CONFIG = xno ; then
  55. AC_MSG_ERROR([*** pkg-config not found. See http://www.freedesktop.org/software/pkgconfig/])
  56. fi
  57. dnl GNOME 2.x installed?
  58. PKG_CHECK_MODULES(GNOME2, libgnome-2.0 >= 2.0, ac_enable_gnome2=yes, ac_enable_gnome2=no)
  59. AM_CONDITIONAL(CLAWS_GNOME2, test x"$ac_enable_gnome2" = x"yes")
  60. dnl libtool versioning
  61. LT_RELEASE=$MAJOR_VERSION.$MINOR_VERSION
  62. LT_CURRENT=`expr $MICRO_VERSION - $INTERFACE_AGE`
  63. LT_REVISION=$INTERFACE_AGE
  64. LT_AGE=`expr $BINARY_AGE - $INTERFACE_AGE`
  65. AC_SUBST(LT_RELEASE)
  66. AC_SUBST(LT_CURRENT)
  67. AC_SUBST(LT_REVISION)
  68. AC_SUBST(LT_AGE)
  69. dnl Specify a header configuration file
  70. AC_CONFIG_HEADERS(config.h)
  71. AC_CONFIG_HEADERS(claws-features.h)
  72. AM_MAINTAINER_MODE
  73. dnl Checks for programs.
  74. dnl AC_ARG_PROGRAM
  75. AC_PROG_CC
  76. AC_ISC_POSIX
  77. AC_PROG_INSTALL
  78. AC_PROG_LN_S
  79. AC_PROG_MAKE_SET
  80. AC_PROG_CPP
  81. dnl AC_PROG_RANLIB
  82. AM_PROG_LEX
  83. AC_PROG_YACC
  84. AC_LIB_PREFIX
  85. AC_LIBTOOL_WIN32_DLL
  86. LT_INIT
  87. LT_AC_PROG_RC
  88. AC_LIBTOOL_RC
  89. AC_PROG_LIBTOOL
  90. AC_SYS_LARGEFILE
  91. dnl ******************************
  92. dnl Checks for host
  93. dnl Not needed anymore because we
  94. dnl do AC_CANONICAL_SYSTEM above
  95. dnl ******************************
  96. dnl AC_CANONICAL_HOST
  97. dnl Copied from the official gtk+-2 configure.in
  98. AC_MSG_CHECKING([for some Win32 platform])
  99. case "$host" in
  100. *-*-mingw*|*-*-cygwin*)
  101. platform_win32=yes
  102. LDFLAGS="$LDFLAGS -mwindows"
  103. ;;
  104. *)
  105. platform_win32=no
  106. ;;
  107. esac
  108. AC_MSG_RESULT([$platform_win32])
  109. AM_CONDITIONAL(PLATFORM_WIN32, test x"$platform_win32" = x"yes")
  110. AC_MSG_CHECKING([for native Win32])
  111. case "$host" in
  112. *-*-mingw*)
  113. os_win32=yes
  114. ;;
  115. *)
  116. os_win32=no
  117. ;;
  118. esac
  119. AC_MSG_RESULT([$os_win32])
  120. AM_CONDITIONAL(OS_WIN32, test x"$os_win32" = x"yes")
  121. AC_MSG_CHECKING([for Cygwin])
  122. case "$host" in
  123. *-*-cygwin*)
  124. env_cygwin=yes
  125. ;;
  126. *)
  127. env_cygwin=no
  128. ;;
  129. esac
  130. AC_MSG_RESULT([$env_cygwin])
  131. AM_CONDITIONAL(CYGWIN, test x"$env_cygwin" = x"yes")
  132. if test "$GCC" = "yes"
  133. then
  134. CFLAGS="$CFLAGS -Wno-unused-function"
  135. #CFLAGS="-g -Wall -Wno-unused-function"
  136. fi
  137. AC_MSG_CHECKING([if gcc supports -Wno-pointer-sign])
  138. _gcc_cflags_save=$CFLAGS
  139. CFLAGS="-Wno-pointer-sign"
  140. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],_gcc_psign=yes,_gcc_psign=no)
  141. AC_MSG_RESULT($_gcc_psign)
  142. CFLAGS=$_gcc_cflags_save;
  143. if test x"$_gcc_psign" = xyes ; then
  144. CFLAGS="$CFLAGS -Wno-pointer-sign"
  145. fi
  146. CFLAGS="$CFLAGS -Wall"
  147. if test $USE_MAINTAINER_MODE = yes; then
  148. CFLAGS="-g -Wall -Wno-pointer-sign -DUSE_MAINTAINER_MODE"
  149. fi
  150. pthread_name=
  151. case "$target" in
  152. *-darwin*)
  153. CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
  154. ;;
  155. *-*-mingw*)
  156. # Note that we need to link to pthreadGC2 in all cases. This
  157. # is because some locking is used even when pthread support is
  158. # disabled.
  159. pthread_name=pthreadGC2
  160. CFLAGS="$CFLAGS -mms-bitfields"
  161. LIBS="$LIBS -l${pthread_name} -lws2_32 -lregex"
  162. ;;
  163. *-*-solaris*)
  164. CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
  165. CFLAGS="$CFLAGS -std=gnu99 -DSOLARIS"
  166. ;;
  167. esac
  168. dnl Checks for iconv
  169. AM_ICONV
  170. dnl floor and ceil are in -lm
  171. LIBS="$LIBS -lm"
  172. dnl
  173. dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
  174. dnl
  175. syl_save_LIBS=$LIBS
  176. LIBS="$LIBS $GTK_LIBS"
  177. AC_CHECK_FUNCS(bind_textdomain_codeset)
  178. LIBS=$syl_save_LIBS
  179. dnl for gettext
  180. ALL_LINGUAS="bg ca cs de en_GB es fi fr he hu id_ID it ja lt nl pl pt_BR pt_PT ru sk sv uk zh_CN zh_TW"
  181. GETTEXT_PACKAGE=claws-mail
  182. AC_SUBST(GETTEXT_PACKAGE)
  183. AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define text domain.])
  184. AM_GNU_GETTEXT_VERSION([0.15])
  185. AM_GNU_GETTEXT([external])
  186. AC_ARG_ENABLE(manual,
  187. [ --disable-manual Do not build user manual],
  188. [enable_manual=$enableval], [enable_manual=yes])
  189. AC_ARG_ENABLE(libsm,
  190. [ --disable-libsm Do not build libSM support for session management],
  191. [enable_libsm=$enableval], [enable_libsm=yes])
  192. AC_ARG_ENABLE(ipv6,
  193. [ --disable-ipv6 Do not build IPv6 support],
  194. [enable_ipv6=$enableval], [enable_ipv6=yes])
  195. AC_ARG_ENABLE(gnutls,
  196. [ --disable-gnutls Do not build GnuTLS support for SSL/TLS],
  197. [enable_gnutls=$enableval], [enable_gnutls=yes])
  198. AC_ARG_ENABLE(enchant,
  199. [ --disable-enchant Do not build Enchant support for spell-checking],
  200. [enable_enchant=$enableval], [enable_enchant=yes])
  201. AC_ARG_ENABLE(crash-dialog,
  202. [ --enable-crash-dialog Build crash dialog],
  203. [enable_crash_dialog=$enableval], [enable_crash_dialog=no])
  204. AC_ARG_ENABLE(generic-umpc,
  205. [ --enable-generic-umpc Build generic UMPC code],
  206. [enable_generic_umpc=$enableval], [enable_generic_umpc=no])
  207. AC_ARG_ENABLE(maemo,
  208. [ --enable-maemo Build for the Maemo platform],
  209. [enable_maemo=$enableval], [enable_maemo=no])
  210. AC_ARG_ENABLE(compface,
  211. [ --disable-compface Do not build compface support for X-Face],
  212. [enable_compface=$enableval], [enable_compface=yes])
  213. AC_ARG_ENABLE(pthread,
  214. [ --disable-pthread Do not build pthread support],
  215. [enable_pthread=$enableval], [enable_pthread=yes])
  216. AC_ARG_ENABLE(startup-notification,
  217. [ --disable-startup-notification Do not startup notification support],
  218. [enable_startup_notification=$enableval], [enable_startup_notification=yes])
  219. AC_ARG_ENABLE(dbus,
  220. [ --disable-dbus Do not build DBUS support],
  221. [enable_dbus=$enableval], [enable_dbus=yes])
  222. AC_ARG_ENABLE(ldap,
  223. [ --disable-ldap Do not build LDAP support],
  224. [enable_ldap=$enableval], [enable_ldap=yes])
  225. AC_ARG_ENABLE(jpilot,
  226. [ --disable-jpilot Do not build JPilot support],
  227. [enable_jpilot=$enableval], [enable_jpilot=yes])
  228. AC_ARG_ENABLE(networkmanager,
  229. [ --disable-networkmanager Do not build NetworkManager support],
  230. [enable_networkmanager=$enableval], [enable_networkmanager=yes])
  231. AC_ARG_ENABLE(libetpan,
  232. [ --disable-libetpan Do not build libetpan support for IMAP4/NNTP],
  233. [enable_libetpan=$enableval], [enable_libetpan=yes])
  234. AC_ARG_ENABLE(valgrind,
  235. [ --disable-valgrind Do not build valgrind support for debugging],
  236. [enable_valgrind=$enableval], [enable_valgrind=yes])
  237. AC_ARG_ENABLE(new-addrbook,
  238. [ --enable-new-addrbook Build new external address book support],
  239. [enable_new_addrbook=$enableval], [enable_new_addrbook=no])
  240. AC_ARG_ENABLE(gtk3,
  241. [ --enable-gtk3 Build GTK3 support],
  242. [enable_gtk3=$enableval], [enable_gtk3=no])
  243. AC_ARG_ENABLE(deprecated,
  244. [ --disable-deprecated Disable deprecated GTK functions],
  245. [GTK_CFLAGS="$GTK_CFLAGS -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"], [])
  246. manualdir='${docdir}/manual'
  247. AC_ARG_WITH(manualdir,
  248. [ --with-manualdir=DIR Manual directory],
  249. [manualdir="$withval"])
  250. AC_SUBST(manualdir)
  251. dnl ******************************
  252. dnl ** Check for required tools **
  253. dnl ** to build manuals **
  254. dnl ******************************
  255. AC_PATH_PROG(DOCBOOK2HTML, docbook2html)
  256. AC_PATH_PROG(DOCBOOK2TXT, docbook2txt)
  257. AC_PATH_PROG(DOCBOOK2PS, docbook2ps)
  258. AC_PATH_PROG(DOCBOOK2PDF, docbook2pdf)
  259. AM_CONDITIONAL(MANUAL_HTML, test -n "$DOCBOOK2HTML")
  260. AM_CONDITIONAL(MANUAL_TXT, test -n "$DOCBOOK2TXT")
  261. AM_CONDITIONAL(MANUAL_PDF, test -n "$DOCBOOK2PDF")
  262. AM_CONDITIONAL(MANUAL_PS, test -n "$DOCBOOK2PS")
  263. if test x"$enable_manual" = x"yes"; then
  264. if test -n "$DOCBOOK2TXT" -o -n "$DOCBOOK2HTML" \
  265. -o -n "$DOCBOOK2PS" -o -n "$DOCBOOK2PDF"; then
  266. enable_manual=yes
  267. else
  268. enable_manual=no
  269. fi
  270. fi
  271. AM_CONDITIONAL(BUILD_MANUAL, test x"$enable_manual" = xyes)
  272. dnl Set PACKAGE_DATA_DIR in config.h.
  273. if test "x${datarootdir}" = 'x${prefix}/share'; then
  274. if test "x${prefix}" = "xNONE"; then
  275. AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}",[PACKAGE_DATA_DIR])
  276. else
  277. AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}",[PACKAGE_DATA_DIR])
  278. fi
  279. else
  280. AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datarootdir}/${PACKAGE}",[PACKAGE_DATA_DIR])
  281. fi
  282. AC_CHECK_LIB(xpg4, setlocale)
  283. SM_LIBS=""
  284. dnl Check for LibSM
  285. AC_MSG_CHECKING([whether to use LibSM])
  286. if test x"$enable_libsm" = xyes; then
  287. AC_MSG_RESULT(yes)
  288. AC_CHECK_LIB(SM, SmcSaveYourselfDone,
  289. [SM_LIBS="$X_LIBS -lSM -lICE"],enable_libsm=no,
  290. $X_LIBS -lICE)
  291. AC_CHECK_HEADERS(X11/SM/SMlib.h,,enable_libsm=no)
  292. if test x"$enable_libsm" = xyes; then
  293. AC_DEFINE(HAVE_LIBSM, 1, [Define to 1 if you have libSM installed])
  294. else
  295. AC_MSG_RESULT(not found)
  296. AC_MSG_WARN([*** LibSM will not be supported ***])
  297. fi
  298. else
  299. AC_MSG_RESULT(no)
  300. fi
  301. AC_SUBST(SM_LIBS)
  302. dnl Check for d_type member in struct dirent
  303. AC_MSG_CHECKING([whether struct dirent has d_type member])
  304. AC_CACHE_VAL(ac_cv_dirent_d_type,[
  305. AC_TRY_COMPILE([#include <dirent.h>],
  306. [struct dirent d; d.d_type = DT_REG;],
  307. ac_cv_dirent_d_type=yes, ac_cv_dirent_d_type=no)
  308. ])
  309. AC_MSG_RESULT($ac_cv_dirent_d_type)
  310. if test $ac_cv_dirent_d_type = yes; then
  311. AC_DEFINE(HAVE_DIRENT_D_TYPE, 1,
  312. Define if `struct dirent' has `d_type' member.)
  313. fi
  314. # Check whether mkdir does not take the permission argument.
  315. GNUPG_FUNC_MKDIR_TAKES_ONE_ARG
  316. dnl Checks for header files.
  317. AC_HEADER_DIRENT
  318. AC_HEADER_STDC
  319. AC_HEADER_SYS_WAIT
  320. AC_CHECK_HEADERS(fcntl.h sys/file.h unistd.h paths.h \
  321. sys/param.h sys/utsname.h sys/select.h \
  322. wchar.h wctype.h locale.h netdb.h)
  323. AC_CHECK_HEADER([execinfo.h], [AC_DEFINE(HAVE_BACKTRACE,1,[Has backtrace*() needed for retrieving stack traces])])
  324. AC_SEARCH_LIBS(backtrace_symbols, [execinfo])
  325. dnl alf - Check for apache installation f*ck up. apache may also install an
  326. dnl fnmatch, which includes their own regex stuff if USE_HSREGEX is defined
  327. AC_TRY_COMPILE([#include <stdlib.h>
  328. #include <fnmatch.h>],
  329. [int x = USE_HSREGEX;],
  330. ac_cv_have_apache_fnmatch=yes, ac_cv_have_apache_fnmatch=no)
  331. if test $ac_cv_have_apache_fnmatch = yes; then
  332. AC_DEFINE(HAVE_APACHE_FNMATCH, 1, Define if you need to work around apache regex/fnmatch !KLUDGE!)
  333. fi
  334. AC_MSG_CHECKING([whether to use Apache regex header kludge])
  335. AC_MSG_RESULT($ac_cv_have_apache_fnmatch)
  336. dnl Checks for typedefs, structures, and compiler characteristics.
  337. AC_C_CONST
  338. AC_TYPE_OFF_T
  339. AC_TYPE_PID_T
  340. AC_TYPE_SIZE_T
  341. AC_STRUCT_TM
  342. dnl AC_CHECK_TYPE(wint_t, unsigned int) does not work because wint_t
  343. dnl may be defined only in wchar.h (this happens with gcc-2.96).
  344. dnl So we need to use this extended macro.
  345. CLAWS_CHECK_TYPE(wint_t, unsigned int,
  346. [
  347. #if HAVE_WCHAR_H
  348. #include <wchar.h>
  349. #endif
  350. ], Define to `unsigned int' if <stddef.h> or <wchar.h> doesn't define.)
  351. GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF, Used to test for a u32 typedef)
  352. AC_CHECK_SIZEOF(unsigned short, 2)
  353. AC_CHECK_SIZEOF(unsigned int, 4)
  354. AC_CHECK_SIZEOF(unsigned long, 4)
  355. dnl Checks for library functions.
  356. AC_FUNC_ALLOCA
  357. AC_CHECK_FUNCS(gethostname mkdir mktime socket strstr strchr \
  358. uname flock lockf inet_aton inet_addr \
  359. fchmod mkstemp truncate getuid regcomp)
  360. AC_CHECK_FUNCS(fgets_unlocked fwrite_unlocked)
  361. dnl *****************
  362. dnl ** common code **
  363. dnl *****************
  364. dnl check for glib
  365. PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.6 gmodule-2.0 >= 2.6 gobject-2.0 >= 2.6 gthread-2.0 >= 2.6)
  366. GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0`
  367. AC_SUBST(GLIB_GENMARSHAL)
  368. AC_SUBST(GLIB_CFLAGS)
  369. AC_SUBST(GLIB_LIBS)
  370. dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
  371. syl_save_LIBS=$LIBS
  372. LIBS="$LIBS $GTK_LIBS"
  373. AC_CHECK_FUNCS(bind_textdomain_codeset)
  374. LIBS=$syl_save_LIBS
  375. dnl check for IPv6 option
  376. dnl automated checks for IPv6 support.
  377. AC_MSG_CHECKING([whether to use IPv6])
  378. if test x"$enable_ipv6" = xyes; then
  379. AC_MSG_RESULT(yes)
  380. AC_MSG_CHECKING([for IPv6 support])
  381. AC_CACHE_VAL(ac_cv_ipv6,[
  382. AC_TRY_COMPILE([#define INET6
  383. #include <sys/types.h>
  384. #include <netinet/in.h>],
  385. [int x = IPPROTO_IPV6; struct in6_addr a;],
  386. ac_cv_ipv6=yes, ac_cv_ipv6=no)
  387. ])
  388. AC_MSG_RESULT($ac_cv_ipv6)
  389. if test $ac_cv_ipv6 = yes; then
  390. AC_DEFINE(INET6, 1, Define if you want IPv6 support.)
  391. else
  392. AC_MSG_WARN(*** IPv6 will not be supported ***)
  393. enable_ipv6=no
  394. fi
  395. else
  396. AC_MSG_RESULT(no)
  397. fi
  398. dnl GNUTLS
  399. AC_MSG_CHECKING([whether to use GnuTLS])
  400. AC_MSG_RESULT($enable_gnutls)
  401. if test "x$enable_gnutls" != "xno"; then
  402. PKG_CHECK_MODULES(GNUTLS, gnutls >= 2.2,
  403. [
  404. AC_DEFINE(USE_GNUTLS, 1, gnutls)
  405. echo "Building with GnuTLS"
  406. ],
  407. [
  408. echo "Building without gnutls"
  409. ])
  410. PKG_CHECK_MODULES(GNUTLS, gnutls >= 2.11,
  411. [
  412. dnl No linking against libgcrypt needed
  413. ],
  414. [
  415. dnl linking against libgcrypt *is* needed
  416. GNUTLS_LIBS="$GNUTLS_LIBS -lgcrypt"
  417. ])
  418. AC_SUBST(GNUTLS_LIBS)
  419. AC_SUBST(GNUTLS_CFLAGS)
  420. fi
  421. dnl password encryption
  422. OLDLIBS=$LIBS
  423. LIBS=
  424. case $host_os in
  425. *dragonfly*)
  426. AC_SEARCH_LIBS(encrypt, cipher, [], AC_MSG_ERROR(['encrypt'-function not found.]))
  427. ;;
  428. *)
  429. AC_SEARCH_LIBS(encrypt, crypt, [], AC_MSG_ERROR(['encrypt'-function not found.]))
  430. ;;
  431. esac
  432. CRYPT_LIBS=$LIBS
  433. AC_SUBST(CRYPT_LIBS)
  434. LIBS=$OLDLIBS
  435. AC_ARG_WITH(passcrypt-key, [ --with-passcrypt-key=KEY Key used to encode passwords (8 byte string)],
  436. with_passcrypt_key="$withval", with_passcrypt_key="passkey0")
  437. AC_SUBST(PASSCRYPT_KEY, $with_passcrypt_key)
  438. dnl RC dir (will be default at a certain point in time)
  439. AC_ARG_WITH(config-dir, [ --with-config-dir=RCDIR Local configuration dir (default: .claws-mail)],
  440. ac_cv_with_config_dir="$withval", ac_cv_with_config_dir=".claws-mail")
  441. if test x"$ac_cv_with_config_dir" = x""; then
  442. ac_cv_with_config_dir=".claws-mail"
  443. fi
  444. AC_DEFINE_UNQUOTED(CFG_RC_DIR, "$ac_cv_with_config_dir", Configuration directory)
  445. dnl ************************
  446. dnl ** GTK user interface **
  447. dnl ************************
  448. dnl Checks for GTK
  449. AM_CONDITIONAL(GTK3, false)
  450. AM_CONDITIONAL(GTK2, true)
  451. if test x"$enable_gtk3" = x"yes"; then
  452. PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 3.0 cairo)
  453. AM_CONDITIONAL(GTK3, true)
  454. AM_CONDITIONAL(GTK2, false)
  455. else
  456. PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.16)
  457. fi
  458. AC_SUBST(GTK_CFLAGS)
  459. AC_SUBST(GTK_LIBS)
  460. dnl enchant is used for spell checking
  461. AC_MSG_CHECKING([whether to use enchant])
  462. AC_MSG_RESULT($enable_enchant)
  463. if test $enable_enchant = yes; then
  464. PKG_CHECK_MODULES(ENCHANT, enchant >= 1.0.0,
  465. [
  466. AC_DEFINE(USE_ENCHANT, 1, enchant)
  467. echo "Building with enchant"
  468. enable_enchant=yes
  469. CFLAGS="$CFLAGS `$PKG_CONFIG --cflags enchant`"
  470. ],
  471. [
  472. echo "Building without enchant-notification"
  473. enable_enchant=no
  474. ])
  475. AC_SUBST(ENCHANT_CFLAGS)
  476. AC_SUBST(ENCHANT_LIBS)
  477. fi
  478. dnl want crash dialog
  479. if test $enable_crash_dialog = yes; then
  480. dnl check if GDB is somewhere
  481. AC_CHECK_PROG(enable_crash_dialog, gdb, yes, no)
  482. AC_MSG_CHECKING([whether to use crash dialog])
  483. if test $enable_crash_dialog = yes; then
  484. AC_DEFINE(CRASH_DIALOG, 1, Pop up crash dialog)
  485. fi
  486. AC_MSG_RESULT($enable_crash_dialog)
  487. fi
  488. dnl generic umpc
  489. if test $enable_generic_umpc = yes; then
  490. AC_DEFINE(GENERIC_UMPC, 1, Generic UMPC code)
  491. AC_MSG_RESULT($enable_generic_umpc)
  492. fi
  493. dnl Maemo platform
  494. if test $enable_maemo = yes; then
  495. PKG_CHECK_MODULES(MAEMO, libosso hildon-libs hildon-fm gnome-vfs-2.0, enable_maemo=yes,
  496. enable_maemo=no)
  497. AC_SUBST(MAEMO_CFLAGS)
  498. AC_SUBST(MAEMO_LIBS)
  499. if test $enable_maemo = no; then
  500. #test for chinook
  501. PKG_CHECK_MODULES(MAEMO, libosso hildon-1 hildon-fm-2 gnome-vfs-2.0 hal, enable_maemo=yes,
  502. enable_maemo=no)
  503. AC_SUBST(MAEMO_CFLAGS)
  504. AC_SUBST(MAEMO_LIBS)
  505. if test $enable_maemo = no; then
  506. AC_MSG_ERROR(one of libosso hildon-libs hildon-fm hildon-1 hildon-fm-2 not found)
  507. else
  508. AC_DEFINE(MAEMO, 1, Build for maemo)
  509. AC_DEFINE(CHINOOK, 1, Maemo chinook)
  510. AC_DEFINE(GENERIC_UMPC, 1, Generic UMPC code)
  511. enable_generic_umpc=yes
  512. fi
  513. else
  514. AC_DEFINE(MAEMO, 1, Build for maemo)
  515. AC_DEFINE(GENERIC_UMPC, 1, Generic UMPC code)
  516. enable_generic_umpc=yes
  517. fi
  518. fi
  519. PKG_CHECK_MODULES(CONIC, conic, enable_conic=yes,
  520. enable_conic=no)
  521. AC_SUBST(CONIC_CFLAGS)
  522. AC_SUBST(CONIC_LIBS)
  523. if test $enable_conic = yes; then
  524. AC_DEFINE(CONIC, 1, Have conic lib)
  525. fi
  526. dnl Check for X-Face support
  527. AC_MSG_CHECKING([whether to use compface])
  528. if test x"$enable_compface" = xyes; then
  529. AC_MSG_RESULT(yes)
  530. AC_CHECK_LIB(compface, uncompface,
  531. [AC_DEFINE(HAVE_LIBCOMPFACE, 1, Define if you want compface support.)],
  532. [enable_compface=no])
  533. if test x"$enable_compface" = xyes; then
  534. COMPFACE_LIBS="-lcompface"
  535. else
  536. COMPFACE_LIBS=""
  537. fi
  538. AC_SUBST(COMPFACE_LIBS)
  539. else
  540. AC_MSG_RESULT(no)
  541. fi
  542. dnl check for pthread support
  543. AC_MSG_CHECKING([whether to use pthread])
  544. if test x$enable_pthread = xno; then
  545. AC_MSG_RESULT(no)
  546. else
  547. AC_MSG_RESULT(yes)
  548. # For W32 we need to use a special ptrhead lib. In this case we can't
  549. # use AC_CHECK_LIB because it has no means of checking for a
  550. # library installed under a different name. Checking for the
  551. # header is okay.
  552. if test -n "${pthread_name}" ; then
  553. enable_pthread=yes
  554. else
  555. AC_CHECK_LIB(pthread, pthread_create, :, enable_pthread=no)
  556. fi
  557. AC_CHECK_HEADERS(pthread.h, :, enable_pthread=no)
  558. if test x$enable_pthread = xyes; then
  559. AC_DEFINE(USE_PTHREAD, 1, Define if you have pthread)
  560. if test -z "${pthread_name}" ; then
  561. PTHREAD_LIBS="-lpthread"
  562. fi
  563. fi
  564. fi
  565. AC_SUBST(PTHREAD_LIBS)
  566. dnl
  567. dnl Check whether we need to pass -lresolv
  568. dnl We know that we don't need it for W32.
  569. dnl
  570. if test x$os_win32 = xno; then
  571. t_oldLibs="$LIBS"
  572. LIBS="$LIBS"
  573. ac_cv_var__res_options=no
  574. AC_TRY_LINK([#include <sys/types.h>
  575. #include <sys/socket.h>
  576. #include <netinet/in.h>
  577. #include <arpa/nameser.h>
  578. #include <resolv.h>],
  579. [_res.options = RES_INIT;],
  580. ac_cv_var__res_options=yes);
  581. if test "$ac_cv_var__res_options" != "yes"; then
  582. LIBRESOLV="-lresolv"
  583. fi
  584. LIBS="$t_oldLibs"
  585. if test "x$LIBRESOLV" = "x"; then
  586. AC_CHECK_LIB(resolv, res_query, [LIBRESOLV=-lresolv])
  587. LIBS="$t_oldLibs"
  588. fi
  589. fi
  590. AC_SUBST(LIBRESOLV)
  591. LIBS="$LIBS $LIBRESOLV"
  592. dnl #######################################################################
  593. dnl # Check for startup notification
  594. dnl #######################################################################
  595. if test "x$enable_startup_notification" = "xyes"; then
  596. PKG_CHECK_MODULES(STARTUP_NOTIFICATION, libstartup-notification-1.0 >= 0.5,
  597. [
  598. AC_DEFINE(HAVE_STARTUP_NOTIFICATION, 1, [Define if we're using libstartup-notification.])
  599. echo "Building with libstartup-notification"
  600. enable_startup_notification=yes
  601. ],
  602. [
  603. echo "Building without libstartup-notification"
  604. enable_startup_notification=no
  605. ])
  606. AC_SUBST(STARTUP_NOTIFICATION_CFLAGS)
  607. AC_SUBST(STARTUP_NOTIFICATION_LIBS)
  608. fi
  609. dnl #######################################################################
  610. dnl # Check for D-Bus support
  611. dnl #######################################################################
  612. if test "x$enable_dbus" = "xyes"; then
  613. PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.60, dbus-glib-1 >= 0.60],
  614. [
  615. AC_DEFINE(HAVE_DBUS_GLIB, 1, [Define if glib bindings of D-Bus are available])
  616. enable_dbus_glib=yes
  617. ],
  618. [
  619. echo "D-Bus requirements not met. D-Bus support not activated."
  620. enable_dbus_glib=no
  621. ])
  622. AC_SUBST(DBUS_CFLAGS)
  623. AC_SUBST(DBUS_LIBS)
  624. fi
  625. dnl #######################################################################
  626. dnl # Configure address book support
  627. dnl #######################################################################
  628. dnl #######################################################################
  629. dnl # Check for new address book support
  630. dnl #######################################################################
  631. AC_MSG_CHECKING([whether DBUS support for new address book is present])
  632. if test x"$enable_dbus_glib" = xyes; then
  633. AC_MSG_RESULT([yes])
  634. AC_MSG_CHECKING([whether to enable new address book])
  635. if test x"$enable_new_addrbook" = xyes; then
  636. AC_MSG_RESULT([yes])
  637. PKG_CHECK_MODULES(CONTACTS, [claws-contacts],
  638. [
  639. AC_DEFINE(USE_NEW_ADDRBOOK, 1, [Define if new address book is to be activated.])
  640. enable_new_addrbook=yes
  641. AC_SUBST(CONTACTS_CFLAGS)
  642. AC_SUBST(CONTACTS_LIBS)
  643. ],
  644. [
  645. enable_new_addrbook=no
  646. ])
  647. else
  648. AC_MSG_RESULT([no])
  649. enable_new_addrbook=no
  650. fi
  651. else
  652. AC_MSG_RESULT([no])
  653. enable_new_addrbook=no
  654. fi
  655. dnl #######################################################################
  656. dnl # Check for old address book support
  657. dnl #######################################################################
  658. if test x"$enable_new_addrbook" = xno; then
  659. dnl for LDAP support in addressbook
  660. dnl no check for libraries; dynamically loaded
  661. AC_MSG_CHECKING([whether to use LDAP])
  662. if test x"$enable_ldap" = xno; then
  663. AC_MSG_RESULT(no)
  664. elif test x"$enable_ldap" = xyes -a x"$enable_pthread" = xno; then
  665. AC_MSG_RESULT(no - LDAP support needs pthread support)
  666. enable_ldap=no
  667. elif test x"$platform_win32" = xyes; then
  668. AC_MSG_RESULT(yes)
  669. AC_DEFINE(USE_LDAP, 1, Define if you want LDAP support in addressbook.)
  670. LDAP_LIBS="-lwldap32"
  671. AC_SUBST(LDAP_LIBS)
  672. else
  673. AC_MSG_RESULT(yes)
  674. dnl check for available libraries, and pull them in
  675. AC_CHECK_LIB(resolv, res_query, LDAP_LIBS="$LDAP_LIBS -lresolv")
  676. AC_CHECK_LIB(socket, bind, LDAP_LIBS="$LDAP_LIBS -lsocket")
  677. AC_CHECK_LIB(nsl, gethostbyaddr, LDAP_LIBS="$LDAP_LIBS -lnsl")
  678. AC_CHECK_LIB(lber, ber_get_tag, LDAP_LIBS="$LDAP_LIBS -llber",,
  679. $LDAP_LIBS)
  680. AC_CHECK_HEADERS(ldap.h lber.h,
  681. [ enable_ldap=yes ],
  682. [ enable_ldap=no ])
  683. if test "$enable_ldap" = yes; then
  684. AC_CHECK_LIB(ldap, ldap_open,
  685. [ enable_ldap=yes ],
  686. [ enable_ldap=no ],
  687. $LDAP_LIBS)
  688. AC_CHECK_LIB(ldap, ldap_start_tls_s,
  689. [ ac_cv_have_tls=yes ],
  690. [ ac_cv_have_tls=no ])
  691. fi
  692. AC_MSG_CHECKING([whether ldap library is available])
  693. AC_MSG_RESULT($enable_ldap)
  694. AC_MSG_CHECKING([whether TLS library is available])
  695. AC_MSG_RESULT($ac_cv_have_tls)
  696. if test "$enable_ldap" = yes; then
  697. AC_DEFINE(USE_LDAP, 1, Define if you want LDAP support in addressbook.)
  698. LDAP_LIBS="$LDAP_LIBS -lldap"
  699. AC_SUBST(LDAP_LIBS)
  700. if test "$ac_cv_have_tls" = yes; then
  701. AC_DEFINE(USE_LDAP_TLS, 1, Define if you want LDAP TLS support in addressbook.)
  702. fi
  703. dnl As of OpenLDAP API version 3000 a number of functions has
  704. dnl been deprecated. As Claws-mail compiles and runs on many
  705. dnl platforms and many versions of OpenLDAP we need to be able
  706. dnl to switch between the old and new API because new API has
  707. dnl added new functions replacing old ones and at the same time
  708. dnl old functions has been changed.
  709. dnl If cross-compiling defaults to enable deprecated features
  710. dnl for maximum portability
  711. AC_MSG_CHECKING([The API version of OpenLDAP])
  712. AC_RUN_IFELSE(
  713. [AC_LANG_PROGRAM(
  714. [#include <ldap.h>],
  715. [if (LDAP_API_VERSION >= 3000)
  716. return 1
  717. ])],
  718. [AC_MSG_RESULT([version < 3000])
  719. AC_DEFINE(OPEN_LDAP_API_AT_LEAST_3000, 0, Define if OpenLDAP API is at least version 3000.)],
  720. [AC_MSG_RESULT([version >= 3000])
  721. AC_DEFINE(OPEN_LDAP_API_AT_LEAST_3000, 1, Define if OpenLDAP API is at least version 3000.)],
  722. [AC_MSG_RESULT([Enabling deprecated features in OpenLDAP])
  723. AC_DEFINE(OPEN_LDAP_API_AT_LEAST_3000, 0, Define if OpenLDAP API is at least version 3000.)
  724. AC_DEFINE(LDAP_DEPRECATED, 1, Define to activate deprecated features in OpenLDAP)]
  725. )
  726. fi
  727. fi
  728. dnl for JPilot support in addressbook
  729. dnl no check for libraries; these are dynamically loaded
  730. AC_MSG_CHECKING([whether to use JPilot])
  731. if test "$enable_jpilot" = yes; then
  732. AC_MSG_RESULT(yes)
  733. AC_CHECK_HEADERS(pi-args.h pi-appinfo.h pi-address.h pi-version.h,
  734. [ AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.) ],
  735. [ enable_jpilot=no ])
  736. if test "$enable_jpilot" = no; then
  737. AC_CHECK_HEADERS(libpisock/pi-args.h libpisock/pi-appinfo.h libpisock/pi-address.h libpisock/pi-version.h,
  738. [ enable_jpilot=yes
  739. AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.) ])
  740. fi
  741. AC_CHECK_LIB(pisock, unpack_Address, [JPILOT_LIBS="-lpisock"], [JPILOT_LIBS="" enable_jpilot="no"])
  742. if test x"$enable_jpilot" = xyes; then
  743. AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.)
  744. else
  745. AC_MSG_NOTICE([JPilot support not available])
  746. fi
  747. AC_SUBST(JPILOT_LIBS)
  748. else
  749. AC_MSG_RESULT(no)
  750. fi
  751. fi
  752. AM_CONDITIONAL(BUILD_NEWADDRBOOK, test x"$enable_new_addrbook" = x"yes")
  753. dnl #######################################################################
  754. dnl # Check for NetworkManager support
  755. dnl #######################################################################
  756. if test x"$enable_dbus_glib" = xyes; then
  757. if test x"$enable_networkmanager" = xyes; then
  758. PKG_CHECK_MODULES(NETWORKMANAGER_SUPPORT, NetworkManager >= 0.6.2,
  759. [
  760. AC_DEFINE(HAVE_NETWORKMANAGER_SUPPORT, 1, [Define if NetworkManager support is to be included.])
  761. echo "Building with NetworkManager support"
  762. enable_networkmanager=yes
  763. ],
  764. [
  765. echo "NetworkManager not found."
  766. enable_networkmanager=no
  767. ])
  768. AC_SUBST(NETWORKMANAGER_SUPPORT_CFLAGS)
  769. fi
  770. else
  771. echo "NetworkManager support deactivated as D-Bus requirements were not met."
  772. enable_networkmanager=no
  773. fi
  774. dnl Libetpan
  775. AC_MSG_CHECKING([whether to use libetpan])
  776. if test x"$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_STABLE=`$libetpanconfig --version | grep -v ^0`
  794. LIBETPAN_VERSION=`$libetpanconfig --version | sed "s/\.//g" | sed "s/-.*$//"`
  795. if test x"$LIBETPAN_STABLE" != "x"; then
  796. LIBETPAN_VERSION="100"
  797. fi
  798. if test "$LIBETPAN_VERSION" -lt "057"; then
  799. AC_MSG_RESULT([*** Claws Mail requires libetpan 0.57 or newer. See http://www.etpan.org/])
  800. AC_MSG_RESULT([*** You can use --disable-libetpan if you don't need IMAP4 and/or NNTP support.])
  801. AC_MSG_ERROR([libetpan 0.57 not found])
  802. fi
  803. AC_SUBST(LIBETPAN_FLAGS)
  804. AC_SUBST(LIBETPAN_LIBS)
  805. AC_DEFINE(HAVE_LIBETPAN, 1, Define if you want IMAP and/or NNTP support.)
  806. else
  807. AC_MSG_RESULT([*** Claws Mail requires libetpan 0.57 or newer. See http://www.etpan.org/ ])
  808. AC_MSG_RESULT([*** You can use --disable-libetpan if you don't need IMAP4 and/or NNTP support.])
  809. AC_MSG_ERROR([libetpan 0.57 not found])
  810. fi
  811. else
  812. AC_MSG_RESULT(no)
  813. fi
  814. AM_CONDITIONAL(CLAWS_LIBETPAN, test "x$libetpan_result" = "xyes")
  815. AC_MSG_CHECKING([whether to use valgrind])
  816. if test x$enable_valgrind = xyes; then
  817. AC_MSG_RESULT(yes)
  818. PKG_CHECK_MODULES(VALGRIND, valgrind >= 2.4.0,
  819. enable_valgrind=yes, enable_valgrind=no)
  820. if test x"$enable_valgrind" = xyes; then
  821. AC_DEFINE(HAVE_VALGRIND, 1, Define if you want valgrind support)
  822. else
  823. AC_MSG_RESULT(not found)
  824. fi
  825. else
  826. AC_MSG_RESULT(no)
  827. fi
  828. AM_CONDITIONAL(CLAWS_VALGRIND, test x"$enable_valgrind" = x"yes")
  829. dnl *************************
  830. dnl ** section for plugins **
  831. dnl *************************
  832. PLUGINS=""
  833. DISABLED_PLUGINS=""
  834. MISSING_DEPS_PLUGINS=""
  835. dnl First we set the enabled status - either enabled (yes), auto-enabled (auto)
  836. dnl or (auto-)disabled (no for both)
  837. dnl
  838. dnl All plugins are auto-enabled except for Demo which is just there to help
  839. dnl potential plugins writers.
  840. AC_ARG_ENABLE(acpi_notifier-plugin,
  841. [ --disable-acpi_notifier-plugin Do not build acpi_notifier plugin],
  842. [enable_acpi_notifier_plugin=$enableval], [enable_acpi_notifier_plugin=auto])
  843. AC_ARG_ENABLE(address_keeper-plugin,
  844. [ --disable-address_keeper-plugin Do not build address_keeper plugin],
  845. [enable_address_keeper_plugin=$enableval], [enable_address_keeper_plugin=auto])
  846. AC_ARG_ENABLE(archive-plugin,
  847. [ --disable-archive-plugin Do not build archive plugin],
  848. [enable_archive_plugin=$enableval], [enable_archive_plugin=auto])
  849. AC_ARG_ENABLE(att_remover-plugin,
  850. [ --disable-att_remover-plugin Do not build att_remover plugin],
  851. [enable_att_remover_plugin=$enableval], [enable_att_remover_plugin=auto])
  852. AC_ARG_ENABLE(attachwarner-plugin,
  853. [ --disable-attachwarner-plugin Do not build attachwarner plugin],
  854. [enable_attachwarner_plugin=$enableval], [enable_attachwarner_plugin=auto])
  855. AC_ARG_ENABLE(bogofilter-plugin,
  856. [ --disable-bogofilter-plugin Do not build bogofilter plugin],
  857. [enable_bogofilter_plugin=$enableval], [enable_bogofilter_plugin=auto])
  858. AC_ARG_ENABLE(bsfilter-plugin,
  859. [ --disable-bsfilter-plugin Do not build bsfilter plugin],
  860. [enable_bsfilter_plugin=$enableval], [enable_bsfilter_plugin=auto])
  861. AC_ARG_ENABLE(clamd-plugin,
  862. [ --disable-clamd-plugin Do not build clamd plugin],
  863. [enable_clamd_plugin=$enableval], [enable_clamd_plugin=auto])
  864. AC_ARG_ENABLE(fancy-plugin,
  865. [ --disable-fancy-plugin Do not build fancy plugin],
  866. [enable_fancy_plugin=$enableval], [enable_fancy_plugin=auto])
  867. AC_ARG_ENABLE(fetchinfo-plugin,
  868. [ --disable-fetchinfo-plugin Do not build fetchinfo plugin],
  869. [enable_fetchinfo_plugin=$enableval], [enable_fetchinfo_plugin=auto])
  870. AC_ARG_ENABLE(gdata-plugin,
  871. [ --disable-gdata-plugin Do not build gdata plugin],
  872. [enable_gdata_plugin=$enableval], [enable_gdata_plugin=auto])
  873. AC_ARG_ENABLE(geolocation-plugin,
  874. [ --disable-geolocation-plugin Do not build geolocation plugin],
  875. [enable_geolocation_plugin=$enableval], [enable_geolocation_plugin=auto])
  876. AC_ARG_ENABLE(mailmbox-plugin,
  877. [ --disable-mailmbox-plugin Do not build mailmbox plugin],
  878. [enable_mailmbox_plugin=$enableval], [enable_mailmbox_plugin=auto])
  879. AC_ARG_ENABLE(newmail-plugin,
  880. [ --disable-newmail-plugin Do not build newmail plugin],
  881. [enable_newmail_plugin=$enableval], [enable_newmail_plugin=auto])
  882. AC_ARG_ENABLE(notification-plugin,
  883. [ --disable-notification-plugin Do not build notification plugin],
  884. [enable_notification_plugin=$enableval], [enable_notification_plugin=auto])
  885. AC_ARG_ENABLE(pdf_viewer-plugin,
  886. [ --disable-pdf_viewer-plugin Do not build pdf_viewer plugin],
  887. [enable_pdf_viewer_plugin=$enableval], [enable_pdf_viewer_plugin=auto])
  888. AC_ARG_ENABLE(perl-plugin,
  889. [ --disable-perl-plugin Do not build perl plugin],
  890. [enable_perl_plugin=$enableval], [enable_perl_plugin=auto])
  891. AC_ARG_ENABLE(python-plugin,
  892. [ --disable-python-plugin Do not build python plugin],
  893. [enable_python_plugin=$enableval], [enable_python_plugin=auto])
  894. AC_ARG_ENABLE(pgpcore-plugin,
  895. [ --disable-pgpcore-plugin Do not build pgpcore plugin],
  896. [enable_pgpcore_plugin=$enableval], [enable_pgpcore_plugin=auto])
  897. AC_ARG_ENABLE(pgpmime-plugin,
  898. [ --disable-pgpmime-plugin Do not build pgpmime plugin],
  899. [enable_pgpmime_plugin=$enableval], [enable_pgpmime_plugin=auto])
  900. AC_ARG_ENABLE(pgpinline-plugin,
  901. [ --disable-pgpinline-plugin Do not build pgpinline plugin],
  902. [enable_pgpinline_plugin=$enableval], [enable_pgpinline_plugin=auto])
  903. AC_ARG_ENABLE(rssyl-plugin,
  904. [ --disable-rssyl-plugin Do not build rssyl plugin],
  905. [enable_rssyl_plugin=$enableval], [enable_rssyl_plugin=auto])
  906. AC_ARG_ENABLE(smime-plugin,
  907. [ --disable-smime-plugin Do not build smime plugin],
  908. [enable_smime_plugin=$enableval], [enable_smime_plugin=auto])
  909. AC_ARG_ENABLE(spamassassin-plugin,
  910. [ --disable-spamassassin-plugin Do not build spamassassin plugin],
  911. [enable_spamassassin_plugin=$enableval], [enable_spamassassin_plugin=auto])
  912. AC_ARG_ENABLE(spam_report-plugin,
  913. [ --disable-spam_report-plugin Do not build spam_report plugin],
  914. [enable_spam_report_plugin=$enableval], [enable_spam_report_plugin=auto])
  915. AC_ARG_ENABLE(tnef_parse-plugin,
  916. [ --disable-tnef_parse-plugin Do not build tnef_parse plugin],
  917. [enable_tnef_parse_plugin=$enableval], [enable_tnef_parse_plugin=auto])
  918. AC_ARG_ENABLE(vcalendar-plugin,
  919. [ --disable-vcalendar-plugin Do not build vcalendar plugin],
  920. [enable_vcalendar_plugin=$enableval], [enable_vcalendar_plugin=auto])
  921. dnl disabled by default
  922. AC_ARG_ENABLE(demo-plugin,
  923. [ --enable-demo-plugin Build demo plugin],
  924. [enable_demo_plugin=$enableval], [enable_demo_plugin=no])
  925. dnl Then we check (unconditionnaly) for plugins dependencies
  926. dnl Some dependencies are optional, some mandatories. This is taken care of
  927. dnl later.
  928. dnl
  929. dnl During this dependancy check we do the checks themselves, define HAVE_X to
  930. dnl either yes or no, and do the AC_SUBST calls.
  931. dnl Archive: libarchive
  932. dnl Fancy: Webkit, curl, optionally libsoup-gnome
  933. dnl Gdata: libgdata
  934. dnl Geolocation libchamplain, libsoup
  935. dnl Notification: optionally libnotify libindicate libcanberra_gtk hotkey
  936. dnl Pdf-Viewer: libpoppler
  937. dnl Perl: sed perl
  938. dnl PGP/Core: libgpgme
  939. dnl PGP/Mime: pgpcore libgpgme
  940. dnl PGP/Inline: pgpcore libgpgme
  941. dnl S/Mime: pgpcore libgpgme
  942. dnl Python: Python
  943. dnl RSSyl: libxml2 libcurl
  944. dnl SpamReport: libcurl
  945. dnl vCalendar: libcurl
  946. dnl libcurl ********************************************************************
  947. PKG_CHECK_MODULES(CURL, libcurl, HAVE_CURL=yes, HAVE_CURL=no)
  948. AC_SUBST(CURL_LIBS)
  949. AC_SUBST(CURL_CFLAGS)
  950. dnl libxml2 ********************************************************************
  951. PKG_CHECK_MODULES(LIBXML, libxml-2.0, HAVE_LIBXML=yes, HAVE_LIBXML=no)
  952. AC_SUBST(LIBXML_LIBS)
  953. AC_SUBST(LIBXML_CFLAGS)
  954. dnl webkit *********************************************************************
  955. PKG_CHECK_MODULES(WEBKIT, webkit-1.0 >= 1.1.14, HAVE_WEBKIT=yes, HAVE_WEBKIT=no)
  956. AC_SUBST(WEBKIT_LIBS)
  957. AC_SUBST(WEBKIT_CFLAGS)
  958. dnl libsoup ********************************************************************
  959. PKG_CHECK_MODULES(LIBSOUP, libsoup-2.4, HAVE_LIBSOUP=yes, HAVE_LIBSOUP=no)
  960. if test x"$HAVE_LIBSOUP" = xyes; then
  961. AC_DEFINE(HAVE_LIBSOUP, 1, [Define if libsoup is available])
  962. fi
  963. AC_SUBST(LIBSOUP_CFLAGS)
  964. AC_SUBST(LIBSOUP_LIBS)
  965. dnl libsoup-gnome **************************************************************
  966. PKG_CHECK_MODULES(LIBSOUP_GNOME, libsoup-gnome-2.4 >= 2.26, HAVE_LIBSOUP_GNOME=yes, HAVE_LIBSOUP_GNOME=no)
  967. if test x"$HAVE_LIBSOUP_GNOME" = xyes; then
  968. AC_DEFINE(HAVE_LIBSOUP_GNOME, 1, [Define if libsoup_gnome is available])
  969. fi
  970. AC_SUBST(LIBSOUP_GNOME_CFLAGS)
  971. AC_SUBST(LIBSOUP_GNOME_LIBS)
  972. dnl libarchive *****************************************************************
  973. AC_SEARCH_LIBS([archive_read_new], [archive],
  974. ARCHIVE_LIBS=-larchive
  975. HAVE_ARCHIVE=yes
  976. AC_SUBST(ARCHIVE_LIBS),
  977. HAVE_ARCHIVE=no
  978. )
  979. dnl libgdata *******************************************************************
  980. dnl Plugin handles compatibility back to 0.6.4 so there are multiple checks.
  981. PKG_CHECK_MODULES(GDATA, libgdata >= 0.9.1, HAVE_GDATA=yes, HAVE_GDATA=no)
  982. if test x"$HAVE_GDATA" = xyes; then
  983. AC_DEFINE(HAVE_GDATA_VERSION_0_9_1, 1, [at least version 0.9.1 of libgdata is available])
  984. AC_DEFINE(HAVE_GDATA_VERSION_0_9, 1, [at least version 0.9 of libgdata is available])
  985. else
  986. PKG_CHECK_MODULES(GDATA, libgdata >= 0.9, HAVE_GDATA=yes, HAVE_GDATA=no)
  987. fi
  988. if test x"$HAVE_GDATA" = xyes; then
  989. AC_DEFINE(HAVE_GDATA_VERSION_0_9, 1, [at least version 0.9 of libgdata is available])
  990. else
  991. PKG_CHECK_MODULES(GDATA, libgdata >= 0.6.4, HAVE_GDATA=yes, HAVE_GDATA=no)
  992. fi
  993. if test x"$HAVE_GDATA" = xyes; then
  994. AC_DEFINE(CM_GDATA_CLIENT_ID, ["Claws Mail GData plugin"], [client id])
  995. fi
  996. AC_SUBST(GDATA_CFLAGS)
  997. AC_SUBST(GDATA_LIBS)
  998. dnl Poppler ********************************************************************
  999. PKG_CHECK_MODULES(POPPLER, poppler-glib >= 0.4.2, HAVE_POPPLER=yes, HAVE_POPPLER=no)
  1000. AC_SUBST(POPPLER_LIBS)
  1001. AC_SUBST(POPPLER_CFLAGS)
  1002. dnl check for Poppler extra features that we conditionally support
  1003. if test x"$HAVE_POPPLER" = xyes; then
  1004. OLD_CFLAGS=$CFLAGS
  1005. CFLAGS="$POPPLER_CFLAGS $GTK_CFLAGS $GLIB_CFLAGS"
  1006. AC_CHECK_DECL(POPPLER_DEST_NAMED,
  1007. [AC_DEFINE([HAVE_POPPLER_DEST_NAMED], [], [Description])],
  1008. ,[#include <poppler-action.h>])
  1009. AC_CHECK_DECL(POPPLER_DEST_XYZ,
  1010. [AC_DEFINE([HAVE_POPPLER_DEST_XYZ], [], [Description])],
  1011. ,[#include <poppler-action.h>])
  1012. CFLAGS=$OLD_CFLAGS
  1013. fi
  1014. dnl perl ***********************************************************************
  1015. AC_CHECK_PROG(HAVE_PERL, perl, yes, no)
  1016. if test x"$HAVE_PERL" = xyes; then
  1017. AC_MSG_CHECKING(for perl >= 5.8.0)
  1018. PERL_VER=`perl -e 'print $] > 5.0079999?"yes":"no"'`
  1019. if test "$PERL_VER" = "yes"; then
  1020. AC_MSG_RESULT(yes)
  1021. else
  1022. AC_MSG_RESULT(no)
  1023. HAVE_PERL=no
  1024. fi
  1025. fi
  1026. if test x"$HAVE_PERL" = xyes; then
  1027. AC_MSG_CHECKING(for Perl compile flags)
  1028. PERL_CFLAGS=`perl -MExtUtils::Embed -e ccopts`
  1029. PERL_CFLAGS=`echo $PERL_CFLAGS | sed 's/-D_FILE_OFFSET_BITS=[[0-9]]*//'`
  1030. PERL_LDFLAGS=`perl -MExtUtils::Embed -e ldopts |sed 's/-lgdbm//'`
  1031. PERL_LDFLAGS=`echo $PERL_LDFLAGS |sed 's/-ldb//'`
  1032. PERL_LDFLAGS=`echo $PERL_LDFLAGS |sed 's/-lndbm//'`
  1033. PERL_LDFLAGS=`echo $PERL_LDFLAGS |sed 's/-lc//'`
  1034. AC_MSG_RESULT(ok)
  1035. AC_MSG_NOTICE([Adding perl LIBS ${PERL_CFLAGS}])
  1036. if test x"$HAVE_PERL" = xyes; then
  1037. AC_CHECK_LIB(perl,perl_alloc,[AC_DEFINE(HAVE_LIBPERL, 1, Check for libperl.)],
  1038. [ HAVE_LIBPERL=no ])
  1039. fi
  1040. if test x"$HAVE_LIBPERL" = xno; then
  1041. LIBPERL_PREFIX=`perl -MExtUtils::Embed -e perl_inc`
  1042. LIBPERL_PREFIX=`echo $LIBPERL_PREFIX |sed 's/-I//'`
  1043. AC_MSG_CHECKING([for libperl.so])
  1044. if test -f "$LIBPERL_PREFIX/libperl.so"; then
  1045. AC_MSG_RESULT(yes)
  1046. HAVE_LIBPERL=yes
  1047. else
  1048. AC_MSG_RESULT(no)
  1049. fi
  1050. fi
  1051. PERL="perl"
  1052. AC_SUBST(PERL)
  1053. AC_SUBST(PERL_CFLAGS)
  1054. AC_SUBST(PERL_LDFLAGS)
  1055. fi
  1056. dnl Gpgme **********************************************************************
  1057. AM_PATH_GPGME(1.0.0, HAVE_GPGME=yes, HAVE_GPGME=no)
  1058. if test x"$HAVE_GPGME" = xyes; then
  1059. AC_DEFINE(USE_GPGME, 1, Define if you use GPGME to support OpenPGP.)
  1060. AM_PATH_GPGME(1.1.1, AC_DEFINE(HAVE_GPGME_PKA_TRUST, 1, [Define if GPGME supports PKA.]))
  1061. fi
  1062. dnl Python *********************************************************************
  1063. AM_PATH_PYTHON([2.5], [
  1064. AC_PATH_PROG(PYTHON_CONFIG, python$PYTHON_VERSION-config)
  1065. if test x"$PYTHON_CONFIG" = x"" ; then
  1066. AC_PATH_PROG(PYTHON_CONFIG, python-config)
  1067. fi
  1068. if test x"$PYTHON_CONFIG" != x""; then
  1069. PYTHON_CFLAGS=`$PYTHON_CONFIG --includes`
  1070. PYTHON_LIBS=`$PYTHON_CONFIG --libs`
  1071. PYTHON_PREFIX=`$PYTHON_CONFIG --prefix`
  1072. HAVE_PYTHON=yes
  1073. else
  1074. AC_MSG_WARN(python-config not found. Maybe you need to install development packages for Python.)
  1075. HAVE_PYTHON=no
  1076. fi
  1077. if test x"$HAVE_PYTHON" = xyes; then
  1078. # libpython.so
  1079. PYTHON_SHARED_LIB="libpython${PYTHON_VERSION}.so"
  1080. _save_libs="$LIBS"
  1081. LIBS="-ldl"
  1082. AC_MSG_CHECKING([whether to dlopen $PYTHON_SHARED_LIB works])
  1083. AC_RUN_IFELSE(
  1084. [AC_LANG_PROGRAM(
  1085. [#include <dlfcn.h>
  1086. #define PYTHON_SO_FILE "${PYTHON_SHARED_LIB}"
  1087. ],
  1088. [if (!dlopen(PYTHON_SO_FILE, RTLD_NOW | RTLD_GLOBAL)) return 1; return 0;])
  1089. ],
  1090. [found_libpython_so="yes"],
  1091. [found_libpython_so="no"],
  1092. [AC_MSG_FAILURE([cross-compiling not supported])])
  1093. if test x"$found_libpython_so" != x"yes"; then
  1094. AC_MSG_RESULT(no)
  1095. AC_MSG_WARN(Could not find Python shared libary: ${PYTHON_SHARED_LIB}. Maybe you need to install development packages for Python.)
  1096. HAVE_PYTHON=no
  1097. else
  1098. AC_MSG_RESULT(yes)
  1099. fi
  1100. LIBS="$_save_libs";
  1101. fi
  1102. if test x"$HAVE_PYTHON" = xyes; then
  1103. PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= 2.10.3, [AC_DEFINE(ENABLE_PYTHON, [1], [Enable Python support])], HAVE_PYTHON=no)
  1104. fi
  1105. ])
  1106. AC_SUBST(PYTHON_SHARED_LIB)
  1107. AC_SUBST(PYTHON_CFLAGS)
  1108. AC_SUBST(PYTHON_LIBS)
  1109. AC_SUBST(PYGTK_CFLAGS)
  1110. AC_SUBST(PYGTK_LIBS)
  1111. dnl libnotify ******************************************************************
  1112. PKG_CHECK_MODULES(libnotify, libnotify >= 0.4.3, HAVE_LIBNOTIFY=yes, HAVE_LIBNOTIFY=no)
  1113. if test x"$HAVE_LIBNOTIFY" = xyes; then
  1114. AC_DEFINE(HAVE_LIBNOTIFY, 1, [Define if libnotify support is enabled])
  1115. fi
  1116. AC_SUBST(libnotify_CFLAGS)
  1117. AC_SUBST(libnotify_LIBS)
  1118. dnl libcanberra-gtk ************************************************************
  1119. PKG_CHECK_MODULES(libcanberra_gtk, libcanberra-gtk >= 0.6, HAVE_LIBCANBERRA_GTK=yes, HAVE_LIBCANBERRA_GTK=no)
  1120. if test x"$HAVE_LIBCANBERRA_GTK" = xyes; then
  1121. AC_DEFINE(HAVE_LIBCANBERRA_GTK, 1, [Define if libcanberra-gtk support is enabled])
  1122. fi
  1123. AC_SUBST(libcanberra_gtk_CFLAGS)
  1124. AC_SUBST(libcanberra_gtk_LIBS)
  1125. dnl libindicate ****************************************************************
  1126. dnl We support either 0.3+ or 0.5+
  1127. LIBINDICATE_MODULE=indicate
  1128. LIBINDICATE_REQUIRED=0.3.0
  1129. PKG_CHECK_EXISTS(indicate-0.5 >= 0.5.0, LIBINDICATE_MODULE=indicate-0.5)
  1130. PKG_CHECK_MODULES(libindicate, $LIBINDICATE_MODULE >= $LIBINDICATE_REQUIRED, HAVE_LIBINDICATE=yes, HAVE_LIBINDICATE=no)
  1131. if test x"$HAVE_LIBINDICATE" = xyes; then
  1132. AC_DEFINE(NOTIFICATION_INDICATOR, 1, [Activate support for indicators])
  1133. fi
  1134. AC_SUBST(libindicate_CFLAGS)
  1135. AC_SUBST(libindicate_LIBS)
  1136. dnl hotkeys ********************************************************************
  1137. PKG_CHECK_MODULES(CM_NP_HOTKEY, [gio-2.0 >= 2.15.6 gio-unix-2.0 >= 2.15.6], HAVE_HOTKEYS=yes, HAVE_HOTKEYS=no)
  1138. if test x"$HAVE_HOTKEYS" = xyes; then
  1139. AC_DEFINE(NOTIFICATION_HOTKEYS, 1, Activate support for global hotkeys)
  1140. fi
  1141. AC_SUBST(CM_NP_HOTKEY_CFLAGS)
  1142. AC_SUBST(CM_NP_HOTKEY_LIBS)
  1143. dnl libchamplain ***************************************************************
  1144. CHAMPLAIN_MODULE=champlain-gtk-0.4
  1145. CHAMPLAIN_VERSION=0.4.0
  1146. PKG_CHECK_EXISTS(champlain-gtk-0.6 > 0.6.0,[CHAMPLAIN_MODULE=champlain-gtk-0.6
  1147. CHAMPLAIN_VERSION=0.6.0], [])
  1148. PKG_CHECK_EXISTS(champlain-gtk-0.8 > 0.8.0,[CHAMPLAIN_MODULE=champlain-gtk-0.8
  1149. CHAMPLAIN_VERSION=0.8.0], [])
  1150. PKG_CHECK_MODULES(CHAMPLAIN, [$CHAMPLAIN_MODULE >= $CHAMPLAIN_VERSION clutter-gtk-0.10], HAVE_CHAMPLAIN=yes, HAVE_CHAMPLAIN=no)
  1151. AC_SUBST(CHAMPLAIN_CFLAGS)
  1152. AC_SUBST(CHAMPLAIN_LIBS)
  1153. dnl Third, we now cross the requested plugins and the available dependencies
  1154. dnl If some dependencies are missing and the plugin was explicitely enabled,
  1155. dnl we error out, else we only inform.
  1156. AC_MSG_CHECKING([whether to build acpi_notifier plugin])
  1157. if test x"$enable_acpi_notifier_plugin" != xno; then
  1158. PLUGINS="$PLUGINS acpi_notifier"
  1159. AC_MSG_RESULT(yes)
  1160. else
  1161. DISABLED_PLUGINS="$DISABLED_PLUGINS acpi_notifier"
  1162. AC_MSG_RESULT(no)
  1163. fi
  1164. AC_MSG_CHECKING([whether to build address_keeper plugin])
  1165. if test x"$enable_address_keeper_plugin" != xno; then
  1166. PLUGINS="$PLUGINS address_keeper"
  1167. AC_MSG_RESULT(yes)
  1168. else
  1169. DISABLED_PLUGINS="$DISABLED_PLUGINS address_keeper"
  1170. AC_MSG_RESULT(no)
  1171. fi
  1172. AC_MSG_CHECKING([whether to build archive plugin])
  1173. if test x"$enable_archive_plugin" != xno; then
  1174. dependencies_missing=""
  1175. if test x"$HAVE_ARCHIVE" = xno; then
  1176. dependencies_missing="libarchive $dependencies_missing"
  1177. fi
  1178. if test x"$dependencies_missing" = x; then
  1179. PLUGINS="$PLUGINS archive"
  1180. AC_MSG_RESULT(yes)
  1181. elif test x"$enable_archive_plugin" = xauto; then
  1182. AC_MSG_RESULT(no)
  1183. AC_MSG_WARN("Plugin archive will not be built; missing $dependencies_missing")
  1184. enable_archive_plugin=no
  1185. MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS archive"
  1186. else
  1187. AC_MSG_RESULT(no)
  1188. AC_MSG_ERROR("Plugin archive cannot be built; missing $dependencies_missing")
  1189. fi
  1190. else
  1191. DISABLED_PLUGINS="$DISABLED_PLUGINS archive"
  1192. AC_MSG_RESULT(no)
  1193. fi
  1194. AC_MSG_CHECKING([whether to build att_remover plugin])
  1195. if test x"$enable_att_remover_plugin" != xno; then
  1196. PLUGINS="$PLUGINS att_remover"
  1197. AC_MSG_RESULT(yes)
  1198. else
  1199. DISABLED_PLUGINS="$DISABLED_PLUGINS att_remover"
  1200. AC_MSG_RESULT(no)
  1201. fi
  1202. AC_MSG_CHECKING([whether to build attachwarner plugin])
  1203. if test x"$enable_attachwarner_plugin" != xno; then
  1204. PLUGINS="$PLUGINS attachwarner"
  1205. AC_MSG_RESULT(yes)
  1206. else
  1207. DISABLED_PLUGINS="$DISABLED_PLUGINS attachwarner"
  1208. AC_MSG_RESULT(no)
  1209. fi
  1210. AC_MSG_CHECKING([whether to build bogofilter plugin])
  1211. if test x"$enable_bogofilter_plugin" != xno; then
  1212. PLUGINS="$PLUGINS bogofilter"
  1213. AC_MSG_RESULT(yes)
  1214. else
  1215. DISABLED_PLUGINS="$DISABLED_PLUGINS bogofilter"
  1216. AC_MSG_RESULT(no)
  1217. fi
  1218. AC_MSG_CHECKING([whether to build bsfilter plugin])
  1219. if test x"$enable_bsfilter_plugin" != xno; then
  1220. PLUGINS="$PLUGINS bsfilter"
  1221. AC_MSG_RESULT(yes)
  1222. else
  1223. DISABLED_PLUGINS="$DISABLED_PLUGINS bsfilter"
  1224. AC_MSG_RESULT(no)
  1225. fi
  1226. AC_MSG_CHECKING([whether to build clamd plugin])
  1227. if test x"$enable_clamd_plugin" != xno; then
  1228. PLUGINS="$PLUGINS clamd"
  1229. AC_MSG_RESULT(yes)
  1230. else
  1231. DISABLED_PLUGINS="$DISABLED_PLUGINS clamd"
  1232. AC_MSG_RESULT(no)
  1233. fi
  1234. AC_MSG_CHECKING([whether to build demo plugin])
  1235. if test x"$enable_demo_plugin" != xno; then
  1236. PLUGINS="$PLUGINS demo"
  1237. AC_MSG_RESULT(yes)
  1238. else
  1239. DISABLED_PLUGINS="$DISABLED_PLUGINS demo"
  1240. AC_MSG_RESULT(no)
  1241. fi
  1242. AC_MSG_CHECKING([whether to build fancy plugin])
  1243. if test x"$enable_fancy_plugin" != xno; then
  1244. dependencies_missing=""
  1245. if test x"$HAVE_WEBKIT" = xno; then
  1246. dependencies_missing="libwebkit-1.0 $dependencies_missing"
  1247. fi
  1248. if test x"$HAVE_CURL" = xno; then
  1249. dependencies_missing="libcurl $dependencies_missing"
  1250. fi
  1251. if test x"$dependencies_missing" = x; then
  1252. PLUGINS="$PLUGINS fancy"
  1253. AC_MSG_RESULT(yes)
  1254. elif test x"$enable_fancy_plugin" = xauto; then
  1255. AC_MSG_RESULT(no)
  1256. AC_MSG_WARN("Plugin fancy will not be built; missing $dependencies_missing")
  1257. enable_fancy_plugin=no
  1258. MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS fancy"
  1259. else
  1260. AC_MSG_RESULT(no)
  1261. AC_MSG_ERROR("Plugin fancy cannot be built; missing $dependencies_missing")
  1262. fi
  1263. else
  1264. DISABLED_PLUGINS="$DISABLED_PLUGINS fancy"
  1265. AC_MSG_RESULT(no)
  1266. fi
  1267. AC_MSG_CHECKING([whether to build fetchinfo plugin])
  1268. if test x"$enable_fetchinfo_plugin" != xno; then
  1269. PLUGINS="$PLUGINS fetchinfo"
  1270. AC_MSG_RESULT(yes)
  1271. else
  1272. DISABLED_PLUGINS="$DISABLED_PLUGINS fetchinfo"
  1273. AC_MSG_RESULT(no)
  1274. fi
  1275. AC_MSG_CHECKING([whether to build gdata plugin])
  1276. if test x"$enable_gdata_plugin" != xno; then
  1277. dependencies_missing=""
  1278. if test x"$HAVE_GDATA" = xno; then
  1279. dependencies_missing="libgdata $dependencies_missing"
  1280. fi
  1281. if test x"$dependencies_missing" = x; then
  1282. PLUGINS="$PLUGINS gdata"
  1283. AC_MSG_RESULT(yes)
  1284. elif test x"$enable_gdata_plugin" = xauto; then
  1285. AC_MSG_RESULT(no)
  1286. AC_MSG_WARN("Plugin gdata will not be built; missing $dependencies_missing")
  1287. enable_gdata_plugin=no
  1288. MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS gdata"
  1289. else
  1290. AC_MSG_RESULT(no)
  1291. AC_MSG_ERROR("Plugin gdata cannot be built; missing $dependencies_missing")
  1292. fi
  1293. else
  1294. DISABLED_PLUGINS="$DISABLED_PLUGINS gdata"
  1295. AC_MSG_RESULT(no)
  1296. fi
  1297. AC_MSG_CHECKING([whether to build geolocation plugin])
  1298. if test x"$enable_geolocation_plugin" != xno; then
  1299. dependencies_missing=""
  1300. if test x"$HAVE_CHAMPLAIN" = xno; then
  1301. dependencies_missing="libchamplain $dependencies_missing"
  1302. fi
  1303. if test x"$dependencies_missing" = x; then
  1304. PLUGINS="$PLUGINS geolocation"
  1305. AC_MSG_RESULT(yes)
  1306. elif test x"$enable_geolocation_plugin" = xauto; then
  1307. AC_MSG_RESULT(no)
  1308. AC_MSG_WARN("Plugin geolocation will not be built; missing $dependencies_missing")
  1309. enable_geolocation_plugin=no
  1310. MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS geolocation"
  1311. else
  1312. AC_MSG_RESULT(no)
  1313. AC_MSG_ERROR("Plugin geolocation cannot be built; missing $dependencies_missing")
  1314. fi
  1315. else
  1316. DISABLED_PLUGINS="$DISABLED_PLUGINS geolocation"
  1317. AC_MSG_RESULT(no)
  1318. fi
  1319. AC_MSG_CHECKING([whether to build mailmbox plugin])
  1320. if test x"$enable_mailmbox_plugin" != xno; then
  1321. PLUGINS="$PLUGINS mailmbox"
  1322. AC_MSG_RESULT(yes)
  1323. else
  1324. DISABLED_PLUGINS="$DISABLED_PLUGINS mailmbox"
  1325. AC_MSG_RESULT(no)
  1326. fi
  1327. AC_MSG_CHECKING([whether to build newmail plugin])
  1328. if test x"$enable_newmail_plugin" != xno; then
  1329. PLUGINS="$PLUGINS newmail"
  1330. AC_MSG_RESULT(yes)
  1331. else
  1332. DISABLED_PLUGINS="$DISABLED_PLUGINS newmail"
  1333. AC_MSG_RESULT(no)
  1334. fi
  1335. AC_MSG_CHECKING([whether to build notification plugin])
  1336. if test x"$enable_notification_plugin" != xno; then
  1337. PLUGINS="$PLUGINS notification"
  1338. AC_MSG_RESULT(yes)
  1339. AC_DEFINE(NOTIFICATION_POPUP, 1, Activate notification popup)
  1340. AC_DEFINE(NOTIFICATION_BANNER, 1, Activate notification banner)
  1341. AC_DEFINE(NOTIFICATION_COMMAND, 1, Activate notification shell command)
  1342. AC_DEFINE(NOTIFICATION_TRAYICON, 1, Activate notification trayicon)
  1343. if test x"$platform_win32" = xno; then
  1344. AC_DEFINE(NOTIFICATION_LCDPROC, 1, Activate lcdproc support)
  1345. fi
  1346. notification_features="banner command"
  1347. notification_missing_dependencies=""
  1348. if test x"$HAVE_HOTKEYS" = xyes; then
  1349. notification_features="$notification_features hotkeys"
  1350. else
  1351. notification_missing_dependencies="$notification_missing_dependencies hotkeys"
  1352. fi
  1353. notification_features="$notification_features lcdproc"
  1354. if test x"$HAVE_LIBINDICATE" = xyes; then
  1355. notification_features="$notification_features libindicate"
  1356. else
  1357. notification_missing_dependencies="$notification_missing_dependencies libindicate"
  1358. fi
  1359. if test x"$HAVE_LIBNOTIFY" = xyes; then
  1360. notification_features="$notification_features libnotify"
  1361. else
  1362. notification_missing_dependencies="$notification_missing_dependencies libnotify"
  1363. fi
  1364. if test x"$HAVE_LIBCANBERRA_GTK" = xyes; then
  1365. notification_features="$notification_features libcanberra-gtk"
  1366. else
  1367. notification_missing_dependencies="$notification_missing_dependencies libcanberra-gtk"
  1368. fi
  1369. notification_features="$notification_features popup trayicon"
  1370. else
  1371. DISABLED_PLUGINS="$DISABLED_PLUGINS notification"
  1372. AC_MSG_RESULT(no)
  1373. fi
  1374. AC_MSG_CHECKING([whether to build pdf_viewer plugin])
  1375. if test x"$enable_pdf_viewer_plugin" != xno; then
  1376. dependencies_missing=""
  1377. if test x"$HAVE_POPPLER" = xno; then
  1378. dependencies_missing="libpoppler-glib $dependencies_missing"
  1379. fi
  1380. if test x"$dependencies_missing" = x; then
  1381. PLUGINS="$PLUGINS pdf_viewer"
  1382. AC_MSG_RESULT(yes)
  1383. elif test x"$enable_pdf_viewer_plugin" = xauto; then
  1384. AC_MSG_RESULT(no)
  1385. AC_MSG_WARN("Plugin pdf_viewer will not be built; missing $dependencies_missing")
  1386. enable_pdf_viewer_plugin=no
  1387. MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS pdf_viewer"
  1388. else
  1389. AC_MSG_RESULT(no)
  1390. AC_MSG_ERROR("Plugin pdf_viewer cannot be built; missing $dependencies_missing")
  1391. fi
  1392. else
  1393. DISABLED_PLUGINS="$DISABLED_PLUGINS pdf_viewer"
  1394. AC_MSG_RESULT(no)
  1395. fi
  1396. AC_MSG_CHECKING([whether to build perl plugin])
  1397. if test x"$enable_perl_plugin" != xno; then
  1398. dependencies_missing=""
  1399. if test x"$HAVE_LIBPERL" = xno; then
  1400. dependencies_missing="libperl $dependencies_missing"
  1401. fi
  1402. if test x"$dependencies_missing" = x; then
  1403. PLUGINS="$PLUGINS perl"
  1404. AC_MSG_RESULT(yes)
  1405. elif test x"$enable_perl_plugin" = xauto; then
  1406. AC_MSG_RESULT(no)
  1407. AC_MSG_WARN("Plugin perl will not be built; missing $dependencies_missing")
  1408. enable_perl_plugin=no
  1409. MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS perl"
  1410. else
  1411. AC_MSG_RESULT(no)
  1412. AC_MSG_ERROR("Plugin perl cannot be built; missing $dependencies_missing")
  1413. fi
  1414. else
  1415. DISABLED_PLUGINS="$DISABLED_PLUGINS perl"
  1416. AC_MSG_RESULT(no)
  1417. fi
  1418. AC_MSG_CHECKING([whether to build python plugin])
  1419. if test x"$enable_python_plugin" != xno; then
  1420. dependencies_missing=""
  1421. if test x"$HAVE_PYTHON" = xno; then
  1422. dependencies_missing="python $dependencies_missing"
  1423. fi
  1424. if test x"$dependencies_missing" = x; then
  1425. PLUGINS="$PLUGINS python"
  1426. AC_MSG_RESULT(yes)
  1427. elif test x"$enable_python_plugin" = xauto; then
  1428. AC_MSG_RESULT(no)
  1429. AC_MSG_WARN("Plugin python will not be built; missing $dependencies_missing")
  1430. enable_python_plugin=no
  1431. MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS python"
  1432. else
  1433. AC_MSG_RESULT(no)
  1434. AC_MSG_ERROR("Plugin python cannot be built; missing $dependencies_missing")
  1435. fi
  1436. else
  1437. DISABLED_PLUGINS="$DISABLED_PLUGINS python"
  1438. AC_MSG_RESULT(no)
  1439. fi
  1440. AC_MSG_CHECKING([whether to build pgpcore plugin])
  1441. if test x"$enable_pgpcore_plugin" != xno; then
  1442. dependencies_missing=""
  1443. if test x"$HAVE_GPGME" = xno; then
  1444. dependencies_missing="libgpgme $dependencies_missing"
  1445. fi
  1446. if test x"$dependencies_missing" = x; then
  1447. PLUGINS="$PLUGINS pgpcore"
  1448. AC_MSG_RESULT(yes)
  1449. elif test x"$enable_pgpcore_plugin" = xauto; then
  1450. AC_MSG_RESULT(no)
  1451. AC_MSG_WARN("Plugin pgpcore will not be built; missing $dependencies_missing")
  1452. enable_pgpcore_plugin=no
  1453. MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS pgpcore"
  1454. else
  1455. AC_MSG_RESULT(no)
  1456. AC_MSG_ERROR("Plugin pgpcore cannot be built; missing $dependencies_missing")
  1457. fi
  1458. else
  1459. DISABLED_PLUGINS="$DISABLED_PLUGINS pgpcore"
  1460. AC_MSG_RESULT(no)
  1461. fi
  1462. AC_MSG_CHECKING([whether to build pgpmime plugin])
  1463. if test x"$enable_pgpmime_plugin" != xno; then
  1464. dependencies_missing=""
  1465. if test x"$HAVE_GPGME" = xno; then
  1466. dependencies_missing="libgpgme $dependencies_missing"
  1467. fi
  1468. if test x"$enable_pgpcore_plugin" = xno; then
  1469. dependencies_missing="pgpcore plugin $dependencies_missing"
  1470. fi
  1471. if test x"$dependencies_missing" = x; then
  1472. PLUGINS="$PLUGINS pgpmime"
  1473. AC_MSG_RESULT(yes)
  1474. elif test x"$enable_pgpmime_plugin" = xauto; then
  1475. AC_MSG_RESULT(no)
  1476. AC_MSG_WARN("Plugin pgpmime will not be built; missing $dependencies_missing")
  1477. enable_pgpmime_plugin=no
  1478. MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS pgpmime"
  1479. else
  1480. AC_MSG_RESULT(no)
  1481. AC_MSG_ERROR("Plugin pgpmime cannot be built; missing $dependencies_missing")
  1482. fi
  1483. else
  1484. DISABLED_PLUGINS="$DISABLED_PLUGINS pgpmime"
  1485. AC_MSG_RESULT(no)
  1486. fi
  1487. AC_MSG_CHECKING([whether to build pgpinline plugin])
  1488. if test x"$enable_pgpinline_plugin" != xno; then
  1489. dependencies_missing=""
  1490. if test x"$HAVE_GPGME" = xno; then
  1491. dependencies_missing="libgpgme $dependencies_missing"
  1492. fi
  1493. if test x"$enable_pgpcore_plugin" = xno; then
  1494. dependencies_missing="pgpcore plugin $dependencies_missing"
  1495. fi
  1496. if test x"$dependencies_missing" = x; then
  1497. PLUGINS="$PLUGINS pgpinline"
  1498. AC_MSG_RESULT(yes)
  1499. elif test x"$enable_pgpinline_plugin" = xauto; then
  1500. AC_MSG_RESULT(no)
  1501. AC_MSG_WARN("Plugin pgpinline will not be built; missing $dependencies_missing")
  1502. enable_pgpinline_plugin=no
  1503. MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS pgpinline"
  1504. else
  1505. AC_MSG_RESULT(no)
  1506. AC_MSG_ERROR("Plugin pgpinline cannot be built; missing $dependencies_missing")
  1507. fi
  1508. else
  1509. DISABLED_PLUGINS="$DISABLED_PLUGINS pgpinline"
  1510. AC_MSG_RESULT(no)
  1511. fi
  1512. AC_MSG_CHECKING([whether to build rssyl plugin])
  1513. if test x"$enable_rssyl_plugin" != xno; then
  1514. dependencies_missing=""
  1515. if test x"$HAVE_LIBXML" = xno; then
  1516. dependencies_missing="libxml2 $dependencies_missing"
  1517. fi
  1518. if test x"$HAVE_CURL" = xno; then
  1519. dependencies_missing="libcurl $dependencies_missing"
  1520. fi
  1521. if test x"$dependencies_missing" = x; then
  1522. PLUGINS="$PLUGINS rssyl"
  1523. AC_MSG_RESULT(yes)
  1524. elif test x"$enable_rssyl_plugin" = xauto; then
  1525. AC_MSG_RESULT(no)
  1526. AC_MSG_WARN("Plugin rssyl will not be built; missing $dependencies_missing")
  1527. enable_rssyl_plugin=no
  1528. MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS rssyl"
  1529. else
  1530. AC_MSG_RESULT(no)
  1531. AC_MSG_ERROR("Plugin rssyl cannot be built; missing $dependencies_missing")
  1532. fi
  1533. else
  1534. DISABLED_PLUGINS="$DISABLED_PLUGINS rssyl"
  1535. AC_MSG_RESULT(no)
  1536. fi
  1537. AC_MSG_CHECKING([whether to build spamassassin plugin])
  1538. if test x"$enable_spamassassin_plugin" != xno; then
  1539. PLUGINS="$PLUGINS spamassassin"
  1540. AC_MSG_RESULT(yes)
  1541. AC_SPAMASSASSIN
  1542. else
  1543. DISABLED_PLUGINS="$DISABLED_PLUGINS spamassassin"
  1544. AC_MSG_RESULT(no)
  1545. fi
  1546. AC_MSG_CHECKING([whether to build smime plugin])
  1547. if test x"$enable_smime_plugin" != xno; then
  1548. dependencies_missing=""
  1549. if test x"$HAVE_GPGME" = xno; then
  1550. dependencies_missing="libgpgme $dependencies_missing"
  1551. fi
  1552. if test x"$enable_pgpcore_plugin" = xno; then
  1553. dependencies_missing="pgpcore plugin $dependencies_missing"
  1554. fi
  1555. if test x"$dependencies_missing" = x; then
  1556. PLUGINS="$PLUGINS smime"
  1557. AC_MSG_RESULT(yes)
  1558. elif test x"$enable_smime_plugin" = xauto; then
  1559. AC_MSG_RESULT(no)
  1560. AC_MSG_WARN("Plugin smime will not be built; missing $dependencies_missing")
  1561. enable_smime_plugin=no
  1562. MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS smime"
  1563. else
  1564. AC_MSG_RESULT(no)
  1565. AC_MSG_ERROR("Plugin smime cannot be built; missing $dependencies_missing")
  1566. fi
  1567. else
  1568. DISABLED_PLUGINS="$DISABLED_PLUGINS smime"
  1569. AC_MSG_RESULT(no)
  1570. fi
  1571. AC_MSG_CHECKING([whether to build spam_report plugin])
  1572. if test x"$enable_spam_report_plugin" != xno; then
  1573. dependencies_missing=""
  1574. if test x"$HAVE_CURL" = xno; then
  1575. dependencies_missing="libcurl $dependencies_missing"
  1576. fi
  1577. if test x"$dependencies_missing" = x; then
  1578. PLUGINS="$PLUGINS spam_report"
  1579. AC_MSG_RESULT(yes)
  1580. elif test x"$enable_spam_report_plugin" = xauto; then
  1581. AC_MSG_RESULT(no)
  1582. AC_MSG_WARN("Plugin spam_report will not be built; missing $dependencies_missing")
  1583. enable_spam_report_plugin=no
  1584. MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS spam_report"
  1585. else
  1586. AC_MSG_RESULT(no)
  1587. AC_MSG_ERROR("Plugin spam_report cannot be built; missing $dependencies_missing")
  1588. fi
  1589. else
  1590. DISABLED_PLUGINS="$DISABLED_PLUGINS spam_report"
  1591. AC_MSG_RESULT(no)
  1592. fi
  1593. AC_MSG_CHECKING([whether to build tnef_parse plugin])
  1594. if test x"$enable_tnef_parse_plugin" != xno; then
  1595. PLUGINS="$PLUGINS tnef_parse"
  1596. AC_MSG_RESULT(yes)
  1597. else
  1598. DISABLED_PLUGINS="$DISABLED_PLUGINS tnef_parse"
  1599. AC_MSG_RESULT(no)
  1600. fi
  1601. AC_MSG_CHECKING([whether to build vcalendar plugin])
  1602. if test x"$enable_vcalendar_plugin" != xno; then
  1603. dependencies_missing=""
  1604. if test x"$HAVE_CURL" = xno; then
  1605. dependencies_missing="libcurl $dependencies_missing"
  1606. fi
  1607. if test x"$HAVE_PERL" = xno; then
  1608. dependencies_missing="perl $dependencies_missing"
  1609. fi
  1610. if test x"$dependencies_missing" = x; then
  1611. PLUGINS="$PLUGINS vcalendar"
  1612. AC_MSG_RESULT(yes)
  1613. elif test x"$enable_vcalendar_plugin" = xauto; then
  1614. AC_MSG_RESULT(no)
  1615. AC_MSG_WARN("Plugin vcalendar will not be built; missing $dependencies_missing")
  1616. enable_vcalendar_plugin=no
  1617. MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS vcalendar"
  1618. else
  1619. AC_MSG_RESULT(no)
  1620. AC_MSG_ERROR("Plugin vcalendar cannot be built; missing $dependencies_missing")
  1621. fi
  1622. else
  1623. DISABLED_PLUGINS="$DISABLED_PLUGINS vcalendar"
  1624. AC_MSG_RESULT(no)
  1625. fi
  1626. dnl And finally the automake conditionals.
  1627. AM_CONDITIONAL(BUILD_ACPI_NOTIFIER_PLUGIN, test x"$enable_acpi_notifier_plugin" != xno)
  1628. AM_CONDITIONAL(BUILD_ADDRESS_KEEPER_PLUGIN, test x"$enable_address_keeper_plugin" != xno)
  1629. AM_CONDITIONAL(BUILD_ARCHIVE_PLUGIN, test x"$enable_archive_plugin" != xno)
  1630. AM_CONDITIONAL(BUILD_ATT_REMOVER_PLUGIN, test x"$enable_att_remover_plugin" != xno)
  1631. AM_CONDITIONAL(BUILD_ATTACHWARNER_PLUGIN, test x"$enable_attachwarner_plugin" != xno)
  1632. AM_CONDITIONAL(BUILD_BOGOFILTER_PLUGIN, test x"$enable_bogofilter_plugin" != xno)
  1633. AM_CONDITIONAL(BUILD_BSFILTER_PLUGIN, test x"$enable_bsfilter_plugin" != xno)
  1634. AM_CONDITIONAL(BUILD_CLAMD_PLUGIN, test x"$enable_clamd_plugin" != xno)
  1635. AM_CONDITIONAL(BUILD_DEMO_PLUGIN, test x"$enable_demo_plugin" != xno)
  1636. AM_CONDITIONAL(BUILD_FANCY_PLUGIN, test x"$enable_fancy_plugin" != xno)
  1637. AM_CONDITIONAL(BUILD_FETCHINFO_PLUGIN, test x"$enable_fetchinfo_plugin" != xno)
  1638. AM_CONDITIONAL(BUILD_GDATA_PLUGIN, test x"$enable_gdata_plugin" != xno)
  1639. AM_CONDITIONAL(BUILD_GEOLOCATION_PLUGIN, test x"$enable_geolocation_plugin" != xno)
  1640. AM_CONDITIONAL(BUILD_MAILMBOX_PLUGIN, test x"$enable_mailmbox_plugin" != xno)
  1641. AM_CONDITIONAL(BUILD_NEWMAIL_PLUGIN, test x"$enable_newmail_plugin" != xno)
  1642. AM_CONDITIONAL(BUILD_NOTIFICATION_PLUGIN, test x"$enable_notification_plugin" != xno)
  1643. AM_CONDITIONAL(BUILD_HOTKEYS, test x"$enable_notification_plugin" != xno -a x"$HAVE_HOTKEYS" = xyes)
  1644. AM_CONDITIONAL(BUILD_PDF_VIEWER_PLUGIN, test x"$enable_pdf_viewer_plugin" != xno)
  1645. AM_CONDITIONAL(BUILD_PERL_PLUGIN, test x"$enable_perl_plugin" != xno)
  1646. AM_CONDITIONAL(BUILD_PYTHON_PLUGIN, test x"$enable_python_plugin" != xno)
  1647. AM_CONDITIONAL(BUILD_PGPCORE_PLUGIN, test x"$enable_pgpcore_plugin" != xno)
  1648. AM_CONDITIONAL(BUILD_PGPMIME_PLUGIN, test x"$enable_pgpmime_plugin" != xno)
  1649. AM_CONDITIONAL(BUILD_PGPINLINE_PLUGIN, test x"$enable_pgpinline_plugin" != xno)
  1650. AM_CONDITIONAL(BUILD_RSSYL_PLUGIN, test x"$enable_rssyl_plugin" != xno)
  1651. AM_CONDITIONAL(BUILD_SMIME_PLUGIN, test x"$enable_smime_plugin" != xno)
  1652. AM_CONDITIONAL(BUILD_SPAMASSASSIN_PLUGIN, test x"$enable_spamassassin_plugin" != xno)
  1653. AM_CONDITIONAL(BUILD_SPAM_REPORT_PLUGIN, test x"$enable_spam_report_plugin" != xno)
  1654. AM_CONDITIONAL(BUILD_TNEF_PARSE_PLUGIN, test x"$enable_tnef_parse_plugin" != xno)
  1655. AM_CONDITIONAL(BUILD_VCALENDAR_PLUGIN, test x"$enable_vcalendar_plugin" != xno)
  1656. dnl ****************************
  1657. dnl ** Final configure output **
  1658. dnl ****************************
  1659. AC_OUTPUT([
  1660. Makefile
  1661. m4/Makefile
  1662. po/Makefile.in
  1663. src/common/version.h
  1664. src/Makefile
  1665. src/common/Makefile
  1666. src/common/passcrypt.h
  1667. src/gtk/Makefile
  1668. src/etpan/Makefile
  1669. src/plugins/Makefile
  1670. src/plugins/acpi_notifier/Makefile
  1671. src/plugins/address_keeper/Makefile
  1672. src/plugins/archive/Makefile
  1673. src/plugins/att_remover/Makefile
  1674. src/plugins/attachwarner/Makefile
  1675. src/plugins/bogofilter/Makefile
  1676. src/plugins/bsfilter/Makefile
  1677. src/plugins/clamd/Makefile
  1678. src/plugins/clamd/libclamd/Makefile
  1679. src/plugins/demo/Makefile
  1680. src/plugins/fancy/Makefile
  1681. src/plugins/fetchinfo/Makefile
  1682. src/plugins/gdata/Makefile
  1683. src/plugins/geolocation/Makefile
  1684. src/plugins/mailmbox/Makefile
  1685. src/plugins/newmail/Makefile
  1686. src/plugins/notification/Makefile
  1687. src/plugins/notification/gtkhotkey/Makefile
  1688. src/plugins/pdf_viewer/Makefile
  1689. src/plugins/perl/Makefile
  1690. src/plugins/perl/tools/Makefile
  1691. src/plugins/python/Makefile
  1692. src/plugins/python/examples/Makefile
  1693. src/plugins/pgpcore/Makefile
  1694. src/plugins/pgpmime/Makefile
  1695. src/plugins/pgpinline/Makefile
  1696. src/plugins/rssyl/Makefile
  1697. src/plugins/smime/Makefile
  1698. src/plugins/spamassassin/Makefile
  1699. src/plugins/spam_report/Makefile
  1700. src/plugins/tnef_parse/Makefile
  1701. src/plugins/vcalendar/Makefile
  1702. src/plugins/vcalendar/libical/Makefile
  1703. src/plugins/vcalendar/libical/libical/icalversion.h
  1704. src/plugins/vcalendar/libical/libical/Makefile
  1705. src/plugins/vcalendar/libical/design-data/Makefile
  1706. src/plugins/vcalendar/libical/scripts/Makefile
  1707. doc/Makefile
  1708. doc/man/Makefile
  1709. tools/Makefile
  1710. config/Makefile
  1711. manual/Makefile
  1712. manual/dtd/Makefile
  1713. manual/dist/Makefile
  1714. manual/dist/pdf/Makefile
  1715. manual/dist/ps/Makefile
  1716. manual/dist/html/Makefile
  1717. manual/dist/txt/Makefile
  1718. manual/fr/Makefile
  1719. manual/fr/dist/Makefile
  1720. manual/fr/dist/pdf/Makefile
  1721. manual/fr/dist/ps/Makefile
  1722. manual/fr/dist/html/Makefile
  1723. manual/fr/dist/txt/Makefile
  1724. manual/pl/Makefile
  1725. manual/pl/dist/Makefile
  1726. manual/pl/dist/pdf/Makefile
  1727. manual/pl/dist/ps/Makefile
  1728. manual/pl/dist/html/Makefile
  1729. manual/pl/dist/txt/Makefile
  1730. manual/es/Makefile
  1731. manual/es/dist/Makefile
  1732. manual/es/dist/pdf/Makefile
  1733. manual/es/dist/ps/Makefile
  1734. manual/es/dist/html/Makefile
  1735. manual/es/dist/txt/Makefile
  1736. manual/de/Makefile
  1737. manual/de/dist/Makefile
  1738. manual/de/dist/pdf/Makefile
  1739. manual/de/dist/ps/Makefile
  1740. manual/de/dist/html/Makefile
  1741. manual/de/dist/txt/Makefile
  1742. claws-mail.pc
  1743. ])
  1744. dnl Output the configuration summary
  1745. echo ""
  1746. echo "$PACKAGE $VERSION"
  1747. echo ""
  1748. if test x"$enable_new_addrbook" = xyes; then
  1749. echo "Using Address Book : New experimental interface"
  1750. else
  1751. echo "Using Address Book : Old stable interface"
  1752. echo "JPilot : $enable_jpilot"
  1753. echo "LDAP : $enable_ldap"
  1754. fi
  1755. echo "gnuTLS : $enable_gnutls"
  1756. echo "iconv : $am_cv_func_iconv"
  1757. echo "compface : $enable_compface"
  1758. echo "IPv6 : $enable_ipv6"
  1759. echo "enchant : $enable_enchant"
  1760. echo "IMAP4 : $enable_libetpan"
  1761. echo "NNTP : $enable_libetpan"
  1762. echo "Crash dialog : $enable_crash_dialog"
  1763. echo "LibSM : $enable_libsm"
  1764. echo "DBUS : $enable_dbus"
  1765. echo "NetworkManager : $enable_networkmanager"
  1766. echo "Manual : $enable_manual"
  1767. echo "Generic UMPC code : $enable_generic_umpc"
  1768. echo "Maemo build : $enable_maemo"
  1769. echo "Config dir : $ac_cv_with_config_dir"
  1770. echo "Plugins"
  1771. echo " Built:"
  1772. for plugin in $PLUGINS; do
  1773. echo " - $plugin"
  1774. if test x"$plugin" = xnotification; then
  1775. echo " Features:"
  1776. for notif_feature in $notification_features; do
  1777. echo " $notif_feature"
  1778. done;
  1779. if test "x$notification_missing_dependencies" != x; then
  1780. echo " Disabled due to missing dependencies:"
  1781. for notif_miss_dep in $notification_missing_dependencies; do
  1782. echo " $notif_miss_dep"
  1783. done;
  1784. fi
  1785. fi
  1786. done;
  1787. if test "x$DISABLED_PLUGINS" != x; then
  1788. echo " Disabled:"
  1789. for plugin in $DISABLED_PLUGINS; do
  1790. echo " - $plugin"
  1791. done;
  1792. fi
  1793. if test "x$MISSING_DEPS_PLUGINS" != x; then
  1794. echo " Disabled due to missing dependencies:"
  1795. for plugin in $MISSING_DEPS_PLUGINS; do
  1796. echo " - $plugin"
  1797. done;
  1798. fi
  1799. echo ""
  1800. echo "The binary will be installed in $prefix/bin"
  1801. echo ""
  1802. echo "Configure finished, type 'make' to build."