apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r1518770 - in /apr/apr-util/branches/1.5.x: CHANGES CMakeLists.txt README.cmake include/apr_ldap.hwc include/apu.hwc
Date Thu, 29 Aug 2013 19:16:52 GMT
Author: trawick
Date: Thu Aug 29 19:16:51 2013
New Revision: 1518770

URL: http://svn.apache.org/r1518770
Log:
Add cmake build for APR-Util 1.5.x.

*.hwc files are essentially the same as the existing .hw
files, except for a few variables filled in during cmake
configuration.

tdonovan contributed a lot via a previous experiment with
cmake.

Added:
    apr/apr-util/branches/1.5.x/CMakeLists.txt   (with props)
    apr/apr-util/branches/1.5.x/README.cmake   (with props)
    apr/apr-util/branches/1.5.x/include/apr_ldap.hwc   (with props)
    apr/apr-util/branches/1.5.x/include/apu.hwc   (with props)
Modified:
    apr/apr-util/branches/1.5.x/CHANGES

Modified: apr/apr-util/branches/1.5.x/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.5.x/CHANGES?rev=1518770&r1=1518769&r2=1518770&view=diff
==============================================================================
--- apr/apr-util/branches/1.5.x/CHANGES [utf-8] (original)
+++ apr/apr-util/branches/1.5.x/CHANGES [utf-8] Thu Aug 29 19:16:51 2013
@@ -1,6 +1,9 @@
                                                      -*- coding: utf-8 -*-
 Changes with APR-util 1.5.3
 
+  *) Add experimental cmake-based build system for Windows.  Refer to
+     README.cmake for more information.  [Jeff Trawick, Tom Donovan]
+
   *) Fix warnings in odbc driver on 64bit systems.
      PR 55197  [Tom Donovan]
 

Added: apr/apr-util/branches/1.5.x/CMakeLists.txt
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.5.x/CMakeLists.txt?rev=1518770&view=auto
==============================================================================
--- apr/apr-util/branches/1.5.x/CMakeLists.txt (added)
+++ apr/apr-util/branches/1.5.x/CMakeLists.txt Thu Aug 29 19:16:51 2013
@@ -0,0 +1,278 @@
+# 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(APR-Util C)
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
+
+FIND_PACKAGE(OpenSSL)
+
+OPTION(APU_HAVE_CRYPTO      "Crypto support"               OFF)
+OPTION(APU_HAVE_ODBC        "Build ODBC DBD driver"        ON)
+OPTION(APR_SHOW_SETTINGS    "Show the build configuration" ON)
+OPTION(APR_BUILD_TESTAPR    "Build the test suite"         OFF)
+
+IF(APU_HAVE_CRYPTO)
+IF(NOT OPENSSL_FOUND)
+  MESSAGE(FATAL_ERROR "OpenSSL is the only supported crypto implementation, and it wasn't
found!")
+ENDIF()
+ENDIF()
+
+# create 1-or-0 representation of feature tests for apu.h
+
+SET(apu_have_crypto_10 0)
+SET(apu_have_apr_iconv_10 0) # not yet implemented
+SET(apr_has_ldap_10 0) # not yet implemented
+
+IF(APU_HAVE_CRYPTO)
+  SET(apu_have_crypto_10 1)
+ENDIF()
+
+CONFIGURE_FILE(include/apu.hwc
+              ${PROJECT_BINARY_DIR}/apu.h)
+CONFIGURE_FILE(include/apr_ldap.hwc
+              ${PROJECT_BINARY_DIR}/apr_ldap.h)
+# "COPYONLY" just because anything else isn't implemented ;)
+CONFIGURE_FILE(include/private/apu_config.hw
+               ${PROJECT_BINARY_DIR}/apu_config.h
+               COPYONLY)
+CONFIGURE_FILE(include/private/apu_select_dbm.hw
+               ${PROJECT_BINARY_DIR}/apu_select_dbm.h
+               COPYONLY)
+CONFIGURE_FILE(include/apu_want.hw
+               ${PROJECT_BINARY_DIR}/apu_want.h
+               COPYONLY)
+
+SET(XMLLIB_INCLUDE_DIR   ${CMAKE_CURRENT_SOURCE_DIR}/xml/expat/lib)
+SET(XMLLIB_LIBRARIES     libexpat)
+
+# Generated .h files are stored in PROJECT_BINARY_DIR, not the
+# source tree.
+#
+# BROKEN: not searching PROJECT_BINARY_DIR first, so you have to
+#         manually delete apu.h in PROJECT_SOURCE_DIR/include if
+#         you've generated apu.h before using a different build
+
+SET(APR_INCLUDE_DIRECTORIES
+  ${PROJECT_BINARY_DIR}
+  ${CMAKE_CURRENT_SOURCE_DIR}/include
+  ${CMAKE_CURRENT_SOURCE_DIR}/include/private
+  ${APR_INCLUDE_DIR}
+)
+
+INCLUDE_DIRECTORIES(${APR_INCLUDE_DIRECTORIES} ${XMLLIB_INCLUDE_DIR})
+
+SET(APR_HEADERS ${PROJECT_BINARY_DIR}/apu.h)
+
+SET(APR_PUBLIC_HEADERS_STATIC
+  include/apr_anylock.h
+  include/apr_base64.h
+  include/apr_buckets.h
+  include/apr_crypto.h
+  include/apr_date.h
+  include/apr_dbd.h
+  include/apr_dbm.h
+  include/apr_hooks.h
+  include/apr_ldap_init.h
+  include/apr_ldap_option.h
+  include/apr_ldap_rebind.h
+  include/apr_ldap_url.h
+  include/apr_md4.h
+  include/apr_md5.h
+  include/apr_memcache.h
+  include/apr_optional.h
+  include/apr_optional_hooks.h
+  include/apr_queue.h
+  include/apr_reslist.h
+  include/apr_rmm.h
+  include/apr_sdbm.h
+  include/apr_sha1.h
+  include/apr_strmatch.h
+  include/apr_thread_pool.h
+  include/apr_uri.h
+  include/apr_uuid.h
+  include/apr_xlate.h
+  include/apr_xml.h
+  include/apu_errno.h
+  include/apu_version.h
+)
+
+# apu_config.h and apu_select_dbm.h are private
+SET(APR_PUBLIC_HEADERS_GENERATED
+  ${PROJECT_BINARY_DIR}/apu.h
+  ${PROJECT_BINARY_DIR}/apr_ldap.h
+  ${PROJECT_BINARY_DIR}/apu_want.h
+)
+
+SET(APR_SOURCES
+  buckets/apr_brigade.c
+  buckets/apr_buckets.c
+  buckets/apr_buckets_alloc.c
+  buckets/apr_buckets_eos.c
+  buckets/apr_buckets_file.c
+  buckets/apr_buckets_flush.c
+  buckets/apr_buckets_heap.c
+  buckets/apr_buckets_mmap.c
+  buckets/apr_buckets_pipe.c
+  buckets/apr_buckets_pool.c
+  buckets/apr_buckets_refcount.c
+  buckets/apr_buckets_simple.c
+  buckets/apr_buckets_socket.c
+  crypto/apr_crypto.c
+  crypto/apr_md4.c
+  crypto/apr_md5.c
+  crypto/apr_passwd.c
+  crypto/apr_sha1.c
+  crypto/crypt_blowfish.c
+  crypto/getuuid.c
+  crypto/uuid.c
+  dbd/apr_dbd.c
+  dbd/apr_dbd_odbc.c
+  dbm/apr_dbm.c
+  dbm/apr_dbm_sdbm.c
+  dbm/sdbm/sdbm.c
+  dbm/sdbm/sdbm_hash.c
+  dbm/sdbm/sdbm_lock.c
+  dbm/sdbm/sdbm_pair.c
+  encoding/apr_base64.c
+  hooks/apr_hooks.c
+  memcache/apr_memcache.c
+  misc/apr_date.c
+  misc/apr_queue.c
+  misc/apr_reslist.c
+  misc/apr_rmm.c
+  misc/apr_thread_pool.c
+  misc/apu_dso.c
+  misc/apu_version.c
+  strmatch/apr_strmatch.c
+  uri/apr_uri.c
+  xlate/xlate.c
+  xml/apr_xml.c
+)
+
+SET(APR_TEST_SOURCES
+  test/abts.c
+  test/testbuckets.c
+  test/testcrypto.c
+  test/testdate.c
+  test/testdbd.c
+  test/testdbm.c
+  test/testldap.c
+  test/testmd4.c
+  test/testmd5.c
+  test/testmemcache.c
+  test/testpass.c
+  test/testqueue.c
+  test/testreslist.c
+  test/testrmm.c
+  test/teststrmatch.c
+  test/testuri.c
+  test/testutil.c
+  test/testuuid.c
+  test/testxlate.c
+  test/testxml.c
+)
+
+SET(EXPAT_SOURCES
+  xml/expat/lib/xmlrole.c
+  xml/expat/lib/xmltok.c
+  xml/expat/lib/xmlparse.c
+)
+
+SET(install_targets)
+
+# static expat (not installed)
+ADD_LIBRARY(libexpat STATIC ${EXPAT_SOURCES})
+SET_TARGET_PROPERTIES(libexpat PROPERTIES COMPILE_DEFINITIONS "XML_STATIC;COMPILED_FROM_DSP")
+
+# libaprutil-1 is shared, aprutil-1 is static
+ADD_LIBRARY(libaprutil-1 SHARED ${APR_HEADERS} ${APR_SOURCES} ${PROJECT_BINARY_DIR}/apu.h)
+SET(install_targets ${install_targets} libaprutil-1)
+TARGET_LINK_LIBRARIES(libaprutil-1 ${APR_LIBRARIES} ${XMLLIB_LIBRARIES})
+SET_TARGET_PROPERTIES(libaprutil-1 PROPERTIES COMPILE_DEFINITIONS "APU_DECLARE_EXPORT;APU_DSO_MODULE_BUILD;XML_STATIC")
+
+ADD_LIBRARY(aprutil-1 STATIC ${APR_HEADERS} ${APR_SOURCES} ${PROJECT_BINARY_DIR}/apu.h)
+SET(install_targets ${install_targets} aprutil-1)
+TARGET_LINK_LIBRARIES(aprutil-1 ${APR_LIBRARIES} ${XMLLIB_LIBRARIES})
+SET_TARGET_PROPERTIES(aprutil-1 PROPERTIES COMPILE_DEFINITIONS "APU_DECLARE_STATIC;APR_DECLARE_STATIC;APU_DSO_MODULE_BUILD;XML_STATIC")
+
+IF(APU_HAVE_CRYPTO)
+  IF(NOT OPENSSL_FOUND)
+    MESSAGE(FATAL_ERROR "Only OpenSSL-based crypto is currently implemented in the cmake
build")
+  ENDIF()
+  ADD_LIBRARY(apr_crypto_openssl-1 SHARED crypto/apr_crypto_openssl.c)
+  SET(install_targets ${install_targets} apr_crypto_openssl-1)
+  SET_TARGET_PROPERTIES(apr_crypto_openssl-1 PROPERTIES INCLUDE_DIRECTORIES "${APR_INCLUDE_DIRECTORIES};${OPENSSL_INCLUDE_DIR}")
+  TARGET_LINK_LIBRARIES(apr_crypto_openssl-1 libaprutil-1 ${APR_LIBRARIES} ${OPENSSL_LIBRARIES})
+ENDIF()
+
+IF(APU_HAVE_ODBC)
+  ADD_LIBRARY(apr_dbd_odbc-1 SHARED dbd/apr_dbd_odbc.c)
+  SET(install_targets ${install_targets} apr_dbd_odbc-1)
+  TARGET_LINK_LIBRARIES(apr_dbd_odbc-1 libaprutil-1 ${APR_LIBRARIES} odbc32 odbccp32)
+  SET_PROPERTY(TARGET apr_dbd_odbc-1 APPEND PROPERTY LINK_FLAGS /export:apr_dbd_odbc_driver)
+  SET_TARGET_PROPERTIES(apr_dbd_odbc-1 PROPERTIES COMPILE_DEFINITIONS "APU_HAVE_ODBC;HAVE_SQL_H;APU_DECLARE_EXPORT;APU_DSO_MODULE_BUILD")
+ENDIF()
+
+IF(APR_BUILD_TESTAPR)
+  EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/data)
+  EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PROJECT_SOURCE_DIR}/test/data/billion-laughs.xml
${PROJECT_BINARY_DIR}/data/billion-laughs.xml)
+
+  ADD_EXECUTABLE(testall ${APR_TEST_SOURCES})
+  TARGET_LINK_LIBRARIES(testall aprutil-1 ${XMLLIB_LIBRARIES})
+
+  ADD_EXECUTABLE(dbd test/dbd.c)
+  TARGET_LINK_LIBRARIES(dbd aprutil-1)
+
+  # test programs are linked with static library
+  SET_TARGET_PROPERTIES(testall dbd PROPERTIES COMPILE_FLAGS "-DAPU_DECLARE_STATIC -DAPR_DECLARE_STATIC")
+
+ENDIF (APR_BUILD_TESTAPR)
+
+# Installation
+
+INSTALL(TARGETS ${install_targets}
+        RUNTIME DESTINATION bin
+        LIBRARY DESTINATION lib
+        ARCHIVE DESTINATION lib
+       )
+
+INSTALL(FILES ${APR_PUBLIC_HEADERS_STATIC} ${APR_PUBLIC_HEADERS_GENERATED} DESTINATION include)
+IF(APR_INSTALL_PRIVATE_H)
+  # Kludges for unexpected dependencies of httpd 2.x, not installed by default
+  SET(APR_PRIVATE_H_FOR_HTTPD
+    include/arch/win32/apr_arch_file_io.h
+    include/arch/win32/apr_arch_misc.h
+    include/arch/win32/apr_arch_utf8.h
+    include/arch/win32/apr_private.h
+    )
+  INSTALL(FILES ${APR_PRIVATE_H_FOR_HTTPD} DESTINATION include/arch/win32)
+ENDIF()
+
+IF(APR_SHOW_SETTINGS)
+  STRING(TOUPPER "${CMAKE_BUILD_TYPE}" buildtype)
+  MESSAGE(STATUS "")
+  MESSAGE(STATUS "")
+  MESSAGE(STATUS "APR configuration summary:")
+  MESSAGE(STATUS "")
+  MESSAGE(STATUS "  Install prefix .................. : ${CMAKE_INSTALL_PREFIX}")
+  MESSAGE(STATUS "  C compiler ...................... : ${CMAKE_C_COMPILER}")
+  MESSAGE(STATUS "  DBD ODBC driver ................. : ${APU_HAVE_ODBC}")
+  MESSAGE(STATUS "  Library files for XML ........... : ${XMLLIB_LIBRARIES}")
+  MESSAGE(STATUS "  Build test suite ................ : ${APR_BUILD_TESTAPR}")
+  MESSAGE(STATUS "  Install private .h for httpd .... : ${APR_INSTALL_PRIVATE_H}")
+ENDIF(APR_SHOW_SETTINGS)

Propchange: apr/apr-util/branches/1.5.x/CMakeLists.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: apr/apr-util/branches/1.5.x/README.cmake
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.5.x/README.cmake?rev=1518770&view=auto
==============================================================================
--- apr/apr-util/branches/1.5.x/README.cmake (added)
+++ apr/apr-util/branches/1.5.x/README.cmake Thu Aug 29 19:16:51 2013
@@ -0,0 +1,126 @@
+Experimental cmake-based build support for APR-Util on Microsoft Windows
+
+Status
+------
+
+This build support is currently intended only for Microsoft Windows.
+
+This build support is experimental.  Specifically,
+
+* It does not support all features of APR-Util.
+* Some components may not be built correctly and/or in a manner
+  compatible with the previous Windows build support.
+* Build interfaces, such as the mechanisms which are used to enable
+  optional functionality or specify prerequisites, may change from
+  release to release as feedback is received from users and bugs and
+  limitations are resolved.
+
+Important: Refer to the "Known Bugs and Limitations" section for further
+           information.
+
+           It is beyond the scope of this document to document or explain
+           how to utilize the various cmake features, such as different
+           build backends or provisions for finding support libraries.
+
+           Please refer to the cmake documentation for additional information
+           that applies to building any project with cmake.
+
+Prerequisites
+-------------
+
+The following tools must be in PATH:
+
+* cmake, version 2.8 or later
+* If using a command-line compiler: compiler and linker and related tools
+  (Refer to the cmake documentation for more information.)
+
+The following support libraries are mandatory:
+
+* APR 1.4.x, built with cmake
+
+Optional support libraries allow optional features of APR to be enabled:
+
+* OpenSSL
+* many others potentially, though the build support isn't currently
+  implemented
+
+How to build
+------------
+
+1. cd to a clean directory for building (i.e., don't build in your
+   source tree)
+
+2. Some cmake backends may want your compile tools in PATH.  (Hint: "Visual
+   Studio Command Prompt")
+
+3. set CMAKE_LIBRARY_PATH=d:\path\to\prereq1\lib;d:\path\to\prereq2\lib;...
+
+4. set CMAKE_INCLUDE_PATH=d:\path\to\prereq1\include;d:\path\to\prereq2\include;...
+
+5. cmake -G "some backend, like 'NMake Makefiles'"
+     -DCMAKE_INSTALL_PREFIX=d:/path/to/aprinst
+     -DAPR_INCLUDE_DIR=d:/path/to/apr1inst/include
+     -DAPR_LIBRARIES=d:/path/to/apr1inst/lib/libapr-1.lib
+     -DAPR-Util-specific-flags
+     d:/path/to/aprutilsource
+
+   Alternately, use cmake-gui and update settings in the GUI.
+
+   APR-Util feature flags:
+
+       APU_HAVE_CRYPTO        Build crypt support (only the OpenSSL
+                              implementation is currently supported)
+                              Default: OFF
+       APU_HAVE_ODBC          Build ODBC DBD driver
+                              Default: ON
+       APR_SHOW_SETTINGS      Display key build settings at the end of build
+                              generation
+                              Default: ON
+       APR_BUILD_TESTAPR      Build APR-Util test suite
+                              Default: OFF
+
+   CMAKE_C_FLAGS_RELEASE, _DEBUG, _RELWITHDEBINFO, _MINSIZEREL
+
+   CMAKE_BUILD_TYPE
+
+       For NMake Makefiles the choices are at least DEBUG, RELEASE,
+       RELWITHDEBINFO, and MINSIZEREL
+       Other backends make have other selections.
+
+6. build using chosen backend (e.g., "nmake install")
+
+Known Bugs and Limitations
+--------------------------
+
+* If include/apu.h or other generated files have been created in the source
+  directory by another build system, they will be used unexpectedly and
+  cause the build to fail.
+* Options should be provided for remaining features, along with finding any
+  necessary libraries
+  + LDAP
+  + DBM:
+    . APU_HAVE_GDBM
+    . APU_HAVE_NDBM
+    . APU_HAVE_DB
+  + DBD:
+    . APU_HAVE_PGSQL
+    . APU_HAVE_MYSQL
+    . APU_HAVE_SQLITE3
+    . APU_HAVE_SQLITE2
+    . APU_HAVE_ORACLE
+  + CRYPTO:
+    . APU_HAVE_NSS
+  + XLATE, APU_HAVE_ICONV
+* Static builds of APR modules are not supported.
+* No test program build to use libaprutil-1.dll is created.
+* No script or other mechanism is provided to run the test suite.
+* CHANGES/LICENSE/NOTICE is not installed, unlike Makefile.win.
+
+Generally:
+
+* Many APR-Util features have not been tested with this build.
+* Developers need to examine the existing Windows build in great detail and see
+  what is missing from the cmake-based build, whether a feature or some build
+  nuance.
+* Any feedback you can provide on your experiences with this build will be
+  helpful.

Propchange: apr/apr-util/branches/1.5.x/README.cmake
------------------------------------------------------------------------------
    svn:eol-style = native

Added: apr/apr-util/branches/1.5.x/include/apr_ldap.hwc
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.5.x/include/apr_ldap.hwc?rev=1518770&view=auto
==============================================================================
--- apr/apr-util/branches/1.5.x/include/apr_ldap.hwc (added)
+++ apr/apr-util/branches/1.5.x/include/apr_ldap.hwc Thu Aug 29 19:16:51 2013
@@ -0,0 +1,197 @@
+/* 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.
+ */
+
+/*
+ * apr_ldap.h is generated from apr_ldap.h.in by configure -- do not edit apr_ldap.h
+ */
+/**
+ * @file apr_ldap.h
+ * @brief  APR-UTIL LDAP 
+ */
+#ifndef APU_LDAP_H
+#define APU_LDAP_H
+
+/**
+ * @defgroup APR_Util_LDAP LDAP
+ * @ingroup APR_Util
+ * @{
+ */
+
+/* this will be defined if LDAP support was compiled into apr-util */
+#define APR_HAS_LDAP		    @apr_has_ldap_10@
+
+/* identify the LDAP toolkit used */
+#define APR_HAS_NETSCAPE_LDAPSDK    0
+#define APR_HAS_SOLARIS_LDAPSDK     0
+#define APR_HAS_NOVELL_LDAPSDK      0
+#define APR_HAS_MOZILLA_LDAPSDK     0
+#define APR_HAS_OPENLDAP_LDAPSDK    0
+#define APR_HAS_MICROSOFT_LDAPSDK   1
+#define APR_HAS_TIVOLI_LDAPSDK      0
+#define APR_HAS_ZOS_LDAPSDK         0
+#define APR_HAS_OTHER_LDAPSDK       0
+
+
+/*
+ * Handle the case when LDAP is enabled
+ */
+#if APR_HAS_LDAP
+
+/*
+ * The following #defines are DEPRECATED and should not be used for
+ * anything. They remain to maintain binary compatibility.
+ * The original code defined the OPENLDAP SDK as present regardless
+ * of what really was there, which was way bogus. In addition, the
+ * apr_ldap_url_parse*() functions have been rewritten specifically for
+ * APR, so the APR_HAS_LDAP_URL_PARSE macro is forced to zero.
+ */
+#if APR_HAS_TIVOLI_LDAPSDK
+#define APR_HAS_LDAP_SSL 0
+#else
+#define APR_HAS_LDAP_SSL 1
+#endif
+#define APR_HAS_LDAP_URL_PARSE 0
+
+#if APR_HAS_OPENLDAP_LDAPSDK && !defined(LDAP_DEPRECATED) 
+/* Ensure that the "deprecated" interfaces are still exposed
+ * with OpenLDAP >= 2.3; these were exposed by default in earlier
+ * releases. */
+#define LDAP_DEPRECATED 1
+#endif
+
+/*
+ * Include the standard LDAP header files.
+ */
+
+#include <winldap.h>
+
+
+/*
+ * Detected standard functions
+ */
+#define APR_HAS_LDAPSSL_CLIENT_INIT 0
+#define APR_HAS_LDAPSSL_CLIENT_DEINIT 0
+#define APR_HAS_LDAPSSL_ADD_TRUSTED_CERT 0
+#define APR_HAS_LDAP_START_TLS_S 0
+#define APR_HAS_LDAP_SSLINIT 1
+#define APR_HAS_LDAPSSL_INIT 0
+#define APR_HAS_LDAPSSL_INSTALL_ROUTINES 0
+
+
+/*
+ * Make sure the secure LDAP port is defined
+ */
+#ifndef LDAPS_PORT
+#define LDAPS_PORT 636  /* ldaps:/// default LDAP over TLS port */
+#endif
+
+
+/*
+ * For ldap function calls that input a size limit on the number of returned elements
+ * Some SDKs do not have the define for LDAP_DEFAULT_LIMIT (-1) or LDAP_NO_LIMIT (0)
+ * LDAP_DEFAULT_LIMIT is preferred as it allows inheritance from whatever the SDK
+ * or process is configured for.
+ */
+#ifdef LDAP_DEFAULT_LIMIT
+#define APR_LDAP_SIZELIMIT LDAP_DEFAULT_LIMIT
+#else
+#ifdef LDAP_NO_LIMIT
+#define APR_LDAP_SIZELIMIT LDAP_NO_LIMIT
+#endif
+#endif
+
+#ifndef APR_LDAP_SIZELIMIT
+#define APR_LDAP_SIZELIMIT 0 /* equivalent to LDAP_NO_LIMIT, and what goes on the wire */
+#endif
+
+/*
+ * z/OS is missing some defines
+ */
+#ifndef LDAP_VERSION_MAX
+#define LDAP_VERSION_MAX  LDAP_VERSION
+#endif
+#if APR_HAS_ZOS_LDAPSDK
+#define LDAP_VENDOR_NAME "IBM z/OS"
+#endif
+
+/* Note: Macros defining const casting has been removed in APR v1.0,
+ * pending real support for LDAP v2.0 toolkits.
+ *
+ * In the mean time, please use an LDAP v3.0 toolkit.
+ */
+#if LDAP_VERSION_MAX <= 2
+#error Support for LDAP v2.0 toolkits has been removed from apr-util. Please use an LDAP
v3.0 toolkit.
+#endif 
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/**
+ * This structure allows the C LDAP API error codes to be returned
+ * along with plain text error messages that explain to us mere mortals
+ * what really happened.
+ */
+typedef struct apr_ldap_err_t {
+    const char *reason;
+    const char *msg;
+    int rc;
+} apr_ldap_err_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+/* The MS SDK returns LDAP_UNAVAILABLE when the backend has closed the connection
+ * between LDAP calls. Protect with APR_HAS_MICROSOFT_LDAPSDK in case someone 
+ * manually chooses another SDK on Windows 
+ */
+#if APR_HAS_MICROSOFT_LDAPSDK
+#define APR_LDAP_IS_SERVER_DOWN(s)    ((s) == LDAP_SERVER_DOWN \
+                                    || (s) == LDAP_UNAVAILABLE)
+#else
+#define APR_LDAP_IS_SERVER_DOWN(s)    ((s) == LDAP_SERVER_DOWN)
+#endif
+
+/* These symbols are not actually exported in a DSO build, but mapped into
+ * a private exported function array for apr_ldap_stub to bind dynamically.
+ * Rename them appropriately to protect the global namespace.
+ */
+#ifdef APU_DSO_LDAP_BUILD
+
+#define apr_ldap_info apr__ldap_info
+#define apr_ldap_init apr__ldap_init
+#define apr_ldap_ssl_init apr__ldap_ssl_init
+#define apr_ldap_ssl_deinit apr__ldap_ssl_deinit
+#define apr_ldap_get_option apr__ldap_get_option
+#define apr_ldap_set_option apr__ldap_set_option
+#define apr_ldap_rebind_init apr__ldap_rebind_init
+#define apr_ldap_rebind_add apr__ldap_rebind_add
+#define apr_ldap_rebind_remove apr__ldap_rebind_remove
+
+#define APU_DECLARE_LDAP(type) type
+#else
+#define APU_DECLARE_LDAP(type) APU_DECLARE(type)
+#endif
+
+#include "apr_ldap_url.h"
+#include "apr_ldap_init.h"
+#include "apr_ldap_option.h"
+#include "apr_ldap_rebind.h"
+
+/** @} */
+#endif /* APR_HAS_LDAP */
+#endif /* APU_LDAP_H */

Propchange: apr/apr-util/branches/1.5.x/include/apr_ldap.hwc
------------------------------------------------------------------------------
    svn:eol-style = native

Added: apr/apr-util/branches/1.5.x/include/apu.hwc
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.5.x/include/apu.hwc?rev=1518770&view=auto
==============================================================================
--- apr/apr-util/branches/1.5.x/include/apu.hwc (added)
+++ apr/apr-util/branches/1.5.x/include/apu.hwc Thu Aug 29 19:16:51 2013
@@ -0,0 +1,146 @@
+/* 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.
+ */
+
+/* 
+ * apu.h is duplicated from apu.hwc at build time -- do not edit apu.h
+ */
+/* @file apu.h
+ * @brief APR-Utility main file
+ */
+/**
+ * @defgroup APR_Util APR Utility Functions
+ * @{
+ */
+
+
+#ifndef APU_H
+#define APU_H
+
+/**
+ * APU_DECLARE_EXPORT is defined when building the APR-UTIL dynamic library,
+ * so that all public symbols are exported.
+ *
+ * APU_DECLARE_STATIC is defined when including the APR-UTIL public headers,
+ * to provide static linkage when the dynamic library may be unavailable.
+ *
+ * APU_DECLARE_STATIC and APU_DECLARE_EXPORT are left undefined when
+ * including the APR-UTIL public headers, to import and link the symbols from 
+ * the dynamic APR-UTIL library and assure appropriate indirection and calling
+ * conventions at compile time.
+ */
+
+/* Make sure we have our platform identifier macro defined we ask for later.
+ */
+#if defined(_WIN32) && !defined(WIN32)
+#define WIN32 1
+#endif
+
+#if defined(DOXYGEN) || !defined(WIN32)
+/**
+ * The public APR-UTIL functions are declared with APU_DECLARE(), so they may
+ * use the most appropriate calling convention.  Public APR functions with 
+ * variable arguments must use APU_DECLARE_NONSTD().
+ *
+ * @fn APU_DECLARE(rettype) apr_func(args);
+ */
+#define APU_DECLARE(type)            type
+/**
+ * The public APR-UTIL functions using variable arguments are declared with 
+ * APU_DECLARE_NONSTD(), as they must use the C language calling convention.
+ *
+ * @fn APU_DECLARE_NONSTD(rettype) apr_func(args, ...);
+ */
+#define APU_DECLARE_NONSTD(type)     type
+/**
+ * The public APR-UTIL variables are declared with APU_DECLARE_DATA.
+ * This assures the appropriate indirection is invoked at compile time.
+ *
+ * @fn APU_DECLARE_DATA type apr_variable;
+ * @note extern APU_DECLARE_DATA type apr_variable; syntax is required for
+ * declarations within headers to properly import the variable.
+ */
+#define APU_DECLARE_DATA
+#elif defined(APU_DECLARE_STATIC)
+#define APU_DECLARE(type)            type __stdcall
+#define APU_DECLARE_NONSTD(type)     type __cdecl
+#define APU_DECLARE_DATA
+#elif defined(APU_DECLARE_EXPORT)
+#define APU_DECLARE(type)            __declspec(dllexport) type __stdcall
+#define APU_DECLARE_NONSTD(type)     __declspec(dllexport) type __cdecl
+#define APU_DECLARE_DATA             __declspec(dllexport)
+#else
+#define APU_DECLARE(type)            __declspec(dllimport) type __stdcall
+#define APU_DECLARE_NONSTD(type)     __declspec(dllimport) type __cdecl
+#define APU_DECLARE_DATA             __declspec(dllimport)
+#endif
+
+#if !defined(WIN32) || defined(APU_MODULE_DECLARE_STATIC)
+/**
+ * Declare a dso module's exported module structure as APU_MODULE_DECLARE_DATA.
+ *
+ * Unless APU_MODULE_DECLARE_STATIC is defined at compile time, symbols 
+ * declared with APU_MODULE_DECLARE_DATA are always exported.
+ * @code
+ * module APU_MODULE_DECLARE_DATA mod_tag
+ * @endcode
+ */
+#define APU_MODULE_DECLARE_DATA
+#else
+#define APU_MODULE_DECLARE_DATA           __declspec(dllexport)
+#endif
+
+/*
+ * we always have SDBM (it's in our codebase)
+ */
+#define APU_HAVE_SDBM           1
+
+#ifndef APU_DSO_MODULE_BUILD
+#define APU_HAVE_GDBM           0
+#define APU_HAVE_NDBM           0
+#define APU_HAVE_DB             0
+
+#if APU_HAVE_DB
+#define APU_HAVE_DB_VERSION     0
+#endif
+#endif
+
+/* 
+ * we always enable dynamic driver loads within apr_dbd
+ * Win32 always has odbc (it's always installed)
+ */
+#ifndef APU_DSO_MODULE_BUILD
+#define APU_HAVE_PGSQL          0
+#define APU_HAVE_MYSQL          0
+#define APU_HAVE_SQLITE3        0
+#define APU_HAVE_SQLITE2        0
+#define APU_HAVE_ORACLE         0
+#define APU_HAVE_FREETDS        0
+#define APU_HAVE_ODBC           1
+#endif
+
+#define APU_HAVE_CRYPTO         @apu_have_crypto_10@
+
+#ifndef APU_DSO_MODULE_BUILD
+#define APU_HAVE_OPENSSL        0
+#define APU_HAVE_NSS            0
+#endif
+
+#define APU_HAVE_APR_ICONV      @apu_have_apr_iconv_10@
+#define APU_HAVE_ICONV          0
+#define APR_HAS_XLATE           (APU_HAVE_APR_ICONV || APU_HAVE_ICONV)
+
+#endif /* APU_H */
+/** @} */

Propchange: apr/apr-util/branches/1.5.x/include/apu.hwc
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message