1 |
* Mike Frysinger <vapier@g.o> schrieb: |
2 |
> On Saturday, February 05, 2011 10:16:16 Enrico Weigelt wrote: |
3 |
> > No, they aren't. They are just macros which are expanded to a big-fat |
4 |
> > unreable shellscript w/o any functions. |
5 |
> |
6 |
> once again you show that you dont follow the projects you spend time |
7 |
> criticizing. autoconf has for quite some time now required shells to support |
8 |
> functions since it generates code that uses functions. |
9 |
|
10 |
Well, actually, there are a few shell functions somewhere deep |
11 |
in the fat shellscript, but still it's lightyears away from |
12 |
the concept of structured programming w/ functions/procedures |
13 |
(introduced somewhere in the 60th). |
14 |
|
15 |
A about 130 lines configure.ac still produces a 13.800 lines |
16 |
unreadable configure script (factor 100 !). |
17 |
|
18 |
Why isn't, eg., something like AC_CHECK_LIB just a function call ? |
19 |
There could be easily one generic function that does the job on |
20 |
the given parameters and also tells the success as return value, |
21 |
so you could directly write: |
22 |
|
23 |
ac_check_library 'z' 'zlibVersion' || ac_error 'zlib not installed' |
24 |
|
25 |
instead of: |
26 |
|
27 |
AC_CHECK_LIB(z, zlibVersion, , AC_ERROR([zlib not installed])) |
28 |
(which translates to more than 60 lines of shell code in the fat script). |
29 |
|
30 |
|
31 |
BTW: the whole AC_CHECK_LIB approach (trying to compile a call to |
32 |
the given function name) uses broken C code - try it on GCC with |
33 |
-Werror and see what happens ;-o |
34 |
|
35 |
|
36 |
cu |
37 |
-- |
38 |
---------------------------------------------------------------------- |
39 |
Enrico Weigelt, metux IT service -- http://www.metux.de/ |
40 |
|
41 |
phone: +49 36207 519931 email: weigelt@×××××.de |
42 |
mobile: +49 151 27565287 icq: 210169427 skype: nekrad666 |
43 |
---------------------------------------------------------------------- |
44 |
Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme |
45 |
---------------------------------------------------------------------- |