config.w32 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. // vim:ft=javascript
  2. if (PHP_OCI8 != "no" && PHP_OCI8_11G != "no") {
  3. if (!PHP_OCI8_SHARED && !PHP_OCI8_11G_SHARED) {
  4. WARNING("oci8 and oci8-11g provide the same extension and cannot both be built statically");
  5. PHP_OCI8 = "no"
  6. }
  7. }
  8. if (PHP_OCI8 != "no" && PHP_OCI8_12C != "no") {
  9. if (!PHP_OCI8_SHARED && !PHP_OCI8_12C_SHARED) {
  10. WARNING("oci8 and oci8-12c provide the same extension and cannot both be built statically");
  11. PHP_OCI8 = "no"
  12. }
  13. }
  14. if (PHP_OCI8_11G != "no" && PHP_OCI8_12C != "no") {
  15. if (!PHP_OCI8_11G_SHARED && !PHP_OCI8_12C_SHARED) {
  16. WARNING("oci8-11g and oci8-12c provide the same extension and cannot both be built statically");
  17. PHP_OCI8_11G = "no"
  18. }
  19. }
  20. ARG_WITH("oci8", "OCI8 support", "no");
  21. if (PHP_OCI8 != "no") {
  22. oci8_dirs = new Array(
  23. PHP_OCI8
  24. );
  25. oci8_lib_paths = "";
  26. oci8_inc_paths = "";
  27. // find the Oracle install
  28. for (i = 0; i < oci8_dirs.length; i++) {
  29. oci8_lib_paths += oci8_dirs[i] + "\\lib;";
  30. oci8_lib_paths += oci8_dirs[i] + "\\lib\\msvc;";
  31. oci8_inc_paths += oci8_dirs[i] + "\\include;";
  32. }
  33. oci8_inc_paths += PHP_PHP_BUILD + "\\include\\instantclient;"
  34. oci8_lib_paths += PHP_PHP_BUILD + "\\lib\\instantclient;";
  35. if (CHECK_HEADER_ADD_INCLUDE("oci.h", "CFLAGS_OCI8", oci8_inc_paths) &&
  36. CHECK_LIB("oci.lib", "oci8", oci8_lib_paths))
  37. {
  38. EXTENSION('oci8', 'oci8.c oci8_lob.c oci8_statement.c oci8_collection.c oci8_interface.c oci8_failover.c');
  39. AC_DEFINE('HAVE_OCI8', 1);
  40. AC_DEFINE('HAVE_OCI_INSTANT_CLIENT', 1);
  41. } else {
  42. WARNING("oci8 not enabled: Oracle Database client libraries or Oracle 10g Instant Client not found");
  43. PHP_OCI8 = "no"
  44. }
  45. }
  46. ARG_WITH("oci8-11g", "OCI8 support using Oracle 11g Instant Client", "no");
  47. if (PHP_OCI8_11G != "no") {
  48. oci8_11g_dirs = new Array(
  49. PHP_OCI8_11G
  50. );
  51. oci8_11g_lib_paths = "";
  52. oci8_11g_inc_paths = "";
  53. // find the Oracle install
  54. for (i = 0; i < oci8_11g_dirs.length; i++) {
  55. oci8_11g_lib_paths += oci8_11g_dirs[i] + "\\lib;";
  56. oci8_11g_lib_paths += oci8_11g_dirs[i] + "\\lib\\msvc;";
  57. oci8_11g_inc_paths += oci8_11g_dirs[i] + "\\include;";
  58. }
  59. oci8_11g_inc_paths += PHP_PHP_BUILD + "\\include\\instantclient_11;"
  60. oci8_11g_lib_paths += PHP_PHP_BUILD + "\\lib\\instantclient_11;";
  61. if (CHECK_HEADER_ADD_INCLUDE("oci.h", "CFLAGS_OCI8_11G", oci8_11g_inc_paths) &&
  62. CHECK_LIB("oci.lib", "oci8_11g", oci8_11g_lib_paths))
  63. {
  64. EXTENSION('oci8_11g', 'oci8.c oci8_lob.c oci8_statement.c oci8_collection.c oci8_interface.c oci8_failover.c', null, null, null, "ext\\oci8_11g")
  65. AC_DEFINE('HAVE_OCI8', 1);
  66. AC_DEFINE('HAVE_OCI_INSTANT_CLIENT', 1);
  67. } else {
  68. WARNING("oci8-11g not enabled: Oracle Database client libraries or Oracle 11g Instant Client not found");
  69. PHP_OCI8_11G = "no"
  70. }
  71. }
  72. ARG_WITH("oci8-12c", "OCI8 support using Oracle Database 12c Instant Client", "no");
  73. if (PHP_OCI8_12C != "no") {
  74. oci8_12c_dirs = new Array(
  75. PHP_OCI8_12C
  76. );
  77. oci8_12c_lib_paths = "";
  78. oci8_12c_inc_paths = "";
  79. // find the Oracle install
  80. for (i = 0; i < oci8_12c_dirs.length; i++) {
  81. oci8_12c_lib_paths += oci8_12c_dirs[i] + "\\lib;";
  82. oci8_12c_lib_paths += oci8_12c_dirs[i] + "\\lib\\msvc;";
  83. oci8_12c_inc_paths += oci8_12c_dirs[i] + "\\include;";
  84. }
  85. oci8_12c_inc_paths += PHP_PHP_BUILD + "\\include\\instantclient_12;"
  86. oci8_12c_lib_paths += PHP_PHP_BUILD + "\\lib\\instantclient_12;";
  87. if (CHECK_HEADER_ADD_INCLUDE("oci.h", "CFLAGS_OCI8_12C", oci8_12c_inc_paths) &&
  88. CHECK_LIB("oci.lib", "oci8_12c", oci8_12c_lib_paths))
  89. {
  90. EXTENSION('oci8_12c', 'oci8.c oci8_lob.c oci8_statement.c oci8_collection.c oci8_interface.c oci8_failover.c', null, null, null, "ext\\oci8_12c")
  91. AC_DEFINE('HAVE_OCI8', 1);
  92. AC_DEFINE('HAVE_OCI_INSTANT_CLIENT', 1);
  93. } else {
  94. WARNING("oci8-12c not enabled: Oracle Database client libraries or Oracle Database 12c Instant Client not found");
  95. PHP_OCI8_12C = "no"
  96. }
  97. }