configure/build system patch

Russ Allbery rra at stanford.edu
Sun Oct 10 08:56:58 UTC 1999


Russ Allbery <rra at Stanford.EDU> writes:

> if you want to play around with it before I get back on-line.  It built
> successfully on Solaris and Linux.  Unless there are lots of complaints
> about it, I'll give it a try on a few more systems and then declare it
> good enough and check it in.

AIX 4.1 was an interesting adventure.  I don't think we've built correctly
there for a while.  Among other things, it doesn't have RLIMIT_NOFILE (or
RLIMIT_OFILE) at least that I can find but *does* have the rlimit
functions, so all the *rlimit() code that was just modifying file
descriptor limits wouldn't compile.

There was also various lossage from the fact that clibrary.h no longer
includes several additional headers that it had been including for various
reasons, and while some code had been correctly including the headers
itself, some hadn't.

I'll add this note to HACKING, and it's also at the top of clibrary.h:
clibrary.h is documented to be equivalent to portably including:

      #include <sys/types.h>
      #include <stdio.h>
      #include <stdlib.h>
      #include <stddef.h>
      #include <stdint.h>
      #include <string.h>
      #include <limits.h>
      #include <unistd.h>

If you need anything else besides that, include it directly, even if
clibrary.h is currently including it as well for some odd reason.  In
particular, clibrary.h is not including netinet/in.h or syslog.h.

I'll go on a warning hunt in a bit to track down all the places syslog()
is used without being declared, but that's more minor since we don't care
about the return type.  netinet/in.h was more important, since that meant
the htonl() family of macros wasn't getting defined and that was causing
link failures on AIX.

AIX 4.1 also needs sys/select.h to get fd_set and friends but that header
file doesn't exist everywhere, so I added that in where it was needed and
configure detected we had it.

Anyway, it now compiles on Solaris 2.6, AIX 4.1, HP-UX 11.00, Linux 2.2.5
(glibc 2.1), and Linux 2.0.35 (libc5) under either gcc 2.95.1 or gcc 2.8.1
depending on platform, which I think is solid enough to check it into the
development branch.  I'm checking Digital UNIX 3.2C right now.  The main
gap in that spread is a really BSDish system, if anyone wants to give it a
whirl there and let me know what breaks.

IRIX has a weird problem when using gcc with inet_ntoa(), which was the
reason for some of the weird configure hackage that I didn't understand.
I think I can detect that specifically and fix it.

Expect a whole slew of checkins shortly, and be warned that the tree may
be somewhat inconsistent until I'm completely done since there are a lot
of interdependencies.  Once all this stuff goes in, I'm going to look at
configdata.h.  There are also large legacy sections in clibrary.h and
acconfig.h that with some fairly simple work on the rest of the source
base we'll probably be able to get rid of in short order.

Once I get things cleaned up, I'd also like to take a look at splitting up
configure.in the way that e.g. fileutils does, with an m4 directory
containing separate files for each major test and configure.in as just a
driver for all of them (plus the options parsing code).  It's kind of hard
to work on with large mmap() tests and the like stuck in the middle of
things.

-- 
Russ Allbery (rra at stanford.edu)         <URL:http://www.eyrie.org/~eagle/>


More information about the inn-workers mailing list