httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <trawi...@bellsouth.net>
Subject os-specific directories and -Ifoo/OSDIR in APR
Date Wed, 09 Aug 2000 14:51:22 GMT
I'm putting some code in lib/apr/dso/os390; it seemed simple enough to
set OSDIR to os390 in APR's configure.in but still use the unix code
in all other cases.  This works pretty well except in 
lib/apr/misc/unix/Makefile.in, where -I directives are:

  INCDIR1=../../include
  INCDIR2=../../file_io/@OSDIR@
  INCDIR3=../../locks/@OSDIR@
  INCDIR4=../../threadproc/@OSDIR@
  INCLUDES=-I$(INCDIR1) -I$(INCDIR2) -I$(INCDIR3) -I$(INCDIR4) -I.

Since OSDIR is os390, this searches for include directories which
don't exist.  I'm surprised that nobody hit this on AIX, BeOS, or OS/2
(in other words, what am I missing here :) ).

It looks like we need variables such as FILE_IO_OSDIR, LOCKS_OSDIR,
and THREADPROC_OSDIR to be set in configure.in by logic like this:

    if test -d "file_io/$OSDIR; then
        FILE_IO_OSDIR=$OSDIR
    else
        FILE_IO_OSDIR=$DEFAULT_OSDIR
    fi

    (same for LOCKS_OSDIR and THREADPROC_OSDIR)

    AC_SUBST(FILE_IO_OSDIR)

    (same for LOCKS_OSDIR and THREADPROC_OSDIR)

It looks like the "make depend" logic in Makefile.in will also need to be 
tweaked.

Is there a better way?

This would also avoid the hard-coded #include
"../../file_io/unix/fileio.h" in otherchild.c (not that it is a real
problem, but...).

Thanks,

Jeff


Mime
View raw message