https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112013-07-04T16:36:38ZRuby Issue Tracking SystemBackport200 - Backport #8593: MKMF have_framework check assumes the framework and header are identically namedhttps://bugs.ruby-lang.org/issues/8593?journal_id=402892013-07-04T16:36:38Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Feedback</i></li></ul><p>=begin<br>
How about passing the header name by an optional argument?</p>
<p>have_framework("SDL2", header: "SDL.h")</p>
<p>diff --git a/lib/mkmf.rb b/lib/mkmf.rb<br>
index 7f472f4..464cbbf 100644<br>
--- a/lib/mkmf.rb<br>
+++ b/lib/mkmf.rb<br>
@@ -1081,9 +1081,9 @@ SRC<br>
# the +HAVE_FRAMEWORK_RUBY+ preprocessor macro would be passed to the<br>
# compiler.<br>
#</p>
<ul>
<li>def have_framework(fw, &b)</li>
</ul>
<ul>
<li>def have_framework(fw, header: "#{fw}.h", &b)<br>
checking_for fw do</li>
</ul>
<ul>
<li>
<pre><code> src = cpp_include("#{fw}/#{fw}.h") << "\n" "int main(void){return 0;}"
</code></pre>
</li>
</ul>
<ul>
<li>
<pre><code> src = cpp_include("#{fw}/#{header}") << "\n" "int main(void){return 0;}"
opt = " -framework #{fw}"
if try_link(src, "-ObjC#{opt}", &b)
$defs.push(format("-DHAVE_FRAMEWORK_%s", fw.tr_cpp))
</code></pre>
</li>
</ul>
<p>=end</p> Backport200 - Backport #8593: MKMF have_framework check assumes the framework and header are identically namedhttps://bugs.ruby-lang.org/issues/8593?journal_id=402912013-07-04T23:43:17Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul></ul><p>-framework option implies -l option, does the library name differ from its framework name?</p> Backport200 - Backport #8593: MKMF have_framework check assumes the framework and header are identically namedhttps://bugs.ruby-lang.org/issues/8593?journal_id=402922013-07-05T00:25:49Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Closed</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>This issue was solved with changeset r41777.<br>
Karl, thank you for reporting this issue.<br>
Your contribution to Ruby is greatly appreciated.<br>
May Ruby be with you.</p>
<hr>
<p>mkmf.rb: header in framework</p>
<ul>
<li>lib/mkmf.rb (have_framework): allow header file to check.<br>
<a href="/issues/8593">[ruby-core:55745]</a> [Bug <a class="issue tracker-4 status-5 priority-4 priority-default closed" title="Backport: MKMF have_framework check assumes the framework and header are identically named (Closed)" href="https://bugs.ruby-lang.org/issues/8593">#8593</a>]</li>
</ul> Backport200 - Backport #8593: MKMF have_framework check assumes the framework and header are identically namedhttps://bugs.ruby-lang.org/issues/8593?journal_id=408522013-08-03T22:41:15Znagachika (Tomoyuki Chikanaga)nagachika00@gmail.com
<ul><li><strong>Tracker</strong> changed from <i>Bug</i> to <i>Backport</i></li><li><strong>Project</strong> changed from <i>Ruby master</i> to <i>Backport200</i></li><li><strong>Status</strong> changed from <i>Closed</i> to <i>Assigned</i></li><li><strong>Assignee</strong> set to <i>nagachika (Tomoyuki Chikanaga)</i></li></ul> Backport200 - Backport #8593: MKMF have_framework check assumes the framework and header are identically namedhttps://bugs.ruby-lang.org/issues/8593?journal_id=408532013-08-03T22:44:36Znagachika (Tomoyuki Chikanaga)nagachika00@gmail.com
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li></ul><p>This issue was solved with changeset r42357.<br>
Karl, thank you for reporting this issue.<br>
Your contribution to Ruby is greatly appreciated.<br>
May Ruby be with you.</p>
<hr>
<p>merge revision(s) 41777,41779: [Backport <a class="issue tracker-4 status-5 priority-4 priority-default closed" title="Backport: MKMF have_framework check assumes the framework and header are identically named (Closed)" href="https://bugs.ruby-lang.org/issues/8593">#8593</a>]</p>
<pre><code>* lib/mkmf.rb (have_framework): allow header file to check.
<a href="/issues/8593">[ruby-core:55745]</a> [Bug #8593]
</code></pre>