summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2003-12-19 16:59:09 +0000
committerWez Furlong <wez@php.net>2003-12-19 16:59:09 +0000
commit19c8a69148cade350b02c25748b15c8e4c017279 (patch)
treea53773cb130ea8b2f73e27d70819bf0051188dc9
parent06f448cf61b5dc1138d8e7620395b9d30a60a6cd (diff)
downloadphp-git-19c8a69148cade350b02c25748b15c8e4c017279.tar.gz
add config.w32 for ext/yaz
Edin: we need to update the yaz stuff in php-win32-dev so that this extension will build.
-rw-r--r--ext/yaz/config.w3238
1 files changed, 38 insertions, 0 deletions
diff --git a/ext/yaz/config.w32 b/ext/yaz/config.w32
new file mode 100644
index 0000000000..2b208e24d7
--- /dev/null
+++ b/ext/yaz/config.w32
@@ -0,0 +1,38 @@
+// $Id$
+// vim:ft=javascript
+
+ARG_WITH("yaz", "YAZ support (ANSI/NISO Z39.50)", "no");
+
+// this is a temporary hack
+function yaz_check_version()
+{
+ var yaz_h = PHP_PHP_BUILD + "\\include\\yaz\\yaz-version.h";
+ var c = null;
+ var v;
+ if (FSO.FileExists(yaz_h)) {
+ c = file_get_contents(yaz_h);
+ if (c.match(/YAZ_VERSIONL\s+0x([a-zA-Z0-9]{2})/)) {
+ v = RegExp.$1;
+ if (parseInt(v) >= 2) {
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
+if (PHP_YAZ != "no") {
+
+ if (CHECK_HEADER_ADD_INCLUDE("yaz/yaz-version.h", "CFLAGS_YAZ", PHP_YAZ) &&
+ CHECK_LIB("yaz.lib", "yaz", PHP_YAZ)) {
+ if (yaz_check_version()) {
+ EXTENSION('yaz', 'php_yaz.c');
+ AC_DEFINE('HAVE_YAZ', 1);
+ } else {
+ WARNING("yaz not enabled; version 2.0 or higher required");
+ }
+ } else {
+ WARNING("yaz not enabled; libraries and headers not found");
+ }
+}
+