// vim:ft=javascript
ARG_WITH("interbase", "InterBase support", "no");
+ARG_WITH("interbase5", "InterBase 5.x support", "no");
-if (PHP_INTERBASE != "no") {
+if (PHP_INTERBASE != "no" || PHP_INTERBASE5 != "no") {
if (CHECK_HEADER_ADD_INCLUDE("ibase.h", "CFLAGS_INTERBASE", PHP_PHP_BUILD + "\\interbase\\include;" + PHP_INTERBASE) &&
(CHECK_LIB("fbclient_ms.lib", "interbase", PHP_PHP_BUILD + "\\interbase\\lib_ms;" + PHP_INTERBASE) ||
CHECK_LIB("gds32_ms.lib", "interbase", PHP_PHP_BUILD + "\\interbase\\lib_ms;" + PHP_INTERBASE))) {
EXTENSION("interbase", "interbase.c ibase_service.c ibase_events.c ibase_blobs.c");
AC_DEFINE('HAVE_IBASE', 1, 'Have interbase library');
- AC_DEFINE('HAVE_IBASE6_API', 1, 'Have interbase version 6 API library');
+
+ if (PHP_INTERBASE != "no") {
+ AC_DEFINE('HAVE_IBASE6_API', 1, 'Have interbase version 6 API library');
+ }
} else {
WARNING("interbase not enabled; libraries and headers not found");
}
}
/* }}} */
+#if HAVE_IBASE6_API
static void _php_ibase_free_service(zend_rsrc_list_entry *rsrc TSRMLS_DC) /* {{{ */
{
ibase_service *sv = (ibase_service *) rsrc->ptr;
efree(sv);
}
/* }}} */
+#endif
/* {{{ startup, shutdown and info functions */
PHP_INI_BEGIN()
le_plink = zend_register_list_destructors_ex(php_ibase_commit_link_rsrc, _php_ibase_close_plink, "interbase link persistent", module_number);
le_trans = zend_register_list_destructors_ex(_php_ibase_free_trans, NULL, "interbase transaction", module_number);
le_event = zend_register_list_destructors_ex(_php_ibase_free_event, NULL, "interbase event", module_number);
+#if HAVE_IBASE6_API
le_service = zend_register_list_destructors_ex(_php_ibase_free_service, NULL, "interbase service manager handle", module_number);
+#endif
REGISTER_LONG_CONSTANT("IBASE_DEFAULT", PHP_IBASE_DEFAULT, CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("IBASE_TEXT", PHP_IBASE_FETCH_BLOBS, CONST_PERSISTENT); /* deprecated, for BC only */