File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / oci8 / config.w32
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue May 29 12:34:41 2012 UTC (12 years, 5 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, HEAD
php 5.4.3+patches

// $Id: config.w32,v 1.1.1.2 2012/05/29 12:34:41 misho Exp $
// vim:ft=javascript

if (PHP_OCI8 != "no" && PHP_OCI8_11G != "no") {
	if (!PHP_OCI8_SHARED && !PHP_OCI8_11G_SHARED) {
		WARNING("oci8 and oci8-11g provide the same extension and cannot both be built statically");
		PHP_OCI8 = "no"
		PHP_OCI8_11G = "no"
	}
}

ARG_WITH("oci8", "OCI8 support", "no");

if (PHP_OCI8 != "no") {

	oci8_dirs = new Array(
		PHP_OCI8
	);

	oci8_lib_paths = "";
	oci8_inc_paths = "";

	// find the Oracle install
	for (i = 0; i < oci8_dirs.length; i++) {
		oci8_lib_paths += oci8_dirs[i] + "\\lib;";
		oci8_lib_paths += oci8_dirs[i] + "\\lib\\msvc;";
		oci8_inc_paths += oci8_dirs[i] + "\\include;";
	}

	oci8_inc_paths += PHP_PHP_BUILD + "\\include\\instantclient;"
	oci8_lib_paths += PHP_PHP_BUILD + "\\lib\\instantclient;";

	if (CHECK_HEADER_ADD_INCLUDE("oci.h", "CFLAGS_OCI8", oci8_inc_paths) &&
			CHECK_LIB("oci.lib", "oci8", oci8_lib_paths))
	{
		EXTENSION('oci8', 'oci8.c oci8_lob.c oci8_statement.c oci8_collection.c oci8_interface.c');

		AC_DEFINE('HAVE_OCI8', 1);
		AC_DEFINE('HAVE_OCI_INSTANT_CLIENT', 1);
		AC_DEFINE('HAVE_OCI_LOB_READ2', 1);

	} else {
		WARNING("oci8 not enabled: Oracle Database libraries or Oracle 10g Instant Client not found");
		PHP_OCI8 = "no"
	}
}

ARG_WITH("oci8-11g", "OCI8 support using Oracle 11g Instant Client", "no");

if (PHP_OCI8_11G != "no") {

	oci8_11g_dirs = new Array(
		PHP_OCI8_11G
	);

	oci8_11g_lib_paths = "";
	oci8_11g_inc_paths = "";

	// find the Oracle install
	for (i = 0; i < oci8_11g_dirs.length; i++) {
		oci8_11g_lib_paths += oci8_11g_dirs[i] + "\\lib;";
		oci8_11g_lib_paths += oci8_11g_dirs[i] + "\\lib\\msvc;";
		oci8_11g_inc_paths += oci8_11g_dirs[i] + "\\include;";
	}

	oci8_11g_inc_paths += PHP_PHP_BUILD + "\\include\\instantclient_11;"
	oci8_11g_lib_paths += PHP_PHP_BUILD + "\\lib\\instantclient_11;";

	if (CHECK_HEADER_ADD_INCLUDE("oci.h", "CFLAGS_OCI8_11G", oci8_11g_inc_paths) &&
			CHECK_LIB("oci.lib", "oci8_11g", oci8_11g_lib_paths))
	{
		EXTENSION('oci8_11g', 'oci8.c oci8_lob.c oci8_statement.c oci8_collection.c oci8_interface.c', null, null, null, "ext\\oci8_11g")

		AC_DEFINE('HAVE_OCI8', 1);
		AC_DEFINE('HAVE_OCI_INSTANT_CLIENT', 1);
		AC_DEFINE('HAVE_OCI_LOB_READ2', 1);

	} else {
		WARNING("oci8-11g not enabled: Oracle Database libraries or Oracle 11g Instant Client not found");
		PHP_OCI8_11G = "no"
	}
}

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>