config.w32 3.7 KB

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