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