You are viewing a plain text version of this content. The canonical link for it is here.
Posted to site-cvs@tcl.apache.org by pe...@apache.org on 2017/08/02 17:16:59 UTC

svn commit: r1803882 - in /tcl/rivet/branches/cmake/cmake: ./ CMakeLists.txt README.cmake cmake_extra_modules/ cmake_extra_modules/FindAPACHE.cmake cmake_extra_modules/FindAPR.cmake cmake_extra_modules/checks.cmake cmake_extra_modules/config.h.cmake

Author: petasis
Date: Wed Aug  2 17:16:59 2017
New Revision: 1803882

URL: http://svn.apache.org/viewvc?rev=1803882&view=rev
Log:
New branch for cmake build system

Added:
    tcl/rivet/branches/cmake/cmake/
    tcl/rivet/branches/cmake/cmake/CMakeLists.txt
    tcl/rivet/branches/cmake/cmake/README.cmake
    tcl/rivet/branches/cmake/cmake/cmake_extra_modules/
    tcl/rivet/branches/cmake/cmake/cmake_extra_modules/FindAPACHE.cmake
    tcl/rivet/branches/cmake/cmake/cmake_extra_modules/FindAPR.cmake
    tcl/rivet/branches/cmake/cmake/cmake_extra_modules/checks.cmake
    tcl/rivet/branches/cmake/cmake/cmake_extra_modules/config.h.cmake

Added: tcl/rivet/branches/cmake/cmake/CMakeLists.txt
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/cmake/cmake/CMakeLists.txt?rev=1803882&view=auto
==============================================================================
--- tcl/rivet/branches/cmake/cmake/CMakeLists.txt (added)
+++ tcl/rivet/branches/cmake/cmake/CMakeLists.txt Wed Aug  2 17:16:59 2017
@@ -0,0 +1,233 @@
+# Georgios Petasis, petasis@iit.demokritos.gr
+
+# The minimum version of cmake required. This may work also in 2.8,
+# but I have not tested. My cmake is version 3.9.0.
+cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
+
+# Rivet version:
+set(RIVET_MAJOR_VERSION 3)
+set(RIVET_MINOR_VERSION 0)
+set(RIVET_PATCH_VERSION 0)
+set(RIVET_VERSION
+  ${RIVET_MAJOR_VERSION}.${RIVET_MINOR_VERSION}.${RIVET_PATCH_VERSION})
+set(INIT_VERSION ${RIVET_MAJOR_VERSION}.${RIVET_MINOR_VERSION})
+
+# The arguments argument are optional, declares version and language
+# (in this case C).
+project(Rivet VERSION ${RIVET_VERSION} LANGUAGES C)
+
+#  User options...
+# ===========================================================================
+set(with-tclsh "" CACHE FILEPATH "location of a working tclsh executable")
+set(with-tcl   "" CACHE PATH "directory containing tcl configuration (tclConfig.sh)")
+set(with-post-max 0 CACHE STRING "BYTES Maximum size of data to be sent with a POST")
+option(version-display            "Display Rivet version in Apache signature" OFF)
+option(head-requests              "Returns real headers in response to a HEAD request" OFF)
+option(single-thread              "forces the worker brigde to create a single thread (debug)" OFF)
+option(rivet-commands-export      "prevent export from ::rivet namespace" ON)
+option(import-rivet-commands      "requires explicit namespace import" OFF)
+option(virtual-interps-separation "to turn on virtual host separation" OFF)
+option(requests-serialization     "Forces HTTP requests serialization among threads(debug)" OFF)
+option(upload-var                 "whether files are uploaded to Tcl variables" ON)
+
+
+# Offer the user the choice of overriding the installation directories
+set(INSTALL_LIB_DIR lib CACHE PATH "Installation directory for libraries")
+set(INSTALL_BIN_DIR bin CACHE PATH "Installation directory for executables")
+set(INSTALL_INCLUDE_DIR include CACHE PATH
+  "Installation directory for header files")
+if(WIN32 AND NOT CYGWIN)
+  set(DEF_INSTALL_CMAKE_DIR CMake)
+else()
+  set(DEF_INSTALL_CMAKE_DIR lib/CMake/Rivet)
+endif()
+set(INSTALL_CMAKE_DIR ${DEF_INSTALL_CMAKE_DIR} CACHE PATH
+  "Installation directory for CMake files")
+
+# Use GNU install directories
+include(GNUInstallDirs)
+
+#  Rivet source files...
+# ===========================================================================
+set(RIVET_SRC_DIR "${PROJECT_SOURCE_DIR}/../src")
+
+set(rivetparser_sources
+  ${RIVET_SRC_DIR}/parser/rivetParser.c
+  ${RIVET_SRC_DIR}/parser/parserPkgInit.c
+)
+
+set(mod_rivet_sources
+  ${RIVET_SRC_DIR}/request/apache_multipart_buffer.c
+  ${RIVET_SRC_DIR}/request/apache_request.c
+  ${RIVET_SRC_DIR}/mod_rivet/rivetCore.c
+  ${RIVET_SRC_DIR}/mod_rivet/rivetInspect.c
+  ${RIVET_SRC_DIR}/mod_rivet/rivetChannel.c
+  ${RIVET_SRC_DIR}/mod_rivet/TclWebapache.c
+  ${RIVET_SRC_DIR}/mod_rivet/apache_config.c
+  ${RIVET_SRC_DIR}/mod_rivet/mod_rivet_common.c
+  ${RIVET_SRC_DIR}/mod_rivet/mod_rivet_generator.c
+  ${RIVET_SRC_DIR}/parser/rivetParser.c
+)
+
+#  Add build targets...
+# ===========================================================================
+add_library(rivetparser   ${rivetparser_sources})
+add_library(mod_rivet     ${mod_rivet_sources})
+add_library(rivet::parser ALIAS rivetparser)
+add_library(rivet::rivet  ALIAS mod_rivet)
+
+#  Definitions...
+# ===========================================================================
+target_compile_definitions (rivetparser PRIVATE TCL_THREADS=1 HAVE_CONFIG_H=1 )
+target_compile_definitions (mod_rivet   PRIVATE TCL_THREADS=1 HAVE_CONFIG_H=1 )
+set(RIVETLIB_DESTDIR "/usr/lib64/rivet2.1/site-packages/mod_rivet")
+
+# ===========================================================================
+#  Locate needed packages...
+# ===========================================================================
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake_extra_modules")
+include(checks)
+
+#  Locate Tcl...
+# ===========================================================================
+MESSAGE ( STATUS "Searching for Tcl..." )
+if (NOT "${with-tclsh}" STREQUAL "")
+  MESSAGE ( STATUS "  manually set by -Dwith-tclsh=" ${with-tclsh} )
+  find_program(TCL_TCLSH ${with-tclsh})
+endif ()
+if (NOT "${with-tcl}" STREQUAL "")
+  MESSAGE ( STATUS "  manually set by -Dwith-tcl=" ${with-tcl} )
+  find_library(TCL_LIBRARY NAMES tcl
+    tcl${TCL_LIBRARY_VERSION} tcl${TCL_TCLSH_VERSION} tcl${TK_WISH_VERSION}
+    tcl89 tcl8.9 tcl88 tcl8.8 tcl87 tcl8.7
+    tcl86 tcl8.6 tcl85 tcl8.5 tcl84 tcl8.4
+    tcl83 tcl8.3 tcl82 tcl8.2 tcl80 tcl8.0
+    PATHS ${with-tcl} )
+endif ()
+FIND_PACKAGE ( TCL 8.6 REQUIRED )
+MESSAGE ( STATUS "  TCL_TCLSH:               " ${TCL_TCLSH} )
+MESSAGE ( STATUS "  TCL_INCLUDE_PATH:        " ${TCL_INCLUDE_PATH} )
+MESSAGE ( STATUS "  TCL_LIBRARY:             " ${TCL_LIBRARY} )
+
+#  Locate Apache...
+# ===========================================================================
+MESSAGE ( STATUS "Searching for Apache..." )
+find_package(APACHE REQUIRED)
+
+#  Locate Apr...
+# ===========================================================================
+MESSAGE ( STATUS "Searching for Apr..." )
+find_package(APR REQUIRED)
+
+find_package(Threads)
+
+#  Set up include-directories...
+# ===========================================================================
+set(RIVET_INCLUDE_DIRS_PUBLIC
+  "${TCL_INCLUDE_PATH}"
+  "${APACHE_INCLUDE_DIR}"
+  "${APR_INCLUDE_DIR}"
+  "${APRUTIL_INCLUDE_DIR}"
+)
+set(RIVET_INCLUDE_DIRS_PRIVATE
+  "${RIVET_SRC_DIR}"
+  "${RIVET_SRC_DIR}/mod_rivet"
+  "${RIVET_SRC_DIR}/parser"
+  "${RIVET_SRC_DIR}/request"
+  "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}"
+  "${PROJECT_BINARY_DIR}" 
+)
+target_include_directories(rivetparser PUBLIC ${RIVET_INCLUDE_DIRS_PUBLIC} PRIVATE ${RIVET_INCLUDE_DIRS_PRIVATE})
+target_include_directories(mod_rivet   PUBLIC ${RIVET_INCLUDE_DIRS_PUBLIC} PRIVATE ${RIVET_INCLUDE_DIRS_PRIVATE})
+
+set(CONFIGURE_CMD "cmake -${CMAKE_ARGC} ${CMAKE_ARGV0}")
+if(version-display)
+  set(DISPLAY_VERSION 1)
+else(version-display)
+  set(DISPLAY_VERSION 0)
+endif()
+if(head-requests)
+  set(HEAD_REQUESTS 1)
+endif()
+set(MAX_POST ${with-post-max})
+if(single-thread)
+  set(MPM_SINGLE_TCL_THREAD 1)
+endif()
+set(NAMEOFEXECUTABLE ${TCL_TCLSH})
+if(import-rivet-commands)
+  message(STATUS "forcing Rivet to import commands from ::rivet namespace")
+  set(NAMESPACE_IMPORT 1)
+endif()
+if(rivet-commands-export)
+  message(STATUS "forcing Rivet to export commands from ::rivet namespace")
+  set(NAMESPACE_EXPORT 1)
+endif()
+set(SEPARATE_CHANNELS 0)
+if(virtual-interps-separation)
+  set(SEPARATE_VIRTUAL_INTERPS 1)
+endif()
+if(requests-serialization)
+  set(SERIALIZE_HTTP_REQUESTS 1)
+endif()
+if(upload-var)
+  set(UPLOAD_FILES_TO_VAR 1)
+endif()
+
+
+# Generate headers
+configure_file("${PROJECT_SOURCE_DIR}/cmake_extra_modules/config.h.cmake"
+               "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/rivet_config.h" )
+configure_file("${PROJECT_SOURCE_DIR}/cmake_extra_modules/config.h.cmake"
+               "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/config.h" )
+
+# # Make relative paths absolute (needed later on)
+# foreach(p LIB BIN INCLUDE CMAKE)
+#   set(var INSTALL_${p}_DIR)
+#   if(NOT IS_ABSOLUTE "${${var}}")
+#     set(${var} "${CMAKE_INSTALL_PREFIX}/${${var}}")
+#   endif()
+# endforeach()
+# 
+# # 
+# # Add sub-directories
+# add_subdirectory(foo)
+# add_subdirectory(bar)
+# 
+# # The interesting stuff goes here
+# # ===============================
+# 
+# # Add all targets to the build-tree export set
+# export(TARGETS foo bar
+#   FILE "${PROJECT_BINARY_DIR}/FooBarTargets.cmake")
+# 
+# # Export the package for use from the build-tree
+# # (this registers the build-tree with a global CMake-registry)
+# export(PACKAGE FooBar)
+# 
+# # Create the FooBarConfig.cmake and FooBarConfigVersion files
+# file(RELATIVE_PATH REL_INCLUDE_DIR "${INSTALL_CMAKE_DIR}"
+#    "${INSTALL_INCLUDE_DIR}")
+# # ... for the build tree
+# set(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}" "${PROJECT_BINARY_DIR}")
+# configure_file(FooBarConfig.cmake.in
+#   "${PROJECT_BINARY_DIR}/FooBarConfig.cmake" @ONLY)
+# # ... for the install tree
+# set(CONF_INCLUDE_DIRS "\${RIVET_CMAKE_DIR}/${REL_INCLUDE_DIR}")
+# configure_file(FooBarConfig.cmake.in
+#   "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/FooBarConfig.cmake" @ONLY)
+# # ... for both
+# configure_file(FooBarConfigVersion.cmake.in
+#   "${PROJECT_BINARY_DIR}/FooBarConfigVersion.cmake" @ONLY)
+# 
+# # Install the FooBarConfig.cmake and FooBarConfigVersion.cmake
+# install(FILES
+#   "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/FooBarConfig.cmake"
+#   "${PROJECT_BINARY_DIR}/FooBarConfigVersion.cmake"
+#   DESTINATION "${INSTALL_CMAKE_DIR}" COMPONENT dev)
+# 
+# # Install the export set for use with the install-tree
+# install(EXPORT FooBarTargets DESTINATION
+#   "${INSTALL_CMAKE_DIR}" COMPONENT dev)
+
+
+

Added: tcl/rivet/branches/cmake/cmake/README.cmake
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/cmake/cmake/README.cmake?rev=1803882&view=auto
==============================================================================
--- tcl/rivet/branches/cmake/cmake/README.cmake (added)
+++ tcl/rivet/branches/cmake/cmake/README.cmake Wed Aug  2 17:16:59 2017
@@ -0,0 +1,14 @@
+In order to build Rivet with cmake, the following software is required:
+
+a) cmake, version 3.2 or newer.
+
+Compiling Rivet with cmake:
+-------------------------------------------------------
+
+1) Change the working directory to "cmake".
+
+2) Execute the following commands:
+  
+   cmake -E make_directory build
+   cmake -E chdir build cmake --config Release ..
+   cmake --build build --target all --config Release --clean-first

Added: tcl/rivet/branches/cmake/cmake/cmake_extra_modules/FindAPACHE.cmake
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/cmake/cmake/cmake_extra_modules/FindAPACHE.cmake?rev=1803882&view=auto
==============================================================================
--- tcl/rivet/branches/cmake/cmake/cmake_extra_modules/FindAPACHE.cmake (added)
+++ tcl/rivet/branches/cmake/cmake/cmake_extra_modules/FindAPACHE.cmake Wed Aug  2 17:16:59 2017
@@ -0,0 +1,32 @@
+#
+#  APACHE_FOUND - System has APACHE
+#  APACHE_INCLUDE_DIR - The APACHE include directory
+#
+#  APACHE_LOCATION
+#   setting this enables search for apache libraries / headers in this location
+
+#
+# Include directories
+#
+find_path(APACHE_INCLUDE_DIR
+          NAMES httpd.h 
+          PATH_SUFFIXES httpd apache apache2
+)
+
+if(NOT DEFINED APACHE_MODULE_DIR)
+   find_program(APXS_BIN NAMES apxs apxs2
+             PATH_SUFFIXES httpd apache apache2
+   )
+
+   if(APXS_BIN)
+      EXEC_PROGRAM(${APXS_BIN}
+         ARGS -q LIBEXECDIR
+         OUTPUT_VARIABLE APACHE_MODULE_DIR )
+   endif(APXS_BIN)
+endif(NOT DEFINED APACHE_MODULE_DIR)
+
+include(FindPackageHandleStandardArgs)
+# handle the QUIETLY and REQUIRED arguments and set APACHE_FOUND to TRUE if 
+# all listed variables are TRUE
+find_package_handle_standard_args(APACHE DEFAULT_MSG APACHE_INCLUDE_DIR )
+mark_as_advanced(APACHE_INCLUDE_DIR)

Added: tcl/rivet/branches/cmake/cmake/cmake_extra_modules/FindAPR.cmake
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/cmake/cmake/cmake_extra_modules/FindAPR.cmake?rev=1803882&view=auto
==============================================================================
--- tcl/rivet/branches/cmake/cmake/cmake_extra_modules/FindAPR.cmake (added)
+++ tcl/rivet/branches/cmake/cmake/cmake_extra_modules/FindAPR.cmake Wed Aug  2 17:16:59 2017
@@ -0,0 +1,109 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# - Find Apache Portable Runtime
+# Find the APR includes and libraries
+# This module defines
+#  APR_INCLUDE_DIR and APRUTIL_INCLUDE_DIR, where to find apr.h, etc.
+#  APR_LIBRARIES and APRUTIL_LIBRARIES, the libraries needed to use APR.
+#  APR_FOUND and APRUTIL_FOUND, If false, do not try to use APR.
+# also defined, but not for general use are
+#  APR_LIBRARY and APRUTIL_LIBRARY, where to find the APR library.
+
+# APR first.
+
+FIND_PATH(APR_INCLUDE_DIR apr.h
+/usr/local/include/apr-1
+/usr/local/include/apr-1.0
+/usr/include/apr-1
+/usr/include/apr-1.0
+)
+
+SET(APR_NAMES ${APR_NAMES} apr-1)
+FIND_LIBRARY(APR_LIBRARY
+  NAMES ${APR_NAMES}
+  PATHS /usr/lib /usr/local/lib
+  )
+
+IF (APR_LIBRARY AND APR_INCLUDE_DIR)
+    SET(APR_LIBRARIES ${APR_LIBRARY})
+    SET(APR_FOUND "YES")
+ELSE (APR_LIBRARY AND APR_INCLUDE_DIR)
+  SET(APR_FOUND "NO")
+ENDIF (APR_LIBRARY AND APR_INCLUDE_DIR)
+
+
+IF (APR_FOUND)
+   IF (NOT APR_FIND_QUIETLY)
+      MESSAGE(STATUS "Found APR: ${APR_LIBRARIES}")
+   ENDIF (NOT APR_FIND_QUIETLY)
+ELSE (APR_FOUND)
+   IF (APR_FIND_REQUIRED)
+      MESSAGE(FATAL_ERROR "Could not find APR library")
+   ENDIF (APR_FIND_REQUIRED)
+ENDIF (APR_FOUND)
+
+# Deprecated declarations.
+SET (NATIVE_APR_INCLUDE_PATH ${APR_INCLUDE_DIR} )
+GET_FILENAME_COMPONENT (NATIVE_APR_LIB_PATH ${APR_LIBRARY} PATH)
+
+MARK_AS_ADVANCED(
+  APR_LIBRARY
+  APR_INCLUDE_DIR
+  )
+
+# Next, APRUTIL.
+
+FIND_PATH(APRUTIL_INCLUDE_DIR apu.h
+/usr/local/include/apr-1
+/usr/local/include/apr-1.0
+/usr/include/apr-1
+/usr/include/apr-1.0
+)
+
+SET(APRUTIL_NAMES ${APRUTIL_NAMES} aprutil-1)
+FIND_LIBRARY(APRUTIL_LIBRARY
+  NAMES ${APRUTIL_NAMES}
+  PATHS /usr/lib /usr/local/lib
+  )
+
+IF (APRUTIL_LIBRARY AND APRUTIL_INCLUDE_DIR)
+    SET(APRUTIL_LIBRARIES ${APRUTIL_LIBRARY})
+    SET(APRUTIL_FOUND "YES")
+ELSE (APRUTIL_LIBRARY AND APRUTIL_INCLUDE_DIR)
+  SET(APRUTIL_FOUND "NO")
+ENDIF (APRUTIL_LIBRARY AND APRUTIL_INCLUDE_DIR)
+
+
+IF (APRUTIL_FOUND)
+   IF (NOT APRUTIL_FIND_QUIETLY)
+      MESSAGE(STATUS "Found APRUTIL: ${APRUTIL_LIBRARIES}")
+   ENDIF (NOT APRUTIL_FIND_QUIETLY)
+ELSE (APRUTIL_FOUND)
+   IF (APRUTIL_FIND_REQUIRED)
+      MESSAGE(FATAL_ERROR "Could not find APRUTIL library")
+   ENDIF (APRUTIL_FIND_REQUIRED)
+ENDIF (APRUTIL_FOUND)
+
+# Deprecated declarations.
+SET (NATIVE_APRUTIL_INCLUDE_PATH ${APRUTIL_INCLUDE_DIR} )
+GET_FILENAME_COMPONENT (NATIVE_APRUTIL_LIB_PATH ${APRUTIL_LIBRARY} PATH)
+
+MARK_AS_ADVANCED(
+  APRUTIL_LIBRARY
+  APRUTIL_INCLUDE_DIR
+  )

Added: tcl/rivet/branches/cmake/cmake/cmake_extra_modules/checks.cmake
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/cmake/cmake/cmake_extra_modules/checks.cmake?rev=1803882&view=auto
==============================================================================
--- tcl/rivet/branches/cmake/cmake/cmake_extra_modules/checks.cmake (added)
+++ tcl/rivet/branches/cmake/cmake/cmake_extra_modules/checks.cmake Wed Aug  2 17:16:59 2017
@@ -0,0 +1,75 @@
+# Check headers
+include(CheckIncludeFile)
+include(CheckIncludeFiles)
+check_include_files(dlfcn.h        HAVE_DLFCN_H)
+check_include_files(inttypes.h     HAVE_INTTYPES_H)
+check_include_files(limits.h       HAVE_LIMITS_H)
+check_include_files(memory.h       HAVE_MEMORY_H)
+check_include_files(net/errno.h    HAVE_NET_ERRNO_H)
+check_include_files(stdint.h       HAVE_STDINT_H)
+check_include_files(stdlib.h       HAVE_STDLIB_H)
+check_include_files(strings.h      HAVE_STRINGS_H)
+check_include_files(string.h       HAVE_STRING_H)
+check_include_files(sys/param.h    HAVE_SYS_PARAM_H)
+check_include_files(sys/stat.h     HAVE_SYS_STAT_H )
+check_include_files(sys/types.h    HAVE_SYS_TYPES_H )
+check_include_files(unistd.h       HAVE_UNISTD_H )
+check_include_files(dirent.h       HAVE_DIRENT_H)
+check_include_files(limits.h       HAVE_LIMITS_H)
+check_include_files(alloca.h       HAVE_ALLOCA_H )
+check_include_files(stdint.h       HAVE_STDINT_H )
+check_include_files(sys/mman.h     HAVE_SYS_MMAN_H)
+check_include_files(errno.h        HAVE_ERRNO_H)
+check_include_files(float.h        HAVE_FLOAT_H)
+check_include_files(sys/wait.h     HAVE_SYS_WAIT_H)
+check_include_files(values.h       HAVE_VALUES_H)
+
+# Check functions
+include(CheckFunctionExists)
+check_function_exists(fseek64      HAVE_FSEEK64)
+check_function_exists(open64       HAVE_OPEN64)
+check_function_exists(memcpy HAVE_MEMCPY )
+check_function_exists(mmap HAVE_MMAP )
+
+# Check types
+include ( CheckTypeSize )
+check_type_size ( "long double" HAVE_LONG_DOUBLE )
+check_type_size ( "double" SIZEOF_DOUBLE )
+check_type_size ( "long double" SIZEOF_LONG_DOUBLE )
+check_type_size ( "void*" SIZEOF_VOID_P )
+
+if(NOT HAVE_DIRENT_H)
+  set(NO_DIRENT_H 1)
+endif()
+
+if(NOT HAVE_DLFCN_H)
+  set(NO_DLFCN_H 1)
+endif()
+
+if(NOT HAVE_ERRNO_H)
+  set(NO_ERRNO_H 1)
+endif()
+
+if(NOT HAVE_FLOAT_H)
+  set(NO_FLOAT_H 1)
+endif()
+
+if(NOT HAVE_LIMITS_H)
+  set(NO_LIMITS_H 1)
+endif()
+
+if(NOT HAVE_SYS_WAIT_H)
+  set(NO_SYS_WAIT_H 1)
+endif()
+
+if(NOT HAVE_VALUES_H)
+  set(NO_VALUES_H 1)
+endif()
+
+if(NOT HAVE_STDLIB_H)
+  set(NO_STDLIB_H 1)
+endif()
+
+if(NOT HAVE_STRING_H)
+  set(NO_STRING_H 1)
+endif()

Added: tcl/rivet/branches/cmake/cmake/cmake_extra_modules/config.h.cmake
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/cmake/cmake/cmake_extra_modules/config.h.cmake?rev=1803882&view=auto
==============================================================================
--- tcl/rivet/branches/cmake/cmake/cmake_extra_modules/config.h.cmake (added)
+++ tcl/rivet/branches/cmake/cmake/cmake_extra_modules/config.h.cmake Wed Aug  2 17:16:59 2017
@@ -0,0 +1,248 @@
+/*
+ * config.h.cmake - CMake generator template for config.h 
+ * Each field bracketed by @'s is corresponds to a variable
+ * that is either set/not set by the CMakeLists.txt config
+ * script.
+ */ 
+ 
+/* Define if building universal (internal helper macro) */
+#cmakedefine AC_APPLE_UNIVERSAL_BUILD @AC_APPLE_UNIVERSAL_BUILD@
+
+/* configure command string */
+#cmakedefine CONFIGURE_CMD "@CONFIGURE_CMD@"
+
+/* Display Rivet version in Apache signature */
+#cmakedefine DISPLAY_VERSION @DISPLAY_VERSION@
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#cmakedefine HAVE_DLFCN_H @HAVE_DLFCN_H@
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#cmakedefine HAVE_INTTYPES_H @HAVE_INTTYPES_H@
+
+/* Define to 1 if you have the <limits.h> header file. */
+#cmakedefine HAVE_LIMITS_H @HAVE_LIMITS_H@
+
+/* Define to 1 if you have the `lseek64' function. */
+#cmakedefine HAVE_LSEEK64 @HAVE_LSEEK64@
+
+/* Define to 1 if you have the <memory.h> header file. */
+#cmakedefine HAVE_MEMORY_H @HAVE_MEMORY_H@
+
+/* Define to 1 if you have the <net/errno.h> header file. */
+#cmakedefine HAVE_NET_ERRNO_H @HAVE_NET_ERRNO_H@
+
+/* Define to 1 if you have the `open64' function. */
+#cmakedefine HAVE_OPEN64 @HAVE_OPEN64@
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#cmakedefine HAVE_STDINT_H @HAVE_STDINT_H@
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#cmakedefine HAVE_STDLIB_H @HAVE_STDLIB_H@
+
+/* Define to 1 if you have the <strings.h> header file. */
+#cmakedefine HAVE_STRINGS_H @HAVE_STRINGS_H@
+
+/* Define to 1 if you have the <string.h> header file. */
+#cmakedefine HAVE_STRING_H @HAVE_STRING_H@
+
+/* Is 'struct dirent64' in <sys/types.h>? */
+/* #undef HAVE_STRUCT_DIRENT64 */
+
+/* Is 'struct stat64' in <sys/stat.h>? */
+/* #undef HAVE_STRUCT_STAT64 */
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#cmakedefine HAVE_SYS_PARAM_H @HAVE_SYS_PARAM_H@
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#cmakedefine HAVE_SYS_STAT_H @HAVE_SYS_STAT_H@
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#cmakedefine HAVE_SYS_TYPES_H @HAVE_SYS_TYPES_H@
+
+/* Is off64_t in <sys/types.h>? */
+/* #undef HAVE_TYPE_OFF64_T */
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#cmakedefine HAVE_UNISTD_H @HAVE_UNISTD_H@
+
+/* Honor HEAD requests */
+#cmakedefine01 HEAD_REQUESTS
+
+/* Rivet Tcl package version */
+#cmakedefine INIT_VERSION "@INIT_VERSION@"
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+   */
+#cmakedefine LT_OBJDIR "@LT_OBJDIR@"
+#ifndef RIVET_LT_OBJDIR
+#define RIVET_LT_OBJDIR ".libs/"
+#endif
+
+/* Max size of data in POST operations */
+#define MAX_POST @MAX_POST@
+
+/* No Compiler support for module scope symbols */
+#ifndef RIVET_MODULE_SCOPE
+#define RIVET_MODULE_SCOPE extern __attribute__((__visibility__("hidden")))
+#endif
+
+/* yes, MPM worker single thread */
+#cmakedefine MPM_SINGLE_TCL_THREAD @MPM_SINGLE_TCL_THREAD@
+
+/* The path to a working tclsh executable */
+#define NAMEOFEXECUTABLE "@NAMEOFEXECUTABLE@"
+
+/* commands will not be exported */
+#cmakedefine01 NAMESPACE_EXPORT
+
+/* good, no automatic import will be done */
+#cmakedefine01 NAMESPACE_IMPORT
+
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.  */
+#cmakedefine HAVE_DIRENT_H @HAVE_DIRENT_H@
+#cmakedefine NO_DIRENT_H @NO_DIRENT_H@
+
+/* Do we have <dlfcn.h>? */
+#cmakedefine NO_DLFCN_H @NO_DLFCN_H@
+
+/* Do we have <errno.h>? */
+#cmakedefine NO_ERRNO_H @NO_ERRNO_H@
+
+/* Do we have <float.h>? */
+#cmakedefine NO_FLOAT_H @NO_FLOAT_H@
+
+/* Define to 1 if you have the <limits.h> header file. */
+#cmakedefine HAVE_LIMITS_H @HAVE_LIMITS_H@
+#cmakedefine NO_LIMITS_H @NO_LIMITS_H@
+
+/* Do we have <stdlib.h>? */
+#cmakedefine NO_STDLIB_H @NO_STDLIB_H@
+
+/* Do we have <string.h>? */
+#cmakedefine NO_STRING_H @NO_STRING_H@
+
+/* Do we have <sys/wait.h>? */
+#cmakedefine NO_SYS_WAIT_H @NO_SYS_WAIT_H@
+
+/* Do we have <values.h>? */
+#cmakedefine NO_VALUES_H @NO_VALUES_H@
+
+/* No description provided for NO_VIZ... */
+#cmakedefine NO_VIZ
+
+/* Name of package */
+#define PACKAGE "rivet"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "@PROJECT_NAME@"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "@PROJECT_NAME@ @RIVET_VERSION@"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "rivet"
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "@RIVET_VERSION@"
+
+/* The path to the rivet tcl library */
+#define RIVETLIB_DESTDIR "@RIVETLIB_DESTDIR@"
+
+/* Separate Channels for virtual hosts */
+#cmakedefine01 SEPARATE_CHANNELS
+
+/* one interpreter per child */
+#cmakedefine01 SEPARATE_VIRTUAL_INTERPS
+
+/* requests will be serialized */
+#cmakedefine SERIALIZE_HTTP_REQUESTS @SERIALIZE_HTTP_REQUESTS@
+
+/* Is this a static build? */
+#cmakedefine STATIC_BUILD @STATIC_BUILD@
+
+/* Define to 1 if you have the ANSI C header files. */
+#cmakedefine STDC_HEADERS @STDC_HEADERS@
+
+/* Is memory debugging enabled? */
+#cmakedefine TCL_MEM_DEBUG @TCL_MEM_DEBUG@
+
+/* Are we building with threads enabled? */
+#cmakedefine TCL_THREADS @TCL_THREADS@
+
+/* Are wide integers to be implemented with C 'long's? */
+#cmakedefine TCL_WIDE_INT_IS_LONG @TCL_WIDE_INT_IS_LONG@
+
+/* What type should be used to define wide integers? */
+#cmakedefine TCL_WIDE_INT_TYPE @TCL_WIDE_INT_TYPE@
+
+/* UNDER_CE version */
+#cmakedefine UNDER_CE @UNDER_CE@
+
+/* Path to the disk directory where uploads are saved */
+#define UPLOAD_DIR "@UPLOAD_DIR@"
+
+/* uploads go to files */
+#cmakedefine01 UPLOAD_FILES_TO_VAR
+
+/* Do we want to use the threaded memory allocator? */
+#cmakedefine USE_THREAD_ALLOC @USE_THREAD_ALLOC@
+
+/* Version number of package */
+#define VERSION "@RIVET_VERSION@"
+
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+   significant byte first (like Motorola and SPARC, unlike Intel). */
+#if defined AC_APPLE_UNIVERSAL_BUILD
+# if defined __BIG_ENDIAN__
+#  define WORDS_BIGENDIAN 1
+# endif
+#else
+# ifndef WORDS_BIGENDIAN
+/* #  undef WORDS_BIGENDIAN */
+# endif
+#endif
+
+/* Add the _ISOC99_SOURCE flag when building */
+#cmakedefine _ISOC99_SOURCE @_ISOC99_SOURCE@
+
+/* Add the _LARGEFILE64_SOURCE flag when building */
+#cmakedefine _LARGEFILE64_SOURCE @_LARGEFILE64_SOURCE@
+
+/* Add the _LARGEFILE_SOURCE64 flag when building */
+#cmakedefine _LARGEFILE_SOURCE64 @_LARGEFILE_SOURCE64@
+
+/* # needed in sys/socket.h Should OS/390 do the right thing with sockets? */
+#cmakedefine _OE_SOCKETS @_OE_SOCKETS@
+
+/* Do we really want to follow the standard? Yes we do! */
+#cmakedefine _POSIX_PTHREAD_SEMANTICS @_POSIX_PTHREAD_SEMANTICS@
+
+/* Do we want the reentrant OS API? */
+#cmakedefine _REENTRANT @_REENTRANT@
+
+/* Do we want the thread-safe OS API? */
+#cmakedefine _THREAD_SAFE @_THREAD_SAFE@
+
+/* _WIN32_WCE version */
+#cmakedefine _WIN32_WCE @_WIN32_WCE@
+
+/* Do we want to use the XOPEN network library? */
+#cmakedefine _XOPEN_SOURCE_EXTENDED @_XOPEN_SOURCE_EXTENDED@
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+   calls it, or to nothing if 'inline' is not supported under any name.  */
+#ifndef __cplusplus
+#define inline 
+#endif
+/*
+ * vim: syntax=c
+ */ 



---------------------------------------------------------------------
To unsubscribe, e-mail: site-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: site-cvs-help@tcl.apache.org