configure.ac 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653
  1. dnl Process this file with autoconf to produce a configure script.
  2. AC_PREREQ(2.50)
  3. AC_INIT(src/main.c)
  4. AC_CONFIG_AUX_DIR(config)
  5. PACKAGE=sylpheed-claws
  6. dnl version number
  7. MAJOR_VERSION=1
  8. MINOR_VERSION=0
  9. MICRO_VERSION=4
  10. INTERFACE_AGE=0
  11. BINARY_AGE=0
  12. EXTRA_VERSION=0
  13. EXTRA_RELEASE=
  14. if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
  15. VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}${EXTRA_RELEASE}
  16. else
  17. VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}cvs${EXTRA_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(SYLPHEED_GNOME, test -n "$gnomedatadir")
  44. dnl Claws version
  45. AC_DEFINE(CLAWS, 1, Compiling Claws branch of sylpheed)
  46. dnl libtool versioning
  47. LT_RELEASE=$MAJOR_VERSION.$MINOR_VERSION
  48. LT_CURRENT=`expr $MICRO_VERSION - $INTERFACE_AGE`
  49. LT_REVISION=$INTERFACE_AGE
  50. LT_AGE=`expr $BINARY_AGE - $INTERFACE_AGE`
  51. AC_SUBST(LT_RELEASE)
  52. AC_SUBST(LT_CURRENT)
  53. AC_SUBST(LT_REVISION)
  54. AC_SUBST(LT_AGE)
  55. dnl Specify a header configuration file
  56. AC_CONFIG_HEADERS(config.h)
  57. AM_MAINTAINER_MODE
  58. dnl Checks for programs.
  59. dnl AC_ARG_PROGRAM
  60. AC_PROG_CC
  61. AC_ISC_POSIX
  62. AC_PROG_INSTALL
  63. AC_PROG_LN_S
  64. AC_PROG_MAKE_SET
  65. AC_PROG_CPP
  66. dnl AC_PROG_RANLIB
  67. AM_PROG_LEX
  68. AC_PROG_YACC
  69. AC_PROG_LIBTOOL
  70. SYLPHEED_ACLOCAL_INCLUDE(m4)
  71. case "$target" in
  72. *-darwin*)
  73. CFLAGS="$CFLAGS -traditional-cpp -fno-common"
  74. ;;
  75. esac
  76. AM_ICONV
  77. dnl for gettext
  78. ALL_LINGUAS="bg cs de el en_GB es fr hr hu it ja ko nl pl pt_BR ru sk sr sv zh_CN zh_TW.Big5"
  79. AM_GNU_GETTEXT([use-libtool])
  80. AM_GNU_GETTEXT_VERSION(0.12.1)
  81. dnl AC_CHECK_FUNC(gettext, AC_CHECK_LIB(intl, gettext))
  82. localedir='${datadir}/locale'
  83. AC_SUBST(localedir)
  84. manualdir='${prefix}/${DATADIRNAME}/${PACKAGE}/manual'
  85. AC_SUBST(manualdir)
  86. faqdir='${prefix}/${DATADIRNAME}/${PACKAGE}/faq'
  87. AC_SUBST(faqdir)
  88. dnl Set PACKAGE_DATA_DIR in config.h.
  89. if test "x${datadir}" = 'x${prefix}/share'; then
  90. if test "x${prefix}" = "xNONE"; then
  91. AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}", PACKAGE_DATA_DIR)
  92. else
  93. AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}", PACKAGE_DATA_DIR)
  94. fi
  95. else
  96. AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datadir}/${PACKAGE}", PACKAGE_DATA_DIR)
  97. fi
  98. AC_CHECK_LIB(xpg4, setlocale)
  99. dnl for GThread support (currently disabled)
  100. dnl AC_ARG_ENABLE(threads,
  101. dnl [ --enable-threads Enable multithread support [default=no]],
  102. dnl [use_threads=$enableval], [use_threads=no])
  103. AC_MSG_CHECKING([whether to use threads])
  104. if test x"$use_threads" = xyes ; then
  105. AC_MSG_RESULT(yes)
  106. if test ! -z `$GLIB_CONFIG --help 2>&1 |grep 'gthread'` ; then
  107. CFLAGS="$CFLAGS `$GLIB_CONFIG --cflags gthread`"
  108. LIBS="$LIBS `$GLIB_CONFIG --libs gthread`"
  109. AC_DEFINE(USE_THREADS, 1, Whether to use multithread or not)
  110. else
  111. AC_MSG_ERROR([Sylpheed requires GThread from GLib to use threading.])
  112. fi
  113. else
  114. AC_MSG_RESULT(no)
  115. fi
  116. dnl Check for d_type member in struct dirent
  117. AC_MSG_CHECKING([whether struct dirent has d_type member])
  118. AC_CACHE_VAL(ac_cv_dirent_d_type,[
  119. AC_TRY_COMPILE([#include <dirent.h>],
  120. [struct dirent d; d.d_type = DT_REG;],
  121. ac_cv_dirent_d_type=yes, ac_cv_dirent_d_type=no)
  122. ])
  123. AC_MSG_RESULT($ac_cv_dirent_d_type)
  124. if test $ac_cv_dirent_d_type = yes; then
  125. AC_DEFINE(HAVE_DIRENT_D_TYPE, 1,
  126. Define if `struct dirent' has `d_type' member.)
  127. fi
  128. dnl Checks for header files.
  129. AC_HEADER_DIRENT
  130. AC_HEADER_STDC
  131. AC_HEADER_SYS_WAIT
  132. AC_CHECK_HEADERS(fcntl.h sys/file.h unistd.h paths.h \
  133. sys/param.h sys/utsname.h sys/select.h \
  134. wchar.h wctype.h locale.h)
  135. dnl alf - Check for apache installation f*ck up. apache may also install an
  136. dnl fnmatch, which includes their own regex stuff if USE_HSREGEX is defined
  137. AC_TRY_COMPILE([#include <stdlib.h>
  138. #include <fnmatch.h>],
  139. [int x = USE_HSREGEX;],
  140. ac_cv_have_apache_fnmatch=yes, ac_cv_have_apache_fnmatch=no)
  141. if test $ac_cv_have_apache_fnmatch = yes; then
  142. AC_DEFINE(HAVE_APACHE_FNMATCH, 1, Define if you need to work around apache regex/fnmatch !KLUDGE!)
  143. fi
  144. AC_MSG_CHECKING([whether to use Apache regex header kludge])
  145. AC_MSG_RESULT($ac_cv_have_apache_fnmatch)
  146. dnl Checks for typedefs, structures, and compiler characteristics.
  147. AC_C_CONST
  148. AC_TYPE_OFF_T
  149. AC_TYPE_PID_T
  150. AC_TYPE_SIZE_T
  151. AC_STRUCT_TM
  152. dnl AC_CHECK_TYPE(wint_t, unsigned int) does not work because wint_t
  153. dnl may be defined only in wchar.h (this happens with gcc-2.96).
  154. dnl So we need to use this extended macro.
  155. SYLPHEED_CHECK_TYPE(wint_t, unsigned int,
  156. [
  157. #if HAVE_WCHAR_H
  158. #include <wchar.h>
  159. #endif
  160. ], Define to `unsigned int' if <stddef.h> or <wchar.h> doesn't define.)
  161. GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF, Used to test for a u32 typedef)
  162. AC_CHECK_SIZEOF(unsigned short, 2)
  163. AC_CHECK_SIZEOF(unsigned int, 4)
  164. AC_CHECK_SIZEOF(unsigned long, 4)
  165. dnl Checks for library functions.
  166. AC_FUNC_ALLOCA
  167. AC_CHECK_FUNCS(gethostname mkdir mktime socket strstr strchr \
  168. wcsstr wcswcs iswalnum iswspace towlower \
  169. wcslen wcscpy wcsncpy \
  170. uname flock lockf inet_aton inet_addr \
  171. fchmod mkstemp)
  172. dnl *****************
  173. dnl ** common code **
  174. dnl *****************
  175. dnl check for glib
  176. AM_PATH_GLIB(1.2.6,,
  177. AC_MSG_ERROR(Test for GLIB failed. See the file 'INSTALL' for help.),
  178. gthread)
  179. dnl check for IPv6 option
  180. AC_ARG_ENABLE(ipv6,
  181. [ --disable-ipv6 Disable IPv6 support],
  182. [ac_cv_enable_ipv6=$enableval], [ac_cv_enable_ipv6=yes])
  183. dnl automated checks for IPv6 support.
  184. AC_MSG_CHECKING([whether to use IPv6])
  185. if test x"$ac_cv_enable_ipv6" = xyes; then
  186. AC_MSG_RESULT(yes)
  187. AC_MSG_CHECKING([for IPv6 support])
  188. AC_CACHE_VAL(ac_cv_ipv6,[
  189. AC_TRY_COMPILE([#define INET6
  190. #include <sys/types.h>
  191. #include <netinet/in.h>],
  192. [int x = IPPROTO_IPV6; struct in6_addr a;],
  193. ac_cv_ipv6=yes, ac_cv_ipv6=no)
  194. ])
  195. AC_MSG_RESULT($ac_cv_ipv6)
  196. if test $ac_cv_ipv6 = yes; then
  197. AC_DEFINE(INET6, 1, Define if you want IPv6 support.)
  198. else
  199. AC_MSG_WARN(*** IPv6 will not be supported ***)
  200. ac_cv_enable_ipv6=no
  201. fi
  202. else
  203. AC_MSG_RESULT(no)
  204. fi
  205. dnl Check for OpenSSL
  206. AC_ARG_ENABLE(openssl,
  207. [ --enable-openssl Attempt to use OpenSSL for SSL support.],
  208. [ac_cv_enable_openssl=$enableval], [ac_cv_enable_openssl=yes])
  209. if test x"$ac_cv_enable_openssl" = xyes; then
  210. PKG_CHECK_MODULES(OPENSSL, openssl >= 0.9.7, :, ac_cv_enable_openssl=no)
  211. if test x$ac_cv_enable_openssl = xyes; then
  212. AC_DEFINE(USE_OPENSSL, 1, Define if you want OpenSSL support)
  213. fi
  214. fi
  215. AC_SUBST(OPENSSL_CFLAGS)
  216. AC_SUBST(OPENSSL_LIBS)
  217. dnl password encryption
  218. OLDLIBS=$LIBS
  219. LIBS=
  220. AC_SEARCH_LIBS(encrypt, crypt, [], AC_MSG_ERROR(['encrypt'-function not found.]))
  221. CRYPT_LIBS=$LIBS
  222. AC_SUBST(CRYPT_LIBS)
  223. LIBS=$OLDLIBS
  224. AC_ARG_WITH(passcrypt-key, [ --with-passcrypt-key=KEY Key used to encode passwords (8 byte string)],
  225. with_passcrypt_key="$withval", with_passcrypt_key="passkey0")
  226. AC_SUBST(PASSCRYPT_KEY, $with_passcrypt_key)
  227. dnl RC dir (will be default at a certain point in time)
  228. AC_ARG_WITH(config-dir, [ --with-config-dir=RCDIR Local configuration dir (default: .sylpheed)],
  229. ac_cv_with_config_dir="$withval", ac_cv_with_config_dir=".sylpheed")
  230. if test x"$ac_cv_with_config_dir" = x""; then
  231. ac_cv_with_config_dir=".sylpheed"
  232. fi
  233. AC_DEFINE_UNQUOTED(CFG_RC_DIR, "$ac_cv_with_config_dir", Configuration directory)
  234. dnl ************************
  235. dnl ** GTK user interface **
  236. dnl ************************
  237. dnl Checks for GTK
  238. AM_PATH_GTK(1.2.6,,
  239. AC_MSG_ERROR(Test for GTK failed. See the file 'INSTALL' for help.))
  240. dnl check if gdk / gtk was compiled with USE_XIM
  241. AC_MSG_CHECKING([whether GTK was compiled with XIM support])
  242. CFLAGS_SAVE="$CFLAGS"
  243. LDFLAGS_SAVE="$LDFLAGS"
  244. CFLAGS="$CFLAGS `$GTK_CONFIG --cflags`"
  245. LDFLAGS="$LDFLAGS `$GTK_CONFIG --libs`"
  246. AC_CACHE_VAL(ac_cv_use_xim, [
  247. AC_TRY_LINK_FUNC([gdk_ic_attr_new],
  248. ac_cv_use_xim=yes, ac_cv_use_xim=no)
  249. ])
  250. AC_MSG_RESULT($ac_cv_use_xim)
  251. if test $ac_cv_use_xim = yes; then
  252. AC_DEFINE(USE_XIM, 1, Whether GTK was compiled with XIM support or not)
  253. fi
  254. CFLAGS="$CFLAGS_SAVE"
  255. LDFLAGS="$LDFLAGS_SAVE"
  256. dnl GNU/Aspell is used for spell checking
  257. AC_ARG_ENABLE(aspell,
  258. [ --enable-aspell Enable GNU/aspell support [default=no]],
  259. [ac_cv_enable_aspell=$enableval], [ac_cv_enable_aspell=no])
  260. AC_MSG_CHECKING([whether to use GNU/aspell])
  261. if test $ac_cv_enable_aspell = yes; then
  262. AC_MSG_RESULT(yes)
  263. AM_PATH_ASPELL(0.50, AC_DEFINE(USE_ASPELL, 1, Define if you use ASPELL to support spell checking),
  264. [use_aspell=no ac_cv_enable_aspell=no])
  265. else
  266. AC_MSG_RESULT(no)
  267. fi
  268. dnl want crash dialog
  269. AC_ARG_ENABLE(crash-dialog,
  270. [ --enable-crash-dialog Enable crash dialog [default=no]],
  271. [ac_cv_enable_crash_dialog=$enableval], [ac_cv_enable_crash_dialog=no])
  272. if test $ac_cv_enable_crash_dialog = yes; then
  273. dnl check if GDB is somewhere
  274. AC_CHECK_PROG(ac_cv_enable_crash_dialog, gdb, yes, no)
  275. AC_MSG_CHECKING([whether to use crash dialog])
  276. if test $ac_cv_enable_crash_dialog = yes; then
  277. AC_DEFINE(CRASH_DIALOG, 1, Pop up crash dialog)
  278. fi
  279. AC_MSG_RESULT($ac_cv_enable_crash_dialog)
  280. fi
  281. dnl Check for X-Face support
  282. AC_ARG_ENABLE(compface,
  283. [ --disable-compface Do not use compface (X-Face)],
  284. [ac_cv_enable_compface=$enableval], [ac_cv_enable_compface=yes])
  285. AC_MSG_CHECKING([whether to use compface])
  286. if test x"$ac_cv_enable_compface" = xyes; then
  287. AC_MSG_RESULT(yes)
  288. AC_CHECK_LIB(compface, uncompface,
  289. [AC_DEFINE(HAVE_LIBCOMPFACE, 1, Define if you want compface support.)],
  290. [ac_cv_enable_compface=no])
  291. if test x"$ac_cv_enable_compface" = xyes; then
  292. COMPFACE_LIBS="-lcompface"
  293. else
  294. COMPFACE_LIBS=""
  295. fi
  296. AC_SUBST(COMPFACE_LIBS)
  297. else
  298. AC_MSG_RESULT(no)
  299. fi
  300. dnl check for pthread support
  301. AC_ARG_ENABLE(pthread,
  302. [ --disable-pthread Disable pthread support],
  303. [ac_cv_enable_pthread=$enableval], [ac_cv_enable_pthread=yes])
  304. AC_MSG_CHECKING([whether to use pthread])
  305. if test x$ac_cv_enable_pthread = xno; then
  306. AC_MSG_RESULT(no)
  307. else
  308. AC_MSG_RESULT(yes)
  309. AC_CHECK_LIB(pthread, pthread_create, :, ac_cv_enable_pthread=no)
  310. AC_CHECK_HEADERS(pthread.h, :, ac_cv_enable_pthread=no)
  311. if test x$ac_cv_enable_pthread = xyes; then
  312. AC_DEFINE(USE_PTHREAD, 1, Define if you have pthread)
  313. PTHREAD_LIBS="-lpthread"
  314. fi
  315. fi
  316. AC_SUBST(PTHREAD_LIBS)
  317. dnl for LDAP support in addressbook
  318. dnl no check for libraries; dynamically loaded
  319. AC_ARG_ENABLE(ldap,
  320. [ --enable-ldap Enable LDAP support [default=no]],
  321. [ac_cv_enable_ldap=$enableval], [ac_cv_enable_ldap=no])
  322. AC_MSG_CHECKING([whether to use LDAP])
  323. if test x"$ac_cv_enable_ldap" = xno; then
  324. AC_MSG_RESULT(no)
  325. elif test x"$ac_cv_enable_ldap" = xyes -a x"$ac_cv_enable_pthread" = xno; then
  326. AC_MSG_RESULT(no - LDAP support needs pthread support)
  327. ac_cv_enable_ldap=no
  328. else
  329. AC_MSG_RESULT(yes)
  330. dnl check for available libraries, and pull them in
  331. AC_CHECK_LIB(resolv, res_query, LDAP_LIBS="$LDAP_LIBS -lresolv")
  332. AC_CHECK_LIB(socket, bind, LDAP_LIBS="$LDAP_LIBS -lsocket")
  333. AC_CHECK_LIB(nsl, gethostbyaddr, LDAP_LIBS="$LDAP_LIBS -lnsl")
  334. AC_CHECK_LIB(lber, ber_get_tag, LDAP_LIBS="$LDAP_LIBS -llber",,
  335. $LDAP_LIBS)
  336. AC_CHECK_HEADERS(ldap.h lber.h,
  337. [ ac_cv_enable_ldap=yes ],
  338. [ ac_cv_enable_ldap=no ])
  339. if test "$ac_cv_enable_ldap" = yes; then
  340. AC_CHECK_LIB(ldap, ldap_open,
  341. [ ac_cv_enable_ldap=yes ],
  342. [ ac_cv_enable_ldap=no ],
  343. $LDAP_LIBS)
  344. AC_CHECK_LIB(ldap, ldap_start_tls_s,
  345. [ ac_cv_have_tls=yes ],
  346. [ ac_cv_have_tls=no ])
  347. fi
  348. AC_MSG_CHECKING([whether ldap library is available])
  349. AC_MSG_RESULT($ac_cv_enable_ldap)
  350. AC_MSG_CHECKING([whether TLS library is available])
  351. AC_MSG_RESULT($ac_cv_have_tls)
  352. if test "$ac_cv_enable_ldap" = yes; then
  353. CFLAGS="$CFLAGS `$GLIB_CONFIG --cflags gthread`"
  354. LDAP_LIBS="$LDAP_LIBS -lldap `$GLIB_CONFIG --libs gthread`"
  355. AC_DEFINE(USE_LDAP, 1, Define if you want LDAP support in addressbook.)
  356. AC_SUBST(LDAP_LIBS)
  357. if test "$ac_cv_have_tls" = yes; then
  358. AC_DEFINE(USE_LDAP_TLS, 1, Define if you want LDAP TLS support in addressbook.)
  359. fi
  360. fi
  361. fi
  362. dnl for JPilot support in addressbook
  363. dnl no check for libraries; these are dynamically loaded
  364. AC_ARG_ENABLE(jpilot,
  365. [ --enable-jpilot Enable JPilot support [default=no]],
  366. [ac_cv_enable_jpilot=$enableval], [ac_cv_enable_jpilot=no])
  367. AC_MSG_CHECKING([whether to use JPilot])
  368. if test "$ac_cv_enable_jpilot" = yes; then
  369. AC_MSG_RESULT(yes)
  370. AC_CHECK_HEADERS(pi-args.h pi-appinfo.h pi-address.h,
  371. [ AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.) ],
  372. [ ac_cv_enable_jpilot=no ])
  373. if test "$ac_cv_enable_jpilot" = no; then
  374. AC_CHECK_HEADERS(libpisock/pi-args.h libpisock/pi-appinfo.h libpisock/pi-address.h,
  375. [ ac_cv_enable_jpilot=yes
  376. AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.) ])
  377. fi
  378. AC_CHECK_LIB(pisock, unpack_Address, [JPILOT_LIBS="-lpisock"], [JPILOT_LIBS="" ac_cv_enable_jpilot="no"])
  379. if test x"$ac_cv_enable_jpilot" = xyes; then
  380. AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.)
  381. else
  382. AC_MSG_NOTICE([JPilot support not available])
  383. fi
  384. AC_SUBST(JPILOT_LIBS)
  385. else
  386. AC_MSG_RESULT(no)
  387. fi
  388. dnl #######################################################################
  389. dnl # Check for startup notification
  390. dnl #######################################################################
  391. AC_ARG_ENABLE(startup-notification, [ --disable-startup-notification compile without startup notification support],,enable_startup_notification=yes)
  392. if test "x$enable_startup_notification" = "xyes"; then
  393. PKG_CHECK_MODULES(STARTUP_NOTIFICATION, libstartup-notification-1.0 >= 0.5,
  394. [
  395. AC_DEFINE(HAVE_STARTUP_NOTIFICATION, 1, [Define if we're using libstartup-notification.])
  396. echo "Building with libstartup-notification"
  397. enable_startup_notification=yes
  398. ],
  399. [
  400. echo "Building without libstartup-notification"
  401. enable_startup_notification=no
  402. ])
  403. AC_SUBST(STARTUP_NOTIFICATION_CFLAGS)
  404. AC_SUBST(STARTUP_NOTIFICATION_LIBS)
  405. fi
  406. dnl *************************
  407. dnl ** section for plugins **
  408. dnl *************************
  409. PLUGINS=""
  410. dnl --- Trayicon ---
  411. AC_ARG_ENABLE(trayicon-plugin,
  412. [ --disable-trayicon-plugin Do not build System Tray Icon plugin],
  413. [ac_cv_enable_trayicon_plugin=$enableval], [ac_cv_enable_trayicon_plugin=yes])
  414. if test x"$ac_cv_enable_trayicon_plugin" = xyes; then
  415. PLUGINS="trayicon $PLUGINS"
  416. fi
  417. AM_CONDITIONAL(BUILD_TRAYICON_PLUGIN, test x"$ac_cv_enable_trayicon_plugin" = xyes)
  418. dnl --- SpamAssassin ---
  419. AC_ARG_ENABLE(spamassassin-plugin,
  420. [ --enable-spamassassin-plugin Build SpamAssassin plugin [default=no]],
  421. [ac_cv_enable_spamassassin_plugin=$enableval], [ac_cv_enable_spamassassin_plugin=no])
  422. if test x"$ac_cv_enable_spamassassin_plugin" = xyes; then
  423. AC_SPAMASSASSIN
  424. PLUGINS="spamassassin $PLUGINS"
  425. fi
  426. AM_CONDITIONAL(BUILD_SPAMASSASSIN_PLUGIN, test x"$ac_cv_enable_spamassassin_plugin" = xyes)
  427. dnl --- PGP/MIME ---
  428. AC_ARG_ENABLE(pgpmime-plugin,
  429. [ --disable-pgpmime-plugin Do not build PGP/MIME plugin],
  430. [ac_cv_enable_pgpmime_plugin=$enableval], [ac_cv_enable_pgpmime_plugin=yes])
  431. if test x"$ac_cv_enable_pgpmime_plugin" = xyes; then
  432. AM_PATH_GPGME(0.3.10, AC_DEFINE(USE_GPGME, 1, Define if you use GPGME to support OpenPGP.),
  433. [ac_cv_enable_pgpmime_plugin=no])
  434. if test x"$ac_cv_enable_pgpmime_plugin" = xyes; then
  435. PLUGINS="pgpmime $PLUGINS"
  436. fi
  437. fi
  438. AM_CONDITIONAL(BUILD_PGPMIME_PLUGIN, test x"$ac_cv_enable_pgpmime_plugin" = xyes)
  439. dnl --- MathML Viewer ---
  440. AC_ARG_ENABLE(mathml-viewer-plugin,
  441. [ --disable-mathml-viewer-plugin Do not build MathML-Viewer plugin],
  442. [ac_cv_enable_mathml_viewer_plugin=$enableval], [ac_cv_enable_mathml_viewer_plugin=yes])
  443. if test x"$ac_cv_enable_mathml_viewer_plugin" = xyes; then
  444. PKG_CHECK_MODULES(GTK_MATH_VIEW, gtkmathview >= 0.4.2 gtkmathview < 0.5, :, ac_cv_enable_mathml_viewer_plugin=no)
  445. if test x"$ac_cv_enable_mathml_viewer_plugin" = xyes; then
  446. PLUGINS="mathml-viewer $PLUGINS"
  447. fi
  448. fi
  449. AC_SUBST(GTK_MATH_VIEW_CFLAGS)
  450. AC_SUBST(GTK_MATH_VIEW_LIBS)
  451. AM_CONDITIONAL(BUILD_MATHML_VIEWER_PLUGIN, test x"$ac_cv_enable_mathml_viewer_plugin" = xyes)
  452. dnl --- Image Viewer ---
  453. AC_ARG_ENABLE(image-viewer-plugin,
  454. [ --disable-image-viewer-plugin Do not build image viewer plugin],
  455. [ac_cv_enable_image_viewer_plugin=$enableval], [ac_cv_enable_image_viewer_plugin=yes])
  456. if test x"$ac_cv_enable_image_viewer_plugin" = xyes; then
  457. AC_ARG_ENABLE(gdk-pixbuf,
  458. [ --disable-gdk-pixbuf Do not use gdk-pixbuf],
  459. [ac_cv_enable_gdk_pixbuf=$enableval], [ac_cv_enable_gdk_pixbuf=yes])
  460. AC_ARG_ENABLE(imlib,
  461. [ --disable-imlib Do not use imlib],
  462. [ac_cv_enable_imlib=$enableval], [ac_cv_enable_imlib=yes])
  463. if test "$ac_cv_enable_gdk_pixbuf" = yes; then
  464. AM_PATH_GDK_PIXBUF(0.8.0,
  465. [AC_DEFINE(HAVE_GDK_PIXBUF, 1, Define if you use gdk-pixbuf to support image viewer)
  466. ac_cv_enable_imlib=no], [ac_cv_enable_gdk_pixbuf=no])
  467. fi
  468. if test "$ac_cv_enable_imlib" = yes; then
  469. AM_PATH_GDK_IMLIB(1.9,
  470. AC_DEFINE(HAVE_GDK_IMLIB, 1, Define if you use gdk_imlib to support image viewer),
  471. [ac_cv_enable_imlib=no])
  472. fi
  473. if test "$ac_cv_enable_gdk_pixbuf" = yes; then
  474. PLUGINS="image-viewer(gdk-pixbuf) $PLUGINS"
  475. elif test "$ac_cv_enable_imlib" = yes; then
  476. PLUGINS="image-viewer(gdk_imlib) $PLUGINS"
  477. else
  478. ac_cv_enable_image_viewer_plugin=no
  479. fi
  480. fi
  481. AM_CONDITIONAL(BUILD_IMAGE_VIEWER_PLUGIN, test x"$ac_cv_enable_image_viewer_plugin" = xyes)
  482. dnl --- Dillo Viewer ---
  483. AC_ARG_ENABLE(dillo-viewer-plugin,
  484. [ --disable-dillo-viewer-plugin Do not build Dillo plugin for html mail rendering],
  485. [ac_cv_enable_dillo_viewer_plugin=$enableval], [ac_cv_enable_dillo_viewer_plugin=yes])
  486. if test x"$ac_cv_enable_dillo_viewer_plugin" = xyes; then
  487. PLUGINS="dillo-viewer $PLUGINS"
  488. fi
  489. AM_CONDITIONAL(BUILD_DILLO_VIEWER_PLUGIN, test x"$ac_cv_enable_dillo_viewer_plugin" = xyes)
  490. dnl --- Demo ---
  491. AC_ARG_ENABLE(demo-plugin,
  492. [ --enable-demo-plugin Build demo plugin [default=no]],
  493. [ac_cv_enable_demo_plugin=$enableval], [ac_cv_enable_demo_plugin=no])
  494. if test x"$ac_cv_enable_demo_plugin" = xyes; then
  495. PLUGINS="demo $PLUGINS"
  496. fi
  497. AM_CONDITIONAL(BUILD_DEMO_PLUGIN, test x"$ac_cv_enable_demo_plugin" = xyes)
  498. dnl --- ClamAV ---
  499. AC_ARG_ENABLE(clamav-plugin,
  500. [ --disable-clamav-plugin Do not build Clam AntiVirus plugin],
  501. [ac_cv_enable_clamav_plugin=$enableval], [ac_cv_enable_clamav_plugin=yes])
  502. if test x"$ac_cv_enable_clamav_plugin" = xyes; then
  503. AC_CHECK_LIB(clamav, cl_scanfile, clamav_lib=-lclamav, ac_cv_enable_clamav_plugin=no)
  504. AC_CHECK_HEADERS(clamav.h, :, ac_cv_enable_clamav_plugin=no)
  505. if test x"$ac_cv_enable_clamav_plugin" = xyes; then
  506. CLAMAV_LIBS="${clamav_lib}"
  507. PLUGINS="clamav $PLUGINS"
  508. else
  509. AC_MSG_NOTICE([clamav library not found, will not build clamav plugin])
  510. fi
  511. fi
  512. AC_SUBST(CLAMAV_LIBS)
  513. AM_CONDITIONAL(BUILD_CLAMAV_PLUGIN, test x"$ac_cv_enable_clamav_plugin" = xyes)
  514. dnl ****************************
  515. dnl ** Final configure output **
  516. dnl ****************************
  517. AC_OUTPUT([
  518. Makefile
  519. sylpheed.spec
  520. intl/Makefile
  521. m4/Makefile
  522. po/Makefile.in
  523. src/common/version.h
  524. src/Makefile
  525. src/common/Makefile
  526. src/common/passcrypt.h
  527. src/gtk/Makefile
  528. src/plugins/Makefile
  529. src/plugins/demo/Makefile
  530. src/plugins/spamassassin/Makefile
  531. src/plugins/mathml_viewer/Makefile
  532. src/plugins/dillo_viewer/Makefile
  533. src/plugins/image_viewer/Makefile
  534. src/plugins/trayicon/Makefile
  535. src/plugins/trayicon/libeggtrayicon/Makefile
  536. src/plugins/clamav/Makefile
  537. src/plugins/pgpmime/Makefile
  538. doc/Makefile
  539. doc/faq/Makefile
  540. doc/faq/de/Makefile
  541. doc/faq/en/Makefile
  542. doc/faq/es/Makefile
  543. doc/faq/fr/Makefile
  544. doc/faq/it/Makefile
  545. doc/man/Makefile
  546. doc/manual/Makefile
  547. doc/manual/de/Makefile
  548. doc/manual/en/Makefile
  549. doc/manual/es/Makefile
  550. doc/manual/fr/Makefile
  551. doc/manual/ja/Makefile
  552. tools/Makefile
  553. config/Makefile
  554. sylpheed-claws.pc
  555. ])
  556. dnl Output the configuration summary
  557. echo ""
  558. echo "$PACKAGE $VERSION"
  559. echo ""
  560. echo "JPilot : $ac_cv_enable_jpilot"
  561. echo "LDAP : $ac_cv_enable_ldap"
  562. echo "OpenSSL : $ac_cv_enable_openssl"
  563. echo "iconv : $am_cv_func_iconv"
  564. echo "compface : $ac_cv_enable_compface"
  565. echo "IPv6 : $ac_cv_enable_ipv6"
  566. echo "GNU/aspell : $ac_cv_enable_aspell"
  567. echo "Crash dialog : $ac_cv_enable_crash_dialog"
  568. echo "Plugins : $PLUGINS"
  569. echo "Config dir : $ac_cv_with_config_dir"
  570. echo ""
  571. echo "The binary will be installed in $prefix/bin"
  572. echo ""
  573. echo "Configure finished, type 'make' to build."