# 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.
#
# Read README.cmake before using this.
PROJECT(HTTPD C)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
INCLUDE(CheckSymbolExists)
INCLUDE(CheckCSourceCompiles)
FIND_PACKAGE(LibXml2)
FIND_PACKAGE(Lua51)
FIND_PACKAGE(OpenSSL)
FIND_PACKAGE(ZLIB)
# Options for support libraries not supported by cmake-bundled FindFOO
# Default to using APR trunk (libapr-2.lib) if it exists in PREFIX/lib;
# otherwise, default to APR 1.x + APR-util 1.x
IF(EXISTS "${CMAKE_INSTALL_PREFIX}/lib/libapr-2.lib")
SET(default_apr_libraries "${CMAKE_INSTALL_PREFIX}/lib/libapr-2.lib")
ELSEIF(EXISTS "${CMAKE_INSTALL_PREFIX}/lib/libapr-1.lib")
SET(ldaplib "${CMAKE_INSTALL_PREFIX}/lib/apr_ldap-1.lib")
IF(NOT EXISTS ${ldaplib})
SET(ldaplib)
ENDIF()
SET(default_apr_libraries ${CMAKE_INSTALL_PREFIX}/lib/libapr-1.lib ${CMAKE_INSTALL_PREFIX}/lib/libaprutil-1.lib ${ldaplib})
ELSE()
SET(default_apr_libraries)
ENDIF()
# PCRE names its libraries differently for debug vs. release builds.
# We can't query our own CMAKE_BUILD_TYPE at configure time.
# If the debug version exists in PREFIX/lib, default to that one.
IF(EXISTS "${CMAKE_INSTALL_PREFIX}/lib/pcred.lib")
SET(default_pcre_libraries ${CMAKE_INSTALL_PREFIX}/lib/pcred.lib)
ELSE()
SET(default_pcre_libraries ${CMAKE_INSTALL_PREFIX}/lib/pcre.lib)
ENDIF()
IF(EXISTS "${CMAKE_INSTALL_PREFIX}/lib/nghttp2d.lib")
SET(default_nghttp2_libraries "${CMAKE_INSTALL_PREFIX}/lib/nghttp2d.lib")
ELSE()
SET(default_nghttp2_libraries "${CMAKE_INSTALL_PREFIX}/lib/nghttp2.lib")
ENDIF()
IF(EXISTS "${CMAKE_INSTALL_PREFIX}/lib/brotlienc.lib")
SET(default_brotli_libraries "${CMAKE_INSTALL_PREFIX}/lib/brotlienc.lib" "${CMAKE_INSTALL_PREFIX}/lib/brotlicommon.lib")
ELSE()
SET(default_brotli_libraries)
ENDIF()
IF(EXISTS "${CMAKE_INSTALL_PREFIX}/lib/curl.lib")
SET(default_curl_libraries "${CMAKE_INSTALL_PREFIX}/lib/curl.lib")
ELSE()
SET(default_curl_libraries)
ENDIF()
IF(EXISTS "${CMAKE_INSTALL_PREFIX}/lib/jansson.lib")
SET(default_jansson_libraries "${CMAKE_INSTALL_PREFIX}/lib/jansson.lib")
ELSE()
SET(default_jansson_libraries)
ENDIF()
SET(APR_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE STRING "Directory with APR[-Util] include files")
SET(APR_LIBRARIES ${default_apr_libraries} CACHE STRING "APR libraries to link with")
SET(NGHTTP2_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE STRING "Directory with NGHTTP2 include files within nghttp2 subdirectory")
SET(NGHTTP2_LIBRARIES ${default_nghttp2_libraries} CACHE STRING "NGHTTP2 libraries to link with")
SET(PCRE_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE STRING "Directory with PCRE include files")
SET(PCRE_LIBRARIES ${default_pcre_libraries} CACHE STRING "PCRE libraries to link with")
SET(LIBXML2_ICONV_INCLUDE_DIR "" CACHE STRING "Directory with iconv include files for libxml2")
SET(LIBXML2_ICONV_LIBRARIES "" CACHE STRING "iconv libraries to link with for libxml2")
SET(BROTLI_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE STRING "Directory with include files for Brotli")
SET(BROTLI_LIBRARIES ${default_brotli_libraries} CACHE STRING "Brotli libraries to link with")
SET(CURL_LIBRARIES "${default_curl_libraries}" CACHE STRING "Curl libraries to link with")
SET(JANSSON_LIBRARIES "${default_jansson_libraries}" CACHE STRING "Jansson libraries to link with")
# end support library configuration
# Misc. options
OPTION(INSTALL_PDB "Install .pdb files (if generated)" ON)
OPTION(INSTALL_MANUAL "Install manual" ON)
SET(ENABLE_MODULES "O" CACHE STRING "Minimum module enablement (e.g., \"i\" to build all but those without prerequisites)")
SET(WITH_MODULES "" CACHE STRING "comma-separated paths to single-file modules to statically link into the server")
SET(EXTRA_INCLUDES "" CACHE STRING "Extra include directories")
SET(EXTRA_LIBS "" CACHE STRING "Extra libraries")
SET(EXTRA_COMPILE_FLAGS "" CACHE STRING "Extra compile flags")
IF(NOT EXISTS "${APR_INCLUDE_DIR}/apr.h")
MESSAGE(FATAL_ERROR "APR include directory ${APR_INCLUDE_DIR} is not correct.")
ENDIF()
FOREACH(onelib ${APR_LIBRARIES})
IF(NOT EXISTS ${onelib})
MESSAGE(FATAL_ERROR "APR library ${onelib} was not found.")
ENDIF()
ENDFOREACH()
MACRO(DEFINE_WITH_BLANKS output_definition input_symbol input_value)
IF(MSVC_IDE OR ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} VERSION_GREATER 2.8.11)
SET(${output_definition} "-D${input_symbol}=\"${input_value}\"")
ELSE()
# command-line tool + older cmake, where extra quotes must be added and
# escaped to survive
SET(${output_definition} "-D${input_symbol}=\"\\\"${input_value}\\\"\"")
ENDIF()
ENDMACRO()
MACRO(GET_MOD_ENABLE_RANK macro_modname macro_mod_enable_val macro_output_rank)
IF(${macro_mod_enable_val} STREQUAL "O")
SET(${macro_output_rank} 0)
ELSEIF(${macro_mod_enable_val} STREQUAL "i")
SET(${macro_output_rank} 1)
ELSEIF(${macro_mod_enable_val} STREQUAL "I")
SET(${macro_output_rank} 2)
ELSEIF(${macro_mod_enable_val} STREQUAL "a")
SET(${macro_output_rank} 3)
ELSEIF(${macro_mod_enable_val} STREQUAL "A")
SET(${macro_output_rank} 4)
ELSE()
MESSAGE(FATAL_ERROR "Unexpected enablement value \"${macro_mod_enable_val}\" for ${macro_modname}")
ENDIF()
ENDMACRO()
GET_MOD_ENABLE_RANK("ENABLE_MODULES setting" ${ENABLE_MODULES} enable_modules_rank)
# Figure out what APR/APU features are available
#
# CHECK_APR_FEATURE checks for features defined to 1 or 0 in apr.h or apu.h
# The symbol representing the feature will be set to TRUE or FALSE for
# compatibility with the feature tests set by FindFooPackage.
#
# (unclear why CHECK_SYMBOL_EXISTS is needed, but I was getting "found" for anything
# not defined to either 1 or 0)
MACRO(CHECK_APR_FEATURE which_define)
SET(CMAKE_REQUIRED_INCLUDES "${APR_INCLUDE_DIR}")
CHECK_SYMBOL_EXISTS(${which_define} "apr.h;apu.h" tmp_${which_define})
IF(${tmp_${which_define}})
CHECK_C_SOURCE_COMPILES("#include \"${APR_INCLUDE_DIR}/apr.h\"
#include \"${APR_INCLUDE_DIR}/apu.h\"
int main() {
#ifndef ${which_define}
#error gobble
#endif
#if !${which_define}
#error gobble
#endif
return 1;}" ${which_define})
ELSE()
SET(${which_define})
ENDIF()
IF(${${which_define}})
SET(${which_define} TRUE)
ELSE()
SET(${which_define} FALSE)
ENDIF()
ENDMACRO()
CHECK_APR_FEATURE(APR_HAS_XLATE)
CHECK_APR_FEATURE(APU_HAVE_CRYPTO)
# APR_HAS_LDAP is defined in apr_ldap.h, which exists only in apr 1.x, so use
# special code instead of CHECK_APR_FEATURE()
# As with CHECK_APR_FEATURE(), convert to a TRUE/FALSE result.
CHECK_C_SOURCE_COMPILES("#include \"${APR_INCLUDE_DIR}/apr.h\"
#include \"${APR_INCLUDE_DIR}/apr_ldap.h\"
int main() {
#if !APR_HAS_LDAP
#error gobble
#endif
return 1;}" APR_HAS_LDAP)
IF(${APR_HAS_LDAP})
SET(APR_HAS_LDAP TRUE)
ELSE()
SET(APR_HAS_LDAP FALSE)
ENDIF()
# See if nghttp2 exists in a configured or d
没有合适的资源?快使用搜索试试~ 我知道了~
httpd-2.4.41.rar

共2000个文件
utf8:418个
c:309个
html:249个

需积分: 50 5 下载量 128 浏览量
2019-09-06
15:53:50
上传
评论
收藏 10.78MB RAR 举报
温馨提示
源码编译:亲测有效! 1、httpd-2.4.41.tar 2、apr-1.7.0.tar 报错: rm: cannot remove `libtoolT': No such file or directory 解决: configure中#$RM "$cfgfile" 3、apr-util-1.6.1.tar 报错: fatal error:expat.h:no such file or directory #include <expat.h> compile interrupt make[1]: *** [xml/apr_xml.lo] error 1 make[1]: 离开目录“/usr/local/apr-util-1.6.1” make: *** [all-recursive] error 1 解决: yum provides expat yum -y install expat-devel(yum -y install expat-2.1.0-10.el7_3.i686) 安装: apr: ./configure --prefix=/usr/local/apr apr-util: ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/ httpd: ./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr/ --with-apr=/usr/local/apr
资源推荐
资源详情
资源评论






























收起资源包目录





































































































共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论


6神
- 粉丝: 3
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- 基于Java语言的网络操作系统.docx
- 基于工作过程的中职计算机网络技术课程教学探讨.docx
- 中职《计算机网络基础》有效教学方法的探讨.docx
- 《软件工程》实验书修订.doc
- 现代通信技术概论-作者-崔健双-习题参考答案.doc
- 图书管理数据库设计说明书.doc
- hc杯网络技术大赛预选赛测试试题.doc
- 通信工程勘察安全操作规程和设计安全注意事项.ppt
- VB多点温度采集系统上位机软件设计.doc
- 电气自动化测量设备的技术原理与应用.docx
- MATLAB系统模型建立和动态特性研究分析实验.doc
- Windows下如何安装及配置IIS-ASP-PHP.docx
- 试析互联网与气象服务的融合与发展.docx
- 基于云计算技术在中职机房管理中的应用分析.docx
- 基于SDN的云计算安全存在的问题及对策.docx
- JAVA毕业设计方案论文题目大全.doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制
