Hide the staticaly linked libstdc++ option if the static libstdc++ is not
present, detected at configure time.
Add a blind option that says whether static linking is possible at all.
It defaults to 'y', but depends on the needed CONFIGURE_* options. For
now, it only depends on static libtdc++, but new dependencies can be
easily added.
Hide the global static toolchain option behind this new option.
Original patch by Bryan Hundven <bryanhundven@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
It's probably a good thing to check for at least one instance of
libstdc++.{so,dylib,a} at configure time. At least one is needed
by the companion libraries and gcc.
Original patch by Bryan Hundven <bryanhundven@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
If check_for is able to find the required prog/inc/lib, allow it to
set an arbitrary variable to 'y'. This variable is then pushed down
to the kconfig definition.
For example:
has_or_abort prog=foobar kconfig=has_foobar
If foobar is available, it yields a kconfig variable defaulting to y:
config CONFIGURE_has_foobar
bool
default y
If foobar is missing, it yields a kconfig variable defaulting to n:
config CONFIGURE_has_foobar
bool
Thus it is possible to depends on that variabel to show/hide options:
config SOME_FEATURE
bool
prompt "Some feature"
depends on CONFIGURE_has_foobar
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
When has_or_warn will come, we do want to print the error message
only in has_or_abort, so move it down there.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
When configuring in an hg clone, we need hg to compute the version string.
It can happen that users do not have Mercurial (eg. if they got a snapshot
rather that they did a full clone). In this case, we can still run, of
course, so simply fill the version string with a sufficiently explicit
value, that does not require hg. The date is a good candidate.
aria2 is a powerfull downloader that is capable of chunking and
parallel retrieval.
Due to li;itations in crosstool-NG retrieval facilities, it's not possible
to take fully advantage of aria2. It might happen that, in the future,
those limitations get lifted away, so we can take use features such as
parallel downloading from more than one server at the same time. For now,
it should still speed up downloads thanks to parallel downloading of chunks.
In case the user specifies the LIBDIR with --libdir , or DOCDIR with
--docdir, install our support files in a sub-dir, so as not to mangle
existing (potentially system) files/dirs.
Split the has_or_abort function in two:
- one that checks if the tool if found,
- one that calls the above check, and aborts if not found
The rational behind this is to be able to check for a tool
and if not found, fallback to using our bundled version,
should the need arise (and I get time).
For every components where it makes sense, use bash arrays (instead
of a string with space-separated values) to store the options pased
to ./configure.
The configure script fails on automake-1.11 (in Fedora-11) since
it looks for 3-digit version number.
Patch fixed by "Yann E. MORIN", with the added comment:
The check for the automake version is not against a 3-digit number,
but really against a 3-part version number, a-la 'x.y.z'. Versions
such as 1.10 and 1.11 are also valid.
Now that we have migrated to hg from svn, it does not make sense
to keep using svn tools to compute the version string, so switch
to using mercurial tools (that are much more flexible, BTW).
- when a variable name was given, with no regexp, the pattern did not correctly extract the variable name
/trunk/configure | 11 8 3 0 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
- removed the --force command line option
- use FORCE from the environment
/trunk/configure | 9 2 7 0 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
- update the tool_pattern to use ' || ' as a pattern separator
- which allows using | in regexp
- add checks for cut and xargs
- manually check for grep and sed because they are needed when checking for tools
- print why a test failed, with each tested tool and regexp
- move tools checks before options parsing
- apply conttibutions before computing the version string
- inform user to run make && make install
/trunk/configure | 173 111 62 0 ++++++++++++++++++++++++++++++++++++++++----------------------
1 file changed, 111 insertions(+), 62 deletions(-)
- borrow a lot of ideas from Michael ABBOTT ( http://sourceware.org/ml/crossgcc/2008-12/msg00030.html )
- should be conforming to POSIX 1003.1-2008, non compliance due to bashsims is to be considered a bug
- as a result, it now works with dash
- make a little easier to read in some places
- enforce 4-space indentation
- get rid of futile 'return $?'
- quote all variables assignments
- save and restore IFS prior to and after using alternate values
- simplify the TOOLS_TO_CHECK listing
What's left:
- provide a mean to actually _compare_ version numbers
- change the TOOLS_TO_CHECK pattern style to be able to use '|' in regexp
/trunk/configure | 243 127 116 0 ++++++++++++++++++++++++++++++++------------------------------
1 file changed, 127 insertions(+), 116 deletions(-)
- previously, only version with a more-than-two-digits minor would match
- make versions starting with major in [2-9] also match
/trunk/configure | 4 2 2 0 ++--
1 file changed, 2 insertions(+), 2 deletions(-)