--W/nzBZO5zC0uMSeA
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Michael Edgar escreveu isso a
> On Jun 23, 2011, at 7:30 PM, Antonio Terceiro wrote:
> 
> > require 'rbconfig'
> > RbConfig::CONFIG['CPP'] = RbConfig::CONFIG['CPP'].gsub('gcc', 'g++')
> > require 'mkmf'
> > have_header('string') or raise('You need <string>')
> > create_makefile('test')
> 
> Don't do this. The following is sufficient:
> 
> require 'mkmf'
> have_library('stdc++')
> create_makefile('laser/BasicBlock')
> 
> That's a working extconf.rb for a gem I'm actively working on. Adding stdc++
> makes mkmf use g++ on my system.

Actualy mkmf uses g++ for C++ code (.cc,.cpp), and not because you
checked for 'stdc++'

The original problem is not checking for a C++ standard header, is
checking for a header that is actually a C++ header that happens to
#include a C++ standard header. Doing that with `gcc -E` instead of `g++
-E` will just not work.

Of course, mkmf could provide a way to say "please check for everything
using C++ instead of C".

-- 
Antonio Terceiro <terceiro / softwarelivre.org>
http://softwarelivre.org/terceiro



--W/nzBZO5zC0uMSeA
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBCAAGBQJOBNwmAAoJEPwNsbvNRgveficP/irw03Wz8u4yBHHd5DiLD/jL
vtOR9TCp2m0p+Pxc/eQVxAF4fqjUQK6RQN6Sv92sYRBGWiH+QxgLtTU7LTYNyIdk
fJoiSUO4KeC49ka+AgVEuO3nfQ55DFQ/B/k5hsLfH7wckWMTyJkZBdOyodcXdS9p
talBrFxQ3QT6GfnDALM8qJ1PU5TN4CLlG6k1lWulCtIaQ3CENkaLh8QcVnx2JcLx
cxzRE4+i/Bhy83xuKSQYbIgwUaDI419wop1TaO/CYefoyieNuuG5EJnecmyVfWM7
siIAL+IB7GUldPJYAgza3x0Q3Ku8iZC1lfxJKy9G8kMO4iK8YL5D/Z+C37lc2koX
P7zmwMugvw2by1vX4kc4PxWZG4eDwrMC0+3w/YsyElfceszaf8BORNNd188lggf1
OdI6pCUXq/oiGGaBpoSQek/P394TxIxfU2nsLAMVQ3OWf/Pv36uaBa0mXkS9btZ7
6eWGtljQty4WtHLO9m6+jUjh2rxzelpvX+qWVmzjypkNrJYi3KADzPS/bs1O8367
CUCBZqoAlgTB604ERuHfS+EZYQz/Jqn0ANFKGoEe3v3VxJ9bc4SUu80gGGPMjogs
1Np05PHUxWZxEz0sorXJc/1MBu9FBcruL50d0IF9WkYKiu2TgdkmoTQFkRT+yqBi
SUztl8npikxSFlSWsVtW
bj
-----END PGP SIGNATURE-----

--W/nzBZO5zC0uMSeA--