cvs: php4 /ext/mcal config.m4
| From: | Sascha Schumann | Date: | Wed, 27 Mar 2002 10:26:16 +0000 |
| Subject: | cvs: php4 /ext/mcal config.m4 | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-10711@lists.php.net to get a copy of this message | ||
sas Wed Mar 27 05:26:16 2002 EDT
Modified files:
/php4/ext/mcal config.m4
Log:
Defer linking against libmcal until we have built the extension,
so that extension-supplied symbols are available.
Also factorize the header file checks.
Reported by: Brandon Knitter
URL: http://news.php.net/article.php?group=php.dev&article=81833
Index: php4/ext/mcal/config.m4
diff -u php4/ext/mcal/config.m4:1.12 php4/ext/mcal/config.m4:1.13
--- php4/ext/mcal/config.m4:1.12 Tue Mar 12 11:23:51 2002
+++ php4/ext/mcal/config.m4 Wed Mar 27 05:26:16 2002
@@ -1,5 +1,5 @@
dnl
-dnl $Id: config.m4,v 1.12 2002/03/12 16:23:51 sas Exp $
+dnl $Id: config.m4,v 1.13 2002/03/27 10:26:16 sas Exp $
dnl
PHP_ARG_WITH(mcal,for MCAL support,
@@ -25,24 +25,19 @@
fi
done
- if test ! -f "$MCAL_INCLUDE/mcal.h"; then
- AC_MSG_ERROR(Unable to locate your libmcal header files - mcal.h should be in the directory you
specify or in the include/ subdirectory below it - default search location is $MCAL_DEFAULT_SEARCH)
- fi
-
- if test ! -f "$MCAL_INCLUDE/cal_misc.h"; then
- AC_MSG_ERROR(Unable to locate your libmcal header files - cal_misc.h should be in the directory
you specify or in the include/ subdirectory below it - default search location is
$MCAL_DEFAULT_SEARCH)
- fi
-
- if test ! -f "$MCAL_INCLUDE/icalroutines.h"; then
- AC_MSG_ERROR(Unable to locate your libmcal header files - icalroutines.h should be in the
directory you specify or in the include/ subdirectory below it - default search location is
$MCAL_DEFAULT_SEARCH)
- fi
+ 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
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
PHP_ADD_INCLUDE($MCAL_INCLUDE)
- PHP_ADD_LIBRARY_WITH_PATH(mcal, $MCAL_LIBRARY, MCAL_SHARED_LIBADD)
+ PHP_ADD_LIBPATH($MCAL_LIBRARY,MCAL_SHARED_LIBADD)
+ PHP_ADD_LIBRARY_DEFER(mcal,[],MCAL_SHARED_LIBADD)
PHP_SUBST(MCAL_SHARED_LIBADD)
AC_DEFINE(HAVE_MCAL,1,[ ])
PHP_NEW_EXTENSION(mcal, php_mcal.c, $ext_shared)