Blame cmake/CheckHeaderDirent.cmake

Packit 0b5880
# - Check if the system has the specified type
Packit 0b5880
# CHECK_HEADER_DIRENT (HEADER1 HEARDER2 ...)
Packit 0b5880
#
Packit 0b5880
#  HEADER - the header(s) where the prototype should be declared
Packit 0b5880
#
Packit 0b5880
# The following variables may be set before calling this macro to
Packit 0b5880
# modify the way the check is run:
Packit 0b5880
#
Packit 0b5880
#  CMAKE_REQUIRED_FLAGS = string of compile command line flags
Packit 0b5880
#  CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
Packit 0b5880
#  CMAKE_REQUIRED_INCLUDES = list of include directories
Packit 0b5880
# Copyright (c) 2009, Michihiro NAKAJIMA
Packit 0b5880
#
Packit 0b5880
# Redistribution and use is allowed according to the terms of the BSD license.
Packit 0b5880
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
Packit 0b5880
Packit 0b5880
Packit 0b5880
INCLUDE(CheckTypeExists)
Packit 0b5880
Packit 0b5880
MACRO (CHECK_HEADER_DIRENT)
Packit 0b5880
  CHECK_TYPE_EXISTS("DIR *" dirent.h     HAVE_DIRENT_H)
Packit 0b5880
  IF(NOT HAVE_DIRENT_H)
Packit 0b5880
    CHECK_TYPE_EXISTS("DIR *" sys/ndir.h  HAVE_SYS_NDIR_H)
Packit 0b5880
    IF(NOT HAVE_SYS_NDIR_H)
Packit 0b5880
      CHECK_TYPE_EXISTS("DIR *" ndir.h      HAVE_NDIR_H)
Packit 0b5880
      IF(NOT HAVE_NDIR_H)
Packit 0b5880
        CHECK_TYPE_EXISTS("DIR *" sys/dir.h   HAVE_SYS_DIR_H)
Packit 0b5880
      ENDIF(NOT HAVE_NDIR_H)
Packit 0b5880
    ENDIF(NOT HAVE_SYS_NDIR_H)
Packit 0b5880
  ENDIF(NOT HAVE_DIRENT_H)
Packit 0b5880
ENDMACRO (CHECK_HEADER_DIRENT)
Packit 0b5880