include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
add_definitions(-DHAVE_CONFIG_H)
set(CONFIG_HEADER ${CMAKE_CURRENT_BINARY_DIR}/config.h)
+
+###############################################################################
+# Generate "check_stdint.h" from "cmake/check_stdint.h.in"
+#
+# The corresponding GNU Autotools build of this project
+# has m4 macro `m4/ax_create_stdint_h.m4` to create
+# the file `check_stdint.h` from scratch.
+# Include file `stdint.h` was introduced in C99 ANSI standard but
+# many compilers were lacking behind or still are and
+# have not implemented C99 or their `stdint.h` is not compatible.
+# Therefore the m4 macro was needed to create the required datatypes.
+#
+# When converting to CMake we also want to abandon the m4 macros.
+#
+set(PROJECT_VERSION "${check_VERSION}")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/check_stdint.h.in
${CMAKE_CURRENT_BINARY_DIR}/check_stdint.h @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/check_stdint.h DESTINATION include)
+/*-*- mode:C; -*- */
+/*
+ * Check: a unit test framework for C
+ *
+ * Copyright (C) 2013 Branden Archer
+ * Copyright (C) 2019 Mikko Johannes Koivunalho
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
#ifndef _CHECK_CHECK_STDINT_H
#define _CHECK_CHECK_STDINT_H 1
+#ifndef _GENERATED_STDINT_H
+#define _GENERATED_STDINT_H "@PROJECT_NAME@ @PROJECT_VERSION@"
+/* generated using CMake @CMAKE_VERSION@ from file cmake/check_stdint.h.in */
+
+/* Imported CMake variables created during build. */
+#cmakedefine HAVE_STDINT_H 1
+
#ifdef HAVE_STDINT_H
+#define _STDINT_HAVE_STDINT_H 1
#include <stdint.h>
-#endif
-#endif
+#undef HAVE_STDINT_H
+#endif /* defined HAVE_STDINT_H */
+
+/* Define only once */
+#endif /* _GENERATED_STDINT_H */
+#endif /* _CHECK_CHECK_STDINT_H */