Blame build/cmake/CheckHeaderDirent.cmake

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