cvs: pecl /svn config.m4

From: Date: Thu, 09 Jun 2005 01:41:40 +0000
Subject: cvs: pecl /svn config.m4
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-3248@lists.php.net to get a copy of this message
alan_k Wed Jun 8 21:41:40 2005 EDT Modified files: /pecl/svn config.m4 Log: remove svn-config support (as subversion devs say its not supported), adding support for --with-svn-apr=/path/to/apr/libs http://cvs.php.net/diff.php/pecl/svn/config.m4?r1=1.7&r2=1.8&ty=u Index: pecl/svn/config.m4 diff -u pecl/svn/config.m4:1.7 pecl/svn/config.m4:1.8 --- pecl/svn/config.m4:1.7 Fri Apr 29 10:57:32 2005 +++ pecl/svn/config.m4 Wed Jun 8 21:41:39 2005 @@ -1,63 +1,61 @@ -dnl $Id: config.m4,v 1.7 2005/04/29 14:57:32 wez Exp $ +dnl $Id: config.m4,v 1.8 2005/06/09 01:41:39 alan_k Exp $ dnl config.m4 for extension svn dnl vim:se ts=2 sw=2 et: PHP_ARG_WITH(svn, for svn support, -[ --with-svn=[/path/to/svn-config] Include svn support]) +[ --with-svn=[/path/to/svn-prefix] Include svn support]) + +PHP_ARG_WITH(svn-apr, for specifying the location of apr for svn, + +[ --with-svn-apr=[/path/to/apr-prefix] Location of /include/*/apr.h]) if test "$PHP_SVN" != "no"; then - AC_MSG_CHECKING([for svn-config]) - if ! test -x $PHP_SVN ; then - for i in $PHP_SVN /usr/local/bin /usr/bin ; do - if test -x $i/svn-config ; then - PHP_SVN=$i/svn-config - break; + AC_MSG_CHECKING([for svn includes]) + for i in $PHP_SVN /usr/local /usr /opt /sw; do + if test -r $i/include/subversion-1/svn_client.h ; then + PHP_SVN_INCLUDES="-I$i/include/subversion-1" + PHP_SVN_LDFLAGS="-L$i/lib" + if test -d $i/lib64 ; then + PHP_SVN_LDFLAGS="-L$i/lib64" fi - done + PHP_SVN_LDFLAGS="-lsvn_client-1 -lapr-0" + break; + fi + done + if test "$PHP_SVN_LDFLAGS" == ""; then + AC_MSG_ERROR([failed to find svn_client.h]) fi - if test -x $PHP_SVN ; then - AC_MSG_RESULT($PHP_SVN) - PHP_SVN_INCLUDES=$PHP_SVN --includes - PHP_SVN_CFLAGS=$PHP_SVN --cppflags --cflags - PHP_SVN_LDFLAGS=$PHP_SVN --ldflags --libs - else - AC_MSG_RESULT([not found]) - AC_MSG_WARN([ -Did not find svn-config; please ensure that you have installed -the svn developer package or equivalent for you system. -]) - PHP_SVN_INCLUDES="" - for i in $PHP_SVN /usr/local /usr ; do - if test -r $i/include/subversion-1/svn_client.h ; then - PHP_SVN_INCLUDES="$PHP_SVN_INCLUDES -I$i/include/subversion-1" - PHP_SVN_LDFLAGS="-L$i/lib" - if test -d $i/lib64 ; then - PHP_SVN_LDFLAGS="-L$i/lib64 $PHP_SVN_LDFLAGS" - fi - PHP_SVN_LDFLAGS="$PHP_SVN_LDFLAGS -lsvn_client-1 -lapr-0" - fi - if test -r $i/include/apr-0/apr.h ; then - PHP_SVN_INCLUDES="$PHP_SVN_INCLUDES -I$i/include/apr-0" - elif test -r $i/include/apache2/apr.h ; then - PHP_SVN_INCLUDES="$PHP_SVN_INCLUDES -I$i/include/apache2" - fi - done + + + for i in $PHP_SVN_APR $PHP_SVN /usr/local /usr /opt /sw; do + if test -r $i/include/apr-0/apr.h ; then + PHP_SVN_INCLUDES="$PHP_SVN_INCLUDES -I$i/include/apr-0" + PHP_SVN_LDFLAGS="$PHP_SVN_LDFLAGS -L$i/lib" + PHP_SVN_APR_FOUND="yes" + break; + elif test -r $i/include/apache2/apr.h ; then + PHP_SVN_INCLUDES="$PHP_SVN_INCLUDES -I$i/include/apache2" + PHP_SVN_LDFLAGS="$PHP_SVN_LDFLAGS -L$i/lib" + PHP_SVN_APR_FOUND="yes" + break; + fi + done + if test "$PHP_SVN_APR_FOUND" == ""; then + AC_MSG_ERROR([failed to find apr.h]) fi - PHP_CHECK_LIBRARY(svn_client-1,svn_client_create_context, - [ - PHP_ADD_LIBRARY(svn_client-1, 1, SVN_SHARED_LIBADD) - AC_DEFINE(HAVE_SVNLIB,1,[ ]) - ],[ - AC_MSG_ERROR([wrong svn lib version or lib not found]) - ],[ - $PHP_SVN_LDFLAGS - ]) + AC_MSG_RESULT($PHP_SVN_INCLUDES) + AC_MSG_CHECKING([for svn libraries]) + AC_MSG_RESULT($PHP_SVN_LDFLAGS) + + AC_DEFINE(HAVE_SVNLIB,1,[ ]) + + INCLUDES="$INCLUDES $PHP_SVN_INCLUDES" PHP_EVAL_LIBLINE($PHP_SVN_LDFLAGS, SVN_SHARED_LIBADD) PHP_SUBST(SVN_SHARED_LIBADD) - PHP_NEW_EXTENSION(svn, svn.c, $ext_shared,,$PHP_SVN_INCLUDES $PHP_SVN_CFLAGS) + PHP_NEW_EXTENSION(svn, svn.c, $ext_shared,,$PHP_SVN_INCLUDES) fi

« previous php.pecl.cvs (#3248) next »