|
From: Pedro A. <ped...@po...> - 2006-09-27 09:55:50
|
Danny Backx wrote: >On Mon, 2006-09-25 at 22:51 +0100, Pedro Alves wrote: > > >>What I am trying to do is remove the #ifdef __MINGW32CE__ from the patch, >>and make the checks check for feature, not target. >>eg: >> >>-#ifdef __MINGW32CE__ >>+#ifdef HAVE_STRCOLL >>#else >>#endif >> >>And have the autoconf* stuff define the HAVE_STRCOLL. >> >> > >In general, that would be the better way to proceed - I completely agree >on that. > >However, for this to work, you need to figure out a way for autoconf to >figure out whether you have these features. > >I am not sure that you can reliably do this in a cross-compiler. > > > Sure you can, with AC_CHECK_HEADER(S) and AC_CHECK_FUNCTION(S). The thing is where to place them. Look into libstdc++-v3/crossconfig.m4, It looks like every other target does an AC_CHECK_HEADERS on its own. Does this mean that for example to add errno.h to the list, I will have to add the check to every other target too? If I don't, wherever in the code an #ifdef HAVE_ERRNO_H appears, it will not be defined even if the header exists, right? > Danny > > |