Browse Source

Added extension YAZ (Z39.50 client role).

PHP-4.0.5
Adam Dickmeiss 27 years ago
parent
commit
5dadceb115
  1. 4
      MAINTAINERS
  2. 5
      ext/yaz/Makefile.in
  3. 51
      ext/yaz/config.m4
  4. 1598
      ext/yaz/php_yaz.c
  5. 48
      ext/yaz/php_yaz.h
  6. 8
      ext/yaz/setup.stub

4
MAINTAINERS

@ -115,6 +115,10 @@ EXTENSION: xml
PRIMARY MAINTAINER: Thies C. Arntzen <thies@digicol.de>
STATUS: Maintained
--------------------------------------------------------------------------------
EXTENSION: yaz
PRIMARY MAINTAINER: Adam Dickmeiss <adam@indexdata.dk>
STATUS: Maintained
--------------------------------------------------------------------------------
EXTENSION: zlib
PRIMARY MAINTAINER: Stefan Roehrich <sr@linux.de>
STATUS: Maintained

5
ext/yaz/Makefile.in

@ -0,0 +1,5 @@
LTLIBRARY_NAME = libyaz.la
LTLIBRARY_SOURCES = php_yaz.c
include $(top_srcdir)/build/dynlib.mk

51
ext/yaz/config.m4

@ -0,0 +1,51 @@
dnl $Id$
AC_ARG_WITH(yaz,
[ --with-yaz[=DIR] Include YAZ support (ANSI/NISO Z39.50). DIR is
the YAZ bin install directory],
[
yazconfig=NONE
if test "$withval" != "no"; then
if test "$withval" = "yes"; then
AC_PATH_PROG(yazconfig, yaz-config, NONE)
else
if test -r ${withval}/yaz-config; then
yazconfig=${withval}/yaz-config
else
yazconfig=${withval}/bin/yaz-config
fi
fi
fi
AC_MSG_CHECKING(for YAZ support)
if test -f $yazconfig; then
AC_DEFINE(HAVE_YAZ,1,[Whether you have YAZ])
. $yazconfig
for i in $YAZLIB; do
case $i in
-l*)
ii=`echo $i|cut -c 3-`
AC_ADD_LIBRARY($ii)
;;
-L*)
ii=`echo $i|cut -c 3-`
AC_ADD_LIBPATH($ii)
;;
esac
done
for i in $YAZINC; do
case $i in
-I*)
ii=`echo $i|cut -c 3-`
AC_ADD_INCLUDE($ii)
;;
esac
done
AC_MSG_RESULT(yes)
PHP_EXTENSION(yaz)
else
AC_MSG_RESULT(no)
fi
],[
AC_MSG_CHECKING(for YAZ support)
AC_MSG_RESULT(no)
])

1598
ext/yaz/php_yaz.c
File diff suppressed because it is too large
View File

48
ext/yaz/php_yaz.h

@ -0,0 +1,48 @@
/*
+----------------------------------------------------------------------+
| PHP version 4.0 |
+----------------------------------------------------------------------+
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Adam Dickmeiss <adam@indexdata.dk> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
#ifndef PHP_YAZ_H
#define PHP_YAZ_H
#if HAVE_YAZ
extern zend_module_entry yaz_module_entry;
#define yaz_module_ptr &yaz_module_entry
PHP_FUNCTION(yaz_connect);
PHP_FUNCTION(yaz_close);
PHP_FUNCTION(yaz_search);
PHP_FUNCTION(yaz_wait);
PHP_FUNCTION(yaz_errno);
PHP_FUNCTION(yaz_error);
PHP_FUNCTION(yaz_addinfo);
PHP_FUNCTION(yaz_hits);
PHP_FUNCTION(yaz_record);
PHP_FUNCTION(yaz_syntax);
PHP_FUNCTION(yaz_element);
PHP_FUNCTION(yaz_range);
#else
#define yaz_module_ptr NULL
#endif
#define phpext_yaz_ptr yaz_module_ptr
#endif

8
ext/yaz/setup.stub

@ -0,0 +1,8 @@
# $Source$
# $Id$
define_option with-yaz 'YAZ support?' yesnodir \
'no /usr/bin YAZ base install' \
' Whether to build with YAZ (Z39.50 protocol package)\n
support.\n
More info about YAZ can be found at http://www.indexdata.dk/yaz/'
Loading…
Cancel
Save