diff options
Diffstat (limited to 'libical/configure.in')
-rw-r--r-- | libical/configure.in | 77 |
1 files changed, 47 insertions, 30 deletions
diff --git a/libical/configure.in b/libical/configure.in index 80b35a660e..112ac66ded 100644 --- a/libical/configure.in +++ b/libical/configure.in @@ -1,7 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(src) -AM_INIT_AUTOMAKE(libical,0.22c) - +AM_INIT_AUTOMAKE(libical,0.23a) AM_CONFIG_HEADER(config.h) dnl Initialize maintainer mode @@ -25,6 +24,7 @@ AC_CHECK_PROGS(PERL, perl5 perl) AC_DEFINE(ICAL_ERRORS_ARE_FATAL,1) AC_DEFINE(ICAL_SAFESAVES,1) AC_DEFINE(ICAL_UNIX_NEWLINE,1) +dnl AC_DEFINE(ICAL_NO_EMPTY_ARRAY_DECL) dnl Checks for libraries. dnl Replace `main' with a function in -lical: @@ -39,37 +39,52 @@ AC_C_CONST AC_TYPE_SIZE_T AC_STRUCT_TM -AC_CACHE_CHECK(for timezone variable, ac_cv_var_timezone, - AC_TRY_COMPILE([ -#include <time.h> - ], [ - timezone = 1; - ], ac_cv_var_timezone=yes, ac_cv_var_timezone=no)) -if test $ac_cv_var_timezone = yes; then - AC_DEFINE(HAVE_TIMEZONE) -else - AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff, - AC_TRY_COMPILE([ -#include <time.h> - ], [ - struct tm tm; - tm.tm_gmtoff = 1; - ], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no -)) - if test $ac_cv_struct_tm_gmtoff = yes; then - AC_DEFINE(HAVE_TM_GMTOFF) - else - AC_ERROR(unable to find a way to determine timezone) - fi -fi - - - dnl Checks for library functions. AC_CHECK_FUNCS(strdup) -dnl Check for perl -AC_CHECK_PROGS(PERL, perl5 perl) +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=yes) +if test "x$enable_python_bindings" = "xyes"; then + python_val=true +else + python_val=false +fi + +if $python_val; 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 + PY_VERSION=`python -c 'import sys ; print sys.version[0:3]'` + changequote([, ])dnl + if test -f $PY_PREFIX/include/python$PY_VERSION/Python.h; then + PY_LIBS="python$PY_VERSION" + PY_LIB_LOC="-L$PY_EXEC_PREFIX/lib/python$PY_VERSION/config" + PY_CFLAGS="-I$PY_PREFIX/include/python$PY_VERSION" + PY_MAKEFILE="$PY_EXEC_PREFIX/lib/python$PY_VERSION/config/Makefile" + PY_LOCALMODLIBS=`sed -n -e 's/^LOCALMODLIBS=\(.*\)/\1/p' $PY_MAKEFILE` + PY_BASEMODLIBS=`sed -n -e 's/^BASEMODLIBS=\(.*\)/\1/p' $PY_MAKEFILE` + PY_OTHER_LIBS=`sed -n -e 's/^LIBS=\(.*\)/\1/p' $PY_MAKEFILE` + PY_EXTRA_LIBS="$PY_LOCALMODLIBS $PY_BASEMODLIBS $PY_OTHER_LIBS" + AC_SUBST(PY_LIBS) + AC_SUBST(PY_LIB_LOC) + AC_SUBST(PY_CFLAGS) + AC_SUBST(PY_EXTRA_LIBS) + else + python_val=false + fi +fi +AM_CONDITIONAL(WITH_PYTHON, $python_val) AC_OUTPUT([ Makefile @@ -80,6 +95,8 @@ src/Makefile src/libical/Makefile src/libical/icalversion.h src/libicalvcal/Makefile +src/python/Makefile +src/test/Makefile test-data/Makefile ]) |