On Fri, Feb 21, 2003 at 01:01:56AM +0200, Tuomo Valkonen wrote: > On Thu, Feb 20, 2003 at 10:40:12PM +0100, Per Olofsson wrote: > > Are autoconf scripts broken? > > Often they do not find the libraries although they are there and options > to set the paths don't work.
Strange, that doesn't happen to me. > Some scripts also require and check for > unncessary things. All checks must have been added for a reason. Perhaps some of them are no good anymore, because they were only needed for obscure old systems that nobody uses these days. And perhaps sometimes they just include a bunch of checks without needing all of them. I have to agree with you that some configure scripts does check for quite a lot of things and take a long time to run. Still, some packages may need to check for many things. > > What do you suggest doing when a package depends on several other > > libraries or need to check some things like library versions and > > availability of certain functions? Write your own configure script? > > Use Imake? > > People who can't check a few Makefile options probably use binary packages. Many packages doesn't just have "a few" options. There's many things they need to check for. And when it can be automated, why does the user have to do it? configure scripts usually does the right thing for me. > In case of Ion and PWM, almost the same system.mk, with a few options > added along the way, can be used with all the releases of both the WM:s. Yes, but Ion and PWM mostly uses X libraries, which looks mostly the same across all platforms. > A minimal library to get around some of the most common OS function > availability/compatibility issues should be written. I agree on this one. > The foobar-config scripts provide a simple way to get the necessary > parameters for libraries that provide the scripts within makefiles. > Versions could be written for libraries/OSes that still miss them. > The scripts could also be used to create a 'make check' target that > can be used to check if something is missing when compile fails or > before the compile at the user's discretion (unlike with autoconf, which > forces sometimes lenghty and unnecessary waits). Similar scripts could > be used to get other system information. All without giving up readable > and easily fixable/customizable Makefiles (same can not be said of autoconf > scripts or the resulting Makefiles that have to be fixed in every directory). > Again, autoconf does not impose any restrictions on makefiles. That's automake. And you shouldn't fix makefiles in every directory, you should edit configure.in/configure.ac. I don't think an autoconf script for Ion would be bloated if it is written correctly. You don't have to test for a hundred things, only what you specify in configure.ac is tested for. I don't think it would be harder to understand than system.mk. For example, is this hard to understand: AC_INIT() AC_PROG_CC() AC_PROG_RANLIB() AC_PATH_X() AC_OUTPUT(system.mk) These, plus some more for Xinerama, Xft, asprintf, etc. would be enough for a configure.ac for Ion, I think. However, it currently works very well as it is, at least for me. But perhaps it will be needed in the future because of Xft and all that... oh well, I don't know. /Pelle
