Hi,

At Fri, 19 Apr 2002 02:08:41 +0900,
Paul Duncan wrote:
> base = '/usr/include'
> prefixes = ['', 'sys/']
> file = 'mntent.h'
> 
> prefixes.each { |p|
>   path = base + '/' + p
>   $CFLAGS << ' -I' << path if have_header path + file and p.length > 0
> }

Just,

  have_header("sys/mntent.h") or have_header("mntent.h")

and

  #ifdef HAVE_SYS_MNTENT_H
  #include <sys/mntent.h>
  #endif
  #ifdef HAVE_MNTENT_H
  #include <mntent.h>
  #endif

Otherwise,

  if have_header("sys/mntent.h")
    $defs << ' -DMNTENT_H="<sys/mntent.h>"'
  elsif have_header("mntent.h")
    $defs << ' -DMNTENT_H="<mntent.h>"'
  end

and

  #include MNTENT_H

-- 
Nobu Nakada