diff options
author | Hans Petter <hansp@src.gnome.org> | 2003-09-12 06:04:44 +0800 |
---|---|---|
committer | Hans Petter <hansp@src.gnome.org> | 2003-09-12 06:04:44 +0800 |
commit | 697761cc337aa77a47140c8df50ed84bc25e23f6 (patch) | |
tree | b785830f72e9938cceaa016a419c7b6d9892bada /libical/configure.in | |
parent | 733d77e657516f9a59b5c1a7b62acb87b03ec86f (diff) | |
download | gsoc2013-evolution-697761cc337aa77a47140c8df50ed84bc25e23f6.tar.gz gsoc2013-evolution-697761cc337aa77a47140c8df50ed84bc25e23f6.tar.zst gsoc2013-evolution-697761cc337aa77a47140c8df50ed84bc25e23f6.zip |
Import new libical from mainline HEAD and make appropriate changes to
Evolution.
svn path=/trunk/; revision=22538
Diffstat (limited to 'libical/configure.in')
-rw-r--r-- | libical/configure.in | 245 |
1 files changed, 220 insertions, 25 deletions
diff --git a/libical/configure.in b/libical/configure.in index df2850e84d..c148ca0d6c 100644 --- a/libical/configure.in +++ b/libical/configure.in @@ -1,18 +1,9 @@ dnl Process this file with autoconf to produce a configure script. -AC_PREREQ(2.52) - AC_INIT(src) -AM_INIT_AUTOMAKE(libical-evolution,0.23a) -AM_CONFIG_HEADER(config.h) - -dnl Set the aux dir to .. (the toplevel evolution directory) so ylwrap -dnl is found in the correct directory for automake >= 1.5 -AC_CONFIG_AUX_DIR(..) +AC_CANONICAL_SYSTEM -dnl subst in evolution's private directories -AC_SUBST(privlibdir) -AC_SUBST(privincludedir) -AC_SUBST(privdatadir) +AM_INIT_AUTOMAKE(libical,0.24) +AM_CONFIG_HEADER(config.h) dnl Initialize maintainer mode AM_MAINTAINER_MODE @@ -20,6 +11,7 @@ AM_MAINTAINER_MODE dnl Checks for programs. AC_PROG_YACC AC_PROG_CC +AC_PROG_CXX AM_PROG_LEX AC_PROG_LN_S AC_PROG_INSTALL @@ -29,11 +21,143 @@ AM_PROG_LIBTOOL AC_SUBST(AR) +dnl *** bdb4 support + +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 +AM_CONDITIONAL(WITH_BDB4, test x$WITH_BDB4 = xyes) + +dnl *** Yacc/Bison support + +AC_MSG_CHECKING(whether to support development) +AC_ARG_WITH(devel, [ --with-devel Add development options], +[case $with_devel in + yes) DEV="yes" + AC_MSG_RESULT(yes) + AC_MSG_RESULT(Setting up for development: -Wall, flex, bison) + AC_MSG_RESULT(** Note that you will need flex 2.5.7 or higher) + ;; + no) AC_MSG_RESULT(no) + ;; + *) AC_MSG_RESULT(no) + AC_MSG_RESULT(Ignoring unknown argument to --with-devel: $with_devel) + ;; +esac], +AC_MSG_RESULT(no)) +AM_CONDITIONAL(DEV, test x$DEV = xyes) + AC_CHECK_PROGS(AR, ar aal, ar) AC_CHECK_PROGS(PERL, perl5 perl) -dnl AC_DEFINE(ICAL_ERRORS_ARE_FATAL,1,[Define to make icalerror_* calls abort instead of internally signalling an error]) -AC_DEFINE(ICAL_SAFESAVES,1,[Define to make icalcluster_commit() save to a temp file and mv to the original file instead of writing to the orig file directly]) +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) +) + +dnl *** libicalcap support (experimental) + +AC_MSG_CHECKING(for CAP/BEEP support) +AC_ARG_WITH(libicalcap, [ --with-libicalcap Add support for CAP/BEEP support], +[case $with_libicalcap in + yes) AC_MSG_RESULT(yes) + AC_MSG_RESULT( Adding CAP/BEEP support) + WITH_CAP="yes" + ;; + no) AC_MSG_RESULT(no) + ;; + *) AC_MSG_RESULT(no) + AC_MSG_RESULT(Ignoring unknown argument to --with-libicalcap: $with_libicalcap) + ;; +esac], +AC_MSG_RESULT(no)) + +if test x$WITH_CAP = xyes; then + AC_MSG_CHECKING(for CAP/BEEP files) + PKG_CHECK_MODULES(RRCAP, roadrunner >= 0.9 \ + rrtls >= 0.9 \ + rrsasl >= 0.9 \ + rrcap >= 0.9) + + AC_SUBST(RRCAP_CFLAGS) + AC_SUBST(RRCAP_LIBS) +fi +AM_CONDITIONAL(WITH_CAP, test x$WITH_CAP = xyes) + +dnl ************************************************** +dnl test/regression.c (and maybe others) needs this defined +dnl ************************************************** +AC_DEFINE(ICAL_ERRORS_ARE_FATAL,1,[Define to make icalerror_* calls abort instead of internally signalling an error]) +AC_DEFINE(NO_WARN_DEPRECATED,1,[Define to 1 if you DO NOT WANT to see deprecated messages]) +AC_DEFINE(NO_WARN_ICAL_MALFORMEDDATA_ERROR_HACK,1,[Define to 1 if you DO NO WANT to see the warning messages related to ICAL_MALFORMEDDATA_ERROR and parsing .ics zoneinfo files]) + AC_DEFINE(ICAL_UNIX_NEWLINE,1,[Define to terminate lines with "\n" instead of "\r\n"]) dnl AC_DEFINE(ICAL_NO_EMPTY_ARRAY_DECL,1,[Define to 1 if your compile does not like lines like: struct something foo[]]) @@ -41,38 +165,103 @@ dnl Checks for libraries. dnl Replace `main' with a function in -lical: dnl AC_CHECK_LIB(ical, main) +dnl Check if this system can use pthreads +dnl HACK to support FreeBSD 4.x pthread + +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 + +AM_CONDITIONAL(HAVE_PTHREAD, test "$have_pthread" = "yes") +AC_SUBST(PTHREAD_LIBS) + dnl Checks for header files. AC_HEADER_STDC -AC_CHECK_HEADERS(time.h sys/types.h assert.h) +AC_CHECK_HEADERS(assert.h ctype.h pthread.h stdint.h time.h sys/types.h unistd.h wctype.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_SIZE_T +AC_TYPE_MODE_T +AC_CHECK_TYPE(intptr_t) AC_STRUCT_TM dnl Checks for library functions. -AC_CHECK_FUNCS(strdup) +AC_CHECK_FUNCS(gmtime_r isspace iswspace strdup snprintf) + +dnl ************************************************** +dnl * Check for C++ +dnl ************************************************** + +AC_ARG_ENABLE(cxx, +[ --enable-cxx Enable C++ bindings],,enable_cxx="no") +AM_CONDITIONAL(WITH_CXX, test x$enable_cxx = "xyes") + +dnl ************************************************** +dnl * Check for Java +dnl ************************************************** + +AC_ARG_ENABLE(java, +[ --enable-java Enable Java bindings],,enable_java="no") +if test "x$enable_java" = "xyes"; then + AC_PATH_PROG(JAR, jar, /usr/local/bin/jar, /usr/local/bin:$PATH) + AC_PATH_PROG(JAVA, java, /usr/local/bin/java, /usr/local/bin:$PATH) + AC_PATH_PROG(JAVAC, javac, /usr/local/bin/javac, /usr/local/bin:$PATH) + AC_PATH_PROG(JAVAH, javah, /usr/local/bin/javah, /usr/local/bin:$PATH) + AC_SUBST(JAR) + AC_SUBST(JAVA) + AC_SUBST(JAVAC) + AC_SUBST(JAVAH) + + dnl truly gross + + case "${host}" in + *-*-solaris*) JAVA_PLATFORM="solaris" ;; + *-*-linux*) JAVA_PLATFORM="linux" ;; + *-*-freebsd*) JAVA_PLATFORM="bsd" ;; + *-*-aix*) JAVA_PLATFORM="aix" ;; + *-sequent-*) JAVA_PLATFORM="ptx" ;; + *-*-hpux*) JAVA_PLATFORM="hpux" ;; + *-*-irix*) JAVA_PLATFORM="irix" ;; + *-*-os390*) JAVA_PLATFORM="os390" ;; + *-*-os400*) JAVA_PLATFORM="os400" ;; + *-apple-darwin*|*-apple-rhapsody*) JAVA_PLATFORM="darwin" ;; + *) JAVA_PLATFORM="unknown" ;; + esac + + AC_SUBST(JAVA_PLATFORM) +fi + +AM_CONDITIONAL(WITH_JAVA, test x$enable_java = "xyes") dnl ************************************************** dnl * Check for Python dnl ************************************************** python_val=false -AC_ARG_ENABLE(python-bindings, -[ --enable-python-bindings=[yes/no] Enable python bindings],,enable_python_bindings=no) -if test "x$enable_python_bindings" = "xyes"; then +AC_ARG_ENABLE(python, +[ --enable-python Enable python bindings],,enable_python="no") + +if test "x$enable_python" = "xyes"; then python_val=true else python_val=false fi -if $python_val; then +if test $python_val = true; then + AC_CHECK_PROG(python_val, python, true, false) -fi -if $python_val; then AC_CHECK_PROG(python_val, swig, true, false) -fi -if $python_val; then PY_PREFIX=`python -c 'import sys ; print sys.prefix'` PY_EXEC_PREFIX=`python -c 'import sys ; print sys.exec_prefix'` changequote(<<, >>)dnl @@ -95,17 +284,23 @@ if $python_val; then python_val=false fi fi -AM_CONDITIONAL(WITH_PYTHON, $python_val) +AM_CONDITIONAL(WITH_PYTHON, test $python_val = true) AC_OUTPUT([ Makefile design-data/Makefile doc/Makefile +examples/Makefile scripts/Makefile src/Makefile src/libical/Makefile src/libical/icalversion.h +src/libicalcap/Makefile +src/libicalss/Makefile src/libicalvcal/Makefile +src/python/Makefile +src/java/Makefile +src/test/Makefile test-data/Makefile zoneinfo/Makefile ]) |