~sergei.glushchenko/percona-xtrabackup/xb-pprint

« back to all changes in this revision

Viewing changes to src/libarchive/build/cmake/CheckHeaderDirent.cmake

merge parallel compression branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# - Check if the system has the specified type
 
2
# CHECK_HEADER_DIRENT (HEADER1 HEARDER2 ...)
 
3
#
 
4
#  HEADER - the header(s) where the prototype should be declared
 
5
#
 
6
# The following variables may be set before calling this macro to
 
7
# modify the way the check is run:
 
8
#
 
9
#  CMAKE_REQUIRED_FLAGS = string of compile command line flags
 
10
#  CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
 
11
#  CMAKE_REQUIRED_INCLUDES = list of include directories
 
12
# Copyright (c) 2009, Michihiro NAKAJIMA
 
13
#
 
14
# Redistribution and use is allowed according to the terms of the BSD license.
 
15
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
 
16
 
 
17
 
 
18
INCLUDE(CheckTypeExists)
 
19
 
 
20
MACRO (CHECK_HEADER_DIRENT)
 
21
  CHECK_TYPE_EXISTS("DIR *" dirent.h     HAVE_DIRENT_H)
 
22
  IF(NOT HAVE_DIRENT_H)
 
23
    CHECK_TYPE_EXISTS("DIR *" sys/ndir.h  HAVE_SYS_NDIR_H)
 
24
    IF(NOT HAVE_SYS_NDIR_H)
 
25
      CHECK_TYPE_EXISTS("DIR *" ndir.h      HAVE_NDIR_H)
 
26
      IF(NOT HAVE_NDIR_H)
 
27
        CHECK_TYPE_EXISTS("DIR *" sys/dir.h   HAVE_SYS_DIR_H)
 
28
      ENDIF(NOT HAVE_NDIR_H)
 
29
    ENDIF(NOT HAVE_SYS_NDIR_H)
 
30
  ENDIF(NOT HAVE_DIRENT_H)
 
31
ENDMACRO (CHECK_HEADER_DIRENT)
 
32