dnl $Id$ dnl dnl Orage - Calendar application for Xfce dnl dnl Copyright (c) 2003-2006 dnl The Xfce development team. All rights reserved. dnl dnl Written for Xfce by Juha Kautto dnl dnl Version information m4_define([orage_version], [4.5.92.5-svn]) m4_define([gtk_minimum_version], [2.6.0]) m4_define([xfce_minimum_version], [4.4.0]) m4_define([dbus_minimum_version], [0.34]) m4_define([notify_minimum_version], [0.3.2]) m4_define([intltool_minimum_version], [0.31]) dnl # DO NOT MODIFY ANYTHING BELOW THIS LINE, UNLESS YOU KNOW WHAT dnl # YOU ARE DOING. dnl Initialize autoconf AC_COPYRIGHT([Copyright (c) 2003-2007 The Xfce development team. All rights reserved. Written for Xfce by Juha Kautto .]) AC_INIT([orage], [orage_version], [xfce4-dev@xfce.org]) AC_CANONICAL_SYSTEM() AC_PREREQ([2.50]) AC_REVISION([$Id$]) dnl Initialize automake ORAGE_VERSION=orage_version() AM_INIT_AUTOMAKE([orage], [$ORAGE_VERSION]) AM_CONFIG_HEADER([config.h]) AM_MAINTAINER_MODE() dnl Check for UNIX variants AC_AIX() AC_ISC_POSIX() AC_MINIX() AM_CONDITIONAL([HAVE_CYGWIN], [test "`uname | grep \"CYGWIN\"`" != ""]) dnl Check for basic programs AC_PROG_CC() AC_PROG_INSTALL() AC_PROG_INTLTOOL([intltool_minimum_version], [no-xml]) AC_PROG_LIBTOOL() AC_PROG_YACC() AC_PROG_LN_S() AM_PROG_LEX() dnl Check for additional programs (libical) AC_CHECK_PROGS([AR], [ar aal], [ar]) AC_CHECK_PROGS([PERL], [perl5 perl]) dnl Check for standard header files AC_HEADER_STDC() AC_CHECK_HEADERS([assert.h errno.h pthread.h stdint.h time.h sys/types.h unistd.h wctype.h]) dnl Checks for typedefs, structures, and compiler characteristics (libical) AC_C_CONST() AC_TYPE_SIZE_T() AC_TYPE_MODE_T() AC_STRUCT_TM() dnl Checks for library functions (libical) AC_CHECK_FUNCS([gmtime_r iswspace strdup snprintf]) dnl Check for i18n support XDT_I18N([@LINGUAS@]) dnl Check for required packages XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [xfce_minimum_version]) dnl Needed for panel plugin XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [xfce_minimum_version]) dnl the ical magic ac_INCLUDED_LIBICAL=yes AC_MSG_CHECKING(for Berkeley DB4 support) AC_ARG_WITH(bdb4, [ --with-bdb4 Add support for Berkeley DB 4.0], [case $with_bdb4 in yes) AC_MSG_RESULT(yes) AC_MSG_RESULT( Adding Berkeley DB support) WITH_BDB4="yes" ;; no) AC_MSG_RESULT(no) ;; *) AC_MSG_RESULT(no) AC_MSG_RESULT(Ignoring unknown argument to --with-bdb4: $with_bdb4) ;; esac], AC_MSG_RESULT(no)) if test x$WITH_BDB4 = xyes; then AC_ARG_WITH(bdb4_dir, [ --with-bdb4-dir=PATH Use PATH as location of BerkeleyDB 4.0], BDB_DIR=$withval, BDB_DIR=/usr/local/BerkeleyDB.4.0 ) AC_MSG_CHECKING(for Berkeley DB include files) if test -f $BDB_DIR/include/db.h; then BDB_DIR_INCLUDE=$BDB_DIR/include AC_MSG_RESULT($BDB_DIR_INCLUDE) else if test -f $BDB_DIR/include/db4/db.h; then BDB_DIR_INCLUDE=$BDB_DIR/include/db4 AC_MSG_RESULT($BDB_DIR_INCLUDE) else WITH_BDB4="no" AC_MSG_RESULT(not found!) fi fi AC_MSG_CHECKING(for Berkeley DB libraries) if test -f $BDB_DIR/lib/libdb-4.0.la; then BDB_DIR_LIB=$BDB_DIR/lib BDB_LIB=libdb-4.0.la AC_MSG_RESULT($BDB_DIR_LIB $BDB_LIB) else if test -f $BDB_DIR/lib/libdb4.la; then BDB_DIR_LIB=$BDB_DIR/lib BDB_LIB=libdb4.la AC_MSG_RESULT($BDB_DIR_LIB $BDB_LIB) else WITH_BDB4="no" AC_MSG_RESULT(not found!) fi fi AC_SUBST(BDB_DIR) AC_SUBST(BDB_DIR_INCLUDE) AC_SUBST(BDB_DIR_LIB) AC_SUBST(BDB_LIB) dnl 4.0 is required... BDB_VERSION="4.0" AC_SUBST(BDB_VERSION) fi AC_MSG_CHECKING(whether to define _REENTRANT) AC_ARG_ENABLE(reentrant, [ --enable-reentrant define _REENTRANT to enable reentrant system calls], [ case "${enableval}" in no) AC_MSG_RESULT(no) ac_cv_reentrant=no ;; *) AC_MSG_RESULT(yes) AC_DEFINE([ICAL_REENTRANT], ,[Define if we want _REENTRANT]) [CFLAGS="$CFLAGS -D_REENTRANT"] ac_cv_reentrant=yes ;; esac ], AC_MSG_RESULT(no) ) case "${host}" in *-*-freebsdelf4* ) AC_MSG_RESULT(checking for pthread_create in -lpthread... -pthread (FreeBSD 4.x style)) AC_DEFINE(HAVE_PTHREAD, ,[Define if we have pthread.]) PTHREAD_LIBS=-pthread;; *) AC_CHECK_LIB([pthread], [pthread_create], [have_pthread=yes]) if test "x$have_pthread" = xyes; then AC_DEFINE(HAVE_PTHREAD, ,[Define if we have pthread.]) PTHREAD_LIBS=-lpthread fi;; esac AC_SUBST([PTHREAD_LIBS]) dnl ********************************** dnl *** check if we have _NL_TIME_FIRST_WEEKDAY dnl *** note that it is an enum and not a define dnl ********************************** AC_MSG_CHECKING([for _NL_TIME_FIRST_WEEKDAY]) AC_TRY_LINK([#include ], [ char c; c = *((unsigned char *) nl_langinfo(_NL_TIME_FIRST_WEEKDAY)); ], nl_ok=yes, nl_ok=no) AC_MSG_RESULT($nl_ok) if test "$nl_ok" = "yes"; then AC_DEFINE([HAVE__NL_TIME_FIRST_WEEKDAY], [1], [Define if _NL_TIME_FIRST_WEEKDAY is available]) fi AM_CONDITIONAL([INCLUDED_LIBICAL], [test x"$ac_INCLUDED_LIBICAL" = x"yes"]) AM_CONDITIONAL([HAVE_PTHREAD], [test x"$have_pthread" = x"yes"]) AM_CONDITIONAL([WITH_BDB4], [test x"$WITH_BDB4" = x"yes"]) dnl ********************************** dnl *** Optional support for D-BUS *** dnl ********************************** XDT_CHECK_OPTIONAL_PACKAGE([DBUS], [dbus-glib-1], [dbus_minimum_version], [dbus], [D-BUS support]) dnl ************************************** dnl *** Optional support for libnotify *** dnl ************************************** XDT_CHECK_OPTIONAL_PACKAGE([NOTIFY], [libnotify], [notify_minimum_version], [libnotify], [LIBNOTIFY support]) dnl ******************************** dnl *** Optional support for MCS *** dnl ******************************** XDT_CHECK_OPTIONAL_PACKAGE([XFCEMCS], [libxfce4mcs-client-1.0], [xfce_minimum_version], [libxfce4mcs], [XFCE_MCS_MANAGER support]) if test x"$XFCEMCS_FOUND" = x"yes"; then dnl configure the mcs plugin XDT_XFCE_MCS_PLUGIN([XFCE_MCS_MANAGER], [xfce_minimum_version]) fi dnl ************************************************ dnl *** Optional support for automatic archiving *** dnl ************************************************ have_archive="no" AC_ARG_ENABLE([archive], AC_HELP_STRING([--enable-archive], [use automatic archiving (defaut=yes)]) AC_HELP_STRING([--disable-archive], [don't use automatic archiving]), [], [enable_archive=yes]) if test x"$enable_archive" = x"yes"; then AC_DEFINE([HAVE_ARCHIVE], [1], [Define to enable archiving]) have_archive="yes" fi dnl Check for debugging support dnl BM_DEBUG_SUPPORT() XDT_FEATURE_DEBUG AC_OUTPUT([ Makefile libical/Makefile libical/design-data/Makefile libical/doc/Makefile libical/scripts/Makefile libical/src/Makefile libical/src/libical/Makefile libical/src/libical/icalversion.h libical/src/libicalss/Makefile libical/zoneinfo/Makefile xfcalendar.spec icons/Makefile icons/48x48/Makefile icons/scalable/Makefile po/Makefile.in sounds/Makefile src/Makefile plugin/Makefile doc/Makefile doc/C/Makefile doc/C/images/Makefile panel-plugin/Makefile globaltime/Makefile ]) dnl *************************** dnl *** Print configuration *** dnl *************************** echo echo "Build Configuration:" echo if test x"$DBUS_FOUND" = x"yes"; then echo "* D-BUS support: yes" else echo "* D-BUS support: no" fi if test x"$NOTIFY_FOUND" = x"yes"; then echo "* LIBNOTIFY support: yes" else echo "* LIBNOTIFY support: no" fi if test x"$XFCEMCS_FOUND" = x"yes"; then echo "* XFCE MCS support: yes" else echo "* XFCE MCS support: no" fi echo "* Automatic archiving: $have_archive" echo