Commit Graph

83 Commits

Author SHA1 Message Date
Yann E. MORIN"
a8f575082a configure: maintain single quotes in error messages
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-06-02 19:58:05 +02:00
Yann E. MORIN"
a257ff7da8 configure: add possibility to set arbitrary variable in check_for
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>
2011-05-26 22:51:03 +02:00
Yann E. MORIN"
7aa57aa228 configure: add has_or_warn
By popular request, add a function to only warn on missing stuff.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-05-26 18:33:53 +02:00
Yann E. MORIN"
94314fce7c configure: move error message down to has_or_abort
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>
2011-05-26 18:40:53 +02:00
Yann E. MORIN"
9dbbc8e5f6 scripts: remove aria2c as downloader, retain only curl and wget
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-11-16 10:00:27 +01:00
Yann E. MORIN"
11c957c216 configure: fix --mandir
--mandir points to the base dir of the man pages, so
we have to append our man section below given dir.
2010-07-15 22:34:31 +02:00
Titus von Boxberg
7e0d63c969 configure: add path to libtool to pathlist
forgot var=libtool
2010-05-23 16:34:15 +02:00
Titus von Boxberg
ebf80df032 ct-ng: Add ability to configure and use some GNU tools
Make the paths to libtool, objcopy, objdump, readelf, patch configurable.
2010-05-17 14:11:08 +02:00
Titus von Boxberg
82af5a5d7b configure: make call to readlink portable to non-GNU (BSD) systems
The argument '-e' for readlink is a GNU extension.
In setting the variable 'where' the argument '-e' is not necessary, thus eliminated.
2010-05-17 12:23:24 +02:00
Titus von Boxberg
5417e0f79c configure: Do not require stat to be of GNU coreutils
calls to stat have been made portable, thus it is not necessary
that the GNU version is present on the user's system.
2010-05-17 11:29:26 +02:00
Yann E. MORIN"
e497ddd14a configure: do not require hg when configuring in an hg clone
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.
2010-01-17 23:06:02 +01:00
blueness
2a5d424288 configure: silently ignore auto-stuff options --build --host and friends 2010-01-17 11:57:53 -05:00
Yann E. MORIN"
04c68600ea scripts/functions: add aria2, a powerfull downloader
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.
2009-12-30 15:36:22 +01:00
Yann E. MORIN"
6c6415a101 configure: install in a sub-dir of --libdir and --docdir
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.
2009-12-10 15:09:13 +01:00
Yann E. MORIN"
9b67193754 Merge. 2009-10-10 17:24:36 +02:00
Yann E. MORIN"
4d8c26fe11 configure: force using the C locale to check messages 2009-10-10 16:44:12 +02:00
Yann E. MORIN"
8d0062fabc configure: fix --with-foo=/path/to/foo
When a required tool is specified with --with-foo, store the variable
in the list.
2009-10-10 16:41:12 +02:00
Yann E. MORIN"
a83479174b docs: get rid of any reference to the now long-gone svn repository 2009-10-10 13:12:28 +02:00
Yann E. MORIN"
26edbc5b62 configure: split has_or_abort in two: one to check, one to abort
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).
2009-10-03 18:49:23 +02:00
Yann E. MORIN"
4de6139e7e Merge the bash_array branch.
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.
2009-08-19 19:52:04 +02:00
Yann E. MORIN"
fdbe62cf0d configure: check for bash-3.1 or above
This is required to use the array variables that came with bash-3.1.
2009-08-19 19:41:24 +02:00
Oron Peled"
c0483fc7ec [configure] Fix automake version check.
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.
2009-08-01 19:18:12 +02:00
Yann E. MORIN"
ea31afdf04 Require GNU awk at ./configure time.
Some components (specifically {,e}glibc) will not build when awk
is not GNU awk. Make ./configure check for GNU awk.
2009-07-22 20:42:23 +02:00
Yann E. MORIN"
82f9efebd8 Make it build again for non-local use.
Using colons (:) in the version string creates Makefile problems:

Makefile:195: *** multiple target patterns.  Stop.
make: *** [build] Error 2
2009-07-15 09:22:47 +02:00
Yann E. MORIN"
f7535c2f62 Merge the gcc-4.4 support. 2009-06-17 12:32:01 +02:00
Yann E. MORIN
221701baf7 [configure] Use hg to compute the version string
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).
2009-06-17 10:46:28 +02:00
Yann E. MORIN"
a07693b13c /devel/gcc-4.4:
- ./configure: check for 'stat', needing to install the tools wrapper
- wrapper: make it a POSIX-compliant script, restore relocatability
- don't install the wrapper for symlinks

 -------- diffstat follows --------
 /devel/gcc-4.4/configure                  |    1     1     0     0 +
 /devel/gcc-4.4/scripts/build/internals.sh |   22    16     6     0 ++++++++++++++++------
 /devel/gcc-4.4/scripts/wrapper.in         |    5     2     3     0 ++---
 3 files changed, 19 insertions(+), 9 deletions(-)
2009-06-02 21:01:19 +00:00
Yann E. MORIN"
a3623f0e95 /trunk:
- ./configure: require cvs, as retrieving recent
  glibc/eglibc is done as cvs checkouts.

 -------- diffstat follows --------
 /trunk/configure |    1     1     0     0 +
 1 file changed, 1 insertion(+)
2009-05-20 20:20:51 +00:00
Yann E. MORIN"
7bc6829e38 configure:
- as per: http://www.opengroup.org/onlinepubs/009695399/utilities/echo.html
  section "application Usage", change all occurences of:
    echo "..."
  with:
    printf "...\n"

 -------- diffstat follows --------
 /trunk/configure |   46    22    24     0 ++++++++++++++++++++++------------------------
 1 file changed, 22 insertions(+), 24 deletions(-)
2009-05-11 20:44:47 +00:00
Yann E. MORIN"
674c493dd2 configure:
- while checking for the ncurses library, remove bashisms, and make it POSIX compliant

 -------- diffstat follows --------
 /trunk/configure |    8     7     1     0 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
2009-05-11 20:24:29 +00:00
Yann E. MORIN"
2bd5bf19ae Add check for the {n,}curses library.
Add check for readlink, needed to check for libraries.

 -------- diffstat follows --------
 /trunk/configure |   15    14     1     0 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
2009-05-02 21:50:09 +00:00
Yann E. MORIN"
66be9f5713 When running ./configure, check for the {n,}curses headers.
-------- diffstat follows --------
 /trunk/configure |   66    39    27     0 +++++++++++++++++++++++++++++++++++++-------------------------
 1 file changed, 39 insertions(+), 27 deletions(-)
2009-05-02 18:23:58 +00:00
Yann E. MORIN"
2d7f8ef60f configure:
- replace the complex TOOLS_TO_CHECK infrastructure
  with a more versatile has_or_abort function
- allows for more explicit error messages

 -------- diffstat follows --------
 /trunk/configure |  301   146   155     0 ++++++++++++++++++++++++++++++--------------------------------
 1 file changed, 146 insertions(+), 155 deletions(-)
2009-05-01 16:16:53 +00:00
Yann E. MORIN"
5c7f27c46f Remove the last remnant of "awk" specifics in ./configure.
-------- diffstat follows --------
 /trunk/configure |    1     0     1     0 -
 1 file changed, 1 deletion(-)
2009-04-20 22:08:54 +00:00
Yann E. MORIN"
1805f4e62d There's no longer any reason to require GNU awk:
- the only part that required it (socks proxy settings) is gone,
- all remaining awk scripts are POSIXly correct (or should be).

 -------- diffstat follows --------
 /trunk/configure                     |    5     2     3     0 ++---
 /trunk/Makefile.in                   |    2     0     2     0 --
 /trunk/scripts/build/kernel/linux.sh |    2     1     1     0 +-
 /trunk/scripts/build/internals.sh    |    1     0     1     0 -
 /trunk/scripts/build/mpfr.sh         |    2     1     1     0 +-
 /trunk/scripts/functions             |    4     2     2     0 ++--
 /trunk/scripts/saveSample.sh.in      |    4     2     2     0 ++--
 7 files changed, 8 insertions(+), 12 deletions(-)
2009-04-20 21:10:03 +00:00
Yann E. MORIN"
aaaca05f1e Fix inverted --local install test at end of configure.
-------- diffstat follows --------
 /trunk/configure |    2     1     1     0 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
2009-04-20 20:14:53 +00:00
Yann E. MORIN"
06b48c1518 Set the execute bit on generated script at build time, not install time.
Do not advertise "make install" when ./configure-d with "--local".

 -------- diffstat follows --------
 /trunk/configure   |    8     5     3     0 +++++---
 /trunk/Makefile.in |   10     3     7     0 +++-------
 2 files changed, 8 insertions(+), 10 deletions(-)
2009-04-20 19:57:16 +00:00
Robert P. J. DAY"
91723b7748 Fix some simple typoes. 2009-04-02 22:28:10 +00:00
Yann E. MORIN"
a971dbf566 Also recognise the libtool as packaged by Cygwin, when ./configure-ing.
/trunk/configure |    2     1     1     0 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
2009-03-09 22:05:52 +00:00
Yann E. MORIN"
f920df9c09 Recognise bash-4 as a usable bash.
Spotted by "Kim B. Heino" <Kim.Heino@bluegiga.com>

 /trunk/configure |    7     3     4     0 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
2009-02-17 21:05:10 +00:00
Yann E. MORIN"
7eda231a2d Checking for grep and sed has been rationalised, and now emit the same messages as for the other tools.
/trunk/configure |   53    36    17     0 ++++++++++++++++++++++++++++++++++++-----------------
 1 file changed, 36 insertions(+), 17 deletions(-)
2009-02-01 18:40:16 +00:00
Yann E. MORIN"
f685a014e7 ./configure: fix the tools pattern recognition
- 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(-)
2009-01-25 19:26:40 +00:00
Yann E. MORIN"
363a045e5d ./configure: enable user to specify path to some tools
/trunk/configure |  203   107    96     0 +++++++++++++++++++++++++++++++++-----------------------------
 1 file changed, 107 insertions(+), 96 deletions(-)
2009-01-18 15:08:28 +00:00
Yann E. MORIN"
e4d8094edb ./configurei: make FORCE work again:
- removed the --force command line option
- use FORCE from the environment

 /trunk/configure |    9     2     7     0 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
2009-01-07 12:11:37 +00:00
Yann E. MORIN"
a3ffccfeff Further enhance the check for needed tools:
- 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(-)
2008-12-23 22:20:25 +00:00
Yann E. MORIN"
a228413680 Rationalise ./configure
- 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(-)
2008-12-22 18:21:51 +00:00
Yann E. MORIN"
54ef20b0f8 Fix testing the automake version:
- 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(-)
2008-12-19 19:04:43 +00:00
Yann E. MORIN"
7915426092 Better check for automake, check for either curl or wget:
- automake must be at least 1.10 to correctly setup MPFR
- either one of curl or wget is needed to retrieve the tarballs

 /trunk/configure |    7     4     3     0 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
2008-12-16 18:03:28 +00:00
Yann E. MORIN"
81f9d4d73e Honor the DESTDIR variable to install out-of-place (Eg. for packaging).
/trunk/configure         |   10    10     0     0 +++++++++
 /trunk/Makefile.in       |   62    36    26     0 +++++++++++++++++++++++++++++++-----------------------
 /trunk/docs/overview.txt |   12    12     0     0 ++++++++++
 3 files changed, 58 insertions(+), 26 deletions(-)
2008-11-16 21:55:46 +00:00
Yann E. MORIN"
a5bbab574f Use 'gawk', not plain 'awk'.
We need GNU Awk? Then check for, and use 'gawk', not plain 'awk'.
Be a little mre verbose if a tool was not found.

 /trunk/configure                     |    7     4     3     0 ++++---
 /trunk/scripts/build/kernel/linux.sh |    2     1     1     0 +-
 /trunk/scripts/functions             |   16     8     8     0 ++++++++--------
 /trunk/scripts/saveSample.sh         |    4     2     2     0 ++--
 4 files changed, 15 insertions(+), 14 deletions(-)
2008-10-29 22:27:30 +00:00