123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422 |
- dnl Process this file with autoconf to produce a configure script.
- AC_INIT(src/main.c)
- PACKAGE=sylpheed
- dnl version number
- MAJOR_VERSION=0
- MINOR_VERSION=8
- MICRO_VERSION=2
- INTERFACE_AGE=0
- BINARY_AGE=0
- EXTRA_VERSION=claws17
- EXTRA_VERSION=${EXTRA_VERSION}-endian
- VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
- dnl set $target
- AC_CANONICAL_SYSTEM
- dnl
- AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
- dnl AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
- dnl AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
- AC_SUBST(PACKAGE)
- AC_SUBST(VERSION)
- dnl GNOME installed?
- AC_PATH_PROG(GNOME_CONFIG, gnome-config, no)
- if test "$GNOME_CONFIG" != no; then
- gnomedir="`gnome-config --prefix`"
- AC_SUBST(gnomedir)
- fi
- AM_CONDITIONAL(SYLPHEED_GNOME, test -d "$gnomedir")
- dnl Claws version
- AC_DEFINE(CLAWS, 1)
- dnl libtool versioning
- LT_RELEASE=$MAJOR_VERSION.$MINOR_VERSION
- LT_CURRENT=`expr $MICRO_VERSION - $INTERFACE_AGE`
- LT_REVISION=$INTERFACE_AGE
- LT_AGE=`expr $BINARY_AGE - $INTERFACE_AGE`
- AC_SUBST(LT_RELEASE)
- AC_SUBST(LT_CURRENT)
- AC_SUBST(LT_REVISION)
- AC_SUBST(LT_AGE)
- dnl Specify a header configuration file
- AM_CONFIG_HEADER(config.h)
- AM_MAINTAINER_MODE
- dnl Checks for programs.
- AC_ARG_PROGRAM
- AC_PROG_CC
- AC_ISC_POSIX
- AM_PROG_CC_STDC
- AC_PROG_INSTALL
- AC_PROG_LN_S
- AC_PROG_MAKE_SET
- AC_PROG_CPP
- dnl AC_PROG_RANLIB
- AM_PROG_LEX
- AC_PROG_YACC
- AM_PROG_LIBTOOL
- SYLPHEED_ACLOCAL_INCLUDE(ac)
- case "$target" in
- *-darwin*)
- CFLAGS="$CFLAGS -traditional-cpp -fno-common"
- ;;
- esac
- dnl for gettext
- ALL_LINGUAS="cs de el en_GB es fr hr it ja ko nl pl pt_BR ru sr sv"
- AM_GNU_GETTEXT
- dnl AC_CHECK_FUNC(gettext, AC_CHECK_LIB(intl, gettext))
- localedir='${prefix}/${DATADIRNAME}/locale'
- AC_SUBST(localedir)
- manualdir='${prefix}/${DATADIRNAME}/${PACKAGE}/manual'
- AC_SUBST(manualdir)
- faqdir='${prefix}/${DATADIRNAME}/${PACKAGE}/faq'
- AC_SUBST(faqdir)
- dnl Set PACKAGE_DATA_DIR in config.h.
- if test "x${datadir}" = 'x${prefix}/share'; then
- if test "x${prefix}" = "xNONE"; then
- AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}")
- else
- AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}")
- fi
- else
- AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datadir}/${PACKAGE}")
- fi
- dnl Checks for libraries.
- AM_PATH_GLIB(1.2.6,,
- AC_MSG_ERROR(Test for GLIB failed. See the file 'INSTALL' for help.),
- gthread)
- AM_PATH_GTK(1.2.6,,
- AC_MSG_ERROR(Test for GTK failed. See the file 'INSTALL' for help.))
- dnl Check for built-in image view support
- AC_ARG_ENABLE(gdk-pixbuf,
- [ --disable-gdk-pixbuf Do not use gdk-pixbuf],
- [ac_cv_enable_gdk_pixbuf=$enableval], [ac_cv_enable_gdk_pixbuf=yes])
- AC_ARG_ENABLE(imlib,
- [ --disable-imlib Do not use imlib],
- [ac_cv_enable_imlib=$enableval], [ac_cv_enable_imlib=yes])
- if test "$ac_cv_enable_gdk_pixbuf" = yes; then
- AM_PATH_GDK_PIXBUF(0.8.0,
- [AC_DEFINE(HAVE_GDK_PIXBUF)
- ac_cv_enable_imlib=no], [ac_cv_enable_gdk_pixbuf=no])
- fi
- if test "$ac_cv_enable_imlib" = yes; then
- AM_PATH_GDK_IMLIB(1.9,
- AC_DEFINE(HAVE_GDK_IMLIB), [ac_cv_enable_imlib=no])
- fi
- if test "$ac_cv_enable_gdk_pixbuf" = no -a "$ac_cv_enable_imlib" = no; then
- AC_MSG_WARN(*** Built-in image view will not be supported ***)
- fi
- dnl GPGME is used to support OpenPGP
- AC_ARG_ENABLE(gpgme,
- [ --enable-gpgme Enable GnuPG support using GPGME [default=no]],
- [ac_cv_enable_gpgme=$enableval], [ac_cv_enable_gpgme=no])
- AC_MSG_CHECKING([whether to use GPGME])
- if test $ac_cv_enable_gpgme = yes; then
- AC_MSG_RESULT(yes)
- AM_PATH_GPGME(0.3.5, AC_DEFINE(USE_GPGME), [use_gpgme=no
- ac_cv_enable_gpgme=no])
- else
- AC_MSG_RESULT(no)
- fi
- dnl for JPilot support in addressbook
- dnl no check for libraries; these are dynamically loaded
- AC_ARG_ENABLE(jpilot,
- [ --enable-jpilot Enable JPilot support [default=no]],
- [ac_cv_enable_jpilot=$enableval], [ac_cv_enable_jpilot=no])
- AC_MSG_CHECKING([whether to use JPilot])
- if test "$ac_cv_enable_jpilot" = yes; then
- AC_MSG_RESULT(yes)
- AC_CHECK_HEADERS(pi-args.h pi-appinfo.h pi-address.h,
- [ AC_DEFINE(USE_JPILOT) ],
- [ ac_cv_enable_jpilot=no ])
- if test "$ac_cv_enable_jpilot" = no; then
- AC_CHECK_HEADERS(libpisock/pi-args.h libpisock/pi-appinfo.h libpisock/pi-address.h,
- [ ac_cv_enable_jpilot=yes
- AC_DEFINE(USE_JPILOT) ])
- fi
- AC_MSG_CHECKING([whether jpilot is available])
- AC_MSG_RESULT($ac_cv_enable_jpilot)
- if test "$ac_cv_enable_jpilot" = yes; then
- LIBS="$LIBS -lpisock"
- fi
- else
- AC_MSG_RESULT(no)
- fi
- dnl for LDAP support in addressbook
- AC_ARG_ENABLE(ldap,
- [ --enable-ldap Enable LDAP support [default=no]],
- [ac_cv_enable_ldap=$enableval], [ac_cv_enable_ldap=no])
- AC_MSG_CHECKING([whether to use LDAP])
- if test "$ac_cv_enable_ldap" = yes; then
- AC_MSG_RESULT(yes)
- dnl check for available libraries, and pull them in
- AC_CHECK_LIB(resolv, res_query, LDAP_LIBS="$LDAP_LIBS -lresolv")
- AC_CHECK_LIB(socket, bind, LDAP_LIBS="$LDAP_LIBS -lsocket")
- AC_CHECK_LIB(nsl, gethostbyaddr, LDAP_LIBS="$LDAP_LIBS -lnsl")
- AC_CHECK_LIB(lber, ber_get_tag, LDAP_LIBS="$LDAP_LIBS -llber")
- dnl we need libpthread for sylpheed ldap, until we find
- dnl a better way to handle ldap requests asynchronously...
- AC_CHECK_LIB(pthread, pthread_create, LDAP_LIBS="$LDAP_LIBS -lpthread")
- dnl the check for the headers
- AC_CHECK_HEADERS(ldap.h lber.h pthread.h,
- [ ac_cv_enable_ldap=yes ],
- [ ac_cv_enable_ldap=no ])
- AC_MSG_CHECKING([whether ldap headers were detected])
- AC_MSG_RESULT($ac_cv_enable_ldap)
- if test "$ac_cv_enable_ldap" = yes; then
- AC_CHECK_LIB(ldap, ldap_open, [
- ac_cv_enable_ldap=yes
- CFLAGS="$CFLAGS `$GLIB_CONFIG --cflags gthread`"
- LDAP_LIBS="$LDAP_LIBS -lldap `$GLIB_CONFIG --libs gthread`"
- AC_DEFINE(USE_LDAP)
- AC_SUBST(LDAP_LIBS)
- ],
- [ ac_cv_enable_ldap=no ], $LDAP_LIBS )
- AC_MSG_CHECKING([whether ldap libs were detected])
- AC_MSG_RESULT($ac_cv_enable_ldap)
- fi
- else
- AC_MSG_RESULT(no)
- fi
- dnl Check for OpenSSL
- AC_ARG_ENABLE(ssl,
- [ --enable-ssl Enable SSL support using OpenSSL [default=no]],
- [ac_cv_enable_ssl=$enableval], [ac_cv_enable_ssl=no])
- AC_MSG_CHECKING([whether to use OpenSSL])
- if test $ac_cv_enable_ssl = yes; then
- AC_MSG_RESULT(yes)
- AC_MSG_CHECKING([if openssl is available])
- LIBS="$LIBS -lssl -lcrypto"
- AC_TRY_LINK([
- #include <openssl/opensslv.h>
- ], [ return OPENSSL_VERSION_NUMBER; ],
- [ AC_MSG_RESULT(yes)
- AC_DEFINE(USE_SSL) ],
- [ AC_MSG_RESULT(no)
- LIBS="$ac_save_LIBS"
- ac_cv_enable_ssl=no ])
- else
- AC_MSG_RESULT(no)
- fi
- dnl Check for X-Face support
- AC_ARG_ENABLE(compface,
- [ --disable-compface Do not use compface (X-Face)],
- [ac_cv_enable_compface=$enableval], [ac_cv_enable_compface=yes])
- if test "$ac_cv_enable_compface" = yes; then
- AC_CHECK_LIB(compface, uncompface,,[ac_cv_enable_compface=no])
- fi
- dnl Check for libjconv
- AC_ARG_ENABLE(jconv,
- [ --disable-jconv Do not use libjconv],
- [ac_cv_enable_jconv=$enableval], [ac_cv_enable_jconv=yes])
- if test "$ac_cv_enable_jconv" = yes; then
- AC_CHECK_LIB(jconv, jconv_alloc_conv,,[ac_cv_enable_jconv=no])
- fi
- AC_CHECK_LIB(xpg4, setlocale)
- dnl for GThread support (currently disabled)
- dnl AC_ARG_ENABLE(threads,
- dnl [ --enable-threads Enable multithread support [default=no]],
- dnl [use_threads=$enableval], [use_threads=no])
- AC_MSG_CHECKING([whether to use threads])
- if test x"$use_threads" = xyes ; then
- AC_MSG_RESULT(yes)
- if test ! -z `$GLIB_CONFIG --help 2>&1 |grep 'gthread'` ; then
- CFLAGS="$CFLAGS `$GLIB_CONFIG --cflags gthread`"
- LIBS="$LIBS `$GLIB_CONFIG --libs gthread`"
- AC_DEFINE(USE_THREADS)
- else
- AC_MSG_ERROR([Sylpheed requires GThread from GLib to use threading.])
- fi
- else
- AC_MSG_RESULT(no)
- fi
- dnl check for IPv6 option
- AC_ARG_ENABLE(ipv6,
- [ --enable-ipv6 Enable IPv6 support [default=no]],
- [ac_cv_enable_ipv6=$enableval], [ac_cv_enable_ipv6=no])
- dnl automated checks for IPv6 support.
- AC_MSG_CHECKING([whether to use IPv6])
- if test x"$ac_cv_enable_ipv6" = xyes; then
- AC_MSG_RESULT(yes)
- AC_MSG_CHECKING([for IPv6 support])
- AC_CACHE_VAL(ac_cv_ipv6,[
- AC_TRY_COMPILE([#define INET6
- #include <sys/types.h>
- #include <netinet/in.h>],
- [int x = IPPROTO_IPV6; struct in6_addr a;],
- ac_cv_ipv6=yes, ac_cv_ipv6=no)
- ])
- AC_MSG_RESULT($ac_cv_ipv6)
- if test $ac_cv_ipv6 = yes; then
- AC_DEFINE(INET6)
- else
- AC_MSG_WARN(*** IPv6 will not be supported ***)
- ac_cv_enable_ipv6=no
- fi
- else
- AC_MSG_RESULT(no)
- fi
- dnl ASPELL is user for spell checking
- AC_ARG_ENABLE(aspell,
- [ --enable-aspell Enable GNU/aspell support [default=no]],
- [ac_cv_enable_aspell=$enableval], [ac_cv_enable_aspell=no])
- AC_MSG_CHECKING([whether to use GNU/aspell])
- if test $ac_cv_enable_aspell = yes; then
- AC_MSG_RESULT(yes)
- AM_PATH_ASPELL(0.50, AC_DEFINE(USE_ASPELL), [use_aspell=no
- ac_cv_enable_aspell=no])
- aspell_path="`$ASPELL config dict-dir`"
- AC_DEFINE_UNQUOTED(ASPELL_PATH, "${aspell_path}/")
- else
- AC_MSG_RESULT(no)
- fi
- dnl check if gdk / gtk was compiled with USE_XIM
- AC_MSG_CHECKING([whether GTK was compiled with XIM support])
- CFLAGS_SAVE="$CFLAGS"
- LDFLAGS_SAVE="$LDFLAGS"
- CFLAGS="$CFLAGS `$GLIB_CONFIG --cflags` `gtk-config --cflags`"
- LDFLAGS="$LIBS `$GLIB_CONFIG --libs` `gtk-config --libs`"
- AC_CACHE_VAL(ac_cv_use_gtkgdk_xim, [
- AC_TRY_LINK_FUNC([ gdk_ic_attr_new ],
- ac_cv_use_gtkgdk_xim=yes, ac_cv_use_gtkgdk_xim=no)
- ])
- AC_MSG_RESULT($ac_cv_use_gtkgdk_xim)
- if test $ac_cv_use_gtkgdk_xim = yes; then
- AC_DEFINE(USE_GTKGDK_XIM)
- fi
- CFLAGS="$CFLAGS_SAVE"
- LDFLAGS="$LDFLAGS_SAVE"
- dnl want crash dialog
- AC_ARG_ENABLE(crash-dialog,
- [ --enable-crash-dialog Enable crash dialog [default=no]],
- [ac_cv_enable_crash_dialog=$enableval], [ac_cv_enable_crash_dialog=no])
- if test $ac_cv_enable_crash_dialog = yes; then
- dnl check if GDB is somewhere
- AC_CHECK_PROG(ac_cv_enable_crash_dialog, gdb, yes, no)
- AC_MSG_CHECKING([whether to use crash dialog])
- if test $ac_cv_enable_crash_dialog = yes; then
- AC_DEFINE(CRASH_DIALOG)
- fi
- AC_MSG_RESULT($ac_cv_enable_crash_dialog)
- fi
- dnl Checks for header files.
- AC_HEADER_DIRENT
- AC_HEADER_STDC
- AC_HEADER_SYS_WAIT
- AC_CHECK_HEADERS(fcntl.h sys/file.h unistd.h paths.h \
- sys/param.h sys/utsname.h sys/select.h \
- wchar.h wctype.h)
- dnl Checks for typedefs, structures, and compiler characteristics.
- AC_C_CONST
- AC_TYPE_OFF_T
- AC_TYPE_PID_T
- AC_TYPE_SIZE_T
- AC_STRUCT_TM
- dnl AC_CHECK_TYPE(wint_t, unsigned int) does not work because wint_t
- dnl may be defined only in wchar.h (this happens with gcc-2.96).
- dnl So we need to use this extended macro.
- SYLPHEED_CHECK_TYPE(wint_t, unsigned int,
- [
- #if HAVE_WCHAR_H
- #include <wchar.h>
- #endif
- ])
- GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF)
- AC_CHECK_SIZEOF(unsigned short, 2)
- AC_CHECK_SIZEOF(unsigned int, 4)
- AC_CHECK_SIZEOF(unsigned long, 4)
- dnl Checks for library functions.
- AC_FUNC_ALLOCA
- AC_CHECK_FUNCS(gethostname mkdir mktime socket strstr strchr \
- wcsstr wcswcs iswalnum iswspace towlower \
- wcslen wcscpy wcsncpy \
- uname flock lockf inet_aton inet_addr \
- fchmod mkstemp)
- AC_OUTPUT([
- Makefile
- sylpheed.spec
- intl/Makefile
- ac/Makefile
- po/Makefile.in
- src/version.h
- src/Makefile
- faq/Makefile
- faq/de/Makefile
- faq/en/Makefile
- faq/es/Makefile
- faq/fr/Makefile
- faq/it/Makefile
- man/Makefile
- manual/Makefile
- manual/de/Makefile
- manual/en/Makefile
- manual/es/Makefile
- manual/fr/Makefile
- manual/ja/Makefile
- tools/Makefile
- ])
- dnl Output the configuration summary
- echo ""
- echo "$PACKAGE $VERSION"
- echo ""
- if test "$ac_cv_enable_gdk_pixbuf" = yes; then
- echo "image support : yes (gdk-pixbuf)"
- elif test "$ac_cv_enable_imlib" = yes; then
- echo "image support : yes (gdk_imlib)"
- else
- echo "image support : no"
- fi
- echo "GPGME : $ac_cv_enable_gpgme"
- echo "JPilot : $ac_cv_enable_jpilot"
- echo "LDAP : $ac_cv_enable_ldap"
- echo "OpenSSL : $ac_cv_enable_ssl"
- echo "compface : $ac_cv_enable_compface"
- echo "libjconv : $ac_cv_enable_jconv"
- echo "IPv6 : $ac_cv_enable_ipv6"
- echo "GNU/aspell : $ac_cv_enable_aspell"
- echo "Crash dialog : $ac_cv_enable_crash_dialog"
- echo ""
- echo "The binary will be installed in $prefix/bin"
- echo ""
- echo "Configure finished, type 'make' to build."
|