pcsc/config.m4
Johannes Findeisen 8db0824d92 Initial commit of the PC/SC (pcsc) extension. There is some stuff that needs to be romoved like the build.sh script and the subfolders tmp/ and php/.
I think the .m4 file has some bugs because it fails to build without my weird build.sh script. I will fix that ASAP.



git-svn-id: https://svn.php.net/repository/pecl/pcsc/trunk@320951 c90b9560-bf6c-de11-be94-00142212c4b1
2011-12-13 16:57:24 +00:00

39 lines
1.2 KiB
Text

dnl $Id$
dnl config.m4 for PC/SC extension
PHP_ARG_ENABLE(pcsc, PC/SC Smart Card support for PHP,
[ --enable-pcsc Enable PC/SC Smart Card support])
dnl Check whether the extension is enabled at all
if test "$PHP_PCSC" != "no"; then
if test -r $PHP_PCSC/include/PCSC/winscard.h; then
PCSC_DIR=$PHP_PCSC
else
AC_MSG_CHECKING(for PC/SC in default path)
for i in /usr/local /usr; do
if test -r $i/include/PCSC/winscard.h; then
PCSC_DIR=$i
AC_MSG_RESULT(found in $i)
break
fi
done
fi
if test -z "$PCSC_DIR"; then
AC_MSG_RESULT(not found)
AC_MSG_ERROR(Please reinstall the pcsc-lite distribution -
winscard.h should be in <pcsc-dir>/include/PCSC/)
fi
AC_MSG_RESULT($PCSC_DIR)
AC_MSG_RESULT($PCSC_DIR)
AC_MSG_RESULT($PCSC_DIR)
PHP_ADD_INCLUDE($PCSC_DIR/include/PCSC/)
dnl PHP_EVAL_LIBLINE($PCSC_LIBS, PCSC_SHARED_LIBADD)
PHP_ADD_LIBRARY_WITH_PATH(pcsclite, "$PCSC_DIR/lib/", PCSC_SHARED_LIBADD)
dnl Finally, tell the build system about the extension and what files are needed
PHP_NEW_EXTENSION(pcsc, pcsc.c, $ext_shared)
PHP_INSTALL_HEADERS([php_pcsc.h])
PHP_SUBST(PCSC_SHARED_LIBADD)
fi