sniper Wed Oct 9 20:24:25 2002 EDT Modified files: /php4/ext/pfpro config.m4 Log: - Fixed the payflowpro version check and cleaned up this a bit. Index: php4/ext/pfpro/config.m4 diff -u php4/ext/pfpro/config.m4:1.8 php4/ext/pfpro/config.m4:1.9 --- php4/ext/pfpro/config.m4:1.8 Tue Mar 12 11:31:23 2002 +++ php4/ext/pfpro/config.m4 Wed Oct 9 20:24:25 2002 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.8 2002/03/12 16:31:23 sas Exp $ +dnl $Id: config.m4,v 1.9 2002/10/10 00:24:25 sniper Exp $ dnl PHP_ARG_WITH(pfpro, for Verisign Payflow Pro support, @@ -28,37 +28,41 @@ done if test -z "$PFPRO_INC_DIR"; then - AC_MSG_ERROR(Could not find pfpro.h. Please make sure you have the + AC_MSG_ERROR([Could not find pfpro.h. Please make sure you have the Verisign Payflow Pro SDK installed. Use - ./configure --with-pfpro=<pfpro-dir> if necessary) + ./configure --with-pfpro=<pfpro-dir> if necessary]) fi if test -z "$PFPRO_LIB_DIR"; then - AC_MSG_ERROR(Could not find libpfpro.so. Please make sure you have the + AC_MSG_ERROR([Could not find libpfpro.so. Please make sure you have the Verisign Payflow Pro SDK installed. Use - ./configure --with-pfpro=<pfpro-dir> if necessary) + ./configure --with-pfpro=<pfpro-dir> if necessary]) fi - PFPRO_VERSION3=`nm $PFPRO_LIB_DIR/$PFPRO_LIB | awk '{print $3}' | grep '^pfpro' > /dev/null && echo 1 || echo 0` - PFPRO_VERSION2=`nm $PFPRO_LIB_DIR/$PFPRO_LIB | awk '{print $3}' | grep '^PN' > /dev/null && echo 1 || echo 0` + dnl + dnl Check version of SDK + dnl + PHP_CHECK_LIBRARY(pfpro, pfproInit, + [ + PFPRO_VERSION=3 + ], [ + PHP_CHECK_LIBRARY(pfpro, PNInit, + [ + PFPRO_VERSION=2 + ], [ + AC_MSG_ERROR([The pfpro extension requires version 2 or 3 of the SDK]) + ], [ + -L$PFPRO_LIB_DIR + ]) + ], [ + -L$PFPRO_LIB_DIR + ]) - if test "$PFPRO_VERSION3" -eq 1 ; then - PFPRO_VERSION=3 - elif test "$PFPRO_VERSION2" -eq 1 ; then - PFPRO_VERSION=2 - else - AC_MSG_ERROR(The pfpro extension requires version 2 or 3 of the SDK) - fi - AC_DEFINE_UNQUOTED(PFPRO_VERSION, $PFPRO_VERSION, [Version of SDK]) - dnl AC_MSG_RESULT(found in $PFPRO_LIB_DIR) - PHP_ADD_INCLUDE($PFPRO_INC_DIR) - - PHP_SUBST(PFPRO_SHARED_LIBADD) PHP_ADD_LIBRARY_WITH_PATH(pfpro, $PFPRO_LIB_DIR, PFPRO_SHARED_LIBADD) - AC_DEFINE(HAVE_PFPRO, 1, [ ]) - PHP_NEW_EXTENSION(pfpro, pfpro.c, $ext_shared) + PHP_SUBST(PFPRO_SHARED_LIBADD) + AC_DEFINE(HAVE_PFPRO, 1, [ ]) fi
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php