This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: enable long long and long double support in printf/scanf


Artem B. Bityuckiy wrote:
Jeff Johnston wrote:

Patch with minor modifications checked in, thanks. It was not necessary to alter acinclude.m4 since the new configuration options are designed to modify newlib.h.

It seems to me this is some convention that I don't know. Please, can you describe this issue in more details? Why some options are in acinclude.m4 but some are directly in configure.in? Why for example --enable-newlib-iconv isn't in acinclude.m4?



--enable-newlib-iconv can now be in configure.in since it uses newlib.h. Since the only configuration required is to produce the correct newlib.h file, only the top newlib configuration is needed. Newlib.h is relatively new in the scheme of things. The historical way was to use compiler flags which required each subdirectory to do the same configuration tests to produce the set of compiler flags needed. To do this we put the options in the top acinclude.m4 and configure.host did the tests. We then regenerated all the aclocal.m4 files in the lower directories. Admittedly, things could have been set up differently to prevent the regeneration, but that is hindsight.


I didn't move existing options that could now be in configure.in because it will then require regenerating all of the aclocal.m4 files. Since your patch was centered around 2 new configuration options and didn't require regeneration, I felt it was better to do a separate clean-up in the future. It doesn't buy anything now anyway since the files have already been generated.

Flags might be useful in the future for options one might want to apply to a single directory but not the whole library. For example, special debug flags. You could reconfigure in your build directory so that a particular subdirectory builds with special defines set.

Thus, the new options were placed in configure.in. I modified configure.host to add some default option variables that various platforms can set as needed. At the end of configure.host, a check is made to see if the configuration options are not set and if a default is specified. This allows the user to override defaults with configuration options.


Thanks.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]