Browse Source

- Fixed the payflowpro version check and cleaned up this a bit.

migration/unlabaled-1.29.2
foobar 24 years ago
parent
commit
7c7905468b
  1. 44
      ext/pfpro/config.m4

44
ext/pfpro/config.m4

@ -28,37 +28,41 @@ if test "$PHP_PFPRO" != "no"; then
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
Loading…
Cancel
Save