* Mike Frysinger <[email protected]> schrieb:
> On Saturday, February 05, 2011 10:16:16 Enrico Weigelt wrote:
> > No, they aren't. They are just macros which are expanded to a big-fat
> > unreable shellscript w/o any functions.
>
> once again you show that you dont follow the projects you spend time
> criticizing. autoconf has for quite some time now required shells to support
> functions since it generates code that uses functions.
Well, actually, there are a few shell functions somewhere deep
in the fat shellscript, but still it's lightyears away from
the concept of structured programming w/ functions/procedures
(introduced somewhere in the 60th).
A about 130 lines configure.ac still produces a 13.800 lines
unreadable configure script (factor 100 !).
Why isn't, eg., something like AC_CHECK_LIB just a function call ?
There could be easily one generic function that does the job on
the given parameters and also tells the success as return value,
so you could directly write:
ac_check_library 'z' 'zlibVersion' || ac_error 'zlib not installed'
instead of:
AC_CHECK_LIB(z, zlibVersion, , AC_ERROR([zlib not installed]))
(which translates to more than 60 lines of shell code in the fat script).
BTW: the whole AC_CHECK_LIB approach (trying to compile a call to
the given function name) uses broken C code - try it on GCC with
-Werror and see what happens ;-o
cu
--
----------------------------------------------------------------------
Enrico Weigelt, metux IT service -- http://www.metux.de/
phone: +49 36207 519931 email: [email protected]
mobile: +49 151 27565287 icq: 210169427 skype: nekrad666
----------------------------------------------------------------------
Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme
----------------------------------------------------------------------