diff options
author | Sascha Schumann <sas@php.net> | 2002-03-27 10:26:17 +0000 |
---|---|---|
committer | Sascha Schumann <sas@php.net> | 2002-03-27 10:26:17 +0000 |
commit | bc11acbf020c4af12f99ce8bfec18d0cff960bc7 (patch) | |
tree | 8ebac0fd82803c29ca309507f008846a08c61283 | |
parent | a40b4ff52b699dc334c83bba06c55f1e3c5983a8 (diff) | |
download | php-git-bc11acbf020c4af12f99ce8bfec18d0cff960bc7.tar.gz |
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
-rw-r--r-- | ext/mcal/config.m4 | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/ext/mcal/config.m4 b/ext/mcal/config.m4 index ef796ef35e..c2f119c5e6 100644 --- a/ext/mcal/config.m4 +++ b/ext/mcal/config.m4 @@ -25,24 +25,19 @@ if test "$PHP_MCAL" != "no"; then 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) |