2001-11-30 19:00:13 +00:00
dnl
1999-09-01 20:30:27 +00:00
dnl $Id$
2001-11-30 19:00:13 +00:00
dnl
1999-09-01 20:30:27 +00:00
2000-05-02 04:00:47 +00:00
PHP_ARG_WITH(mcal,for MCAL support,
[ --with-mcal[=DIR] Include MCAL support.])
if test "$PHP_MCAL" != "no"; then
2000-06-13 00:57:58 +00:00
MCAL_DEFAULT_SEARCH=/usr/local
2000-05-02 04:00:47 +00:00
if test "$PHP_MCAL" = "yes"; then
2000-06-13 00:57:58 +00:00
MCAL_DIR=$MCAL_DEFAULT_SEARCH
1999-09-01 20:30:27 +00:00
else
2001-03-27 20:35:04 +00:00
PHP_EXPAND_PATH($PHP_MCAL, MCAL_DIR)
1999-09-01 20:30:27 +00:00
fi
2000-06-13 00:57:58 +00:00
2000-12-05 12:15:18 +00:00
for i in $MCAL_DIR $MCAL_DIR/mcal $MCAL_DIR/mcal/include $MCAL_DIR/include/mcal $MCAL_DIR/include; do
2000-06-13 00:57:58 +00:00
if test -r "$i/mcal.h"; then
MCAL_INCLUDE=$i
fi
done
2000-12-05 12:15:18 +00:00
for i in $MCAL_DIR $MCAL_DIR/mcal $MCAL_DIR/mcal/lib $MCAL_DIR/lib/mcal $MCAL_DIR/lib; do
2000-06-13 00:57:58 +00:00
if test -r "$i/libmcal.a"; then
MCAL_LIBRARY=$i
fi
done
2002-03-27 10:26:17 +00:00
for i in mcal cal_misc icalroutines; do
if test ! -f "$MCAL_INCLUDE/$i.h"; then
AC_MSG_ERROR(Unable to locate your libmcal header files - $i.h should be in the directory you specify or in the include/ subdirectory below it - default search location is $MCAL_DEFAULT_SEARCH)
fi
done
2000-11-19 02:42:06 +00:00
2000-06-13 00:57:58 +00:00
if test ! -f "$MCAL_LIBRARY/libmcal.a"; then
AC_MSG_ERROR(Unable to locate your libmcal library files - libmcal.a should be in the directory you specify or in the lib/ subdirectory below it - default search location is $MCAL_DEFAULT_SEARCH)
fi
2001-03-27 20:35:04 +00:00
PHP_ADD_INCLUDE($MCAL_INCLUDE)
2002-03-27 10:26:17 +00:00
PHP_ADD_LIBPATH($MCAL_LIBRARY,MCAL_SHARED_LIBADD)
PHP_ADD_LIBRARY_DEFER(mcal,[],MCAL_SHARED_LIBADD)
2000-05-02 04:00:47 +00:00
PHP_SUBST(MCAL_SHARED_LIBADD)
AC_DEFINE(HAVE_MCAL,1,[ ])
2002-03-12 16:44:00 +00:00
PHP_NEW_EXTENSION(mcal, php_mcal.c, $ext_shared)
2000-05-02 04:00:47 +00:00
fi
2000-06-13 00:57:58 +00:00