| 113 | |
| 114 | # If 'google_perftools' port doesn't find headers needed for the profiler lib, it just quietly skips it. |
| 115 | # Check if "-lprofiler" will fail -- if so, pre-empt configure-stage error with a more useful error msg. |
| 116 | if { [file exists "${prefix}/lib/libprofiler.dylib"] || |
| 117 | [file exists "${prefix}/lib/libprofiler.a"] |
| 118 | } { |
| 119 | configure.args-append --with-google_perftools_module |
| 120 | } \ |
| 121 | else { |
| 122 | ui_warn [ join [list \ |
| 123 | "On some OSX versions, the 'google_perftools' port is installed without library files " \ |
| 124 | "needed by the \"google_perftools\" variant ( libprofiler.dylib or libprofiler.a ). \n" \ |
| 125 | "Until the 'google_perftools' port is fixed, this variant is incompatible with these " \ |
| 126 | "OSX versions. \n\n" \ |
| 127 | "If the 'google_perftools' port HAS BEEN updated, running the command: \n" \ |
| 128 | " port -f upgrade --enforce-variants nginx +google_perftools \n" \ |
| 129 | "will indicate if this bug was fixed, based on whether it installs successfully and " \ |
| 130 | "DOES NOT display this message again. \n\n" \ |
| 131 | "Aborting 'nginx' port installation... " \ |
| 132 | ] "" ] |
| 133 | |
| 134 | return -code error "Variant \"+google_perftools\" does not support current 'google_perftools' port." |
| 135 | } |