From 72ff4776cd78698c7f47868e88cd6072979f61b5 Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Wed, 8 Jan 2014 16:52:00 +0400 Subject: Use config.h --- CMakeLists.txt | 17 ----------------- config.h.cmake | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f4b4b73f..7caca604 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -105,37 +105,20 @@ check_include_file_cxx ("mntent.h" HAVE_MNTENT_H) check_include_file_cxx ("sys/mnttab.h" HAVE_SYS_MNTTAB_H) if (HAVE_MNTENT_H) - add_definitions (-D HAVE_MNTENT_H=1) check_struct_has_member ("struct mntent" mnt_opts "mntent.h" HAVE_MNTENT) - if (HAVE_MNTENT) - add_definitions (-D HAVE_MNTENT=1) - endif() endif() if (HAVE_SYS_MNTTAB_H) - add_definitions (-D HAVE_SYS_MNTTAB_H=1) check_struct_has_member ("struct mnttab" mnt_mntopts "sys/mnttab.h" HAVE_MNTTAB) - if (HAVE_MNTTAB) - add_definitions (-D HAVE_MNTTAB=1) - endif() endif() check_symbol_exists (environ "unistd.h" HAVE_ENVIRON_DECLARED) -if (HAVE_ENVIRON_DECLARED) - add_definitions (-D HAVE_ENVIRON_DECLARED=1) -endif() # LIBRARY CHECKS include (CheckLibraryExists) include (CheckFunctionExists) check_function_exists (setmntent HAVE_SETMNTENT) -if (HAVE_SETMNTENT) - add_definitions (-D HAVE_SETMNTENT=1) -endif() check_function_exists (endmntent HAVE_ENDMNTENT) -if (HAVE_ENDMNTENT) - add_definitions (-D HAVE_ENDMNTENT=1) -endif() include("cmake/boost-checks.cmake") include("cmake/regex-checks.cmake") diff --git a/config.h.cmake b/config.h.cmake index d433d175..5bfd3a10 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -166,3 +166,19 @@ /* Version number of package */ #cmakedefine VERSION "${VERSION}" + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_MNTENT_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_MNTTAB_H 1 + +/* Define to 1 if you have the mntent stuct (Linux). */ +#cmakedefine HAVE_MNTENT 1 + +/* Define to 1 if you have the mnttab stuct (Solaris). */ +#cmakedefine HAVE_MNTTAB 1 + +/* Define to 1 if you have "char **environ" declared in unistd.h. */ +#cmakedefine HAVE_ENVIRON_DECLARED 1 + -- cgit v1.2.3