# ac -- filtered autoconf # (Master copy is in RHTF directory) # # # The reason for this script is to eliminate an undesirable warning # message that is familiar to most users of the GNU cross-development # tools: # # AC_TRY_RUN called without default to allow cross compiling # # Background: # # #autoconf# and #automake# allow developers to create software that can # be distributed in source form and run on many different UNIX platforms. # They automate the creation of the Makefiles, testing for all the # different flags that have to be set to control which library functions # are called, what include files exists and where they are located, whether # ints are big-endian, etc. # # Specifically, automake was created to simplify the process of creating # makefiles. The textbook example Makefiles are very simple, but real # Makefiles, particularly for anything that has to be distributed to # many different users using different types of UNIX, are very complicated. # The complexity comes entirely from dealing with lots of different types # of UNIX, compilers, etc. automake makes it simple again. # Similarly, autoconf simplifies the job of creating the "configure" # script. "configure" scripts are a common way to solve multi-platform # issues like figuring out what directory the libraries are in, or whether # the machine is big-endian. Like Makefiles, configure scripts are # needlessly large and complicated, and autoconf simplifies things # dramatically. With automake and autoconf, the developer doesn't have to # know anything about all the other UNIXs and their idiosyncracies. # # The end-product of using automake and autoconf, from the developer's point # of view, is a "configure" script that, when run by the user, will set up # the Makefiles to properly build the program on that user's system. When # it is run, the configure script performs many tests -- finding libraries, # checking for compiler bugs, etc. # # Many of these tests performed by configure involve actually running small # test programs on the machine where the build is being done. This is what # AC_TRY_RUN is used for. However, sometimes a user is building not for his # own machine, but for another; this is called "cross-compiling". An example # is a user who has an Intel-based Linux system, compiling a program for # the PalmPilot. In this case, AC_TRY_RUN won't really work because you # can't easily try little test programs on the PalmPilot when you're # running on a Linux machine. The warning message shown above tells the # developer (before he even releases the source code) that this situation # might cause trouble for the user unless he (the developer) supplies an # alternative method of testing. # # Unfortunately, most developers don't have cross-compiling in mind and # don't really know any alternative ways of testing. Even if they did, # they don't know about all the different types of targets (like the # PalmPilot) that are out there and how to handle each one. Thus, the warning # message appears and they can't do anything about it, they have no way # of providing a proper dafault. The message ends up being little more than # an annoyance. # autoconf 2>&1 | grep -v 'warning.*AC_TRY_RUN called without default to allow cross compiling'