This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: WCHAR_MIN; WCHAR_MAX
- To: Ulrich Drepper <drepper at cygnus dot com>
- Subject: Re: WCHAR_MIN; WCHAR_MAX
- From: Benjamin Kosnik <bkoz at cygnus dot com>
- Date: Thu, 7 Oct 1999 13:12:36 -0700 (PDT)
- cc: Tom Tromey <tromey at cygnus dot com>, libstdc++ at sourceware dot cygnus dot com
> > I want something like AM_CONDITIONAL but for autoconf, so that I can
> > generate headers on the fly at configure time, depending on things that
> > autoconf has already tested for (like for the exampe below,
> > _GLIBCPP_DONT_USE_WCHAR removes the wchar bits for mknumeric_limits)
>
> Hum, how is this different from AC_DEFINE which influences config.h?
> Since mknumeric_limits does not get installed it is fine to rely on
> config.h.
I can use AC_DEFINE and have things defined in config.h, and then have a
header (say bits/std_cmath.h) that include config.h and has a mess of
#if/#elif whatever stuff in it that determines what really happens. This
is what happens currently in other files, and is what will be probably be
used to clear up the WCHAR_MIN issue that started this thread. I continue
to think this is a less than optimal solution, but hey. It works.
What I'm talking about is having autoconf generate a config.h, and
the after all the tests have been run, and all the necessary macros
defined, having autoconf use a header template (bits/std_cmath.h.in) that
is used to generate a (bits/std_cmath.h) that only has the correct info in
it, no extra defines. You can do something like this with Makefiles, using
automake and AM_CONDITIONAL (see the libstdc++/libio/Makefile.* for an
example). I'm talking about this functionality for header and source
files, and run at configure time not make time. I guess you are saying
that this is what fixincludes is for. . . oh, joy.
Anyway.
Benjamin