summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2020-08-30 17:09:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2020-08-30 17:09:28 +0000
commit941fac8609ae3c25abd0bdac3b8b4a7f687ad7e9 (patch)
treec40a185d99de6e9ec51618918e117a8a3a5e3520
parentInitial commit. (diff)
downloadapr-util-941fac8609ae3c25abd0bdac3b8b4a7f687ad7e9.tar.xz
apr-util-941fac8609ae3c25abd0bdac3b8b4a7f687ad7e9.zip
Adding upstream version 1.6.1.upstream/1.6.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r--CHANGES83
-rw-r--r--CMakeLists.txt355
-rw-r--r--LICENSE459
-rw-r--r--Makefile.in123
-rw-r--r--Makefile.win384
-rw-r--r--NOTICE14
-rw-r--r--NWGNUmakefile310
-rw-r--r--README111
-rw-r--r--README.FREETDS11
-rw-r--r--README.cmake139
-rw-r--r--apr-util.pc.in13
-rw-r--r--apr-util.spec200
-rw-r--r--aprutil.dep431
-rw-r--r--aprutil.dsp810
-rw-r--r--aprutil.dsw443
-rw-r--r--aprutil.mak1466
-rw-r--r--apu-config.in221
-rw-r--r--buckets/apr_brigade.c736
-rw-r--r--buckets/apr_buckets.c46
-rw-r--r--buckets/apr_buckets_alloc.c234
-rw-r--r--buckets/apr_buckets_eos.c54
-rw-r--r--buckets/apr_buckets_file.c242
-rw-r--r--buckets/apr_buckets_flush.c54
-rw-r--r--buckets/apr_buckets_heap.c96
-rw-r--r--buckets/apr_buckets_mmap.c144
-rw-r--r--buckets/apr_buckets_pipe.c119
-rw-r--r--buckets/apr_buckets_pool.c142
-rw-r--r--buckets/apr_buckets_refcount.c64
-rw-r--r--buckets/apr_buckets_simple.c137
-rw-r--r--buckets/apr_buckets_socket.c114
-rw-r--r--build-outputs.mk152
-rw-r--r--build.conf104
-rw-r--r--build/apr_common.m4990
-rw-r--r--build/apu-conf.m4439
-rw-r--r--build/apu-hints.m462
-rw-r--r--build/apu-iconv.m4132
-rwxr-xr-xbuild/config.guess1448
-rwxr-xr-xbuild/config.sub1836
-rw-r--r--build/crypto.m4290
-rw-r--r--build/dbd.m4514
-rw-r--r--build/dbm.m4745
-rw-r--r--build/dso.m4117
-rw-r--r--build/find_apr.m4202
-rw-r--r--build/find_apu.m4211
-rwxr-xr-xbuild/get-version.sh37
-rwxr-xr-xbuild/install.sh112
-rwxr-xr-xbuild/mkdir.sh43
-rw-r--r--build/nw_apu_export.inc44
-rw-r--r--build/pkg/README20
-rwxr-xr-xbuild/pkg/buildpkg.sh99
-rw-r--r--build/pkg/pkginfo.in11
-rw-r--r--build/preaprutil.dsp131
-rw-r--r--build/rpm/apr-util.spec.in200
-rw-r--r--build/w32locatedb.pl217
-rwxr-xr-xbuildconf118
-rw-r--r--config.layout232
-rwxr-xr-xconfigure25340
-rw-r--r--configure.in344
-rw-r--r--crypto/apr_crypto.c608
-rw-r--r--crypto/apr_crypto_commoncrypto.c906
-rw-r--r--crypto/apr_crypto_nss.c1097
-rw-r--r--crypto/apr_crypto_nss.dep15
-rw-r--r--crypto/apr_crypto_nss.dsp203
-rw-r--r--crypto/apr_crypto_nss.mak594
-rw-r--r--crypto/apr_crypto_openssl.c973
-rw-r--r--crypto/apr_crypto_openssl.dep14
-rw-r--r--crypto/apr_crypto_openssl.dsp203
-rw-r--r--crypto/apr_crypto_openssl.mak606
-rw-r--r--crypto/apr_md4.c404
-rw-r--r--crypto/apr_md5.c666
-rw-r--r--crypto/apr_passwd.c200
-rw-r--r--crypto/apr_sha1.c368
-rw-r--r--crypto/apr_siphash.c196
-rw-r--r--crypto/crypt_blowfish.c902
-rw-r--r--crypto/crypt_blowfish.h27
-rw-r--r--crypto/getuuid.c208
-rw-r--r--crypto/uuid.c130
-rw-r--r--dbd/NWGNUdbdmysql295
-rw-r--r--dbd/NWGNUdbdpgsql301
-rw-r--r--dbd/NWGNUdbdsqli2296
-rw-r--r--dbd/NWGNUdbdsqli3298
-rw-r--r--dbd/NWGNUmakefile259
-rw-r--r--dbd/apr_dbd.c573
-rw-r--r--dbd/apr_dbd_mysql.c1305
-rw-r--r--dbd/apr_dbd_mysql.dep15
-rw-r--r--dbd/apr_dbd_mysql.dsp207
-rw-r--r--dbd/apr_dbd_mysql.mak594
-rw-r--r--dbd/apr_dbd_odbc.c1750
-rw-r--r--dbd/apr_dbd_odbc.dep11
-rw-r--r--dbd/apr_dbd_odbc.dsp191
-rw-r--r--dbd/apr_dbd_odbc.mak550
-rw-r--r--dbd/apr_dbd_oracle.c2220
-rw-r--r--dbd/apr_dbd_oracle.dep13
-rw-r--r--dbd/apr_dbd_oracle.dsp207
-rw-r--r--dbd/apr_dbd_oracle.mak594
-rw-r--r--dbd/apr_dbd_pgsql.c1315
-rw-r--r--dbd/apr_dbd_pgsql.dep14
-rw-r--r--dbd/apr_dbd_pgsql.dsp207
-rw-r--r--dbd/apr_dbd_pgsql.mak594
-rw-r--r--dbd/apr_dbd_sqlite2.c566
-rw-r--r--dbd/apr_dbd_sqlite2.dep13
-rw-r--r--dbd/apr_dbd_sqlite2.dsp207
-rw-r--r--dbd/apr_dbd_sqlite2.mak594
-rw-r--r--dbd/apr_dbd_sqlite3.c914
-rw-r--r--dbd/apr_dbd_sqlite3.dep13
-rw-r--r--dbd/apr_dbd_sqlite3.dsp207
-rw-r--r--dbd/apr_dbd_sqlite3.mak594
-rw-r--r--dbd/unsupported/NWGNUdbdfreetds296
-rw-r--r--dbd/unsupported/apr_dbd_freetds.c809
-rw-r--r--dbd/unsupported/apr_dbd_freetds.dep13
-rw-r--r--dbd/unsupported/apr_dbd_freetds.dsp207
-rw-r--r--dbd/unsupported/apr_dbd_freetds.mak594
-rw-r--r--dbm/NWGNUdbmdb299
-rw-r--r--dbm/NWGNUdbmgdbm298
-rw-r--r--dbm/NWGNUmakefile251
-rw-r--r--dbm/apr_dbm.c307
-rw-r--r--dbm/apr_dbm_berkeleydb.c404
-rw-r--r--dbm/apr_dbm_db.dep15
-rw-r--r--dbm/apr_dbm_db.dsp215
-rw-r--r--dbm/apr_dbm_db.mak594
-rw-r--r--dbm/apr_dbm_gdbm.c255
-rw-r--r--dbm/apr_dbm_gdbm.dep14
-rw-r--r--dbm/apr_dbm_gdbm.dsp215
-rw-r--r--dbm/apr_dbm_gdbm.mak594
-rw-r--r--dbm/apr_dbm_ndbm.c238
-rw-r--r--dbm/apr_dbm_sdbm.c223
-rw-r--r--dbm/sdbm/sdbm.c584
-rw-r--r--dbm/sdbm/sdbm_hash.c63
-rw-r--r--dbm/sdbm/sdbm_lock.c79
-rw-r--r--dbm/sdbm/sdbm_pair.c320
-rw-r--r--dbm/sdbm/sdbm_pair.h40
-rw-r--r--dbm/sdbm/sdbm_private.h84
-rw-r--r--dbm/sdbm/sdbm_tune.h40
-rw-r--r--docs/doxygen.conf32
-rw-r--r--encoding/apr_base64.c268
-rw-r--r--export_vars.sh.in13
-rw-r--r--hooks/apr_hooks.c414
-rw-r--r--include/apr_anylock.h128
-rw-r--r--include/apr_base64.h113
-rw-r--r--include/apr_buckets.h1598
-rw-r--r--include/apr_crypto.h507
-rw-r--r--include/apr_date.h106
-rw-r--r--include/apr_dbd.h549
-rw-r--r--include/apr_dbm.h227
-rw-r--r--include/apr_hooks.h358
-rw-r--r--include/apr_ldap.h.in197
-rw-r--r--include/apr_ldap.hnw158
-rw-r--r--include/apr_ldap.hw197
-rw-r--r--include/apr_ldap.hwc197
-rw-r--r--include/apr_ldap_init.h165
-rw-r--r--include/apr_ldap_option.h254
-rw-r--r--include/apr_ldap_rebind.h98
-rw-r--r--include/apr_ldap_url.h120
-rw-r--r--include/apr_md4.h135
-rw-r--r--include/apr_md5.h176
-rw-r--r--include/apr_memcache.h444
-rw-r--r--include/apr_optional.h92
-rw-r--r--include/apr_optional_hooks.h117
-rw-r--r--include/apr_queue.h138
-rw-r--r--include/apr_redis.h459
-rw-r--r--include/apr_reslist.h183
-rw-r--r--include/apr_rmm.h137
-rw-r--r--include/apr_sdbm.h176
-rw-r--r--include/apr_sha1.h121
-rw-r--r--include/apr_siphash.h148
-rw-r--r--include/apr_strmatch.h81
-rw-r--r--include/apr_thread_pool.h299
-rw-r--r--include/apr_uri.h178
-rw-r--r--include/apr_uuid.h76
-rw-r--r--include/apr_xlate.h163
-rw-r--r--include/apr_xml.h358
-rw-r--r--include/apu.h.in128
-rw-r--r--include/apu.hnw124
-rw-r--r--include/apu.hw146
-rw-r--r--include/apu.hwc145
-rw-r--r--include/apu_errno.h173
-rw-r--r--include/apu_version.h139
-rw-r--r--include/apu_want.h.in51
-rw-r--r--include/apu_want.hnw52
-rw-r--r--include/apu_want.hw52
-rw-r--r--include/private/apr_crypto_internal.h297
-rw-r--r--include/private/apr_dbd_internal.h365
-rw-r--r--include/private/apr_dbd_odbc_v2.h119
-rw-r--r--include/private/apr_dbm_private.h121
-rw-r--r--include/private/apu_config.h.in183
-rw-r--r--include/private/apu_config.hnw53
-rw-r--r--include/private/apu_config.hw52
-rw-r--r--include/private/apu_internal.h73
-rw-r--r--include/private/apu_select_dbm.h.in28
-rw-r--r--include/private/apu_select_dbm.hw28
-rw-r--r--ldap/NWGNUmakefile263
-rw-r--r--ldap/apr_ldap.dep37
-rw-r--r--ldap/apr_ldap.dsp227
-rw-r--r--ldap/apr_ldap.mak620
-rw-r--r--ldap/apr_ldap_init.c235
-rw-r--r--ldap/apr_ldap_option.c652
-rw-r--r--ldap/apr_ldap_rebind.c377
-rw-r--r--ldap/apr_ldap_stub.c145
-rw-r--r--ldap/apr_ldap_url.c694
-rw-r--r--libaprutil.dep339
-rw-r--r--libaprutil.dsp868
-rw-r--r--libaprutil.mak1472
-rw-r--r--libaprutil.rc69
-rw-r--r--memcache/apr_memcache.c1724
-rw-r--r--misc/apr_date.c637
-rw-r--r--misc/apr_queue.c398
-rw-r--r--misc/apr_reslist.c473
-rw-r--r--misc/apr_rmm.c457
-rw-r--r--misc/apr_thread_pool.c956
-rw-r--r--misc/apu_dso.c209
-rw-r--r--misc/apu_version.c37
-rw-r--r--redis/apr_redis.c1548
-rw-r--r--renames_pending2
-rw-r--r--strmatch/apr_strmatch.c118
-rw-r--r--test/Makefile.in90
-rw-r--r--test/Makefile.win171
-rw-r--r--test/NWGNUaputest282
-rw-r--r--test/NWGNUmakefile258
-rw-r--r--test/abts.c423
-rw-r--r--test/abts.h101
-rw-r--r--test/abts_tests.h48
-rw-r--r--test/data/billion-laughs.xml36
-rw-r--r--test/dbd.c407
-rw-r--r--test/nw_misc.c23
-rw-r--r--test/test_apu.h100
-rw-r--r--test/testall.dsw513
-rw-r--r--test/testbuckets.c535
-rw-r--r--test/testcrypto.c1545
-rw-r--r--test/testdate.c202
-rw-r--r--test/testdbd.c245
-rw-r--r--test/testdbm.c221
-rw-r--r--test/testldap.c250
-rw-r--r--test/testmd4.c119
-rw-r--r--test/testmd5.c103
-rw-r--r--test/testmemcache.c626
-rw-r--r--test/testpass.c217
-rw-r--r--test/testqueue.c135
-rw-r--r--test/testredis.c552
-rw-r--r--test/testreslist.c272
-rw-r--r--test/testrmm.c191
-rw-r--r--test/testsiphash.c148
-rw-r--r--test/teststrmatch.c92
-rw-r--r--test/testuri.c331
-rw-r--r--test/testutil.c60
-rw-r--r--test/testutil.h73
-rw-r--r--test/testutildll.dsp270
-rw-r--r--test/testutillib.dsp270
-rw-r--r--test/testuuid.c56
-rw-r--r--test/testxlate.c134
-rw-r--r--test/testxml.c205
-rw-r--r--uri/apr_uri.c962
-rw-r--r--xlate/xlate.c458
-rw-r--r--xml/NWGNUmakefile259
-rw-r--r--xml/apr_xml.c1078
254 files changed, 108360 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
new file mode 100644
index 0000000..1b2333b
--- /dev/null
+++ b/CHANGES
@@ -0,0 +1,83 @@
+ -*- coding: utf-8 -*-
+Changes with APR-util 1.6.1
+
+ *) Win32: Add function exports from new apr_crypto API's missing in 1.6.0.
+
+ *) Win32: Introduce XML_PARSER build-time variable to select the expat
+ library name to be linked to libaprutil-1.dll. See Makefile.win
+
+ *) Win32: Removed lingering xml/xml.dsp project forked from the expat
+ Project in the 1.9x era. Use expat's maintained build schema instead,
+ prior to building apr-util.
+
+ *) apr_crypto: Fix compatibility with LibreSSL. PR 61596.
+ [Bernard Spil <brnrd freebsd.org>, Yann Ylavic]
+
+ *) sdbm: better database/page validation to fail cleanly when corrupted.
+ [Yann Ylavic]
+
+Changes with APR-util 1.6.0
+
+ *) The expat dependency of apr-util is no longer built with apr-util.
+ Install expat (including development headers and libraries) first
+ before building apr-util. [https://libexpat.github.io/]
+
+ *) Mark apr_dbd_freetds as unsupported, and remove it from all builds
+ [Nick Kew]
+
+ *) Update MySQL build to stop using libmysqlclient_r.
+ [Petr Sumbera <petr.sumbera oracle.com>]
+
+ *) apr_buckets: Add apr_bucket_file_set_buf_size() which allows to configure
+ the size of the buffer used to read files. [Yann Ylavic]
+
+ *) apr_crypto: avoid excessive iteration in bcrypt hash.
+ [Hanno Böck <hanno hboeck.de>]
+
+ *) apr_siphash: Implement keyed hash function SipHash. [Yann Ylavic]
+
+ *) apr_crypto: Add apr_crypto_key() function which supports keys
+ generated from a passphrase or a raw secret provided by the caller.
+ Deprecate apr_crypto_passphrase(). [Graham Leggett]
+
+ *) apr_crypto_nss: Ensure the SECItem returned by PK11_ParamFromIV
+ is properly freed. [Graham Leggett]
+
+ *) apr_crypto: Don't cache the driver if initialisation fails. This
+ stops the second and subsequent attempt to use the API from failing
+ claiming the library is not initialised. [Graham Leggett]
+
+ *) apr_crypto: Add a native CommonCrypto implementation for iOS and OSX
+ where OpenSSL has been deprecated. [Graham Leggett]
+
+ *) apr_xml_to_text: Add style APR_XML_X2T_PARSED to maintain a
+ consistent namespace prefix. [Jari Urpalainen
+ <jari.urpalainen nokia.com>]
+
+Changes with APR-util 1.5.x and later:
+
+ *) http://svn.apache.org/viewvc/apr/apr-util/branches/1.5.x/CHANGES?view=markup
+
+Changes with APR-util 1.4.x and later:
+
+ *) http://svn.apache.org/viewvc/apr/apr-util/branches/1.4.x/CHANGES?view=markup
+
+Changes for APR-util 1.3.x and later:
+
+ *) http://svn.apache.org/viewvc/apr/apr-util/branches/1.3.x/CHANGES?view=markup
+
+Changes for APR-util 1.2.x and later:
+
+ *) http://svn.apache.org/viewvc/apr/apr-util/branches/1.2.x/CHANGES?view=markup
+
+Changes for APR-util 1.1.x and later:
+
+ *) http://svn.apache.org/viewvc/apr/apr-util/branches/1.1.x/CHANGES?view=markup
+
+Changes for APR-util 1.0.x and later:
+
+ *) http://svn.apache.org/viewvc/apr/apr-util/branches/1.0.x/CHANGES?view=markup
+
+Changes for APR-util 0.9.x and later/earlier:
+
+ *) http://svn.apache.org/viewvc/apr/apr-util/branches/0.9.x/CHANGES?view=markup
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..9ae90b1
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,355 @@
+# 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)
+
+FIND_PACKAGE(expat)
+
+OPTION(APU_HAVE_CRYPTO "Crypto support" OFF)
+OPTION(APU_HAVE_ODBC "Build ODBC DBD driver" ON)
+OPTION(APR_HAS_LDAP "LDAP support" ON)
+OPTION(INSTALL_PDB "Install .pdb files (if generated)" ON)
+OPTION(APR_BUILD_TESTAPR "Build the test suite" OFF)
+OPTION(TEST_STATIC_LIBS "Test programs use APR static libraries instead of shared libraries?" OFF)
+SET(APR_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE STRING "Directory with APR include files")
+SET(APR_LIBRARIES "${CMAKE_INSTALL_PREFIX}/lib/libapr-1.lib" CACHE STRING "APR library to link with")
+
+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()
+
+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)
+
+IF(APU_HAVE_CRYPTO)
+ SET(apu_have_crypto_10 1)
+ENDIF()
+
+IF(APR_HAS_LDAP)
+ SET(apr_has_ldap_10 1)
+ENDIF()
+
+IF(NOT EXPAT_FOUND)
+ MESSAGE(FATAL_ERROR "Expat is required, and it wasn't found!")
+ENDIF()
+
+SET(XMLLIB_INCLUDE_DIR ${EXPAT_INCLUDE_DIRS})
+SET(XMLLIB_LIBRARIES ${EXPAT_LIBRARIES})
+
+SET(LDAP_LIBRARIES)
+IF(APR_HAS_LDAP)
+ SET(LDAP_LIBRARIES wldap32)
+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)
+
+# 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_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_redis.h
+ include/apr_reslist.h
+ include/apr_rmm.h
+ include/apr_sdbm.h
+ include/apr_sha1.h
+ include/apr_siphash.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/apr_siphash.c
+ crypto/crypt_blowfish.c
+ crypto/getuuid.c
+ crypto/uuid.c
+ dbd/apr_dbd.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
+ redis/apr_redis.c
+ strmatch/apr_strmatch.c
+ uri/apr_uri.c
+ xlate/xlate.c
+ xml/apr_xml.c
+)
+
+IF(APR_HAS_LDAP)
+ SET(APR_SOURCES ${APR_SOURCES} ldap/apr_ldap_stub.c ldap/apr_ldap_url.c)
+ENDIF()
+
+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/testredis.c
+ test/testreslist.c
+ test/testrmm.c
+ test/testsiphash.c
+ test/teststrmatch.c
+ test/testuri.c
+ test/testutil.c
+ test/testuuid.c
+ test/testxlate.c
+ test/testxml.c
+)
+
+SET(install_targets)
+SET(install_bin_pdb)
+SET(dbd_drivers)
+
+# Note: The WINNT definition on some targets is used only by libaprutil.rc.
+
+# libaprutil-1 is shared, aprutil-1 is static
+ADD_LIBRARY(libaprutil-1 SHARED ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED} libaprutil.rc)
+SET(install_targets ${install_targets} libaprutil-1)
+SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/libaprutil-1.pdb)
+TARGET_LINK_LIBRARIES(libaprutil-1 ${APR_LIBRARIES} ${XMLLIB_LIBRARIES})
+SET_TARGET_PROPERTIES(libaprutil-1 PROPERTIES COMPILE_DEFINITIONS "APU_DECLARE_EXPORT;APR_DECLARE_EXPORT;XML_STATIC;WINNT")
+
+ADD_LIBRARY(aprutil-1 STATIC ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED})
+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 libaprutil.rc)
+ SET(install_targets ${install_targets} apr_crypto_openssl-1)
+ SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/apr_crypto_openssl-1.pdb)
+ SET_TARGET_PROPERTIES(apr_crypto_openssl-1 PROPERTIES INCLUDE_DIRECTORIES "${APR_INCLUDE_DIRECTORIES};${OPENSSL_INCLUDE_DIR}")
+ SET_TARGET_PROPERTIES(apr_crypto_openssl-1 PROPERTIES COMPILE_DEFINITIONS "WINNT")
+ SET_TARGET_PROPERTIES(apr_crypto_openssl-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_EXPORT=1 -DAPU_DECLARE_EXPORT=1 -DDLL_NAME=apr_crypto_openssl")
+ 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 libaprutil.rc)
+ SET(install_targets ${install_targets} apr_dbd_odbc-1)
+ SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/apr_dbd_odbc-1.pdb)
+ SET(dbd_drivers ${dbd_drivers} odbc)
+ 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;APR_DECLARE_EXPORT;APU_DSO_MODULE_BUILD;WINNT")
+ SET_TARGET_PROPERTIES(apr_dbd_odbc-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_EXPORT=1 -DAPU_DECLARE_EXPORT=1 -DDLL_NAME=apr_dbd_odbc")
+ENDIF()
+
+IF(APR_HAS_LDAP)
+ ADD_LIBRARY(apr_ldap-1 SHARED ldap/apr_ldap_init.c ldap/apr_ldap_option.c
+ ldap/apr_ldap_rebind.c libaprutil.rc)
+ SET(install_targets ${install_targets} apr_ldap-1)
+ SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/apr_ldap-1.pdb)
+ TARGET_LINK_LIBRARIES(apr_ldap-1 libaprutil-1 ${APR_LIBRARIES} ${LDAP_LIBRARIES})
+ SET_TARGET_PROPERTIES(apr_ldap-1 PROPERTIES COMPILE_DEFINITIONS "WINNT")
+ SET_TARGET_PROPERTIES(apr_ldap-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_EXPORT=1 -DAPU_DECLARE_EXPORT=1 -DDLL_NAME=apr_ldap")
+ SET(apr_ldap_libraries apr_ldap-1)
+ELSE()
+ SET(apr_ldap_libraries)
+ENDIF()
+
+IF(APR_BUILD_TESTAPR)
+ ENABLE_TESTING()
+ # Create a "check" target that displays test program output to the console.
+ ADD_CUSTOM_TARGET(check COMMAND ${CMAKE_CTEST_COMMAND} --verbose)
+
+ # copy data files to build directory so that we can run programs from there
+ 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)
+
+ IF(TEST_STATIC_LIBS)
+ SET(whichapr aprutil-1)
+ SET(apiflag "-DAPR_DECLARE_STATIC -DAPU_DECLARE_STATIC")
+ ELSE()
+ SET(whichapr libaprutil-1)
+ SET(apiflag)
+ ENDIF()
+
+ ADD_EXECUTABLE(testall ${APR_TEST_SOURCES})
+ TARGET_LINK_LIBRARIES(testall ${whichapr} ${apr_ldap_libraries} ${XMLLIB_LIBRARIES} ${LDAP_LIBRARIES})
+ IF(apiflag)
+ SET_TARGET_PROPERTIES(testall PROPERTIES COMPILE_FLAGS ${apiflag})
+ ENDIF()
+ ADD_TEST(NAME testall COMMAND testall)
+
+ ADD_EXECUTABLE(dbd test/dbd.c)
+ TARGET_LINK_LIBRARIES(dbd ${whichapr})
+ IF(apiflag)
+ SET_TARGET_PROPERTIES(dbd PROPERTIES COMPILE_FLAGS ${apiflag})
+ ENDIF()
+
+ # dbd is run multiple times with different parameters.
+ FOREACH(somedbd ${dbd_drivers})
+ ADD_TEST(NAME dbd-${somedbd} COMMAND dbd ${somedbd})
+ ENDFOREACH()
+
+ENDIF (APR_BUILD_TESTAPR)
+
+# Installation
+
+INSTALL(TARGETS ${install_targets}
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+ )
+
+IF(INSTALL_PDB)
+ INSTALL(FILES ${install_bin_pdb}
+ DESTINATION bin
+ CONFIGURATIONS RelWithDebInfo Debug)
+ENDIF()
+
+INSTALL(FILES ${APR_PUBLIC_HEADERS_STATIC} ${APR_PUBLIC_HEADERS_GENERATED} DESTINATION include)
+
+STRING(TOUPPER "${CMAKE_BUILD_TYPE}" buildtype)
+MESSAGE(STATUS "")
+MESSAGE(STATUS "")
+MESSAGE(STATUS "APR-Util configuration summary:")
+MESSAGE(STATUS "")
+MESSAGE(STATUS " Build type ...................... : ${CMAKE_BUILD_TYPE}")
+MESSAGE(STATUS " Install .pdb (if available)...... : ${INSTALL_PDB}")
+MESSAGE(STATUS " Install prefix .................. : ${CMAKE_INSTALL_PREFIX}")
+MESSAGE(STATUS " C compiler ...................... : ${CMAKE_C_COMPILER}")
+MESSAGE(STATUS " APR include directory ........... : ${APR_INCLUDE_DIR}")
+MESSAGE(STATUS " APR libraries ................... : ${APR_LIBRARIES}")
+MESSAGE(STATUS " DBD ODBC driver ................. : ${APU_HAVE_ODBC}")
+MESSAGE(STATUS " APU_HAVE_CRYPTO ................. : ${APU_HAVE_CRYPTO}")
+MESSAGE(STATUS " APR_HAS_LDAP .................... : ${APR_HAS_LDAP}")
+MESSAGE(STATUS " Build test suite ................ : ${APR_BUILD_TESTAPR}")
+IF(TEST_STATIC_LIBS)
+MESSAGE(STATUS " (testing static libraries)")
+ELSE()
+MESSAGE(STATUS " (testing dynamic libraries)")
+ENDIF()
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..bfe78d5
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,459 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed 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.
+
+
+
+APACHE PORTABLE RUNTIME SUBCOMPONENTS:
+
+The Apache Portable Runtime includes a number of subcomponents with
+separate copyright notices and license terms. Your use of the source
+code for the these subcomponents is subject to the terms and
+conditions of the following licenses.
+
+For the include\apr_md5.h component:
+/*
+ * This is work is derived from material Copyright RSA Data Security, Inc.
+ *
+ * The RSA copyright statement and Licence for that original material is
+ * included below. This is followed by the Apache copyright statement and
+ * licence for the modifications made to that material.
+ */
+
+/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
+ rights reserved.
+
+ License to copy and use this software is granted provided that it
+ is identified as the "RSA Data Security, Inc. MD5 Message-Digest
+ Algorithm" in all material mentioning or referencing this software
+ or this function.
+
+ License is also granted to make and use derivative works provided
+ that such works are identified as "derived from the RSA Data
+ Security, Inc. MD5 Message-Digest Algorithm" in all material
+ mentioning or referencing the derived work.
+
+ RSA Data Security, Inc. makes no representations concerning either
+ the merchantability of this software or the suitability of this
+ software for any particular purpose. It is provided "as is"
+ without express or implied warranty of any kind.
+
+ These notices must be retained in any copies of any part of this
+ documentation and/or software.
+ */
+
+For the passwd\apr_md5.c component:
+
+/*
+ * This is work is derived from material Copyright RSA Data Security, Inc.
+ *
+ * The RSA copyright statement and Licence for that original material is
+ * included below. This is followed by the Apache copyright statement and
+ * licence for the modifications made to that material.
+ */
+
+/* MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm
+ */
+
+/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
+ rights reserved.
+
+ License to copy and use this software is granted provided that it
+ is identified as the "RSA Data Security, Inc. MD5 Message-Digest
+ Algorithm" in all material mentioning or referencing this software
+ or this function.
+
+ License is also granted to make and use derivative works provided
+ that such works are identified as "derived from the RSA Data
+ Security, Inc. MD5 Message-Digest Algorithm" in all material
+ mentioning or referencing the derived work.
+
+ RSA Data Security, Inc. makes no representations concerning either
+ the merchantability of this software or the suitability of this
+ software for any particular purpose. It is provided "as is"
+ without express or implied warranty of any kind.
+
+ These notices must be retained in any copies of any part of this
+ documentation and/or software.
+ */
+/*
+ * The apr_md5_encode() routine uses much code obtained from the FreeBSD 3.0
+ * MD5 crypt() function, which is licenced as follows:
+ * ----------------------------------------------------------------------------
+ * "THE BEER-WARE LICENSE" (Revision 42):
+ * <phk@login.dknet.dk> wrote this file. As long as you retain this notice you
+ * can do whatever you want with this stuff. If we meet some day, and you think
+ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
+ * ----------------------------------------------------------------------------
+ */
+
+For the crypto\apr_md4.c component:
+
+ * This is derived from material copyright RSA Data Security, Inc.
+ * Their notice is reproduced below in its entirety.
+ *
+ * Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
+ * rights reserved.
+ *
+ * License to copy and use this software is granted provided that it
+ * is identified as the "RSA Data Security, Inc. MD4 Message-Digest
+ * Algorithm" in all material mentioning or referencing this software
+ * or this function.
+ *
+ * License is also granted to make and use derivative works provided
+ * that such works are identified as "derived from the RSA Data
+ * Security, Inc. MD4 Message-Digest Algorithm" in all material
+ * mentioning or referencing the derived work.
+ *
+ * RSA Data Security, Inc. makes no representations concerning either
+ * the merchantability of this software or the suitability of this
+ * software for any particular purpose. It is provided "as is"
+ * without express or implied warranty of any kind.
+ *
+ * These notices must be retained in any copies of any part of this
+ * documentation and/or software.
+ */
+
+For the crypto\crypt_blowfish.c(.h) component:
+
+ * Written by Solar Designer <solar at openwall.com> in 1998-2011.
+ * No copyright is claimed, and the software is hereby placed in the public
+ * domain. In case this attempt to disclaim copyright and place the software
+ * in the public domain is deemed null and void, then the software is
+ * Copyright (c) 1998-2011 Solar Designer and it is hereby released to the
+ * general public under the following terms:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted.
+ *
+ * There's ABSOLUTELY NO WARRANTY, express or implied.
+
+ See crypto/crypt_blowfish.c for more information.
+
+For the include\apr_md4.h component:
+
+ *
+ * This is derived from material copyright RSA Data Security, Inc.
+ * Their notice is reproduced below in its entirety.
+ *
+ * Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
+ * rights reserved.
+ *
+ * License to copy and use this software is granted provided that it
+ * is identified as the "RSA Data Security, Inc. MD4 Message-Digest
+ * Algorithm" in all material mentioning or referencing this software
+ * or this function.
+ *
+ * License is also granted to make and use derivative works provided
+ * that such works are identified as "derived from the RSA Data
+ * Security, Inc. MD4 Message-Digest Algorithm" in all material
+ * mentioning or referencing the derived work.
+ *
+ * RSA Data Security, Inc. makes no representations concerning either
+ * the merchantability of this software or the suitability of this
+ * software for any particular purpose. It is provided "as is"
+ * without express or implied warranty of any kind.
+ *
+ * These notices must be retained in any copies of any part of this
+ * documentation and/or software.
+ */
+
+For the test\testmd4.c component:
+
+ *
+ * This is derived from material copyright RSA Data Security, Inc.
+ * Their notice is reproduced below in its entirety.
+ *
+ * Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All
+ * rights reserved.
+ *
+ * RSA Data Security, Inc. makes no representations concerning either
+ * the merchantability of this software or the suitability of this
+ * software for any particular purpose. It is provided "as is"
+ * without express or implied warranty of any kind.
+ *
+ * These notices must be retained in any copies of any part of this
+ * documentation and/or software.
+ */
+
+For the xml\expat\conftools\install-sh component:
+
+#
+# install - install a program, script, or datafile
+# This comes from X11R5 (mit/util/scripts/install.sh).
+#
+# Copyright 1991 by the Massachusetts Institute of Technology
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of M.I.T. not be used in advertising or
+# publicity pertaining to distribution of the software without specific,
+# written prior permission. M.I.T. makes no representations about the
+# suitability of this software for any purpose. It is provided "as is"
+# without express or implied warranty.
+#
+
+For the expat xml parser component:
+
+Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
+ and Clark Cooper
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====================================================================
+
+For the ldap/apr_ldap_url.c component:
+
+/* Portions Copyright 1998-2002 The OpenLDAP Foundation
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License. A copy of this license is available at
+ * http://www.OpenLDAP.org/license.html or in file LICENSE in the
+ * top-level directory of the distribution.
+ *
+ * OpenLDAP is a registered trademark of the OpenLDAP Foundation.
+ *
+ * Individual files and/or contributed packages may be copyright by
+ * other parties and subject to additional restrictions.
+ *
+ * This work is derived from the University of Michigan LDAP v3.3
+ * distribution. Information concerning this software is available
+ * at: http://www.umich.edu/~dirsvcs/ldap/
+ *
+ * This work also contains materials derived from public sources.
+ *
+ * Additional information about OpenLDAP can be obtained at:
+ * http://www.openldap.org/
+ */
+
+/*
+ * Portions Copyright (c) 1992-1996 Regents of the University of Michigan.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that this notice is preserved and that due credit is given
+ * to the University of Michigan at Ann Arbor. The name of the University
+ * may not be used to endorse or promote products derived from this
+ * software without specific prior written permission. This software
+ * is provided ``as is'' without express or implied warranty.
+ */
+
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..208dd1c
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,123 @@
+#
+# Top-level Makefile for APRUTIL
+#
+CPP = @CPP@
+
+# gets substituted into some targets
+APRUTIL_MAJOR_VERSION=@APRUTIL_MAJOR_VERSION@
+APRUTIL_DOTTED_VERSION=@APRUTIL_DOTTED_VERSION@
+
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+INCLUDES = @APRUTIL_PRIV_INCLUDES@ @APR_INCLUDES@ @APRUTIL_INCLUDES@
+APRUTIL_LDFLAGS = @APRUTIL_LDFLAGS@
+APRUTIL_LIBS = @APRUTIL_LIBS@
+
+TARGET_LIB = lib@APRUTIL_LIBNAME@.la
+INSTALL_SUBDIRS = @APR_ICONV_DIR@
+EXTRA_SOURCE_DIRS = @APR_ICONV_DIR@
+APRUTIL_PCFILE = apr-util-$(APRUTIL_MAJOR_VERSION).pc
+APU_CONFIG = apu-$(APRUTIL_MAJOR_VERSION)-config
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+
+APU_MODULES = @APU_MODULES@
+LINK_MODULE = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(ALL_CFLAGS) $(ALL_LDFLAGS) $(APRUTIL_LDFLAGS) -release $(APRUTIL_MAJOR_VERSION) -module -rpath $(APU_DSO_LIBDIR)
+APU_DSO_LIBDIR = @APU_DSO_LIBDIR@
+
+LT_VERSION = @APU_LTVERSION@
+
+EXTRA_OBJECTS = @EXTRA_OBJECTS@
+
+LDADD_dbd_pgsql = @LDADD_dbd_pgsql@
+LDADD_dbd_oracle = @LDADD_dbd_oracle@
+LDADD_dbd_sqlite2 = @LDADD_dbd_sqlite2@
+LDADD_dbd_sqlite3 = @LDADD_dbd_sqlite3@
+LDADD_dbd_mysql = @LDADD_dbd_mysql@
+LDADD_dbd_odbc = @LDADD_dbd_odbc@
+LDADD_dbm_db = @LDADD_dbm_db@
+LDADD_dbm_gdbm = @LDADD_dbm_gdbm@
+LDADD_dbm_ndbm = @LDADD_dbm_ndbm@
+LDADD_ldap = @LDADD_ldap@
+LDADD_crypto_openssl = @LDADD_crypto_openssl@
+LDADD_crypto_nss = @LDADD_crypto_nss@
+LDADD_crypto_commoncrypto = @LDADD_crypto_commoncrypto@
+
+TARGETS = $(TARGET_LIB) aprutil.exp apu-config.out $(APU_MODULES)
+
+# bring in rules.mk for standard functionality
+@INCLUDE_RULES@
+@INCLUDE_OUTPUTS@
+
+CLEAN_SUBDIRS = test @APR_ICONV_DIR@
+
+CLEAN_TARGETS = exports.c export_vars.c aprutil.exp .make.dirs apu-config.out
+DISTCLEAN_TARGETS = config.cache config.log config.status libtool \
+ include/private/apu_config.h include/private/apu_private.h \
+ include/private/apu_select_dbm.h include/apr_ldap.h include/apu.h \
+ export_vars.sh $(APU_CONFIG) build/rules.mk include/apu_want.h \
+ apr-util.pc build/pkg/pkginfo
+EXTRACLEAN_TARGETS = configure aclocal.m4 include/private/apu_config.h.in \
+ exports.c build-outputs.mk \
+ build/apr_common.m4 build/find_apr.m4 build/install.sh \
+ build/config.guess build/config.sub
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+bindir=@bindir@
+libdir=@libdir@
+includedir=@includedir@
+top_srcdir=@abs_srcdir@
+top_blddir=@abs_builddir@
+
+# Create apu-config script suitable for the install tree
+apu-config.out: $(APU_CONFIG)
+ sed 's,^\(location=\).*$$,\1installed,' < $(APU_CONFIG) > $@
+
+install: $(TARGETS) install-modules
+ $(APR_MKDIR) $(DESTDIR)$(includedir) $(DESTDIR)$(libdir)/pkgconfig \
+ $(DESTDIR)$(libdir) $(DESTDIR)$(bindir)
+ for f in $(top_srcdir)/include/*.h $(top_blddir)/include/*.h; do \
+ $(INSTALL_DATA) $${f} $(DESTDIR)$(includedir); \
+ done
+ $(INSTALL_DATA) apr-util.pc $(DESTDIR)$(libdir)/pkgconfig/$(APRUTIL_PCFILE)
+ list='$(INSTALL_SUBDIRS)'; for i in $$list; do \
+ ( cd $$i ; $(MAKE) DESTDIR=$(DESTDIR) install ); \
+ done
+ $(LIBTOOL) --mode=install $(INSTALL) -m 755 $(TARGET_LIB) $(DESTDIR)$(libdir)
+ $(INSTALL_DATA) aprutil.exp $(DESTDIR)$(libdir)
+ $(INSTALL) -m 755 apu-config.out $(DESTDIR)$(bindir)/$(APU_CONFIG)
+
+$(TARGET_LIB): $(OBJECTS) $(EXTRA_OBJECTS)
+ $(LINK) @lib_target@ $(EXTRA_OBJECTS) $(ALL_LIBS) $(APRUTIL_LDFLAGS) $(APRUTIL_LIBS)
+
+install-modules: install-modules-@APU_HAVE_MODULES@
+
+install-modules-no:
+
+install-modules-yes: $(APU_MODULES)
+ $(APR_MKDIR) $(DESTDIR)$(APU_DSO_LIBDIR)
+ @for m in $(APU_MODULES); do $(LIBTOOL) $(LT_LTFLAGS) $(LTFLAGS) --mode=install $(INSTALL) -m 755 $$m $(DESTDIR)$(APU_DSO_LIBDIR); done
+
+exports.c: $(HEADERS)
+ $(APR_MKEXPORT) $(HEADERS) > $@
+
+export_vars.c: $(HEADERS)
+ $(APR_MKVAREXPORT) $(HEADERS) > $@
+
+aprutil.exp: exports.c export_vars.c
+ @echo "#! lib@APRUTIL_LIBNAME@.so" > $@
+ @echo "* This file was AUTOGENERATED at build time." >> $@
+ @echo "* Please do not edit by hand." >> $@
+ $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) exports.c | grep "ap_hack_" | sed -e 's/^.*[)]\(.*\);$$/\1/' >> $@
+ $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) export_vars.c | sed -e 's/^\#[^!]*//' | sed -e '/^$$/d' >> $@
+
+dox:
+ doxygen $(top_srcdir)/docs/doxygen.conf
+
+test: check
+check: $(TARGET_LIB)
+ cd test && $(MAKE) all check
+
+.PHONY: install-modules install-modules-yes install-modules-no dox test check
diff --git a/Makefile.win b/Makefile.win
new file mode 100644
index 0000000..454b4fe
--- /dev/null
+++ b/Makefile.win
@@ -0,0 +1,384 @@
+# Makefile.win for Win32 APR + APR-iconv + APR-util
+#
+# Targets are:
+#
+# buildall - compile everything
+# checkall - run APR + APR-util regression tests
+# install - compile everything
+# clean - mop up everything
+#
+# You can override the build mechanism, choose only one;
+#
+# USEMAK=1 - compile from exported make files
+# USEDSW=1 - compile from .dsw / .dsp VC6 projects
+# USESLN=1 - compile from converted .sln / .vcproj VC7+ files
+#
+# Define ARCH to your desired preference (your PATH must point
+# to the correct compiler tools!) Choose only one;
+#
+# ARCH="Win32 Release"
+# ARCH="Win32 Debug"
+# ARCH="Win32 Release9x"
+# ARCH="Win32 Debug9x"
+# ARCH="x64 Release"
+# ARCH="x64 Debug"
+#
+# Provide the APR_PATH, API_PATH and APU_PATH entirely relative
+# to one another! At this time, building the libraries themselves
+# is only expected to work if the defaults (../apr, ../apr-iconv
+# and ../apr-util) are used, or if they are built with USEMAK=1.
+#
+# APR_PATH=..\apr-1.3.0
+# API_PATH=..\apr-iconv-1.3.0
+# APU_PATH=..\apr-util-1.3.0
+#
+# Provide a DBD_LIST argument after configuring LIB and INCLUDE with
+# the SDK paths of the corresponding client support libraries.
+# ODBC is always built on Windows, so it does not get included in DBD_LIST
+# Note that at this time, none of these are supported on win32, per say.
+#
+# DBD_LIST="sqlite3 pgsql oracle mysql freetds"
+#
+# Provide a DBM_LIST argument after configuring LIB and INCLUDE with
+# the SDK paths of the corresponding database support libraries. Right
+# now only db has been configured, gdbm and ndbm require additional study.
+# Note that at this time, none of these are supported on win32, per say.
+#
+# DBM_LIST="db gdbm"
+#
+# Provide a CRYPTO_LIST argument after configuring LIB and INCLUDE with
+# the SDK paths of the corresponding cryptographic support libraries.
+#
+# CRYPTO_LIST="nss openssl"
+#
+# Provide the XML_PARSER argument after configuring LIB and INCLUDE with
+# the expat path of the corresponding xml parser, e.g. libexpatMT to choose
+# static, or libexpat (default) to choose the dynamic library for aprutil-1.dll
+# (Static libaprutil-1.lib always presumes libexpatMT with XML_STATIC flag.)
+#
+# XML_PARSER="libexpat"
+#
+# For example;
+#
+# nmake -f Makefile.win PREFIX=C:\APR buildall checkall installall clean
+#
+
+!IF EXIST("aprutil.sln") && ([devenv /help > NUL 2>&1] == 0) \
+ && !defined(USEMAK) && !defined(USEDSW)
+USESLN=1
+USEMAK=0
+USEDSW=0
+!ELSEIF EXIST("aprutil.mak") && !defined(USEDSW)
+USESLN=0
+USEMAK=1
+USEDSW=0
+!ELSE
+USESLN=0
+USEMAK=0
+USEDSW=1
+!ENDIF
+
+PREFIX=..\apr-dist
+
+!IF EXIST("..\openssl")
+!IF EXIST("..\openssl\libcrypto.lib")
+SSLOPT=_HAVE_OSSL110=1
+!ENDIF
+!ENDIF
+
+# Legacy default (and unwise alternative) for libapr-1.dll is libexpatMT
+XML_PARSER="libexpat"
+!IF "$(XML_PARSER)" == "libexpat"
+XMLOPT=XML_PARSER=$(XML_PARSER)
+!ELSE
+XMLOPT=XML_PARSER=$(XML_PARSER) XML_OPTIONS="/D XML_STATIC"
+!ENDIF
+
+!IF [$(COMSPEC) /c cl /nologo /? \
+ | $(SystemRoot)\System32\find.exe "x64" >NUL ] == 0
+ARCH=x64 Release
+!ELSE
+ARCH=Win32 Release
+!ENDIF
+
+APR_PATH=..\apr
+API_PATH=..\apr-iconv
+APU_PATH=..\apr-util
+
+!MESSAGE ARCH = $(ARCH)
+!MESSAGE APR_PATH = $(APR_PATH)
+!MESSAGE API_PATH = $(API_PATH) (apr-iconv)
+!MESSAGE APU_PATH = $(APU_PATH) (apr-util)
+!MESSAGE PREFIX = $(PREFIX) (install path)
+!MESSAGE DBD_LIST = $(DBD_LIST)
+!MESSAGE DBM_LIST = $(DBM_LIST)
+!MESSAGE CRYPTO_LIST = $(CRYPTO_LIST)
+
+# Utility and Translation things, nothing here for the user
+#
+!IF "$(ARCH)" == "Win32 Release"
+SLNARCH=Release|Win32
+ARCHPATH=Release
+LIBSPATH=LibR
+ARCHOSPATH=Release
+LIBSOSPATH=LibR
+!ELSEIF "$(ARCH)" == "Win32 Debug"
+SLNARCH=Debug|Win32
+ARCHPATH=Debug
+LIBSPATH=LibD
+ARCHOSPATH=Debug
+LIBSOSPATH=LibD
+!ELSEIF "$(ARCH)" == "Win32 Release9x"
+SLNARCH=Release9x|Win32
+ARCHPATH=Release
+LIBSPATH=LibR
+ARCHOSPATH=9x\Release
+LIBSOSPATH=9x\LibR
+!ELSEIF "$(ARCH)" == "Win32 Debug9x"
+SLNARCH=Debug9x|Win32
+ARCHPATH=Debug
+LIBSPATH=LibD
+ARCHOSPATH=9x\Debug
+LIBSOSPATH=9x\LibD
+!ELSEIF "$(ARCH)" == "x64 Release"
+SLNARCH=Release|x64
+ARCHPATH=x64\Release
+LIBSPATH=x64\LibR
+ARCHOSPATH=x64\Release
+LIBSOSPATH=x64\LibR
+!ELSEIF "$(ARCH)" == "x64 Debug"
+SLNARCH=Debug|x64
+ARCHPATH=x64\Debug
+LIBSPATH=x64\LibD
+ARCHOSPATH=x64\Debug
+LIBSOSPATH=x64\LibD
+!ENDIF
+
+!IFNDEF MAKEOPT
+# Only default the behavior if MAKEOPT= is omitted
+!IFDEF _NMAKE_VER
+# Microsoft NMake options
+MAKEOPT=-nologo
+!ELSEIF "$(MAKE)" == "make"
+# Borland make options? Not really supported (yet)
+MAKEOPT=-s -N
+!ENDIF
+!ENDIF
+
+
+# Sanity Checks
+#
+!IF !EXIST("$(APR_PATH)\apr.dsp") || !EXIST("$(API_PATH)\apriconv.dsp") \
+ || !EXIST("$(APU_PATH)\aprutil.dsp")
+!MESSAGE Please check out or download and unpack the Apache Portability Runtime
+!MESSAGE sources (apr, apr-iconv and apr-util) under a single parent dir,
+!MESSAGE or provide APR_PATH, API_PATH and APU_PATH (all relative to each other,
+!MESSAGE or all absolute paths).
+!MESSAGE Apache cannot build without these libraries!
+!MESSAGE
+!ERROR Need apr and apr-iconv alongside apr-util to build!
+!ENDIF
+
+
+all: buildall checkall
+
+# To help win32 pick up the locations where they don't fall in the usual
+# path locations. This may not be completely effective for USESLN/USEDSP
+# oriented builds, just yet
+#
+LIB=$(APR_PATH)\$(ARCHOSPATH);$(APR_PATH)\$(LIBSOSPATH);$(API_PATH)\$(ARCHPATH);$(API_PATH)\$(LIBSPATH);$(APU_PATH)\$(ARCHPATH);$(APU_PATH)\$(LIBSPATH);$(LIB)
+INCLUDE=$(APR_PATH)\include;$(API_PATH)\include;$(INCLUDE)
+
+!IF $(USEMAK) == 1
+
+clean:
+ $(MAKE) $(MAKEOPT) -f Makefile.win ARCH="$(ARCH)" \
+ CTARGET=CLEAN buildall
+
+buildall:
+ cd $(APR_PATH)
+ $(MAKE) $(MAKEOPT) -f apr.mak CFG="apr - $(ARCH)" RECURSE=0 $(CTARGET)
+ $(MAKE) $(MAKEOPT) -f libapr.mak CFG="libapr - $(ARCH)" RECURSE=0 $(CTARGET)
+ cd build
+ $(MAKE) $(MAKEOPT) -f aprapp.mak CFG="aprapp - $(ARCH)" RECURSE=0 $(CTARGET)
+ $(MAKE) $(MAKEOPT) -f libaprapp.mak CFG="libaprapp - $(ARCH)" RECURSE=0 $(CTARGET)
+ cd ..
+ cd $(API_PATH)
+ $(MAKE) $(MAKEOPT) -f apriconv.mak CFG="apriconv - $(ARCH)" RECURSE=0 $(CTARGET)
+ $(MAKE) $(MAKEOPT) -f libapriconv.mak CFG="libapriconv - $(ARCH)" RECURSE=0 $(CTARGET)
+!IF "$(CTARGET)" == "CLEAN"
+ $(MAKE) $(MAKEOPT) -f build\modules.mk.win clean \
+ BUILD_MODE="$(ARCH)" BIND_MODE=shared API_SOURCE=.
+!ELSE
+ cd ccs
+ $(MAKE) $(MAKEOPT) -f Makefile.win all \
+ BUILD_MODE="$(ARCH)" BIND_MODE=shared
+ cd ..\ces
+ $(MAKE) $(MAKEOPT) -f Makefile.win all \
+ BUILD_MODE="$(ARCH)" BIND_MODE=shared
+ cd ..
+!ENDIF
+ cd $(APU_PATH)
+ $(MAKE) $(MAKEOPT) $(SSLOPT) $(XMLOPT) -f aprutil.mak CFG="aprutil - $(ARCH)" RECURSE=0 $(CTARGET)
+ $(MAKE) $(MAKEOPT) $(SSLOPT) $(XMLOPT) -f libaprutil.mak CFG="libaprutil - $(ARCH)" RECURSE=0 $(CTARGET)
+ cd ldap
+ $(MAKE) $(MAKEOPT) -f apr_ldap.mak CFG="apr_ldap - $(ARCH)" RECURSE=0 $(CTARGET)
+ cd ..
+ cd dbd
+ for %d in (odbc $(DBD_LIST)) do \
+ $(MAKE) $(MAKEOPT) -f apr_dbd_%d.mak CFG="apr_dbd_%d - $(ARCH)" RECURSE=0 $(CTARGET)
+ cd ..
+ cd dbm
+ for %d in ($(DBM_LIST) x) do if not %d == x \
+ $(MAKE) $(MAKEOPT) -f apr_dbm_%d.mak CFG="apr_dbm_%d - $(ARCH)" RECURSE=0 $(CTARGET)
+ cd ..
+ cd crypto
+ for %d in ($(CRYPTO_LIST) x) do if not %d == x \
+ $(MAKE) $(MAKEOPT) $(SSLOPT) -f apr_crypto_%d.mak CFG="apr_crypto_%d - $(ARCH)" RECURSE=0 $(CTARGET)
+ cd ..
+
+!ELSEIF $(USESLN) == 1
+
+clean:
+ -for %d in (odbc $(DBD_LIST)) do \
+ devenv aprutil.sln /useenv /clean "$(SLNARCH)" /project apr_dbd_%d
+ -for %d in ($(DBM_LIST) x) do if not %d == x \
+ devenv aprutil.sln /useenv /clean "$(SLNARCH)" /project apr_dbm_%d
+ -for %d in ($(CRYPTO_LIST) x) do if not %d == x \
+ devenv aprutil.sln /useenv /clean "$(SLNARCH)" /project apr_crypto_%d
+ -devenv aprutil.sln /useenv /clean "$(SLNARCH)" /project apr_ldap
+ -devenv aprutil.sln /useenv /clean "$(SLNARCH)" /project libaprutil
+ -devenv aprutil.sln /useenv /clean "$(SLNARCH)" /project aprutil
+ cd $(API_PATH)
+ -$(MAKE) $(MAKEOPT) -f build\modules.mk.win clean \
+ BUILD_MODE="$(ARCH)" BIND_MODE=shared API_SOURCE=.
+ cd $(APU_PATH)
+ -devenv aprutil.sln /useenv /clean "$(SLNARCH)" /project libapriconv
+ -devenv aprutil.sln /useenv /clean "$(SLNARCH)" /project apriconv
+ -devenv aprutil.sln /useenv /clean "$(SLNARCH)" /project libaprapp
+ -devenv aprutil.sln /useenv /clean "$(SLNARCH)" /project aprapp
+ -devenv aprutil.sln /useenv /clean "$(SLNARCH)" /project libapr
+ -devenv aprutil.sln /useenv /clean "$(SLNARCH)" /project apr
+
+buildall:
+ devenv aprutil.sln /useenv /build "$(SLNARCH)" /project aprapp
+ devenv aprutil.sln /useenv /build "$(SLNARCH)" /project libaprapp
+ devenv aprutil.sln /useenv /build "$(SLNARCH)" /project aprutil
+ devenv aprutil.sln /useenv /build "$(SLNARCH)" /project libaprutil
+ devenv aprutil.sln /useenv /build "$(SLNARCH)" /project apr_ldap
+ for %d in (odbc $(DBD_LIST)) do \
+ devenv aprutil.sln /useenv /build "$(SLNARCH)" /project apr_dbd_%d
+ for %d in ($(DBM_LIST) x) do if not %d == x \
+ devenv aprutil.sln /useenv /build "$(SLNARCH)" /project apr_dbm_%d
+ for %d in ($(CRYPTO_LIST) x) do if not %d == x \
+ devenv aprutil.sln /useenv /build "$(SLNARCH)" /project apr_crypto_%d
+
+!ELSE
+# $(USEDSP) == 1
+
+clean:
+ -for %d in (odbc $(DBD_LIST)) do \
+ msdev aprutil.dsw /USEENV /MAKE "apr_dbd_%d - $(ARCH)" /CLEAN
+ -for %d in ($(DBM_LIST) x) do if not %d == x \
+ msdev aprutil.dsw /USEENV /MAKE "apr_dbm_%d - $(ARCH)" /CLEAN
+ -for %d in ($(CRYPTO_LIST) x) do if not %d == x \
+ msdev aprutil.dsw /USEENV /MAKE "apr_crypto_%d - $(ARCH)" /CLEAN
+ -msdev aprutil.dsw /USEENV /MAKE "apr_ldap - $(ARCH)" /CLEAN
+ -msdev aprutil.dsw /USEENV /MAKE "libaprutil - $(ARCH)" /CLEAN
+ -msdev aprutil.dsw /USEENV /MAKE "aprutil - $(ARCH)" /CLEAN
+ cd $(API_PATH)
+ $(MAKE) $(MAKEOPT) -f build\modules.mk.win clean \
+ BUILD_MODE="$(ARCH)" BIND_MODE=shared API_SOURCE=.
+ cd $(APU_PATH)
+ -msdev aprutil.dsw /USEENV /MAKE "libapriconv - $(ARCH)" /CLEAN
+ -msdev aprutil.dsw /USEENV /MAKE "apriconv - $(ARCH)" /CLEAN
+ -msdev aprutil.dsw /USEENV /MAKE "libaprapp - $(ARCH)" /CLEAN
+ -msdev aprutil.dsw /USEENV /MAKE "aprapp - $(ARCH)" /CLEAN
+ -msdev aprutil.dsw /USEENV /MAKE "libapr - $(ARCH)" /CLEAN
+ -msdev aprutil.dsw /USEENV /MAKE "apr - $(ARCH)" /CLEAN
+
+buildall:
+ @msdev aprutil.dsw /USEENV /MAKE "aprapp - $(ARCH)"
+ @msdev aprutil.dsw /USEENV /MAKE "aprutil - $(ARCH)"
+ @msdev aprutil.dsw /USEENV /MAKE "libaprapp - $(ARCH)"
+ @msdev aprutil.dsw /USEENV /MAKE "libaprutil - $(ARCH)"
+ @msdev aprutil.dsw /USEENV /MAKE "apr_ldap - $(ARCH)"
+ @for %d in (odbc $(DBD_LIST)) do \
+ msdev aprutil.dsw /USEENV /MAKE "apr_dbd_%d - $(ARCH)"
+ @for %d in ($(DBM_LIST) x) do if not %d == x \
+ msdev aprutil.dsw /USEENV /MAKE "apr_dbm_%d - $(ARCH)"
+ @for %d in ($(CRYPTO_LIST) x) do if not %d == x \
+ msdev aprutil.dsw /USEENV /MAKE "apr_crypto_%d - $(ARCH)"
+
+!ENDIF
+
+
+checkapr:
+ cd $(APR_PATH)\test
+ $(MAKE) $(MAKEOPT) -f Makefile.win MODEL=static \
+ OUTDIR=$(LIBSOSPATH) check
+ $(MAKE) $(MAKEOPT) -f Makefile.win MODEL=dynamic \
+ OUTDIR=$(ARCHOSPATH) check
+ cd ..
+ cd $(APU_PATH)
+
+checkapu:
+ cd $(APU_PATH)
+ cd test
+ $(MAKE) $(MAKEOPT) -f Makefile.win MODEL=static \
+ OUTDIR=$(LIBSPATH) APROUTDIR=$(LIBSOSPATH) \
+ APR_PATH=..\$(APR_PATH) API_PATH=..\$(API_PATH) check
+ $(MAKE) $(MAKEOPT) -f Makefile.win MODEL=dynamic \
+ OUTDIR=$(ARCHPATH) APROUTDIR=$(ARCHOSPATH) \
+ APR_PATH=..\$(APR_PATH) API_PATH=..\$(API_PATH) check
+ cd ..
+
+checkall: checkapr checkapu
+
+
+install:
+ echo Y >.y
+ echo A >.A
+ @if NOT EXIST "$(PREFIX)\." mkdir "$(PREFIX)"
+ @if NOT EXIST "$(PREFIX)\bin\." mkdir "$(PREFIX)\bin"
+ @if NOT EXIST "$(PREFIX)\bin\iconv\." mkdir "$(PREFIX)\bin\iconv"
+ @if NOT EXIST "$(PREFIX)\include\." mkdir "$(PREFIX)\include"
+ @if NOT EXIST "$(PREFIX)\lib\." mkdir "$(PREFIX)\lib"
+ copy CHANGES "$(PREFIX)\CHANGES.txt" <.y
+ copy LICENSE "$(PREFIX)\LICENSE.txt" <.y
+ copy NOTICE "$(PREFIX)\NOTICE.txt" <.y
+ xcopy $(APR_PATH)\include\*.h "$(PREFIX)\include\" /d < .a
+ xcopy $(APU_PATH)\include\*.h "$(PREFIX)\include\" /d < .a
+ copy $(APR_PATH)\$(LIBSOSPATH)\apr-1.lib "$(PREFIX)\lib\" <.y
+ copy $(APR_PATH)\$(LIBSOSPATH)\apr-1.pdb "$(PREFIX)\lib\" <.y
+ copy $(APU_PATH)\$(LIBSPATH)\aprutil-1.lib "$(PREFIX)\lib\" <.y
+ copy $(APU_PATH)\$(LIBSPATH)\aprutil-1.pdb "$(PREFIX)\lib\" <.y
+ copy $(APR_PATH)\$(ARCHOSPATH)\libapr-1.lib "$(PREFIX)\lib\" <.y
+ copy $(APR_PATH)\$(ARCHOSPATH)\libapr-1.exp "$(PREFIX)\lib\" <.y
+ copy $(APU_PATH)\$(ARCHPATH)\libaprutil-1.lib "$(PREFIX)\lib\" <.y
+ copy $(APU_PATH)\$(ARCHPATH)\libaprutil-1.exp "$(PREFIX)\lib\" <.y
+ copy $(APR_PATH)\$(ARCHOSPATH)\libapr-1.dll "$(PREFIX)\bin\" <.y
+ copy $(APR_PATH)\$(ARCHOSPATH)\libapr-1.pdb "$(PREFIX)\bin\" <.y
+ copy $(API_PATH)\$(ARCHPATH)\libapriconv-1.dll "$(PREFIX)\bin\" <.y
+ copy $(API_PATH)\$(ARCHPATH)\libapriconv-1.pdb "$(PREFIX)\bin\" <.y
+ copy $(APU_PATH)\$(ARCHPATH)\libaprutil-1.dll "$(PREFIX)\bin\" <.y
+ copy $(APU_PATH)\$(ARCHPATH)\libaprutil-1.pdb "$(PREFIX)\bin\" <.y
+ copy $(APU_PATH)\ldap\$(ARCHPATH)\apr_ldap-1.dll "$(PREFIX)\bin\" <.y
+ copy $(APU_PATH)\ldap\$(ARCHPATH)\apr_ldap-1.pdb "$(PREFIX)\bin\" <.y
+ for %d in (odbc $(DBD_LIST)) do ( \
+ copy $(APU_PATH)\dbd\$(ARCHPATH)\apr_dbd_%d-1.dll "$(PREFIX)\bin\" <.y && \
+ copy $(APU_PATH)\dbd\$(ARCHPATH)\apr_dbd_%d-1.pdb "$(PREFIX)\bin\" <.y \
+ )
+ for %d in ($(DBM_LIST) x) do if not %d == x ( \
+ copy $(APU_PATH)\dbm\$(ARCHPATH)\apr_dbm_%d-1.dll "$(PREFIX)\bin\" <.y && \
+ copy $(APU_PATH)\dbm\$(ARCHPATH)\apr_dbm_%d-1.pdb "$(PREFIX)\bin\" <.y \
+ )
+ for %d in ($(CRYPTO_LIST) x) do if not %d == x ( \
+ copy $(APU_PATH)\crypto\$(ARCHPATH)\apr_crypto_%d-1.dll "$(PREFIX)\bin\" <.y && \
+ copy $(APU_PATH)\crypto\$(ARCHPATH)\apr_crypto_%d-1.pdb "$(PREFIX)\bin\" <.y \
+ )
+ xcopy $(API_PATH)\$(ARCHPATH)\iconv\*.so "$(PREFIX)\bin\iconv\" /d < .a
+ xcopy $(API_PATH)\$(ARCHPATH)\iconv\*.pdb "$(PREFIX)\bin\iconv\" /d < .a
+ del .y
+ del .a
+
diff --git a/NOTICE b/NOTICE
new file mode 100644
index 0000000..3ae54e1
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,14 @@
+Apache Portable Runtime Utility Library
+Copyright (c) 2000-2016 The Apache Software Foundation.
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+Portions of this software were developed at the National Center
+for Supercomputing Applications (NCSA) at the University of
+Illinois at Urbana-Champaign.
+
+This software contains code derived from the RSA Data Security
+Inc. MD5 Message-Digest Algorithm, including various
+modifications by Spyglass Inc., Carnegie Mellon University, and
+Bell Communications Research, Inc (Bellcore).
diff --git a/NWGNUmakefile b/NWGNUmakefile
new file mode 100644
index 0000000..cef05ee
--- /dev/null
+++ b/NWGNUmakefile
@@ -0,0 +1,310 @@
+#
+# Declare the sub-directories to be built here
+#
+
+SUBDIRS = \
+ ldap \
+ xml \
+ $(EOLIST)
+
+ifdef WITH_APR_DBD
+SUBDIRS += \
+ dbd \
+ $(EOLIST)
+endif
+
+ifdef WITH_APR_DBM
+SUBDIRS += \
+ dbm \
+ $(EOLIST)
+endif
+
+#
+# Get the 'head' of the build environment. This includes default targets and
+# paths to tools
+#
+
+include $(APR_WORK)/build/NWGNUhead.inc
+
+#
+# Make sure all needed macro's are defined
+#
+
+#
+# These directories will be at the beginning of the include list, followed by
+# INCDIRS
+#
+XINCDIRS += \
+ $(APR)/include \
+ $(APR)/include/arch/NetWare \
+ $(APU)/include \
+ $(APU)/uri \
+ $(APU)/dbm/sdbm \
+ $(APU)/include/private \
+ $(APUXML)/expat/lib \
+ $(LDAPSDK)/inc \
+ $(EOLIST)
+
+#
+# These flags will come after CFLAGS
+#
+XCFLAGS += \
+ $(EOLIST)
+
+#
+# These defines will come after DEFINES
+#
+XDEFINES += \
+ $(EOLIST)
+
+#
+# These flags will be added to the link.opt file
+#
+XLFLAGS += \
+ $(EOLIST)
+
+#
+# These values will be appended to the correct variables based on the value of
+# RELEASE
+#
+ifeq "$(RELEASE)" "debug"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+ifeq "$(RELEASE)" "noopt"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+ifeq "$(RELEASE)" "release"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+#
+# These are used by the link target if an NLM is being generated
+# This is used by the link 'name' directive to name the nlm. If left blank
+# TARGET_nlm (see below) will be used.
+#
+NLM_NAME =
+
+#
+# This is used by the link '-desc ' directive.
+# If left blank, NLM_NAME will be used.
+#
+NLM_DESCRIPTION =
+
+#
+# This is used by the '-threadname' directive. If left blank,
+# NLM_NAME Thread will be used.
+#
+NLM_THREAD_NAME =
+#
+# If this is specified, it will override VERSION value in
+# $(APR_WORK)/build/NWGNUenvironment.inc
+#
+NLM_VERSION =
+
+#
+# If this is specified, it will override the default of 64K
+#
+NLM_STACK_SIZE =
+
+#
+# If this is specified it will be used by the link '-entry' directive
+#
+NLM_ENTRY_SYM =
+
+#
+# If this is specified it will be used by the link '-exit' directive
+#
+NLM_EXIT_SYM =
+
+#
+# If this is specified it will be used by the link '-check' directive
+#
+NLM_CHECK_SYM =
+
+#
+# If this is specified it will be used by the link '-flags' directive
+#
+NLM_FLAGS =
+
+#
+# If this is specified it will be linked in with the XDCData option in the def
+# file instead of the default of $(APR)/misc/netware/apache.xdc. XDCData can
+# be disabled by setting APACHE_UNIPROC in the environment
+#
+XDCDATA =
+
+#
+# Declare all target files (you must add your files here)
+#
+
+#
+# If there is an NLM target, put it here
+#
+TARGET_nlm = \
+ $(EOLIST)
+
+#
+# If there is an LIB target, put it here
+#
+TARGET_lib = \
+ $(OBJDIR)/apulib.lib \
+ $(EOLIST)
+
+#
+# These are the OBJ files needed to create the NLM target above.
+# Paths must all use the '/' character
+#
+FILES_nlm_objs = \
+ $(EOLIST)
+
+#
+# These are the LIB files needed to create the NLM target above.
+# These will be added as a library command in the link.opt file.
+#
+FILES_nlm_libs = \
+ $(EOLIST)
+
+#
+# These are the modules that the above NLM target depends on to load.
+# These will be added as a module command in the link.opt file.
+#
+FILES_nlm_modules = \
+ $(EOLIST)
+
+#
+# If the nlm has a msg file, put it's path here
+#
+FILE_nlm_msg =
+
+#
+# If the nlm has a hlp file put it's path here
+#
+FILE_nlm_hlp =
+
+#
+# If this is specified, it will override $(NWOS)\copyright.txt.
+#
+FILE_nlm_copyright =
+
+#
+# Any additional imports go here
+#
+FILES_nlm_Ximports = \
+ $(EOLIST)
+
+#
+# Any symbols exported to here
+#
+FILES_nlm_exports = \
+ $(EOLIST)
+
+#
+# These are the OBJ files needed to create the LIB target above.
+# Paths must all use the '/' character
+#
+FILES_lib_objs = \
+ $(OBJDIR)/apr_base64.o \
+ $(OBJDIR)/apr_brigade.o \
+ $(OBJDIR)/apr_buckets.o \
+ $(OBJDIR)/apr_buckets_alloc.o \
+ $(OBJDIR)/apr_buckets_eos.o \
+ $(OBJDIR)/apr_buckets_file.o \
+ $(OBJDIR)/apr_buckets_flush.o \
+ $(OBJDIR)/apr_buckets_heap.o \
+ $(OBJDIR)/apr_buckets_mmap.o \
+ $(OBJDIR)/apr_buckets_pipe.o \
+ $(OBJDIR)/apr_buckets_pool.o \
+ $(OBJDIR)/apr_buckets_refcount.o \
+ $(OBJDIR)/apr_buckets_simple.o \
+ $(OBJDIR)/apr_buckets_socket.o \
+ $(OBJDIR)/apr_crypto.o \
+ $(OBJDIR)/apr_date.o \
+ $(OBJDIR)/apr_dbm.o \
+ $(OBJDIR)/apr_dbd.o \
+ $(OBJDIR)/apr_dbm_sdbm.o \
+ $(OBJDIR)/apu_dso.o \
+ $(OBJDIR)/apr_hooks.o \
+ $(OBJDIR)/apr_md4.o \
+ $(OBJDIR)/apr_md5.o \
+ $(OBJDIR)/apr_memcache.o \
+ $(OBJDIR)/apr_passwd.o \
+ $(OBJDIR)/apr_queue.o \
+ $(OBJDIR)/apr_redis.o \
+ $(OBJDIR)/apr_reslist.o \
+ $(OBJDIR)/apr_rmm.o \
+ $(OBJDIR)/apr_sha1.o \
+ $(OBJDIR)/apr_siphash.o \
+ $(OBJDIR)/apu_version.o \
+ $(OBJDIR)/getuuid.o \
+ $(OBJDIR)/uuid.o \
+ $(OBJDIR)/apr_strmatch.o \
+ $(OBJDIR)/apr_thread_pool.o \
+ $(OBJDIR)/apr_uri.o \
+ $(OBJDIR)/crypt_blowfish.o \
+ $(OBJDIR)/sdbm.o \
+ $(OBJDIR)/sdbm_hash.o \
+ $(OBJDIR)/sdbm_lock.o \
+ $(OBJDIR)/sdbm_pair.o \
+ $(OBJDIR)/xlate.o \
+ $(EOLIST)
+
+#
+# implement targets and dependancies (leave this section alone)
+#
+
+libs :: $(OBJDIR) $(TARGET_lib)
+
+nlms :: libs $(TARGET_nlm)
+
+#
+# Updated this target to create necessary directories and copy files to the
+# correct place. (See $(APR_WORK)/build/NWGNUhead.inc for examples)
+#
+install :: nlms FORCE
+
+#
+# Any specialized rules here
+#
+
+vpath %.c buckets:crypto:dbd:dbm:dbm/sdbm:encoding:hooks:ldap:memcache:redis:misc:strmatch:uri:xlate:xml
+
+#
+# Include the 'tail' makefile that has targets that depend on variables defined
+# in this makefile
+#
+
+include $(APRBUILD)/NWGNUtail.inc
+
+
diff --git a/README b/README
new file mode 100644
index 0000000..9ea474d
--- /dev/null
+++ b/README
@@ -0,0 +1,111 @@
+Apache Portable Runtime Utility Library README
+----------------------------------------------
+
+ The Apache Portable Runtime Utility Library provides a predictable
+ and consistent interface to underlying client library interfaces.
+ This API assures predictable if not identical behavior regardless
+ of which libraries are available on a given platform.
+
+ APR and its companion libraries are implemented entirely in C
+ and provide a common programming interface across a wide variety
+ of operating system platforms without sacrificing performance.
+ Currently supported platforms include:
+
+ UNIX variants
+ Windows
+ Netware
+ Mac OS X
+ OS/2
+
+ To give a brief overview, the primary core
+ subsystems of APR-util 1.3 include the following:
+
+ Hashing and UUID services
+ Multiple SQL DBD client interfaces
+ Multiple flat-database DBM client interfaces
+ Typesafe function Hooks abstraction
+ LDAP SSL connections for a variety of LDAP toolkits
+ MemCache interface
+ Date parsing rourtines
+ Resource Lists
+ Thread Pools
+ Queues
+ Relocatable Memory Management functions
+ String filename-style pattern matching
+ URI Parsing
+ Charset translation (iconv based)
+ XML parsing (expat)
+
+ For a more complete list, please refer to the following URLs:
+
+ http://apr.apache.org/docs/apr-util/modules.html
+
+ Users of APR 0.9 should be aware that migrating to the APR 1.x
+ programming interfaces may require some adjustments; APR 1.x is
+ neither source nor binary compatible with earlier APR 0.9 releases.
+ Users of APR 1.x can expect consistent interfaces and binary backwards
+ compatibility throughout the entire APR 1.x release cycle, as defined
+ in our versioning rules:
+
+ http://apr.apache.org/versioning.html
+
+ APR is already used extensively by the Apache HTTP Server
+ version 2 and the Subversion revision control system, to
+ name but a few. We list all known projects using APR at
+ http://apr.apache.org/projects.html -- so please let us know
+ if you find our libraries useful in your own projects!
+
+
+Database Providers
+------------------
+As of apr-util version 1.2.11, MySQL DBD driver is shipped as part of the
+distribution. However, to avoid licensing incompatibilities, it is not
+built by default. To enable MySQL support, use the --with-mysql option,
+but be aware that the MySQL license may introduce licensing implications
+for your compiled code. Similarly, the bindings for propritary drivers
+such as Oracle (--with-oracle option) must also be explicitly enabled.
+
+On windows, selection of supported drivers is via the environment values
+DBD_LIST (for mysql, oracle, pgsql, sqlite2 and/or sqlite3)
+and DBM_LIST (db and/or gdbm). DBD odbc and DBM sdbm are unconditionally
+compiled and installed, do not include these in the list.
+
+Whenever distributing apr-util in combination with database client
+drivers, always review the license requirements of all components.
+
+
+Cryptographic Software Notice
+-----------------------------
+This distribution includes cryptographic software. The country in
+which you currently reside may have restrictions on the import,
+possession, use, and/or re-export to another country, of
+encryption software. BEFORE using any encryption software, please
+check your country's laws, regulations and policies concerning the
+import, possession, or use, and re-export of encryption software, to
+see if this is permitted. See http://www.wassenaar.org/ for more
+information.
+
+The U.S. Government Department of Commerce, Bureau of Industry and
+Security (BIS), has classified this software as Export Commodity
+Control Number (ECCN) 5D002.C.1, which includes information security
+software using or performing cryptographic functions with asymmetric
+algorithms. The form and manner of this Apache Software Foundation
+distribution makes it eligible for export under the License Exception
+ENC Technology Software Unrestricted (TSU) exception (see the BIS
+Export Administration Regulations, Section 740.13) for both object
+code and source code.
+
+The following provides more details on the included cryptographic
+software:
+
+ APR-Util provides an abstract interface for symmetrical cryptographic
+ functions that make use of a general-purpose encryption library,
+ such as OpenSSL, NSS, or the operating system's platform-specific
+ facilities. This interface is known as the apr_crypto interface,
+ with implementation beneath the /crypto directory.
+
+ APR-Util provides an abstract interface for SSL encrypted LDAP (ldaps
+ and STARTTLS style) connections, which can be powered by OpenLDAP,
+ Netscape LDAP SDK, Mozilla LDAP SDK, or other platform specific ldap
+ interfaces.
+
diff --git a/README.FREETDS b/README.FREETDS
new file mode 100644
index 0000000..4066a9c
--- /dev/null
+++ b/README.FREETDS
@@ -0,0 +1,11 @@
+The APR DBD Driver for FreeTDS has been removed from the build.
+It is known to have problems, and we are not able to maintain it.
+
+The source code is still available. If you want it and are able
+to manage maintenance for yourself, you can patch the build and
+work through issues that affect you, but you're on your own.
+
+We expect that for most users, the ODBC driver will serve as
+an alternative.
+
+Sorry.
diff --git a/README.cmake b/README.cmake
new file mode 100644
index 0000000..85de33a
--- /dev/null
+++ b/README.cmake
@@ -0,0 +1,139 @@
+Experimental cmake-based build support for APR-Util on Microsoft Windows
+
+Status
+------
+
+This build support is currently intended only for Microsoft Windows.
+Only Windows NT-based systems can be targeted. (The traditional
+Windows build support for APR can target Windows 9x as well.)
+
+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
+ cmake version 3.1.3 or later is required to work with current OpenSSL
+ releases. (OpenSSL is an optional prerequisite of APR-Util.)
+* 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 or APR 1.5.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-Util-specific-flags
+ d:/path/to/aprutilsource
+
+ If APR 1.x was installed to a different directory than APR-Util,
+ also pass these additional arguments:
+
+ -DAPR_INCLUDE_DIR=d:/path/to/apr1inst/include
+ -DAPR_LIBRARIES=d:/path/to/apr1inst/lib/libapr-1.lib
+
+ 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_BUILD_TESTAPR Build APR-Util test suite
+ Default: OFF
+ TEST_STATIC_LIBS Build the test suite to test the APR static
+ library instead of the APR dynamic library.
+ Default: OFF
+ In order to build the test suite against both
+ static and dynamic libraries, separate builds
+ will be required, one with TEST_STATIC_LIBS
+ set to ON.
+ INSTALL_PDB Install .pdb files if generated.
+ Default: ON
+
+ 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
+ + 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 (no way to consume an apr-iconv build yet)
+* Static builds of APR modules are not supported.
+* CHANGES/LICENSE/NOTICE is not installed, unlike Makefile.win.
+ (But unlike Makefile.win we want to call them APR-Util-CHANGES.txt
+ and so on.) But perhaps that is a job for a higher-level script.
+
+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.
diff --git a/apr-util.pc.in b/apr-util.pc.in
new file mode 100644
index 0000000..5b146af
--- /dev/null
+++ b/apr-util.pc.in
@@ -0,0 +1,13 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+APRUTIL_MAJOR_VERSION=@APRUTIL_MAJOR_VERSION@
+includedir=@includedir@
+
+Name: APR Utils
+Description: Companion library for APR
+Version: @APRUTIL_DOTTED_VERSION@
+# assume that apr-util requires libapr of same major version
+Requires: apr-@APRUTIL_MAJOR_VERSION@
+Libs: -L${libdir} -l@APRUTIL_LIBNAME@ @LDADD_ldap@ @APRUTIL_EXPORT_LIBS@
+Cflags: -I${includedir}
diff --git a/apr-util.spec b/apr-util.spec
new file mode 100644
index 0000000..18fdea1
--- /dev/null
+++ b/apr-util.spec
@@ -0,0 +1,200 @@
+
+%define apuver 1
+
+Summary: Apache Portable Runtime Utility library
+Name: apr-util
+Version: 1.6.1
+Release: 1
+License: Apache Software License
+Group: System Environment/Libraries
+URL: http://apr.apache.org/
+Source0: http://www.apache.org/dist/apr/%{name}-%{version}.tar.bz2
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
+BuildRequires: autoconf, libtool, doxygen, apr-devel >= 1.4.0
+BuildRequires: expat-devel, libuuid-devel
+
+%description
+The mission of the Apache Portable Runtime (APR) is to provide a
+free library of C data structures and routines. This library
+contains additional utility interfaces for APR; including support
+for XML, LDAP, database interfaces, URI parsing and more.
+
+%package devel
+Group: Development/Libraries
+Summary: APR utility library development kit
+Requires: apr-util = %{version}-%{release}, apr-devel
+Requires: db4-devel, expat-devel
+
+%description devel
+This package provides the support files which can be used to
+build applications using the APR utility library. The mission
+of the Apache Portable Runtime (APR) is to provide a free
+library of C data structures and routines.
+
+%package dbm
+Group: Development/Libraries
+Summary: APR utility library DBM driver
+BuildRequires: db4-devel
+Requires: apr-util = %{version}-%{release}
+
+%description dbm
+This package provides the DBM driver for the apr-util.
+
+%package pgsql
+Group: Development/Libraries
+Summary: APR utility library PostgreSQL DBD driver
+BuildRequires: postgresql-devel
+Requires: apr-util = %{version}-%{release}
+
+%description pgsql
+This package provides the PostgreSQL driver for the apr-util
+DBD (database abstraction) interface.
+
+%package mysql
+Group: Development/Libraries
+Summary: APR utility library MySQL DBD driver
+BuildRequires: mysql-devel
+Requires: apr-util = %{version}-%{release}
+
+%description mysql
+This package provides the MySQL driver for the apr-util DBD
+(database abstraction) interface.
+
+%package sqlite
+Group: Development/Libraries
+Summary: APR utility library SQLite DBD driver
+BuildRequires: sqlite-devel >= 3.0.0
+Requires: apr-util = %{version}-%{release}
+
+%description sqlite
+This package provides the SQLite driver for the apr-util DBD
+(database abstraction) interface.
+
+%package odbc
+Group: Development/Libraries
+Summary: APR utility library ODBC DBD driver
+BuildRequires: unixODBC-devel
+Requires: apr-util = %{version}-%{release}
+
+%description odbc
+This package provides the ODBC driver for the apr-util DBD
+(database abstraction) interface.
+
+%package ldap
+Group: Development/Libraries
+Summary: APR utility library LDAP support
+BuildRequires: openldap-devel
+Requires: apr-util = %{version}-%{release}
+
+%description ldap
+This package provides the LDAP support for the apr-util.
+
+%package openssl
+Group: Development/Libraries
+Summary: APR utility library OpenSSL crypto support
+BuildRequires: openssl-devel
+Requires: apr-util = %{version}-%{release}
+
+%description openssl
+This package provides crypto support for apr-util based on OpenSSL.
+
+%package nss
+Group: Development/Libraries
+Summary: APR utility library NSS crypto support
+BuildRequires: nss-devel
+Requires: apr-util = %{version}-%{release}
+
+%description nss
+This package provides crypto support for apr-util based on Mozilla NSS.
+
+%prep
+%setup -q
+
+%build
+%configure --with-apr=%{_prefix} \
+ --includedir=%{_includedir}/apr-%{apuver} \
+ --with-ldap --without-gdbm \
+ --with-sqlite3 --with-pgsql --with-mysql --with-odbc \
+ --with-berkeley-db \
+ --with-crypto --with-openssl --with-nss \
+ --without-sqlite2
+make %{?_smp_mflags} && make dox
+
+%check
+# Run non-interactive tests
+pushd test
+make %{?_smp_mflags} all CFLAGS=-fno-strict-aliasing
+make check || exit 1
+popd
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make install DESTDIR=$RPM_BUILD_ROOT
+
+# Documentation
+mv docs/dox/html html
+
+# Unpackaged files
+rm -f $RPM_BUILD_ROOT%{_libdir}/aprutil.exp
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(-,root,root,-)
+%doc CHANGES LICENSE NOTICE
+%{_libdir}/libaprutil-%{apuver}.so.*
+%dir %{_libdir}/apr-util-%{apuver}
+
+%files dbm
+%defattr(-,root,root,-)
+%{_libdir}/apr-util-%{apuver}/apr_dbm_db*
+
+%files pgsql
+%defattr(-,root,root,-)
+%{_libdir}/apr-util-%{apuver}/apr_dbd_pgsql*
+
+%files mysql
+%defattr(-,root,root,-)
+%{_libdir}/apr-util-%{apuver}/apr_dbd_mysql*
+
+%files sqlite
+%defattr(-,root,root,-)
+%{_libdir}/apr-util-%{apuver}/apr_dbd_sqlite*
+
+%files odbc
+%defattr(-,root,root,-)
+%{_libdir}/apr-util-%{apuver}/apr_dbd_odbc*
+
+%files ldap
+%defattr(-,root,root,-)
+%{_libdir}/apr-util-%{apuver}/apr_ldap*
+
+%files openssl
+%defattr(-,root,root,-)
+%{_libdir}/apr-util-%{apuver}/apr_crypto_openssl*
+
+%files nss
+%defattr(-,root,root,-)
+%{_libdir}/apr-util-%{apuver}/apr_crypto_nss*
+
+%files devel
+%defattr(-,root,root,-)
+%{_bindir}/apu-%{apuver}-config
+%{_libdir}/libaprutil-%{apuver}.*a
+%{_libdir}/libaprutil-%{apuver}.so
+%{_libdir}/pkgconfig/apr-util-%{apuver}.pc
+%{_includedir}/apr-%{apuver}/*.h
+%doc html
+
+%changelog
+* Tue Jun 22 2004 Graham Leggett <minfrin@sharp.fm> 1.0.0-1
+- update to support v1.0.0 of APR
+
+* Tue Jun 22 2004 Graham Leggett <minfrin@sharp.fm> 1.0.0-1
+- derived from Fedora Core apr.spec
+
diff --git a/aprutil.dep b/aprutil.dep
new file mode 100644
index 0000000..53098d8
--- /dev/null
+++ b/aprutil.dep
@@ -0,0 +1,431 @@
+# Microsoft Developer Studio Generated Dependency File, included by aprutil.mak
+
+.\buckets\apr_brigade.c : \
+ ".\include\apr_buckets.h"\
+ ".\include\apu.h"\
+
+
+.\buckets\apr_buckets.c : \
+ ".\include\apr_buckets.h"\
+ ".\include\apu.h"\
+
+
+.\buckets\apr_buckets_alloc.c : \
+ ".\include\apr_buckets.h"\
+ ".\include\apu.h"\
+
+
+.\buckets\apr_buckets_eos.c : \
+ ".\include\apr_buckets.h"\
+ ".\include\apu.h"\
+
+
+.\buckets\apr_buckets_file.c : \
+ ".\include\apr_buckets.h"\
+ ".\include\apu.h"\
+
+
+.\buckets\apr_buckets_flush.c : \
+ ".\include\apr_buckets.h"\
+ ".\include\apu.h"\
+
+
+.\buckets\apr_buckets_heap.c : \
+ ".\include\apr_buckets.h"\
+ ".\include\apu.h"\
+
+
+.\buckets\apr_buckets_mmap.c : \
+ ".\include\apr_buckets.h"\
+ ".\include\apu.h"\
+
+
+.\buckets\apr_buckets_pipe.c : \
+ ".\include\apr_buckets.h"\
+ ".\include\apu.h"\
+
+
+.\buckets\apr_buckets_pool.c : \
+ ".\include\apr_buckets.h"\
+ ".\include\apu.h"\
+
+
+.\buckets\apr_buckets_refcount.c : \
+ ".\include\apr_buckets.h"\
+ ".\include\apu.h"\
+
+
+.\buckets\apr_buckets_simple.c : \
+ ".\include\apr_buckets.h"\
+ ".\include\apu.h"\
+
+
+.\buckets\apr_buckets_socket.c : \
+ ".\include\apr_buckets.h"\
+ ".\include\apu.h"\
+
+
+.\crypto\apr_crypto.c : \
+ ".\include\apr_crypto.h"\
+ ".\include\apu.h"\
+ ".\include\apu_errno.h"\
+ ".\include\apu_version.h"\
+ ".\include\private\apr_crypto_internal.h"\
+ ".\include\private\apu_config.h"\
+ ".\include\private\apu_internal.h"\
+
+
+.\crypto\apr_md4.c : \
+ ".\include\apr_md4.h"\
+ ".\include\apr_xlate.h"\
+ ".\include\apu.h"\
+
+
+.\crypto\apr_md5.c : \
+ ".\include\apr_md5.h"\
+ ".\include\apr_xlate.h"\
+ ".\include\apu.h"\
+ ".\include\private\apu_config.h"\
+
+
+.\crypto\apr_passwd.c : \
+ ".\crypto\crypt_blowfish.h"\
+ ".\include\apr_md5.h"\
+ ".\include\apr_sha1.h"\
+ ".\include\apr_xlate.h"\
+ ".\include\apu.h"\
+ ".\include\private\apu_config.h"\
+
+
+.\crypto\apr_sha1.c : \
+ ".\include\apr_base64.h"\
+ ".\include\apr_sha1.h"\
+ ".\include\apr_xlate.h"\
+ ".\include\apu.h"\
+
+
+.\crypto\apr_siphash.c : \
+ ".\include\apr_siphash.h"\
+
+
+.\crypto\crypt_blowfish.c : \
+ ".\crypto\crypt_blowfish.h"\
+
+
+.\crypto\getuuid.c : \
+ ".\include\apr_md5.h"\
+ ".\include\apr_uuid.h"\
+ ".\include\apr_xlate.h"\
+ ".\include\apu.h"\
+
+
+.\crypto\uuid.c : \
+ ".\include\apr_uuid.h"\
+ ".\include\apu.h"\
+
+
+.\dbd\apr_dbd.c : \
+ ".\include\apr_dbd.h"\
+ ".\include\apu.h"\
+ ".\include\apu_version.h"\
+ ".\include\private\apr_dbd_internal.h"\
+ ".\include\private\apu_config.h"\
+ ".\include\private\apu_internal.h"\
+
+
+.\dbd\apr_dbd_mysql.c : \
+ ".\include\apr_buckets.h"\
+ ".\include\apr_dbd.h"\
+ ".\include\apu.h"\
+ ".\include\apu_version.h"\
+ ".\include\private\apr_dbd_internal.h"\
+ ".\include\private\apu_config.h"\
+
+
+.\dbd\apr_dbd_odbc.c : \
+ ".\include\apr_buckets.h"\
+ ".\include\apr_dbd.h"\
+ ".\include\apu.h"\
+ ".\include\apu_version.h"\
+ ".\include\private\apr_dbd_internal.h"\
+ ".\include\private\apr_dbd_odbc_v2.h"\
+ ".\include\private\apu_config.h"\
+
+
+.\dbd\apr_dbd_oracle.c : \
+ ".\include\apr_buckets.h"\
+ ".\include\apr_dbd.h"\
+ ".\include\apu.h"\
+ ".\include\private\apr_dbd_internal.h"\
+
+
+.\dbd\apr_dbd_pgsql.c : \
+ ".\include\apr_buckets.h"\
+ ".\include\apr_dbd.h"\
+ ".\include\apu.h"\
+ ".\include\private\apr_dbd_internal.h"\
+ ".\include\private\apu_config.h"\
+
+
+.\dbd\apr_dbd_sqlite2.c : \
+ ".\include\apr_buckets.h"\
+ ".\include\apr_dbd.h"\
+ ".\include\apu.h"\
+ ".\include\private\apr_dbd_internal.h"\
+
+
+.\dbd\apr_dbd_sqlite3.c : \
+ ".\include\apr_buckets.h"\
+ ".\include\apr_dbd.h"\
+ ".\include\apu.h"\
+ ".\include\private\apr_dbd_internal.h"\
+
+
+.\dbm\apr_dbm.c : \
+ ".\include\apr_dbm.h"\
+ ".\include\apu.h"\
+ ".\include\apu_version.h"\
+ ".\include\private\apr_dbm_private.h"\
+ ".\include\private\apu_config.h"\
+ ".\include\private\apu_internal.h"\
+ ".\include\private\apu_select_dbm.h"\
+
+
+.\dbm\apr_dbm_berkeleydb.c : \
+ ".\include\apr_dbm.h"\
+ ".\include\apu.h"\
+ ".\include\apu_want.h"\
+ ".\include\private\apr_dbm_private.h"\
+ ".\include\private\apu_config.h"\
+ ".\include\private\apu_select_dbm.h"\
+
+
+.\dbm\apr_dbm_gdbm.c : \
+ ".\include\apr_dbm.h"\
+ ".\include\apu.h"\
+ ".\include\private\apr_dbm_private.h"\
+ ".\include\private\apu_config.h"\
+ ".\include\private\apu_select_dbm.h"\
+
+
+.\dbm\apr_dbm_sdbm.c : \
+ ".\include\apr_dbm.h"\
+ ".\include\apr_sdbm.h"\
+ ".\include\apu.h"\
+ ".\include\private\apr_dbm_private.h"\
+ ".\include\private\apu_config.h"\
+ ".\include\private\apu_select_dbm.h"\
+
+
+.\encoding\apr_base64.c : \
+ ".\include\apr_base64.h"\
+ ".\include\apr_xlate.h"\
+ ".\include\apu.h"\
+
+
+.\hooks\apr_hooks.c : \
+ ".\include\apr_hooks.h"\
+ ".\include\apr_optional.h"\
+ ".\include\apr_optional_hooks.h"\
+ ".\include\apu.h"\
+
+
+.\ldap\apr_ldap_init.c : \
+ ".\include\apr_ldap.h"\
+ ".\include\apr_ldap_init.h"\
+ ".\include\apr_ldap_option.h"\
+ ".\include\apr_ldap_rebind.h"\
+ ".\include\apr_ldap_url.h"\
+ ".\include\apu.h"\
+ ".\include\private\apu_config.h"\
+ ".\include\private\apu_internal.h"\
+
+
+.\ldap\apr_ldap_option.c : \
+ ".\include\apr_ldap.h"\
+ ".\include\apr_ldap_init.h"\
+ ".\include\apr_ldap_option.h"\
+ ".\include\apr_ldap_rebind.h"\
+ ".\include\apr_ldap_url.h"\
+ ".\include\apu.h"\
+ ".\include\private\apu_config.h"\
+
+
+.\ldap\apr_ldap_rebind.c : \
+ ".\include\apr_ldap.h"\
+ ".\include\apr_ldap_init.h"\
+ ".\include\apr_ldap_option.h"\
+ ".\include\apr_ldap_rebind.h"\
+ ".\include\apr_ldap_url.h"\
+ ".\include\apu.h"\
+ ".\include\private\apu_config.h"\
+
+
+.\ldap\apr_ldap_stub.c : \
+ ".\include\apr_ldap.h"\
+ ".\include\apr_ldap_init.h"\
+ ".\include\apr_ldap_option.h"\
+ ".\include\apr_ldap_rebind.h"\
+ ".\include\apr_ldap_url.h"\
+ ".\include\apu.h"\
+ ".\include\apu_version.h"\
+ ".\include\private\apu_config.h"\
+ ".\include\private\apu_internal.h"\
+
+
+.\ldap\apr_ldap_url.c : \
+ ".\include\apr_ldap.h"\
+ ".\include\apr_ldap_init.h"\
+ ".\include\apr_ldap_option.h"\
+ ".\include\apr_ldap_rebind.h"\
+ ".\include\apr_ldap_url.h"\
+ ".\include\apu.h"\
+
+
+.\memcache\apr_memcache.c : \
+ ".\include\apr_buckets.h"\
+ ".\include\apr_memcache.h"\
+ ".\include\apr_reslist.h"\
+ ".\include\apu.h"\
+
+
+.\misc\apr_date.c : \
+ ".\include\apr_date.h"\
+ ".\include\apu.h"\
+
+
+.\misc\apr_queue.c : \
+ ".\include\apr_queue.h"\
+ ".\include\apu.h"\
+
+
+.\misc\apr_reslist.c : \
+ ".\include\apr_reslist.h"\
+ ".\include\apu.h"\
+
+
+.\misc\apr_rmm.c : \
+ ".\include\apr_anylock.h"\
+ ".\include\apr_rmm.h"\
+ ".\include\apu.h"\
+
+
+.\misc\apr_thread_pool.c : \
+ ".\include\apr_thread_pool.h"\
+ ".\include\apu.h"\
+
+
+.\misc\apu_dso.c : \
+ ".\include\apu.h"\
+ ".\include\apu_version.h"\
+ ".\include\private\apu_config.h"\
+ ".\include\private\apu_internal.h"\
+
+
+.\misc\apu_version.c : \
+ ".\include\apu.h"\
+ ".\include\apu_version.h"\
+
+
+.\dbm\sdbm\sdbm.c : \
+ ".\dbm\sdbm\sdbm_pair.h"\
+ ".\dbm\sdbm\sdbm_private.h"\
+ ".\dbm\sdbm\sdbm_tune.h"\
+ ".\include\apr_sdbm.h"\
+ ".\include\apu.h"\
+
+
+.\dbm\sdbm\sdbm_hash.c : \
+ ".\dbm\sdbm\sdbm_private.h"\
+ ".\include\apr_sdbm.h"\
+ ".\include\apu.h"\
+
+
+.\dbm\sdbm\sdbm_lock.c : \
+ ".\dbm\sdbm\sdbm_private.h"\
+ ".\dbm\sdbm\sdbm_tune.h"\
+ ".\include\apr_sdbm.h"\
+ ".\include\apu.h"\
+
+
+.\dbm\sdbm\sdbm_pair.c : \
+ ".\dbm\sdbm\sdbm_pair.h"\
+ ".\dbm\sdbm\sdbm_private.h"\
+ ".\dbm\sdbm\sdbm_tune.h"\
+ ".\include\apr_sdbm.h"\
+ ".\include\apu.h"\
+
+
+.\strmatch\apr_strmatch.c : \
+ ".\include\apr_strmatch.h"\
+ ".\include\apu.h"\
+
+
+.\uri\apr_uri.c : \
+ ".\include\apr_uri.h"\
+ ".\include\apu.h"\
+
+
+.\xlate\xlate.c : \
+ ".\include\apr_xlate.h"\
+ ".\include\apu.h"\
+ ".\include\private\apu_config.h"\
+
+
+.\xml\apr_xml.c : \
+ ".\include\apr_xlate.h"\
+ ".\include\apr_xml.h"\
+ ".\include\apu.h"\
+ ".\include\private\apu_config.h"\
+
+
+!IF "$(CFG)" == "aprutil - Win32 Release"
+
+!ELSEIF "$(CFG)" == "aprutil - Win32 Debug"
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Release"
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Debug"
+
+!ENDIF
+
+!IF "$(CFG)" == "aprutil - Win32 Release"
+
+!ELSEIF "$(CFG)" == "aprutil - Win32 Debug"
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Release"
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Debug"
+
+!ENDIF
+
+!IF "$(CFG)" == "aprutil - Win32 Release"
+
+!ELSEIF "$(CFG)" == "aprutil - Win32 Debug"
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Release"
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Debug"
+
+!ENDIF
+
+!IF "$(CFG)" == "aprutil - Win32 Release"
+
+!ELSEIF "$(CFG)" == "aprutil - Win32 Debug"
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Release"
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Debug"
+
+!ENDIF
+
+!IF "$(CFG)" == "aprutil - Win32 Release"
+
+!ELSEIF "$(CFG)" == "aprutil - Win32 Debug"
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Release"
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Debug"
+
+!ENDIF
+
diff --git a/aprutil.dsp b/aprutil.dsp
new file mode 100644
index 0000000..0706114
--- /dev/null
+++ b/aprutil.dsp
@@ -0,0 +1,810 @@
+# Microsoft Developer Studio Project File - Name="aprutil" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=aprutil - Win32 Release
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "aprutil.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "aprutil.mak" CFG="aprutil - Win32 Release"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "aprutil - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "aprutil - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE "aprutil - x64 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "aprutil - x64 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "aprutil - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "LibR"
+# PROP BASE Intermediate_Dir "LibR"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "LibR"
+# PROP Intermediate_Dir "LibR"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "./include" /I "../apr/include" /I "./include/private" /I "./xml/expat/lib" /I "../apr-iconv/include" /I "./dbm/sdbm" /D "NDEBUG" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /D "API_DECLARE_STATIC" /D "APU_USE_SDBM" /D "HAVE_SQL_H" /D "XML_STATIC" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\aprutil-1" /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"LibR\aprutil-1.lib"
+
+!ELSEIF "$(CFG)" == "aprutil - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "LibD"
+# PROP BASE Intermediate_Dir "LibD"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "LibD"
+# PROP Intermediate_Dir "LibD"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "./include" /I "../apr/include" /I "./include/private" /I "./xml/expat/lib" /I "../apr-iconv/include" /I "./dbm/sdbm" /D "_DEBUG" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /D "API_DECLARE_STATIC" /D "APU_USE_SDBM" /D "HAVE_SQL_H" /D "XML_STATIC" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\aprutil-1" /FD /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"LibD\aprutil-1.lib"
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "x64\LibR"
+# PROP BASE Intermediate_Dir "x64\LibR"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "x64\LibR"
+# PROP Intermediate_Dir "x64\LibR"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
+# ADD CPP /nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "../apr/include" /I "./include/private" /I "./xml/expat/lib" /I "../apr-iconv/include" /I "./dbm/sdbm" /D "NDEBUG" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /D "API_DECLARE_STATIC" /D "APU_USE_SDBM" /D "HAVE_SQL_H" /D "XML_STATIC" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\aprutil-1" /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"x64\LibR\aprutil-1.lib"
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "x64\LibD"
+# PROP BASE Intermediate_Dir "x64\LibD"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "x64\LibD"
+# PROP Intermediate_Dir "x64\LibD"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /EHsc /c
+# ADD CPP /nologo /MDd /W3 /Zi /Od /I "./include" /I "../apr/include" /I "./include/private" /I "./xml/expat/lib" /I "../apr-iconv/include" /I "./dbm/sdbm" /D "_DEBUG" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /D "API_DECLARE_STATIC" /D "APU_USE_SDBM" /D "HAVE_SQL_H" /D "XML_STATIC" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\" /Fd"$(OUTDIR)\aprutil-1" /FD /EHsc /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"x64\LibD\aprutil-1.lib"
+
+!ENDIF
+
+# Begin Target
+
+# Name "aprutil - Win32 Release"
+# Name "aprutil - Win32 Debug"
+# Name "aprutil - x64 Release"
+# Name "aprutil - x64 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter ""
+# Begin Group "buckets"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\buckets\apr_brigade.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\buckets\apr_buckets.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\buckets\apr_buckets_alloc.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\buckets\apr_buckets_eos.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\buckets\apr_buckets_file.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\buckets\apr_buckets_flush.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\buckets\apr_buckets_heap.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\buckets\apr_buckets_mmap.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\buckets\apr_buckets_pipe.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\buckets\apr_buckets_pool.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\buckets\apr_buckets_refcount.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\buckets\apr_buckets_simple.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\buckets\apr_buckets_socket.c
+# End Source File
+# End Group
+# Begin Group "crypto"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\crypto\apr_crypto.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\crypto\apr_md4.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\crypto\apr_md5.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\crypto\apr_passwd.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\crypto\apr_sha1.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\crypto\apr_siphash.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\crypto\crypt_blowfish.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\crypto\crypt_blowfish.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\crypto\getuuid.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\crypto\uuid.c
+# End Source File
+# End Group
+# Begin Group "dbd"
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\dbd\apr_dbd.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\dbd\apr_dbd_mysql.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\dbd\apr_dbd_odbc.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\dbd\apr_dbd_oracle.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\dbd\apr_dbd_pgsql.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\dbd\apr_dbd_sqlite2.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\dbd\apr_dbd_sqlite3.c
+# End Source File
+# End Group
+# Begin Group "dbm"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\dbm\apr_dbm.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\dbm\apr_dbm_berkeleydb.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\dbm\apr_dbm_gdbm.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\dbm\apr_dbm_sdbm.c
+# End Source File
+# End Group
+# Begin Group "encoding"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\encoding\apr_base64.c
+# End Source File
+# End Group
+# Begin Group "hooks"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\hooks\apr_hooks.c
+# End Source File
+# End Group
+# Begin Group "ldap"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\ldap\apr_ldap_init.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\ldap\apr_ldap_option.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\ldap\apr_ldap_rebind.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\ldap\apr_ldap_stub.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\ldap\apr_ldap_url.c
+# End Source File
+# End Group
+# Begin Group "memcache"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\memcache\apr_memcache.c
+# End Source File
+# End Group
+# Begin Group "misc"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\misc\apr_date.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\misc\apu_dso.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\misc\apr_queue.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\misc\apr_reslist.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\misc\apr_rmm.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\misc\apr_thread_pool.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\misc\apu_version.c
+# End Source File
+# End Group
+# Begin Group "sdbm"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\dbm\sdbm\sdbm.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\dbm\sdbm\sdbm_hash.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\dbm\sdbm\sdbm_lock.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\dbm\sdbm\sdbm_pair.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\dbm\sdbm\sdbm_pair.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\dbm\sdbm\sdbm_private.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\dbm\sdbm\sdbm_tune.h
+# End Source File
+# End Group
+# Begin Group "strmatch"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\strmatch\apr_strmatch.c
+# End Source File
+# End Group
+# Begin Group "uri"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\uri\apr_uri.c
+# End Source File
+# End Group
+# Begin Group "xlate"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\xlate\xlate.c
+# End Source File
+# End Group
+# Begin Group "xml"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\xml\apr_xml.c
+# End Source File
+# End Group
+# End Group
+# Begin Group "Generated Files"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\include\apr_ldap.h.in
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\apr_ldap.hnw
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\apr_ldap.hw
+
+!IF "$(CFG)" == "aprutil - Win32 Release"
+
+# Begin Custom Build - Creating apr_ldap.h from apr_ldap.hw
+InputPath=.\include\apr_ldap.hw
+
+".\include\apr_ldap.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\apr_ldap.hw > .\include\apr_ldap.h
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "aprutil - Win32 Debug"
+
+# Begin Custom Build - Creating apr_ldap.h from apr_ldap.hw
+InputPath=.\include\apr_ldap.hw
+
+".\include\apr_ldap.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\apr_ldap.hw > .\include\apr_ldap.h
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Release"
+
+# Begin Custom Build - Creating apr_ldap.h from apr_ldap.hw
+InputPath=.\include\apr_ldap.hw
+
+".\include\apr_ldap.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\apr_ldap.hw > .\include\apr_ldap.h
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Debug"
+
+# Begin Custom Build - Creating apr_ldap.h from apr_ldap.hw
+InputPath=.\include\apr_ldap.hw
+
+".\include\apr_ldap.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\apr_ldap.hw > .\include\apr_ldap.h
+
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\apu.h.in
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\apu.hnw
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\apu.hw
+
+!IF "$(CFG)" == "aprutil - Win32 Release"
+
+# Begin Custom Build - Creating apu.h from apu.hw
+InputPath=.\include\apu.hw
+
+".\include\apu.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\apu.hw > .\include\apu.h
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "aprutil - Win32 Debug"
+
+# Begin Custom Build - Creating apu.h from apu.hw
+InputPath=.\include\apu.hw
+
+".\include\apu.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\apu.hw > .\include\apu.h
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Release"
+
+# Begin Custom Build - Creating apu.h from apu.hw
+InputPath=.\include\apu.hw
+
+".\include\apu.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\apu.hw > .\include\apu.h
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Debug"
+
+# Begin Custom Build - Creating apu.h from apu.hw
+InputPath=.\include\apu.hw
+
+".\include\apu.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\apu.hw > .\include\apu.h
+
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\private\apu_config.h.in
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\private\apu_config.hw
+
+!IF "$(CFG)" == "aprutil - Win32 Release"
+
+# Begin Custom Build - Creating apu_config.h from apu_config.hw
+InputPath=.\include\private\apu_config.hw
+
+".\include\private\apu_config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\private\apu_config.hw > .\include\private\apu_config.h
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "aprutil - Win32 Debug"
+
+# Begin Custom Build - Creating apu_config.h from apu_config.hw
+InputPath=.\include\private\apu_config.hw
+
+".\include\private\apu_config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\private\apu_config.hw > .\include\private\apu_config.h
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Release"
+
+# Begin Custom Build - Creating apu_config.h from apu_config.hw
+InputPath=.\include\private\apu_config.hw
+
+".\include\private\apu_config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\private\apu_config.hw > .\include\private\apu_config.h
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Debug"
+
+# Begin Custom Build - Creating apu_config.h from apu_config.hw
+InputPath=.\include\private\apu_config.hw
+
+".\include\private\apu_config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\private\apu_config.hw > .\include\private\apu_config.h
+
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\private\apu_select_dbm.h.in
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\private\apu_select_dbm.hw
+
+!IF "$(CFG)" == "aprutil - Win32 Release"
+
+# Begin Custom Build - Creating apu_select_dbm.h from apu_select_dbm.hw
+InputPath=.\include\private\apu_select_dbm.hw
+
+".\include\private\apu_select_dbm.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\private\apu_select_dbm.hw > .\include\private\apu_select_dbm.h
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "aprutil - Win32 Debug"
+
+# Begin Custom Build - Creating apu_select_dbm.h from apu_select_dbm.hw
+InputPath=.\include\private\apu_select_dbm.hw
+
+".\include\private\apu_select_dbm.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\private\apu_select_dbm.hw > .\include\private\apu_select_dbm.h
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Release"
+
+# Begin Custom Build - Creating apu_select_dbm.h from apu_select_dbm.hw
+InputPath=.\include\private\apu_select_dbm.hw
+
+".\include\private\apu_select_dbm.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\private\apu_select_dbm.hw > .\include\private\apu_select_dbm.h
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Debug"
+
+# Begin Custom Build - Creating apu_select_dbm.h from apu_select_dbm.hw
+InputPath=.\include\private\apu_select_dbm.hw
+
+".\include\private\apu_select_dbm.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\private\apu_select_dbm.hw > .\include\private\apu_select_dbm.h
+
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\apu_want.h.in
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\apu_want.hnw
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\apu_want.hw
+
+!IF "$(CFG)" == "aprutil - Win32 Release"
+
+# Begin Custom Build - Creating apu_want.h from apu_want.hw
+InputPath=.\include\apu_want.hw
+
+".\include\apu_want.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\apu_want.hw > .\include\apu_want.h
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "aprutil - Win32 Debug"
+
+# Begin Custom Build - Creating apu_want.h from apu_want.hw
+InputPath=.\include\apu_want.hw
+
+".\include\apu_want.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\apu_want.hw > .\include\apu_want.h
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Release"
+
+# Begin Custom Build - Creating apu_want.h from apu_want.hw
+InputPath=.\include\apu_want.hw
+
+".\include\apu_want.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\apu_want.hw > .\include\apu_want.h
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Debug"
+
+# Begin Custom Build - Creating apu_want.h from apu_want.hw
+InputPath=.\include\apu_want.hw
+
+".\include\apu_want.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ type .\include\apu_want.hw > .\include\apu_want.h
+
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Group
+# Begin Group "Public Header Files"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\include\apr_anylock.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\apr_base64.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\apr_buckets.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\apr_date.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\apr_dbm.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\apr_hooks.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\apr_ldap_url.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\apr_md4.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\apr_md5.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\apr_memcache.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\apr_optional.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\apr_optional_hooks.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\apr_queue.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\apr_reslist.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\apr_rmm.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\apr_sdbm.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\apr_sha1.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\apr_siphash.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\apr_strmatch.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\apr_thread_pool.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\apr_uri.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\apr_uuid.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\apr_xlate.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\apr_xml.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\apu_version.h
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/aprutil.dsw b/aprutil.dsw
new file mode 100644
index 0000000..a2976cc
--- /dev/null
+++ b/aprutil.dsw
@@ -0,0 +1,443 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "apr"="..\apr\apr.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "apr_crypto_nss"=".\crypto\apr_crypto_nss.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libapr
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libaprutil
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "apr_crypto_openssl"=".\crypto\apr_crypto_openssl.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libapr
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libaprutil
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "apr_dbd_mysql"=".\dbd\apr_dbd_mysql.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libapr
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libaprutil
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "apr_dbd_odbc"=".\dbd\apr_dbd_odbc.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libaprutil
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libapr
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "apr_dbd_oracle"=".\dbd\apr_dbd_oracle.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libapr
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libaprutil
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "apr_dbd_pgsql"=".\dbd\apr_dbd_pgsql.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libapr
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libaprutil
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "apr_dbd_sqlite2"=".\dbd\apr_dbd_sqlite2.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libapr
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libaprutil
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "apr_dbd_sqlite3"=".\dbd\apr_dbd_sqlite3.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libapr
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libaprutil
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "apr_dbm_db"=".\dbm\apr_dbm_db.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libapr
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libaprutil
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "apr_dbm_gdbm"=".\dbm\apr_dbm_gdbm.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libapr
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libaprutil
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "apr_ldap"=".\ldap\apr_ldap.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libapr
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libaprutil
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "aprapp"="..\apr\build\aprapp.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name preaprapp
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "apriconv"="..\apr-iconv\apriconv.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name preapriconv
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "aprutil"=".\aprutil.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name preaprutil
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name apriconv
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "libapr"="..\apr\libapr.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "libaprapp"="..\apr\build\libaprapp.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name prelibaprapp
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "libapriconv"="..\apr-iconv\libapriconv.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libapr
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "libapriconv_ccs_modules"="..\apr-iconv\ccs\libapriconv_ccs_modules.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libapr
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libapriconv
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "libapriconv_ces_modules"="..\apr-iconv\ces\libapriconv_ces_modules.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libapr
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libapriconv
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "libaprutil"=".\libaprutil.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libapr
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libaprapp
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libapriconv
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libapriconv_ccs_modules
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libapriconv_ces_modules
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "preaprapp"="..\apr\build\preaprapp.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name apr
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "preapriconv"="..\apr-iconv\build\preapriconv.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name apr
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "preaprutil"=".\build\preaprutil.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name apr
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name aprapp
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "prelibaprapp"="..\apr\build\prelibaprapp.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libapr
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/aprutil.mak b/aprutil.mak
new file mode 100644
index 0000000..fd54159
--- /dev/null
+++ b/aprutil.mak
@@ -0,0 +1,1466 @@
+# Microsoft Developer Studio Generated NMAKE File, Based on aprutil.dsp
+!IF "$(CFG)" == ""
+CFG=aprutil - Win32 Release
+!MESSAGE No configuration specified. Defaulting to aprutil - Win32 Release.
+!ENDIF
+
+!IF "$(CFG)" != "aprutil - Win32 Release" && "$(CFG)" != "aprutil - Win32 Debug" && "$(CFG)" != "aprutil - x64 Release" && "$(CFG)" != "aprutil - x64 Debug"
+!MESSAGE Invalid configuration "$(CFG)" specified.
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "aprutil.mak" CFG="aprutil - Win32 Release"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "aprutil - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "aprutil - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE "aprutil - x64 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "aprutil - x64 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE
+!ERROR An invalid configuration is specified.
+!ENDIF
+
+!IF "$(OS)" == "Windows_NT"
+NULL=
+!ELSE
+NULL=nul
+!ENDIF
+
+!IF "$(_HAVE_OSSL110)" == "1"
+SSLINC=/I ../openssl/include
+!ELSE
+SSLINC=/I ../openssl/inc32
+!ENDIF
+
+!IF "$(CFG)" == "aprutil - Win32 Release"
+
+OUTDIR=.\LibR
+INTDIR=.\LibR
+# Begin Custom Macros
+OutDir=.\LibR
+# End Custom Macros
+
+!IF "$(RECURSE)" == "0"
+
+ALL : "$(OUTDIR)\aprutil-1.lib"
+
+!ELSE
+
+ALL : "apriconv - Win32 Release" "$(OUTDIR)\aprutil-1.lib"
+
+!ENDIF
+
+!IF "$(RECURSE)" == "1"
+CLEAN :"apriconv - Win32 ReleaseCLEAN"
+!ELSE
+CLEAN :
+!ENDIF
+ -@erase "$(INTDIR)\apr_base64.obj"
+ -@erase "$(INTDIR)\apr_brigade.obj"
+ -@erase "$(INTDIR)\apr_buckets.obj"
+ -@erase "$(INTDIR)\apr_buckets_alloc.obj"
+ -@erase "$(INTDIR)\apr_buckets_eos.obj"
+ -@erase "$(INTDIR)\apr_buckets_file.obj"
+ -@erase "$(INTDIR)\apr_buckets_flush.obj"
+ -@erase "$(INTDIR)\apr_buckets_heap.obj"
+ -@erase "$(INTDIR)\apr_buckets_mmap.obj"
+ -@erase "$(INTDIR)\apr_buckets_pipe.obj"
+ -@erase "$(INTDIR)\apr_buckets_pool.obj"
+ -@erase "$(INTDIR)\apr_buckets_refcount.obj"
+ -@erase "$(INTDIR)\apr_buckets_simple.obj"
+ -@erase "$(INTDIR)\apr_buckets_socket.obj"
+ -@erase "$(INTDIR)\apr_crypto.obj"
+ -@erase "$(INTDIR)\apr_date.obj"
+ -@erase "$(INTDIR)\apr_dbd.obj"
+ -@erase "$(INTDIR)\apr_dbd_mysql.obj"
+ -@erase "$(INTDIR)\apr_dbd_odbc.obj"
+ -@erase "$(INTDIR)\apr_dbd_oracle.obj"
+ -@erase "$(INTDIR)\apr_dbd_pgsql.obj"
+ -@erase "$(INTDIR)\apr_dbd_sqlite2.obj"
+ -@erase "$(INTDIR)\apr_dbd_sqlite3.obj"
+ -@erase "$(INTDIR)\apr_dbm.obj"
+ -@erase "$(INTDIR)\apr_dbm_berkeleydb.obj"
+ -@erase "$(INTDIR)\apr_dbm_gdbm.obj"
+ -@erase "$(INTDIR)\apr_dbm_sdbm.obj"
+ -@erase "$(INTDIR)\apr_hooks.obj"
+ -@erase "$(INTDIR)\apr_ldap_init.obj"
+ -@erase "$(INTDIR)\apr_ldap_option.obj"
+ -@erase "$(INTDIR)\apr_ldap_rebind.obj"
+ -@erase "$(INTDIR)\apr_ldap_stub.obj"
+ -@erase "$(INTDIR)\apr_ldap_url.obj"
+ -@erase "$(INTDIR)\apr_md4.obj"
+ -@erase "$(INTDIR)\apr_md5.obj"
+ -@erase "$(INTDIR)\apr_memcache.obj"
+ -@erase "$(INTDIR)\apr_passwd.obj"
+ -@erase "$(INTDIR)\apr_queue.obj"
+ -@erase "$(INTDIR)\apr_redis.obj"
+ -@erase "$(INTDIR)\apr_reslist.obj"
+ -@erase "$(INTDIR)\apr_rmm.obj"
+ -@erase "$(INTDIR)\apr_sha1.obj"
+ -@erase "$(INTDIR)\apr_siphash.obj"
+ -@erase "$(INTDIR)\apr_strmatch.obj"
+ -@erase "$(INTDIR)\apr_thread_pool.obj"
+ -@erase "$(INTDIR)\apr_uri.obj"
+ -@erase "$(INTDIR)\apr_xml.obj"
+ -@erase "$(INTDIR)\aprutil-1.idb"
+ -@erase "$(INTDIR)\aprutil-1.pdb"
+ -@erase "$(INTDIR)\apu_dso.obj"
+ -@erase "$(INTDIR)\apu_version.obj"
+ -@erase "$(INTDIR)\crypt_blowfish.obj"
+ -@erase "$(INTDIR)\getuuid.obj"
+ -@erase "$(INTDIR)\sdbm.obj"
+ -@erase "$(INTDIR)\sdbm_hash.obj"
+ -@erase "$(INTDIR)\sdbm_lock.obj"
+ -@erase "$(INTDIR)\sdbm_pair.obj"
+ -@erase "$(INTDIR)\uuid.obj"
+ -@erase "$(INTDIR)\xlate.obj"
+ -@erase "$(OUTDIR)\aprutil-1.lib"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP=cl.exe
+CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "../apr/include" /I "./include/private" /I "../apr-iconv/include" /I "./dbm/sdbm" /I "./xml/expat/lib" $(SSLINC) /D "NDEBUG" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /D "API_DECLARE_STATIC" /D "APU_USE_SDBM" /D "HAVE_SQL_H" /D "XML_STATIC" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(OUTDIR)\aprutil-1" /FD /c
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+RSC=rc.exe
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\aprutil.bsc"
+BSC32_SBRS= \
+
+LIB32=link.exe -lib
+LIB32_FLAGS=/nologo /out:"$(OUTDIR)\aprutil-1.lib"
+LIB32_OBJS= \
+ "$(INTDIR)\apr_brigade.obj" \
+ "$(INTDIR)\apr_buckets.obj" \
+ "$(INTDIR)\apr_buckets_alloc.obj" \
+ "$(INTDIR)\apr_buckets_eos.obj" \
+ "$(INTDIR)\apr_buckets_file.obj" \
+ "$(INTDIR)\apr_buckets_flush.obj" \
+ "$(INTDIR)\apr_buckets_heap.obj" \
+ "$(INTDIR)\apr_buckets_mmap.obj" \
+ "$(INTDIR)\apr_buckets_pipe.obj" \
+ "$(INTDIR)\apr_buckets_pool.obj" \
+ "$(INTDIR)\apr_buckets_refcount.obj" \
+ "$(INTDIR)\apr_buckets_simple.obj" \
+ "$(INTDIR)\apr_buckets_socket.obj" \
+ "$(INTDIR)\apr_crypto.obj" \
+ "$(INTDIR)\apr_md4.obj" \
+ "$(INTDIR)\apr_md5.obj" \
+ "$(INTDIR)\apr_passwd.obj" \
+ "$(INTDIR)\apr_sha1.obj" \
+ "$(INTDIR)\apr_siphash.obj" \
+ "$(INTDIR)\crypt_blowfish.obj" \
+ "$(INTDIR)\getuuid.obj" \
+ "$(INTDIR)\uuid.obj" \
+ "$(INTDIR)\apr_dbd.obj" \
+ "$(INTDIR)\apr_dbd_mysql.obj" \
+ "$(INTDIR)\apr_dbd_odbc.obj" \
+ "$(INTDIR)\apr_dbd_oracle.obj" \
+ "$(INTDIR)\apr_dbd_pgsql.obj" \
+ "$(INTDIR)\apr_dbd_sqlite2.obj" \
+ "$(INTDIR)\apr_dbd_sqlite3.obj" \
+ "$(INTDIR)\apr_dbm.obj" \
+ "$(INTDIR)\apr_dbm_berkeleydb.obj" \
+ "$(INTDIR)\apr_dbm_gdbm.obj" \
+ "$(INTDIR)\apr_dbm_sdbm.obj" \
+ "$(INTDIR)\apr_base64.obj" \
+ "$(INTDIR)\apr_hooks.obj" \
+ "$(INTDIR)\apr_ldap_init.obj" \
+ "$(INTDIR)\apr_ldap_option.obj" \
+ "$(INTDIR)\apr_ldap_rebind.obj" \
+ "$(INTDIR)\apr_ldap_stub.obj" \
+ "$(INTDIR)\apr_ldap_url.obj" \
+ "$(INTDIR)\apr_memcache.obj" \
+ "$(INTDIR)\apr_date.obj" \
+ "$(INTDIR)\apu_dso.obj" \
+ "$(INTDIR)\apr_queue.obj" \
+ "$(INTDIR)\apr_redis.obj" \
+ "$(INTDIR)\apr_reslist.obj" \
+ "$(INTDIR)\apr_rmm.obj" \
+ "$(INTDIR)\apr_thread_pool.obj" \
+ "$(INTDIR)\apu_version.obj" \
+ "$(INTDIR)\sdbm.obj" \
+ "$(INTDIR)\sdbm_hash.obj" \
+ "$(INTDIR)\sdbm_lock.obj" \
+ "$(INTDIR)\sdbm_pair.obj" \
+ "$(INTDIR)\apr_strmatch.obj" \
+ "$(INTDIR)\apr_uri.obj" \
+ "$(INTDIR)\xlate.obj" \
+ "$(INTDIR)\apr_xml.obj" \
+ "..\apr-iconv\LibR\apriconv-1.lib"
+
+"$(OUTDIR)\aprutil-1.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
+ $(LIB32) @<<
+ $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
+<<
+
+!ELSEIF "$(CFG)" == "aprutil - Win32 Debug"
+
+OUTDIR=.\LibD
+INTDIR=.\LibD
+# Begin Custom Macros
+OutDir=.\LibD
+# End Custom Macros
+
+!IF "$(RECURSE)" == "0"
+
+ALL : ".\include\private\apu_select_dbm.h" ".\include\private\apu_config.h" ".\include\apu_want.h" ".\include\apu.h" ".\include\apr_ldap.h" "$(OUTDIR)\aprutil-1.lib"
+
+!ELSE
+
+ALL : "apriconv - Win32 Debug" ".\include\private\apu_select_dbm.h" ".\include\private\apu_config.h" ".\include\apu_want.h" ".\include\apu.h" ".\include\apr_ldap.h" "$(OUTDIR)\aprutil-1.lib"
+
+!ENDIF
+
+!IF "$(RECURSE)" == "1"
+CLEAN :"apriconv - Win32 DebugCLEAN"
+!ELSE
+CLEAN :
+!ENDIF
+ -@erase "$(INTDIR)\apr_base64.obj"
+ -@erase "$(INTDIR)\apr_brigade.obj"
+ -@erase "$(INTDIR)\apr_buckets.obj"
+ -@erase "$(INTDIR)\apr_buckets_alloc.obj"
+ -@erase "$(INTDIR)\apr_buckets_eos.obj"
+ -@erase "$(INTDIR)\apr_buckets_file.obj"
+ -@erase "$(INTDIR)\apr_buckets_flush.obj"
+ -@erase "$(INTDIR)\apr_buckets_heap.obj"
+ -@erase "$(INTDIR)\apr_buckets_mmap.obj"
+ -@erase "$(INTDIR)\apr_buckets_pipe.obj"
+ -@erase "$(INTDIR)\apr_buckets_pool.obj"
+ -@erase "$(INTDIR)\apr_buckets_refcount.obj"
+ -@erase "$(INTDIR)\apr_buckets_simple.obj"
+ -@erase "$(INTDIR)\apr_buckets_socket.obj"
+ -@erase "$(INTDIR)\apr_crypto.obj"
+ -@erase "$(INTDIR)\apr_date.obj"
+ -@erase "$(INTDIR)\apr_dbd.obj"
+ -@erase "$(INTDIR)\apr_dbd_mysql.obj"
+ -@erase "$(INTDIR)\apr_dbd_odbc.obj"
+ -@erase "$(INTDIR)\apr_dbd_oracle.obj"
+ -@erase "$(INTDIR)\apr_dbd_pgsql.obj"
+ -@erase "$(INTDIR)\apr_dbd_sqlite2.obj"
+ -@erase "$(INTDIR)\apr_dbd_sqlite3.obj"
+ -@erase "$(INTDIR)\apr_dbm.obj"
+ -@erase "$(INTDIR)\apr_dbm_berkeleydb.obj"
+ -@erase "$(INTDIR)\apr_dbm_gdbm.obj"
+ -@erase "$(INTDIR)\apr_dbm_sdbm.obj"
+ -@erase "$(INTDIR)\apr_hooks.obj"
+ -@erase "$(INTDIR)\apr_ldap_init.obj"
+ -@erase "$(INTDIR)\apr_ldap_option.obj"
+ -@erase "$(INTDIR)\apr_ldap_rebind.obj"
+ -@erase "$(INTDIR)\apr_ldap_stub.obj"
+ -@erase "$(INTDIR)\apr_ldap_url.obj"
+ -@erase "$(INTDIR)\apr_md4.obj"
+ -@erase "$(INTDIR)\apr_md5.obj"
+ -@erase "$(INTDIR)\apr_memcache.obj"
+ -@erase "$(INTDIR)\apr_passwd.obj"
+ -@erase "$(INTDIR)\apr_queue.obj"
+ -@erase "$(INTDIR)\apr_redis.obj"
+ -@erase "$(INTDIR)\apr_reslist.obj"
+ -@erase "$(INTDIR)\apr_rmm.obj"
+ -@erase "$(INTDIR)\apr_sha1.obj"
+ -@erase "$(INTDIR)\apr_siphash.obj"
+ -@erase "$(INTDIR)\apr_strmatch.obj"
+ -@erase "$(INTDIR)\apr_thread_pool.obj"
+ -@erase "$(INTDIR)\apr_uri.obj"
+ -@erase "$(INTDIR)\apr_xml.obj"
+ -@erase "$(INTDIR)\aprutil-1.idb"
+ -@erase "$(INTDIR)\aprutil-1.pdb"
+ -@erase "$(INTDIR)\apu_dso.obj"
+ -@erase "$(INTDIR)\apu_version.obj"
+ -@erase "$(INTDIR)\crypt_blowfish.obj"
+ -@erase "$(INTDIR)\getuuid.obj"
+ -@erase "$(INTDIR)\sdbm.obj"
+ -@erase "$(INTDIR)\sdbm_hash.obj"
+ -@erase "$(INTDIR)\sdbm_lock.obj"
+ -@erase "$(INTDIR)\sdbm_pair.obj"
+ -@erase "$(INTDIR)\uuid.obj"
+ -@erase "$(INTDIR)\xlate.obj"
+ -@erase "$(OUTDIR)\aprutil-1.lib"
+ -@erase ".\include\apr_ldap.h"
+ -@erase ".\include\apu.h"
+ -@erase ".\include\apu_want.h"
+ -@erase ".\include\private\apu_config.h"
+ -@erase ".\include\private\apu_select_dbm.h"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP=cl.exe
+CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "./include" /I "../apr/include" /I "./include/private" /I "../apr-iconv/include" /I "./dbm/sdbm" /I "./xml/expat/lib" $(SSLINC)/D "_DEBUG" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /D "API_DECLARE_STATIC" /D "APU_USE_SDBM" /D "HAVE_SQL_H" /D "XML_STATIC" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(OUTDIR)\aprutil-1" /FD /EHsc /c
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+RSC=rc.exe
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\aprutil.bsc"
+BSC32_SBRS= \
+
+LIB32=link.exe -lib
+LIB32_FLAGS=/nologo /out:"$(OUTDIR)\aprutil-1.lib"
+LIB32_OBJS= \
+ "$(INTDIR)\apr_brigade.obj" \
+ "$(INTDIR)\apr_buckets.obj" \
+ "$(INTDIR)\apr_buckets_alloc.obj" \
+ "$(INTDIR)\apr_buckets_eos.obj" \
+ "$(INTDIR)\apr_buckets_file.obj" \
+ "$(INTDIR)\apr_buckets_flush.obj" \
+ "$(INTDIR)\apr_buckets_heap.obj" \
+ "$(INTDIR)\apr_buckets_mmap.obj" \
+ "$(INTDIR)\apr_buckets_pipe.obj" \
+ "$(INTDIR)\apr_buckets_pool.obj" \
+ "$(INTDIR)\apr_buckets_refcount.obj" \
+ "$(INTDIR)\apr_buckets_simple.obj" \
+ "$(INTDIR)\apr_buckets_socket.obj" \
+ "$(INTDIR)\apr_crypto.obj" \
+ "$(INTDIR)\apr_md4.obj" \
+ "$(INTDIR)\apr_md5.obj" \
+ "$(INTDIR)\apr_passwd.obj" \
+ "$(INTDIR)\apr_sha1.obj" \
+ "$(INTDIR)\apr_siphash.obj" \
+ "$(INTDIR)\crypt_blowfish.obj" \
+ "$(INTDIR)\getuuid.obj" \
+ "$(INTDIR)\uuid.obj" \
+ "$(INTDIR)\apr_dbd.obj" \
+ "$(INTDIR)\apr_dbd_mysql.obj" \
+ "$(INTDIR)\apr_dbd_odbc.obj" \
+ "$(INTDIR)\apr_dbd_oracle.obj" \
+ "$(INTDIR)\apr_dbd_pgsql.obj" \
+ "$(INTDIR)\apr_dbd_sqlite2.obj" \
+ "$(INTDIR)\apr_dbd_sqlite3.obj" \
+ "$(INTDIR)\apr_dbm.obj" \
+ "$(INTDIR)\apr_dbm_berkeleydb.obj" \
+ "$(INTDIR)\apr_dbm_gdbm.obj" \
+ "$(INTDIR)\apr_dbm_sdbm.obj" \
+ "$(INTDIR)\apr_base64.obj" \
+ "$(INTDIR)\apr_hooks.obj" \
+ "$(INTDIR)\apr_ldap_init.obj" \
+ "$(INTDIR)\apr_ldap_option.obj" \
+ "$(INTDIR)\apr_ldap_rebind.obj" \
+ "$(INTDIR)\apr_ldap_stub.obj" \
+ "$(INTDIR)\apr_ldap_url.obj" \
+ "$(INTDIR)\apr_memcache.obj" \
+ "$(INTDIR)\apr_date.obj" \
+ "$(INTDIR)\apu_dso.obj" \
+ "$(INTDIR)\apr_queue.obj" \
+ "$(INTDIR)\apr_redis.obj" \
+ "$(INTDIR)\apr_reslist.obj" \
+ "$(INTDIR)\apr_rmm.obj" \
+ "$(INTDIR)\apr_thread_pool.obj" \
+ "$(INTDIR)\apu_version.obj" \
+ "$(INTDIR)\sdbm.obj" \
+ "$(INTDIR)\sdbm_hash.obj" \
+ "$(INTDIR)\sdbm_lock.obj" \
+ "$(INTDIR)\sdbm_pair.obj" \
+ "$(INTDIR)\apr_strmatch.obj" \
+ "$(INTDIR)\apr_uri.obj" \
+ "$(INTDIR)\xlate.obj" \
+ "$(INTDIR)\apr_xml.obj" \
+ "..\apr-iconv\LibD\apriconv-1.lib"
+
+"$(OUTDIR)\aprutil-1.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
+ $(LIB32) @<<
+ $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
+<<
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Release"
+
+OUTDIR=.\x64\LibR
+INTDIR=.\x64\LibR
+# Begin Custom Macros
+OutDir=.\x64\LibR
+# End Custom Macros
+
+!IF "$(RECURSE)" == "0"
+
+ALL : ".\include\private\apu_select_dbm.h" ".\include\private\apu_config.h" ".\include\apu_want.h" ".\include\apu.h" ".\include\apr_ldap.h" "$(OUTDIR)\aprutil-1.lib"
+
+!ELSE
+
+ALL : "apriconv - x64 Release" ".\include\private\apu_select_dbm.h" ".\include\private\apu_config.h" ".\include\apu_want.h" ".\include\apu.h" ".\include\apr_ldap.h" "$(OUTDIR)\aprutil-1.lib"
+
+!ENDIF
+
+!IF "$(RECURSE)" == "1"
+CLEAN :"apriconv - x64 ReleaseCLEAN"
+!ELSE
+CLEAN :
+!ENDIF
+ -@erase "$(INTDIR)\apr_base64.obj"
+ -@erase "$(INTDIR)\apr_brigade.obj"
+ -@erase "$(INTDIR)\apr_buckets.obj"
+ -@erase "$(INTDIR)\apr_buckets_alloc.obj"
+ -@erase "$(INTDIR)\apr_buckets_eos.obj"
+ -@erase "$(INTDIR)\apr_buckets_file.obj"
+ -@erase "$(INTDIR)\apr_buckets_flush.obj"
+ -@erase "$(INTDIR)\apr_buckets_heap.obj"
+ -@erase "$(INTDIR)\apr_buckets_mmap.obj"
+ -@erase "$(INTDIR)\apr_buckets_pipe.obj"
+ -@erase "$(INTDIR)\apr_buckets_pool.obj"
+ -@erase "$(INTDIR)\apr_buckets_refcount.obj"
+ -@erase "$(INTDIR)\apr_buckets_simple.obj"
+ -@erase "$(INTDIR)\apr_buckets_socket.obj"
+ -@erase "$(INTDIR)\apr_crypto.obj"
+ -@erase "$(INTDIR)\apr_date.obj"
+ -@erase "$(INTDIR)\apr_dbd.obj"
+ -@erase "$(INTDIR)\apr_dbd_mysql.obj"
+ -@erase "$(INTDIR)\apr_dbd_odbc.obj"
+ -@erase "$(INTDIR)\apr_dbd_oracle.obj"
+ -@erase "$(INTDIR)\apr_dbd_pgsql.obj"
+ -@erase "$(INTDIR)\apr_dbd_sqlite2.obj"
+ -@erase "$(INTDIR)\apr_dbd_sqlite3.obj"
+ -@erase "$(INTDIR)\apr_dbm.obj"
+ -@erase "$(INTDIR)\apr_dbm_berkeleydb.obj"
+ -@erase "$(INTDIR)\apr_dbm_gdbm.obj"
+ -@erase "$(INTDIR)\apr_dbm_sdbm.obj"
+ -@erase "$(INTDIR)\apr_hooks.obj"
+ -@erase "$(INTDIR)\apr_ldap_init.obj"
+ -@erase "$(INTDIR)\apr_ldap_option.obj"
+ -@erase "$(INTDIR)\apr_ldap_rebind.obj"
+ -@erase "$(INTDIR)\apr_ldap_stub.obj"
+ -@erase "$(INTDIR)\apr_ldap_url.obj"
+ -@erase "$(INTDIR)\apr_md4.obj"
+ -@erase "$(INTDIR)\apr_md5.obj"
+ -@erase "$(INTDIR)\apr_memcache.obj"
+ -@erase "$(INTDIR)\apr_passwd.obj"
+ -@erase "$(INTDIR)\apr_queue.obj"
+ -@erase "$(INTDIR)\apr_redis.obj"
+ -@erase "$(INTDIR)\apr_reslist.obj"
+ -@erase "$(INTDIR)\apr_rmm.obj"
+ -@erase "$(INTDIR)\apr_sha1.obj"
+ -@erase "$(INTDIR)\apr_siphash.obj"
+ -@erase "$(INTDIR)\apr_strmatch.obj"
+ -@erase "$(INTDIR)\apr_thread_pool.obj"
+ -@erase "$(INTDIR)\apr_uri.obj"
+ -@erase "$(INTDIR)\apr_xml.obj"
+ -@erase "$(INTDIR)\aprutil-1.idb"
+ -@erase "$(INTDIR)\aprutil-1.pdb"
+ -@erase "$(INTDIR)\apu_dso.obj"
+ -@erase "$(INTDIR)\apu_version.obj"
+ -@erase "$(INTDIR)\crypt_blowfish.obj"
+ -@erase "$(INTDIR)\getuuid.obj"
+ -@erase "$(INTDIR)\sdbm.obj"
+ -@erase "$(INTDIR)\sdbm_hash.obj"
+ -@erase "$(INTDIR)\sdbm_lock.obj"
+ -@erase "$(INTDIR)\sdbm_pair.obj"
+ -@erase "$(INTDIR)\uuid.obj"
+ -@erase "$(INTDIR)\xlate.obj"
+ -@erase "$(OUTDIR)\aprutil-1.lib"
+ -@erase ".\include\apr_ldap.h"
+ -@erase ".\include\apu.h"
+ -@erase ".\include\apu_want.h"
+ -@erase ".\include\private\apu_config.h"
+ -@erase ".\include\private\apu_select_dbm.h"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP=cl.exe
+CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "../apr/include" /I "./include/private" /I "../apr-iconv/include" /I "./dbm/sdbm" /I "./xml/expat/lib" $(SSLINC) /D "NDEBUG" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /D "API_DECLARE_STATIC" /D "APU_USE_SDBM" /D "HAVE_SQL_H" /D "XML_STATIC" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(OUTDIR)\aprutil-1" /FD /c
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+RSC=rc.exe
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\aprutil.bsc"
+BSC32_SBRS= \
+
+LIB32=link.exe -lib
+LIB32_FLAGS=/nologo /out:"$(OUTDIR)\aprutil-1.lib"
+LIB32_OBJS= \
+ "$(INTDIR)\apr_brigade.obj" \
+ "$(INTDIR)\apr_buckets.obj" \
+ "$(INTDIR)\apr_buckets_alloc.obj" \
+ "$(INTDIR)\apr_buckets_eos.obj" \
+ "$(INTDIR)\apr_buckets_file.obj" \
+ "$(INTDIR)\apr_buckets_flush.obj" \
+ "$(INTDIR)\apr_buckets_heap.obj" \
+ "$(INTDIR)\apr_buckets_mmap.obj" \
+ "$(INTDIR)\apr_buckets_pipe.obj" \
+ "$(INTDIR)\apr_buckets_pool.obj" \
+ "$(INTDIR)\apr_buckets_refcount.obj" \
+ "$(INTDIR)\apr_buckets_simple.obj" \
+ "$(INTDIR)\apr_buckets_socket.obj" \
+ "$(INTDIR)\apr_crypto.obj" \
+ "$(INTDIR)\apr_md4.obj" \
+ "$(INTDIR)\apr_md5.obj" \
+ "$(INTDIR)\apr_passwd.obj" \
+ "$(INTDIR)\apr_sha1.obj" \
+ "$(INTDIR)\apr_siphash.obj" \
+ "$(INTDIR)\crypt_blowfish.obj" \
+ "$(INTDIR)\getuuid.obj" \
+ "$(INTDIR)\uuid.obj" \
+ "$(INTDIR)\apr_dbd.obj" \
+ "$(INTDIR)\apr_dbd_mysql.obj" \
+ "$(INTDIR)\apr_dbd_odbc.obj" \
+ "$(INTDIR)\apr_dbd_oracle.obj" \
+ "$(INTDIR)\apr_dbd_pgsql.obj" \
+ "$(INTDIR)\apr_dbd_sqlite2.obj" \
+ "$(INTDIR)\apr_dbd_sqlite3.obj" \
+ "$(INTDIR)\apr_dbm.obj" \
+ "$(INTDIR)\apr_dbm_berkeleydb.obj" \
+ "$(INTDIR)\apr_dbm_gdbm.obj" \
+ "$(INTDIR)\apr_dbm_sdbm.obj" \
+ "$(INTDIR)\apr_base64.obj" \
+ "$(INTDIR)\apr_hooks.obj" \
+ "$(INTDIR)\apr_ldap_init.obj" \
+ "$(INTDIR)\apr_ldap_option.obj" \
+ "$(INTDIR)\apr_ldap_rebind.obj" \
+ "$(INTDIR)\apr_ldap_stub.obj" \
+ "$(INTDIR)\apr_ldap_url.obj" \
+ "$(INTDIR)\apr_memcache.obj" \
+ "$(INTDIR)\apr_date.obj" \
+ "$(INTDIR)\apu_dso.obj" \
+ "$(INTDIR)\apr_queue.obj" \
+ "$(INTDIR)\apr_redis.obj" \
+ "$(INTDIR)\apr_reslist.obj" \
+ "$(INTDIR)\apr_rmm.obj" \
+ "$(INTDIR)\apr_thread_pool.obj" \
+ "$(INTDIR)\apu_version.obj" \
+ "$(INTDIR)\sdbm.obj" \
+ "$(INTDIR)\sdbm_hash.obj" \
+ "$(INTDIR)\sdbm_lock.obj" \
+ "$(INTDIR)\sdbm_pair.obj" \
+ "$(INTDIR)\apr_strmatch.obj" \
+ "$(INTDIR)\apr_uri.obj" \
+ "$(INTDIR)\xlate.obj" \
+ "$(INTDIR)\apr_xml.obj" \
+ "..\apr-iconv\x64\LibR\apriconv-1.lib"
+
+"$(OUTDIR)\aprutil-1.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
+ $(LIB32) @<<
+ $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
+<<
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Debug"
+
+OUTDIR=.\x64\LibD
+INTDIR=.\x64\LibD
+# Begin Custom Macros
+OutDir=.\x64\LibD
+# End Custom Macros
+
+!IF "$(RECURSE)" == "0"
+
+ALL : ".\include\private\apu_select_dbm.h" ".\include\private\apu_config.h" ".\include\apu_want.h" ".\include\apu.h" ".\include\apr_ldap.h" "$(OUTDIR)\aprutil-1.lib"
+
+!ELSE
+
+ALL : "apriconv - x64 Debug" ".\include\private\apu_select_dbm.h" ".\include\private\apu_config.h" ".\include\apu_want.h" ".\include\apu.h" ".\include\apr_ldap.h" "$(OUTDIR)\aprutil-1.lib"
+
+!ENDIF
+
+!IF "$(RECURSE)" == "1"
+CLEAN :"apriconv - x64 DebugCLEAN"
+!ELSE
+CLEAN :
+!ENDIF
+ -@erase "$(INTDIR)\apr_base64.obj"
+ -@erase "$(INTDIR)\apr_brigade.obj"
+ -@erase "$(INTDIR)\apr_buckets.obj"
+ -@erase "$(INTDIR)\apr_buckets_alloc.obj"
+ -@erase "$(INTDIR)\apr_buckets_eos.obj"
+ -@erase "$(INTDIR)\apr_buckets_file.obj"
+ -@erase "$(INTDIR)\apr_buckets_flush.obj"
+ -@erase "$(INTDIR)\apr_buckets_heap.obj"
+ -@erase "$(INTDIR)\apr_buckets_mmap.obj"
+ -@erase "$(INTDIR)\apr_buckets_pipe.obj"
+ -@erase "$(INTDIR)\apr_buckets_pool.obj"
+ -@erase "$(INTDIR)\apr_buckets_refcount.obj"
+ -@erase "$(INTDIR)\apr_buckets_simple.obj"
+ -@erase "$(INTDIR)\apr_buckets_socket.obj"
+ -@erase "$(INTDIR)\apr_crypto.obj"
+ -@erase "$(INTDIR)\apr_date.obj"
+ -@erase "$(INTDIR)\apr_dbd.obj"
+ -@erase "$(INTDIR)\apr_dbd_mysql.obj"
+ -@erase "$(INTDIR)\apr_dbd_odbc.obj"
+ -@erase "$(INTDIR)\apr_dbd_oracle.obj"
+ -@erase "$(INTDIR)\apr_dbd_pgsql.obj"
+ -@erase "$(INTDIR)\apr_dbd_sqlite2.obj"
+ -@erase "$(INTDIR)\apr_dbd_sqlite3.obj"
+ -@erase "$(INTDIR)\apr_dbm.obj"
+ -@erase "$(INTDIR)\apr_dbm_berkeleydb.obj"
+ -@erase "$(INTDIR)\apr_dbm_gdbm.obj"
+ -@erase "$(INTDIR)\apr_dbm_sdbm.obj"
+ -@erase "$(INTDIR)\apr_hooks.obj"
+ -@erase "$(INTDIR)\apr_ldap_init.obj"
+ -@erase "$(INTDIR)\apr_ldap_option.obj"
+ -@erase "$(INTDIR)\apr_ldap_rebind.obj"
+ -@erase "$(INTDIR)\apr_ldap_stub.obj"
+ -@erase "$(INTDIR)\apr_ldap_url.obj"
+ -@erase "$(INTDIR)\apr_md4.obj"
+ -@erase "$(INTDIR)\apr_md5.obj"
+ -@erase "$(INTDIR)\apr_memcache.obj"
+ -@erase "$(INTDIR)\apr_passwd.obj"
+ -@erase "$(INTDIR)\apr_queue.obj"
+ -@erase "$(INTDIR)\apr_redis.obj"
+ -@erase "$(INTDIR)\apr_reslist.obj"
+ -@erase "$(INTDIR)\apr_rmm.obj"
+ -@erase "$(INTDIR)\apr_sha1.obj"
+ -@erase "$(INTDIR)\apr_siphash.obj"
+ -@erase "$(INTDIR)\apr_strmatch.obj"
+ -@erase "$(INTDIR)\apr_thread_pool.obj"
+ -@erase "$(INTDIR)\apr_uri.obj"
+ -@erase "$(INTDIR)\apr_xml.obj"
+ -@erase "$(INTDIR)\aprutil-1.idb"
+ -@erase "$(INTDIR)\aprutil-1.pdb"
+ -@erase "$(INTDIR)\apu_dso.obj"
+ -@erase "$(INTDIR)\apu_version.obj"
+ -@erase "$(INTDIR)\crypt_blowfish.obj"
+ -@erase "$(INTDIR)\getuuid.obj"
+ -@erase "$(INTDIR)\sdbm.obj"
+ -@erase "$(INTDIR)\sdbm_hash.obj"
+ -@erase "$(INTDIR)\sdbm_lock.obj"
+ -@erase "$(INTDIR)\sdbm_pair.obj"
+ -@erase "$(INTDIR)\uuid.obj"
+ -@erase "$(INTDIR)\xlate.obj"
+ -@erase "$(OUTDIR)\aprutil-1.lib"
+ -@erase ".\include\apr_ldap.h"
+ -@erase ".\include\apu.h"
+ -@erase ".\include\apu_want.h"
+ -@erase ".\include\private\apu_config.h"
+ -@erase ".\include\private\apu_select_dbm.h"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP=cl.exe
+CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "./include" /I "../apr/include" /I "./include/private" /I "../apr-iconv/include" /I "./dbm/sdbm" /I "./xml/expat/lib" $(SSLINC) /D "_DEBUG" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /D "API_DECLARE_STATIC" /D "APU_USE_SDBM" /D "HAVE_SQL_H" /D "XML_STATIC" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(OUTDIR)\aprutil-1" /FD /EHsc /c
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+RSC=rc.exe
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\aprutil.bsc"
+BSC32_SBRS= \
+
+LIB32=link.exe -lib
+LIB32_FLAGS=/nologo /out:"$(OUTDIR)\aprutil-1.lib"
+LIB32_OBJS= \
+ "$(INTDIR)\apr_brigade.obj" \
+ "$(INTDIR)\apr_buckets.obj" \
+ "$(INTDIR)\apr_buckets_alloc.obj" \
+ "$(INTDIR)\apr_buckets_eos.obj" \
+ "$(INTDIR)\apr_buckets_file.obj" \
+ "$(INTDIR)\apr_buckets_flush.obj" \
+ "$(INTDIR)\apr_buckets_heap.obj" \
+ "$(INTDIR)\apr_buckets_mmap.obj" \
+ "$(INTDIR)\apr_buckets_pipe.obj" \
+ "$(INTDIR)\apr_buckets_pool.obj" \
+ "$(INTDIR)\apr_buckets_refcount.obj" \
+ "$(INTDIR)\apr_buckets_simple.obj" \
+ "$(INTDIR)\apr_buckets_socket.obj" \
+ "$(INTDIR)\apr_crypto.obj" \
+ "$(INTDIR)\apr_md4.obj" \
+ "$(INTDIR)\apr_md5.obj" \
+ "$(INTDIR)\apr_passwd.obj" \
+ "$(INTDIR)\apr_sha1.obj" \
+ "$(INTDIR)\apr_siphash.obj" \
+ "$(INTDIR)\crypt_blowfish.obj" \
+ "$(INTDIR)\getuuid.obj" \
+ "$(INTDIR)\uuid.obj" \
+ "$(INTDIR)\apr_dbd.obj" \
+ "$(INTDIR)\apr_dbd_mysql.obj" \
+ "$(INTDIR)\apr_dbd_odbc.obj" \
+ "$(INTDIR)\apr_dbd_oracle.obj" \
+ "$(INTDIR)\apr_dbd_pgsql.obj" \
+ "$(INTDIR)\apr_dbd_sqlite2.obj" \
+ "$(INTDIR)\apr_dbd_sqlite3.obj" \
+ "$(INTDIR)\apr_dbm.obj" \
+ "$(INTDIR)\apr_dbm_berkeleydb.obj" \
+ "$(INTDIR)\apr_dbm_gdbm.obj" \
+ "$(INTDIR)\apr_dbm_sdbm.obj" \
+ "$(INTDIR)\apr_base64.obj" \
+ "$(INTDIR)\apr_hooks.obj" \
+ "$(INTDIR)\apr_ldap_init.obj" \
+ "$(INTDIR)\apr_ldap_option.obj" \
+ "$(INTDIR)\apr_ldap_rebind.obj" \
+ "$(INTDIR)\apr_ldap_stub.obj" \
+ "$(INTDIR)\apr_ldap_url.obj" \
+ "$(INTDIR)\apr_memcache.obj" \
+ "$(INTDIR)\apr_date.obj" \
+ "$(INTDIR)\apu_dso.obj" \
+ "$(INTDIR)\apr_queue.obj" \
+ "$(INTDIR)\apr_redis.obj" \
+ "$(INTDIR)\apr_reslist.obj" \
+ "$(INTDIR)\apr_rmm.obj" \
+ "$(INTDIR)\apr_thread_pool.obj" \
+ "$(INTDIR)\apu_version.obj" \
+ "$(INTDIR)\sdbm.obj" \
+ "$(INTDIR)\sdbm_hash.obj" \
+ "$(INTDIR)\sdbm_lock.obj" \
+ "$(INTDIR)\sdbm_pair.obj" \
+ "$(INTDIR)\apr_strmatch.obj" \
+ "$(INTDIR)\apr_uri.obj" \
+ "$(INTDIR)\xlate.obj" \
+ "$(INTDIR)\apr_xml.obj" \
+ "..\apr-iconv\x64\LibD\apriconv-1.lib"
+
+"$(OUTDIR)\aprutil-1.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
+ $(LIB32) @<<
+ $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
+<<
+
+!ENDIF
+
+
+!IF "$(NO_EXTERNAL_DEPS)" != "1"
+!IF EXISTS("aprutil.dep")
+!INCLUDE "aprutil.dep"
+!ELSE
+!MESSAGE Warning: cannot find "aprutil.dep"
+!ENDIF
+!ENDIF
+
+
+!IF "$(CFG)" == "aprutil - Win32 Release" || "$(CFG)" == "aprutil - Win32 Debug" || "$(CFG)" == "aprutil - x64 Release" || "$(CFG)" == "aprutil - x64 Debug"
+SOURCE=.\buckets\apr_brigade.c
+
+"$(INTDIR)\apr_brigade.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\buckets\apr_buckets.c
+
+"$(INTDIR)\apr_buckets.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\buckets\apr_buckets_alloc.c
+
+"$(INTDIR)\apr_buckets_alloc.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\buckets\apr_buckets_eos.c
+
+"$(INTDIR)\apr_buckets_eos.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\buckets\apr_buckets_file.c
+
+"$(INTDIR)\apr_buckets_file.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\buckets\apr_buckets_flush.c
+
+"$(INTDIR)\apr_buckets_flush.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\buckets\apr_buckets_heap.c
+
+"$(INTDIR)\apr_buckets_heap.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\buckets\apr_buckets_mmap.c
+
+"$(INTDIR)\apr_buckets_mmap.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\buckets\apr_buckets_pipe.c
+
+"$(INTDIR)\apr_buckets_pipe.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\buckets\apr_buckets_pool.c
+
+"$(INTDIR)\apr_buckets_pool.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\buckets\apr_buckets_refcount.c
+
+"$(INTDIR)\apr_buckets_refcount.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\buckets\apr_buckets_simple.c
+
+"$(INTDIR)\apr_buckets_simple.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\buckets\apr_buckets_socket.c
+
+"$(INTDIR)\apr_buckets_socket.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\crypto\apr_crypto.c
+
+"$(INTDIR)\apr_crypto.obj" : $(SOURCE) "$(INTDIR)" ".\include\private\apu_config.h" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\crypto\apr_md4.c
+
+"$(INTDIR)\apr_md4.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\crypto\apr_md5.c
+
+"$(INTDIR)\apr_md5.obj" : $(SOURCE) "$(INTDIR)" ".\include\private\apu_config.h" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\crypto\apr_passwd.c
+
+"$(INTDIR)\apr_passwd.obj" : $(SOURCE) "$(INTDIR)" ".\include\private\apu_config.h" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\crypto\apr_sha1.c
+
+"$(INTDIR)\apr_sha1.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\crypto\apr_siphash.c
+
+"$(INTDIR)\apr_siphash.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\crypto\crypt_blowfish.c
+
+"$(INTDIR)\crypt_blowfish.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\crypto\getuuid.c
+
+"$(INTDIR)\getuuid.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\crypto\uuid.c
+
+"$(INTDIR)\uuid.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\dbd\apr_dbd.c
+
+"$(INTDIR)\apr_dbd.obj" : $(SOURCE) "$(INTDIR)" ".\include\private\apu_config.h" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\dbd\apr_dbd_mysql.c
+
+"$(INTDIR)\apr_dbd_mysql.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" ".\include\private\apu_config.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\dbd\apr_dbd_odbc.c
+
+"$(INTDIR)\apr_dbd_odbc.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" ".\include\private\apu_config.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\dbd\apr_dbd_oracle.c
+
+"$(INTDIR)\apr_dbd_oracle.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\dbd\apr_dbd_pgsql.c
+
+"$(INTDIR)\apr_dbd_pgsql.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" ".\include\private\apu_config.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\dbd\apr_dbd_sqlite2.c
+
+"$(INTDIR)\apr_dbd_sqlite2.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\dbd\apr_dbd_sqlite3.c
+
+"$(INTDIR)\apr_dbd_sqlite3.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\dbm\apr_dbm.c
+
+"$(INTDIR)\apr_dbm.obj" : $(SOURCE) "$(INTDIR)" ".\include\private\apu_config.h" ".\include\apu.h" ".\include\private\apu_select_dbm.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\dbm\apr_dbm_berkeleydb.c
+
+"$(INTDIR)\apr_dbm_berkeleydb.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu_want.h" ".\include\private\apu_config.h" ".\include\apu.h" ".\include\private\apu_select_dbm.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\dbm\apr_dbm_gdbm.c
+
+"$(INTDIR)\apr_dbm_gdbm.obj" : $(SOURCE) "$(INTDIR)" ".\include\private\apu_config.h" ".\include\apu.h" ".\include\private\apu_select_dbm.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\dbm\apr_dbm_sdbm.c
+
+"$(INTDIR)\apr_dbm_sdbm.obj" : $(SOURCE) "$(INTDIR)" ".\include\private\apu_config.h" ".\include\apu.h" ".\include\private\apu_select_dbm.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\encoding\apr_base64.c
+
+"$(INTDIR)\apr_base64.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\hooks\apr_hooks.c
+
+"$(INTDIR)\apr_hooks.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\ldap\apr_ldap_init.c
+
+"$(INTDIR)\apr_ldap_init.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" ".\include\private\apu_config.h" ".\include\apr_ldap.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\ldap\apr_ldap_option.c
+
+"$(INTDIR)\apr_ldap_option.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" ".\include\private\apu_config.h" ".\include\apr_ldap.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\ldap\apr_ldap_rebind.c
+
+"$(INTDIR)\apr_ldap_rebind.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" ".\include\private\apu_config.h" ".\include\apr_ldap.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\ldap\apr_ldap_stub.c
+
+"$(INTDIR)\apr_ldap_stub.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" ".\include\private\apu_config.h" ".\include\apr_ldap.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\ldap\apr_ldap_url.c
+
+"$(INTDIR)\apr_ldap_url.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" ".\include\apr_ldap.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\memcache\apr_memcache.c
+
+"$(INTDIR)\apr_memcache.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\misc\apr_date.c
+
+"$(INTDIR)\apr_date.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\misc\apr_queue.c
+
+"$(INTDIR)\apr_queue.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\misc\apr_reslist.c
+
+"$(INTDIR)\apr_reslist.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\misc\apr_rmm.c
+
+"$(INTDIR)\apr_rmm.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\misc\apr_thread_pool.c
+
+"$(INTDIR)\apr_thread_pool.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\misc\apu_dso.c
+
+"$(INTDIR)\apu_dso.obj" : $(SOURCE) "$(INTDIR)" ".\include\private\apu_config.h" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\misc\apu_version.c
+
+"$(INTDIR)\apu_version.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\redis\apr_redis.c
+
+"$(INTDIR)\apr_redis.obj" : $(SOURCE) "$(INTDIR)" ".\include\apr_redis.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\dbm\sdbm\sdbm.c
+
+"$(INTDIR)\sdbm.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\dbm\sdbm\sdbm_hash.c
+
+"$(INTDIR)\sdbm_hash.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\dbm\sdbm\sdbm_lock.c
+
+"$(INTDIR)\sdbm_lock.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\dbm\sdbm\sdbm_pair.c
+
+"$(INTDIR)\sdbm_pair.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\strmatch\apr_strmatch.c
+
+"$(INTDIR)\apr_strmatch.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\uri\apr_uri.c
+
+"$(INTDIR)\apr_uri.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\xlate\xlate.c
+
+"$(INTDIR)\xlate.obj" : $(SOURCE) "$(INTDIR)" ".\include\apu.h" ".\include\private\apu_config.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\xml\apr_xml.c
+
+"$(INTDIR)\apr_xml.obj" : $(SOURCE) "$(INTDIR)" ".\include\private\apu_config.h" ".\include\apu.h"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=.\include\apr_ldap.hw
+
+!IF "$(CFG)" == "aprutil - Win32 Release"
+
+InputPath=.\include\apr_ldap.hw
+
+".\include\apr_ldap.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ <<tempfile.bat
+ @echo off
+ type .\include\apr_ldap.hw > .\include\apr_ldap.h
+<<
+
+
+!ELSEIF "$(CFG)" == "aprutil - Win32 Debug"
+
+InputPath=.\include\apr_ldap.hw
+
+".\include\apr_ldap.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ <<tempfile.bat
+ @echo off
+ type .\include\apr_ldap.hw > .\include\apr_ldap.h
+<<
+
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Release"
+
+InputPath=.\include\apr_ldap.hw
+
+".\include\apr_ldap.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ <<tempfile.bat
+ @echo off
+ type .\include\apr_ldap.hw > .\include\apr_ldap.h
+<<
+
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Debug"
+
+InputPath=.\include\apr_ldap.hw
+
+".\include\apr_ldap.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ <<tempfile.bat
+ @echo off
+ type .\include\apr_ldap.hw > .\include\apr_ldap.h
+<<
+
+
+!ENDIF
+
+SOURCE=.\include\apu.hw
+
+!IF "$(CFG)" == "aprutil - Win32 Release"
+
+InputPath=.\include\apu.hw
+
+".\include\apu.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ <<tempfile.bat
+ @echo off
+ type .\include\apu.hw > .\include\apu.h
+<<
+
+
+!ELSEIF "$(CFG)" == "aprutil - Win32 Debug"
+
+InputPath=.\include\apu.hw
+
+".\include\apu.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ <<tempfile.bat
+ @echo off
+ type .\include\apu.hw > .\include\apu.h
+<<
+
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Release"
+
+InputPath=.\include\apu.hw
+
+".\include\apu.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ <<tempfile.bat
+ @echo off
+ type .\include\apu.hw > .\include\apu.h
+<<
+
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Debug"
+
+InputPath=.\include\apu.hw
+
+".\include\apu.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ <<tempfile.bat
+ @echo off
+ type .\include\apu.hw > .\include\apu.h
+<<
+
+
+!ENDIF
+
+SOURCE=.\include\private\apu_config.hw
+
+!IF "$(CFG)" == "aprutil - Win32 Release"
+
+InputPath=.\include\private\apu_config.hw
+
+".\include\private\apu_config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ <<tempfile.bat
+ @echo off
+ type .\include\private\apu_config.hw > .\include\private\apu_config.h
+<<
+
+
+!ELSEIF "$(CFG)" == "aprutil - Win32 Debug"
+
+InputPath=.\include\private\apu_config.hw
+
+".\include\private\apu_config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ <<tempfile.bat
+ @echo off
+ type .\include\private\apu_config.hw > .\include\private\apu_config.h
+<<
+
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Release"
+
+InputPath=.\include\private\apu_config.hw
+
+".\include\private\apu_config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ <<tempfile.bat
+ @echo off
+ type .\include\private\apu_config.hw > .\include\private\apu_config.h
+<<
+
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Debug"
+
+InputPath=.\include\private\apu_config.hw
+
+".\include\private\apu_config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ <<tempfile.bat
+ @echo off
+ type .\include\private\apu_config.hw > .\include\private\apu_config.h
+<<
+
+
+!ENDIF
+
+SOURCE=.\include\private\apu_select_dbm.hw
+
+!IF "$(CFG)" == "aprutil - Win32 Release"
+
+InputPath=.\include\private\apu_select_dbm.hw
+
+".\include\private\apu_select_dbm.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ <<tempfile.bat
+ @echo off
+ type .\include\private\apu_select_dbm.hw > .\include\private\apu_select_dbm.h
+<<
+
+
+!ELSEIF "$(CFG)" == "aprutil - Win32 Debug"
+
+InputPath=.\include\private\apu_select_dbm.hw
+
+".\include\private\apu_select_dbm.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ <<tempfile.bat
+ @echo off
+ type .\include\private\apu_select_dbm.hw > .\include\private\apu_select_dbm.h
+<<
+
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Release"
+
+InputPath=.\include\private\apu_select_dbm.hw
+
+".\include\private\apu_select_dbm.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ <<tempfile.bat
+ @echo off
+ type .\include\private\apu_select_dbm.hw > .\include\private\apu_select_dbm.h
+<<
+
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Debug"
+
+InputPath=.\include\private\apu_select_dbm.hw
+
+".\include\private\apu_select_dbm.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ <<tempfile.bat
+ @echo off
+ type .\include\private\apu_select_dbm.hw > .\include\private\apu_select_dbm.h
+<<
+
+
+!ENDIF
+
+SOURCE=.\include\apu_want.hw
+
+!IF "$(CFG)" == "aprutil - Win32 Release"
+
+InputPath=.\include\apu_want.hw
+
+".\include\apu_want.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ <<tempfile.bat
+ @echo off
+ type .\include\apu_want.hw > .\include\apu_want.h
+<<
+
+
+!ELSEIF "$(CFG)" == "aprutil - Win32 Debug"
+
+InputPath=.\include\apu_want.hw
+
+".\include\apu_want.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ <<tempfile.bat
+ @echo off
+ type .\include\apu_want.hw > .\include\apu_want.h
+<<
+
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Release"
+
+InputPath=.\include\apu_want.hw
+
+".\include\apu_want.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ <<tempfile.bat
+ @echo off
+ type .\include\apu_want.hw > .\include\apu_want.h
+<<
+
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Debug"
+
+InputPath=.\include\apu_want.hw
+
+".\include\apu_want.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ <<tempfile.bat
+ @echo off
+ type .\include\apu_want.hw > .\include\apu_want.h
+<<
+
+
+!ENDIF
+
+!IF "$(CFG)" == "aprutil - Win32 Release"
+
+"apriconv - Win32 Release" :
+ cd ".\..\apr-iconv"
+ $(MAKE) /$(MAKEFLAGS) /F ".\apriconv.mak" CFG="apriconv - Win32 Release"
+ cd "..\apr-util"
+
+"apriconv - Win32 ReleaseCLEAN" :
+ cd ".\..\apr-iconv"
+ $(MAKE) /$(MAKEFLAGS) /F ".\apriconv.mak" CFG="apriconv - Win32 Release" RECURSE=1 CLEAN
+ cd "..\apr-util"
+
+!ELSEIF "$(CFG)" == "aprutil - Win32 Debug"
+
+"apriconv - Win32 Debug" :
+ cd ".\..\apr-iconv"
+ $(MAKE) /$(MAKEFLAGS) /F ".\apriconv.mak" CFG="apriconv - Win32 Debug"
+ cd "..\apr-util"
+
+"apriconv - Win32 DebugCLEAN" :
+ cd ".\..\apr-iconv"
+ $(MAKE) /$(MAKEFLAGS) /F ".\apriconv.mak" CFG="apriconv - Win32 Debug" RECURSE=1 CLEAN
+ cd "..\apr-util"
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Release"
+
+"apriconv - x64 Release" :
+ cd ".\..\apr-iconv"
+ $(MAKE) /$(MAKEFLAGS) /F ".\apriconv.mak" CFG="apriconv - x64 Release"
+ cd "..\apr-util"
+
+"apriconv - x64 ReleaseCLEAN" :
+ cd ".\..\apr-iconv"
+ $(MAKE) /$(MAKEFLAGS) /F ".\apriconv.mak" CFG="apriconv - x64 Release" RECURSE=1 CLEAN
+ cd "..\apr-util"
+
+!ELSEIF "$(CFG)" == "aprutil - x64 Debug"
+
+"apriconv - x64 Debug" :
+ cd ".\..\apr-iconv"
+ $(MAKE) /$(MAKEFLAGS) /F ".\apriconv.mak" CFG="apriconv - x64 Debug"
+ cd "..\apr-util"
+
+"apriconv - x64 DebugCLEAN" :
+ cd ".\..\apr-iconv"
+ $(MAKE) /$(MAKEFLAGS) /F ".\apriconv.mak" CFG="apriconv - x64 Debug" RECURSE=1 CLEAN
+ cd "..\apr-util"
+
+!ENDIF
+
+
+!ENDIF
+
diff --git a/apu-config.in b/apu-config.in
new file mode 100644
index 0000000..82109e5
--- /dev/null
+++ b/apu-config.in
@@ -0,0 +1,221 @@
+#!/bin/sh
+# 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-util script designed to allow easy command line access to APR-util
+# configuration parameters.
+
+APRUTIL_MAJOR_VERSION="@APRUTIL_MAJOR_VERSION@"
+APRUTIL_DOTTED_VERSION="@APRUTIL_DOTTED_VERSION@"
+
+prefix="@prefix@"
+exec_prefix="@exec_prefix@"
+bindir="@bindir@"
+libdir="@libdir@"
+includedir="@includedir@"
+
+LIBS="@APRUTIL_EXPORT_LIBS@"
+INCLUDES="@APRUTIL_INCLUDES@"
+LDFLAGS="@APRUTIL_LDFLAGS@"
+LDAP_LIBS="@LDADD_ldap@"
+DBM_LIBS="@LDADD_dbm_db@ @LDADD_dbm_gdbm@ @LDADD_dbm_ndbm@"
+
+APRUTIL_LIBNAME="@APRUTIL_LIBNAME@"
+
+APU_SOURCE_DIR="@abs_srcdir@"
+APU_BUILD_DIR="@abs_builddir@"
+APR_XML_EXPAT_OLD="@APR_XML_EXPAT_OLD@"
+APU_DB_VERSION="@apu_db_version@"
+
+# NOTE: the following line is modified during 'make install': alter with care!
+location=@APU_CONFIG_LOCATION@
+
+show_usage()
+{
+ cat << EOF
+Usage: apu-$APRUTIL_MAJOR_VERSION-config [OPTION]
+
+Known values for OPTION are:
+ --prefix[=DIR] change prefix to DIR
+ --bindir print location where binaries are installed
+ --includes print include information
+ --includedir print location where headers are installed
+ --ldflags print linker flags
+ --libs print library information
+ --avoid-ldap do not include ldap library information with --libs
+ --ldap-libs print library information to link with ldap
+ --avoid-dbm do not include DBM library information with --libs
+ --dbm-libs print additional library information to link with DBM
+ --srcdir print APR-util source directory
+ --link-ld print link switch(es) for linking to APR-util
+ --link-libtool print the libtool inputs for linking to APR-util
+ --apu-la-file print the path to the .la file, if available
+ --old-expat indicate if APR-util was built against an old expat
+ --db-version print the DB version
+ --version print APR-util's version as a dotted triple
+ --help print this help
+
+When linking with libtool, an application should do something like:
+ APU_LIBS="\`apu-$APRUTIL_MAJOR_VERSION-config --link-libtool --libs\`"
+or when linking directly:
+ APU_LIBS="\`apu-$APRUTIL_MAJOR_VERSION-config --link-ld --libs\`"
+
+An application should use the results of --includes, and --ldflags in
+their build process.
+EOF
+}
+
+if test $# -eq 0; then
+ show_usage
+ exit 1
+fi
+
+if test "$location" = "installed"; then
+ LA_FILE="$libdir/lib${APRUTIL_LIBNAME}.la"
+else
+ LA_FILE="$APU_BUILD_DIR/lib${APRUTIL_LIBNAME}.la"
+fi
+
+flags=""
+
+while test $# -gt 0; do
+ # Normalize the prefix.
+ case "$1" in
+ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ case "$1" in
+ # It is possible for the user to override our prefix.
+ --prefix=*)
+ prefix=$optarg
+ ;;
+ --prefix)
+ echo $prefix
+ exit 0
+ ;;
+ --bindir)
+ echo $bindir
+ exit 0
+ ;;
+ --avoid-ldap)
+ LDAP_LIBS=""
+ ;;
+ --avoid-dbm)
+ DBM_LIBS=""
+ ;;
+ --libs)
+ flags="$flags $LDAP_LIBS $DBM_LIBS $LIBS"
+ ;;
+ --ldap-libs)
+ flags="$flags $LDAP_LIBS"
+ ;;
+ --dbm-libs)
+ flags="$flags $DBM_LIBS"
+ ;;
+ --includedir)
+ if test "$location" = "installed"; then
+ flags="$includedir"
+ elif test "$location" = "source"; then
+ flags="$APU_SOURCE_DIR/include"
+ else
+ # this is for VPATH builds
+ flags="$APU_BUILD_DIR/include $APU_SOURCE_DIR/include"
+ fi
+ echo $flags
+ exit 0
+ ;;
+ --includes)
+ if test "$location" = "installed"; then
+ flags="$flags -I$includedir $INCLUDES"
+ elif test "$location" = "source"; then
+ flags="$flags -I$APU_SOURCE_DIR/include $INCLUDES"
+ else
+ # this is for VPATH builds
+ flags="$flags -I$APU_BUILD_DIR/include -I$APU_SOURCE_DIR/include $INCLUDES"
+ fi
+ ;;
+ --ldflags)
+ flags="$flags $LDFLAGS"
+ ;;
+ --srcdir)
+ echo $APU_SOURCE_DIR
+ exit 0
+ ;;
+ --version)
+ echo $APRUTIL_DOTTED_VERSION
+ exit 0
+ ;;
+ --link-ld)
+ if test "$location" = "installed"; then
+ ### avoid using -L if libdir is a "standard" location like /usr/lib
+ flags="$flags -L$libdir -l$APRUTIL_LIBNAME"
+ else
+ flags="$flags -L$APU_BUILD_DIR -l$APRUTIL_LIBNAME"
+ fi
+ ;;
+ --link-libtool)
+ # If the LA_FILE exists where we think it should be, use it. If we're
+ # installed and the LA_FILE does not exist, assume to use -L/-l
+ # (the LA_FILE may not have been installed). If we're building ourselves,
+ # we'll assume that at some point the .la file be created.
+ if test -f "$LA_FILE"; then
+ flags="$flags $LA_FILE"
+ elif test "$location" = "installed"; then
+ ### avoid using -L if libdir is a "standard" location like /usr/lib
+ # Since the user is specifying they are linking with libtool, we
+ # *know* that -R will be recognized by libtool.
+ flags="$flags -L$libdir -R$libdir -l$APRUTIL_LIBNAME"
+ else
+ flags="$flags $LA_FILE"
+ fi
+ ;;
+ --apu-la-file)
+ if test -f "$LA_FILE"; then
+ flags="$flags $LA_FILE"
+ fi
+ ;;
+ --old-expat)
+ if test ! -n "$APR_XML_EXPAT_OLD"; then
+ echo "no"
+ else
+ echo "$APR_XML_EXPAT_OLD"
+ fi
+ exit 0
+ ;;
+ --db-version)
+ echo $APU_DB_VERSION
+ exit 0
+ ;;
+ --help)
+ show_usage
+ exit 0
+ ;;
+ *)
+ show_usage
+ exit 1
+ ;;
+ esac
+
+ # Next please.
+ shift
+done
+
+if test -n "$flags"; then
+ echo "$flags"
+fi
+
+exit 0
diff --git a/buckets/apr_brigade.c b/buckets/apr_brigade.c
new file mode 100644
index 0000000..1f2ba17
--- /dev/null
+++ b/buckets/apr_brigade.c
@@ -0,0 +1,736 @@
+/* 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.
+ */
+
+#include "apr.h"
+#include "apr_lib.h"
+#include "apr_strings.h"
+#include "apr_pools.h"
+#include "apr_tables.h"
+#include "apr_buckets.h"
+#include "apr_errno.h"
+#define APR_WANT_MEMFUNC
+#define APR_WANT_STRFUNC
+#include "apr_want.h"
+
+#if APR_HAVE_SYS_UIO_H
+#include <sys/uio.h>
+#endif
+
+static apr_status_t brigade_cleanup(void *data)
+{
+ return apr_brigade_cleanup(data);
+}
+
+APU_DECLARE(apr_status_t) apr_brigade_cleanup(void *data)
+{
+ apr_bucket_brigade *b = data;
+ apr_bucket *e;
+
+ while (!APR_BRIGADE_EMPTY(b)) {
+ e = APR_BRIGADE_FIRST(b);
+ apr_bucket_delete(e);
+ }
+ /* We don't need to free(bb) because it's allocated from a pool. */
+ return APR_SUCCESS;
+}
+
+APU_DECLARE(apr_status_t) apr_brigade_destroy(apr_bucket_brigade *b)
+{
+ apr_pool_cleanup_kill(b->p, b, brigade_cleanup);
+ return apr_brigade_cleanup(b);
+}
+
+APU_DECLARE(apr_bucket_brigade *) apr_brigade_create(apr_pool_t *p,
+ apr_bucket_alloc_t *list)
+{
+ apr_bucket_brigade *b;
+
+ b = apr_palloc(p, sizeof(*b));
+ b->p = p;
+ b->bucket_alloc = list;
+
+ APR_RING_INIT(&b->list, apr_bucket, link);
+
+ apr_pool_cleanup_register(b->p, b, brigade_cleanup, apr_pool_cleanup_null);
+ return b;
+}
+
+APU_DECLARE(apr_bucket_brigade *) apr_brigade_split_ex(apr_bucket_brigade *b,
+ apr_bucket *e,
+ apr_bucket_brigade *a)
+{
+ apr_bucket *f;
+
+ if (!a) {
+ a = apr_brigade_create(b->p, b->bucket_alloc);
+ }
+ else if (!APR_BRIGADE_EMPTY(a)) {
+ apr_brigade_cleanup(a);
+ }
+ /* Return an empty brigade if there is nothing left in
+ * the first brigade to split off
+ */
+ if (e != APR_BRIGADE_SENTINEL(b)) {
+ f = APR_RING_LAST(&b->list);
+ APR_RING_UNSPLICE(e, f, link);
+ APR_RING_SPLICE_HEAD(&a->list, e, f, apr_bucket, link);
+ }
+
+ APR_BRIGADE_CHECK_CONSISTENCY(a);
+ APR_BRIGADE_CHECK_CONSISTENCY(b);
+
+ return a;
+}
+
+APU_DECLARE(apr_bucket_brigade *) apr_brigade_split(apr_bucket_brigade *b,
+ apr_bucket *e)
+{
+ return apr_brigade_split_ex(b, e, NULL);
+}
+
+APU_DECLARE(apr_status_t) apr_brigade_partition(apr_bucket_brigade *b,
+ apr_off_t point,
+ apr_bucket **after_point)
+{
+ apr_bucket *e;
+ const char *s;
+ apr_size_t len;
+ apr_uint64_t point64;
+ apr_status_t rv;
+
+ if (point < 0) {
+ /* this could cause weird (not necessarily SEGV) things to happen */
+ return APR_EINVAL;
+ }
+ if (point == 0) {
+ *after_point = APR_BRIGADE_FIRST(b);
+ return APR_SUCCESS;
+ }
+
+ /*
+ * Try to reduce the following casting mess: We know that point will be
+ * larger equal 0 now and forever and thus that point (apr_off_t) and
+ * apr_size_t will fit into apr_uint64_t in any case.
+ */
+ point64 = (apr_uint64_t)point;
+
+ APR_BRIGADE_CHECK_CONSISTENCY(b);
+
+ for (e = APR_BRIGADE_FIRST(b);
+ e != APR_BRIGADE_SENTINEL(b);
+ e = APR_BUCKET_NEXT(e))
+ {
+ /* For an unknown length bucket, while 'point64' is beyond the possible
+ * size contained in apr_size_t, read and continue...
+ */
+ if ((e->length == (apr_size_t)(-1))
+ && (point64 > (apr_uint64_t)APR_SIZE_MAX)) {
+ /* point64 is too far out to simply split this bucket,
+ * we must fix this bucket's size and keep going... */
+ rv = apr_bucket_read(e, &s, &len, APR_BLOCK_READ);
+ if (rv != APR_SUCCESS) {
+ *after_point = e;
+ return rv;
+ }
+ }
+ else if ((point64 < (apr_uint64_t)e->length)
+ || (e->length == (apr_size_t)(-1))) {
+ /* We already consumed buckets where point64 is beyond
+ * our interest ( point64 > APR_SIZE_MAX ), above.
+ * Here point falls between 0 and APR_SIZE_MAX
+ * and is within this bucket, or this bucket's len
+ * is undefined, so now we are ready to split it.
+ * First try to split the bucket natively... */
+ if ((rv = apr_bucket_split(e, (apr_size_t)point64))
+ != APR_ENOTIMPL) {
+ *after_point = APR_BUCKET_NEXT(e);
+ return rv;
+ }
+
+ /* if the bucket cannot be split, we must read from it,
+ * changing its type to one that can be split */
+ rv = apr_bucket_read(e, &s, &len, APR_BLOCK_READ);
+ if (rv != APR_SUCCESS) {
+ *after_point = e;
+ return rv;
+ }
+
+ /* this assumes that len == e->length, which is okay because e
+ * might have been morphed by the apr_bucket_read() above, but
+ * if it was, the length would have been adjusted appropriately */
+ if (point64 < (apr_uint64_t)e->length) {
+ rv = apr_bucket_split(e, (apr_size_t)point64);
+ *after_point = APR_BUCKET_NEXT(e);
+ return rv;
+ }
+ }
+ if (point64 == (apr_uint64_t)e->length) {
+ *after_point = APR_BUCKET_NEXT(e);
+ return APR_SUCCESS;
+ }
+ point64 -= (apr_uint64_t)e->length;
+ }
+ *after_point = APR_BRIGADE_SENTINEL(b);
+ return APR_INCOMPLETE;
+}
+
+APU_DECLARE(apr_status_t) apr_brigade_length(apr_bucket_brigade *bb,
+ int read_all, apr_off_t *length)
+{
+ apr_off_t total = 0;
+ apr_bucket *bkt;
+ apr_status_t status = APR_SUCCESS;
+
+ for (bkt = APR_BRIGADE_FIRST(bb);
+ bkt != APR_BRIGADE_SENTINEL(bb);
+ bkt = APR_BUCKET_NEXT(bkt))
+ {
+ if (bkt->length == (apr_size_t)(-1)) {
+ const char *ignore;
+ apr_size_t len;
+
+ if (!read_all) {
+ total = -1;
+ break;
+ }
+
+ if ((status = apr_bucket_read(bkt, &ignore, &len,
+ APR_BLOCK_READ)) != APR_SUCCESS) {
+ break;
+ }
+ }
+
+ total += bkt->length;
+ }
+
+ *length = total;
+ return status;
+}
+
+APU_DECLARE(apr_status_t) apr_brigade_flatten(apr_bucket_brigade *bb,
+ char *c, apr_size_t *len)
+{
+ apr_size_t actual = 0;
+ apr_bucket *b;
+
+ for (b = APR_BRIGADE_FIRST(bb);
+ b != APR_BRIGADE_SENTINEL(bb);
+ b = APR_BUCKET_NEXT(b))
+ {
+ const char *str;
+ apr_size_t str_len;
+ apr_status_t status;
+
+ status = apr_bucket_read(b, &str, &str_len, APR_BLOCK_READ);
+ if (status != APR_SUCCESS) {
+ return status;
+ }
+
+ /* If we would overflow. */
+ if (str_len + actual > *len) {
+ str_len = *len - actual;
+ }
+
+ /* XXX: It appears that overflow of the final bucket
+ * is DISCARDED without any warning to the caller.
+ *
+ * No, we only copy the data up to their requested size. -- jre
+ */
+ memcpy(c, str, str_len);
+
+ c += str_len;
+ actual += str_len;
+
+ /* This could probably be actual == *len, but be safe from stray
+ * photons. */
+ if (actual >= *len) {
+ break;
+ }
+ }
+
+ *len = actual;
+ return APR_SUCCESS;
+}
+
+APU_DECLARE(apr_status_t) apr_brigade_pflatten(apr_bucket_brigade *bb,
+ char **c,
+ apr_size_t *len,
+ apr_pool_t *pool)
+{
+ apr_off_t actual;
+ apr_size_t total;
+ apr_status_t rv;
+
+ apr_brigade_length(bb, 1, &actual);
+
+ /* XXX: This is dangerous beyond belief. At least in the
+ * apr_brigade_flatten case, the user explicitly stated their
+ * buffer length - so we don't up and palloc 4GB for a single
+ * file bucket. This API must grow a useful max boundry,
+ * either compiled-in or preset via the *len value.
+ *
+ * Shouldn't both fn's grow an additional return value for
+ * the case that the brigade couldn't be flattened into the
+ * provided or allocated buffer (such as APR_EMOREDATA?)
+ * Not a failure, simply an advisory result.
+ */
+ total = (apr_size_t)actual;
+
+ *c = apr_palloc(pool, total);
+
+ rv = apr_brigade_flatten(bb, *c, &total);
+
+ if (rv != APR_SUCCESS) {
+ return rv;
+ }
+
+ *len = total;
+ return APR_SUCCESS;
+}
+
+APU_DECLARE(apr_status_t) apr_brigade_split_line(apr_bucket_brigade *bbOut,
+ apr_bucket_brigade *bbIn,
+ apr_read_type_e block,
+ apr_off_t maxbytes)
+{
+ apr_off_t readbytes = 0;
+
+ while (!APR_BRIGADE_EMPTY(bbIn)) {
+ const char *pos;
+ const char *str;
+ apr_size_t len;
+ apr_status_t rv;
+ apr_bucket *e;
+
+ e = APR_BRIGADE_FIRST(bbIn);
+ rv = apr_bucket_read(e, &str, &len, block);
+
+ if (rv != APR_SUCCESS) {
+ return rv;
+ }
+
+ pos = memchr(str, APR_ASCII_LF, len);
+ /* We found a match. */
+ if (pos != NULL) {
+ apr_bucket_split(e, pos - str + 1);
+ APR_BUCKET_REMOVE(e);
+ APR_BRIGADE_INSERT_TAIL(bbOut, e);
+ return APR_SUCCESS;
+ }
+ APR_BUCKET_REMOVE(e);
+ if (APR_BUCKET_IS_METADATA(e) || len > APR_BUCKET_BUFF_SIZE/4) {
+ APR_BRIGADE_INSERT_TAIL(bbOut, e);
+ }
+ else {
+ if (len > 0) {
+ rv = apr_brigade_write(bbOut, NULL, NULL, str, len);
+ if (rv != APR_SUCCESS) {
+ return rv;
+ }
+ }
+ apr_bucket_destroy(e);
+ }
+ readbytes += len;
+ /* We didn't find an APR_ASCII_LF within the maximum line length. */
+ if (readbytes >= maxbytes) {
+ break;
+ }
+ }
+
+ return APR_SUCCESS;
+}
+
+
+APU_DECLARE(apr_status_t) apr_brigade_to_iovec(apr_bucket_brigade *b,
+ struct iovec *vec, int *nvec)
+{
+ int left = *nvec;
+ apr_bucket *e;
+ struct iovec *orig;
+ apr_size_t iov_len;
+ const char *iov_base;
+ apr_status_t rv;
+
+ orig = vec;
+
+ for (e = APR_BRIGADE_FIRST(b);
+ e != APR_BRIGADE_SENTINEL(b);
+ e = APR_BUCKET_NEXT(e))
+ {
+ if (left-- == 0)
+ break;
+
+ rv = apr_bucket_read(e, &iov_base, &iov_len, APR_NONBLOCK_READ);
+ if (rv != APR_SUCCESS)
+ return rv;
+ /* Set indirectly since types differ: */
+ vec->iov_len = iov_len;
+ vec->iov_base = (void *)iov_base;
+ ++vec;
+ }
+
+ *nvec = (int)(vec - orig);
+ return APR_SUCCESS;
+}
+
+APU_DECLARE(apr_status_t) apr_brigade_vputstrs(apr_bucket_brigade *b,
+ apr_brigade_flush flush,
+ void *ctx,
+ va_list va)
+{
+#define MAX_VECS 8
+ struct iovec vec[MAX_VECS];
+ apr_size_t i = 0;
+
+ for (;;) {
+ char *str = va_arg(va, char *);
+ apr_status_t rv;
+
+ if (str == NULL)
+ break;
+
+ vec[i].iov_base = str;
+ vec[i].iov_len = strlen(str);
+ i++;
+
+ if (i == MAX_VECS) {
+ rv = apr_brigade_writev(b, flush, ctx, vec, i);
+ if (rv != APR_SUCCESS)
+ return rv;
+ i = 0;
+ }
+ }
+ if (i != 0)
+ return apr_brigade_writev(b, flush, ctx, vec, i);
+
+ return APR_SUCCESS;
+}
+
+APU_DECLARE(apr_status_t) apr_brigade_putc(apr_bucket_brigade *b,
+ apr_brigade_flush flush, void *ctx,
+ const char c)
+{
+ return apr_brigade_write(b, flush, ctx, &c, 1);
+}
+
+APU_DECLARE(apr_status_t) apr_brigade_write(apr_bucket_brigade *b,
+ apr_brigade_flush flush,
+ void *ctx,
+ const char *str, apr_size_t nbyte)
+{
+ apr_bucket *e = APR_BRIGADE_LAST(b);
+ apr_size_t remaining = APR_BUCKET_BUFF_SIZE;
+ char *buf = NULL;
+
+ /*
+ * If the last bucket is a heap bucket and its buffer is not shared with
+ * another bucket, we may write into that bucket.
+ */
+ if (!APR_BRIGADE_EMPTY(b) && APR_BUCKET_IS_HEAP(e)
+ && ((apr_bucket_heap *)(e->data))->refcount.refcount == 1) {
+ apr_bucket_heap *h = e->data;
+
+ /* HEAP bucket start offsets are always in-memory, safe to cast */
+ remaining = h->alloc_len - (e->length + (apr_size_t)e->start);
+ buf = h->base + e->start + e->length;
+ }
+
+ if (nbyte > remaining) {
+ /* either a buffer bucket exists but is full,
+ * or no buffer bucket exists and the data is too big
+ * to buffer. In either case, we should flush. */
+ if (flush) {
+ e = apr_bucket_transient_create(str, nbyte, b->bucket_alloc);
+ APR_BRIGADE_INSERT_TAIL(b, e);
+ return flush(b, ctx);
+ }
+ else {
+ e = apr_bucket_heap_create(str, nbyte, NULL, b->bucket_alloc);
+ APR_BRIGADE_INSERT_TAIL(b, e);
+ return APR_SUCCESS;
+ }
+ }
+ else if (!buf) {
+ /* we don't have a buffer, but the data is small enough
+ * that we don't mind making a new buffer */
+ buf = apr_bucket_alloc(APR_BUCKET_BUFF_SIZE, b->bucket_alloc);
+ e = apr_bucket_heap_create(buf, APR_BUCKET_BUFF_SIZE,
+ apr_bucket_free, b->bucket_alloc);
+ APR_BRIGADE_INSERT_TAIL(b, e);
+ e->length = 0; /* We are writing into the brigade, and
+ * allocating more memory than we need. This
+ * ensures that the bucket thinks it is empty just
+ * after we create it. We'll fix the length
+ * once we put data in it below.
+ */
+ }
+
+ /* there is a sufficiently big buffer bucket available now */
+ memcpy(buf, str, nbyte);
+ e->length += nbyte;
+
+ return APR_SUCCESS;
+}
+
+APU_DECLARE(apr_status_t) apr_brigade_writev(apr_bucket_brigade *b,
+ apr_brigade_flush flush,
+ void *ctx,
+ const struct iovec *vec,
+ apr_size_t nvec)
+{
+ apr_bucket *e;
+ apr_size_t total_len;
+ apr_size_t i;
+ char *buf;
+
+ /* Compute the total length of the data to be written.
+ */
+ total_len = 0;
+ for (i = 0; i < nvec; i++) {
+ total_len += vec[i].iov_len;
+ }
+
+ /* If the data to be written is very large, try to convert
+ * the iovec to transient buckets rather than copying.
+ */
+ if (total_len > APR_BUCKET_BUFF_SIZE) {
+ if (flush) {
+ for (i = 0; i < nvec; i++) {
+ e = apr_bucket_transient_create(vec[i].iov_base,
+ vec[i].iov_len,
+ b->bucket_alloc);
+ APR_BRIGADE_INSERT_TAIL(b, e);
+ }
+ return flush(b, ctx);
+ }
+ else {
+ for (i = 0; i < nvec; i++) {
+ e = apr_bucket_heap_create((const char *) vec[i].iov_base,
+ vec[i].iov_len, NULL,
+ b->bucket_alloc);
+ APR_BRIGADE_INSERT_TAIL(b, e);
+ }
+ return APR_SUCCESS;
+ }
+ }
+
+ i = 0;
+
+ /* If there is a heap bucket at the end of the brigade
+ * already, and its refcount is 1, copy into the existing bucket.
+ */
+ e = APR_BRIGADE_LAST(b);
+ if (!APR_BRIGADE_EMPTY(b) && APR_BUCKET_IS_HEAP(e)
+ && ((apr_bucket_heap *)(e->data))->refcount.refcount == 1) {
+ apr_bucket_heap *h = e->data;
+ apr_size_t remaining = h->alloc_len -
+ (e->length + (apr_size_t)e->start);
+ buf = h->base + e->start + e->length;
+
+ if (remaining >= total_len) {
+ /* Simple case: all the data will fit in the
+ * existing heap bucket
+ */
+ for (; i < nvec; i++) {
+ apr_size_t len = vec[i].iov_len;
+ memcpy(buf, (const void *) vec[i].iov_base, len);
+ buf += len;
+ }
+ e->length += total_len;
+ return APR_SUCCESS;
+ }
+ else {
+ /* More complicated case: not all of the data
+ * will fit in the existing heap bucket. The
+ * total data size is <= APR_BUCKET_BUFF_SIZE,
+ * so we'll need only one additional bucket.
+ */
+ const char *start_buf = buf;
+ for (; i < nvec; i++) {
+ apr_size_t len = vec[i].iov_len;
+ if (len > remaining) {
+ break;
+ }
+ memcpy(buf, (const void *) vec[i].iov_base, len);
+ buf += len;
+ remaining -= len;
+ }
+ e->length += (buf - start_buf);
+ total_len -= (buf - start_buf);
+
+ if (flush) {
+ apr_status_t rv = flush(b, ctx);
+ if (rv != APR_SUCCESS) {
+ return rv;
+ }
+ }
+
+ /* Now fall through into the case below to
+ * allocate another heap bucket and copy the
+ * rest of the array. (Note that i is not
+ * reset to zero here; it holds the index
+ * of the first vector element to be
+ * written to the new bucket.)
+ */
+ }
+ }
+
+ /* Allocate a new heap bucket, and copy the data into it.
+ * The checks above ensure that the amount of data to be
+ * written here is no larger than APR_BUCKET_BUFF_SIZE.
+ */
+ buf = apr_bucket_alloc(APR_BUCKET_BUFF_SIZE, b->bucket_alloc);
+ e = apr_bucket_heap_create(buf, APR_BUCKET_BUFF_SIZE,
+ apr_bucket_free, b->bucket_alloc);
+ for (; i < nvec; i++) {
+ apr_size_t len = vec[i].iov_len;
+ memcpy(buf, (const void *) vec[i].iov_base, len);
+ buf += len;
+ }
+ e->length = total_len;
+ APR_BRIGADE_INSERT_TAIL(b, e);
+
+ return APR_SUCCESS;
+}
+
+APU_DECLARE(apr_status_t) apr_brigade_puts(apr_bucket_brigade *bb,
+ apr_brigade_flush flush, void *ctx,
+ const char *str)
+{
+ return apr_brigade_write(bb, flush, ctx, str, strlen(str));
+}
+
+APU_DECLARE_NONSTD(apr_status_t) apr_brigade_putstrs(apr_bucket_brigade *b,
+ apr_brigade_flush flush,
+ void *ctx, ...)
+{
+ va_list va;
+ apr_status_t rv;
+
+ va_start(va, ctx);
+ rv = apr_brigade_vputstrs(b, flush, ctx, va);
+ va_end(va);
+ return rv;
+}
+
+APU_DECLARE_NONSTD(apr_status_t) apr_brigade_printf(apr_bucket_brigade *b,
+ apr_brigade_flush flush,
+ void *ctx,
+ const char *fmt, ...)
+{
+ va_list ap;
+ apr_status_t rv;
+
+ va_start(ap, fmt);
+ rv = apr_brigade_vprintf(b, flush, ctx, fmt, ap);
+ va_end(ap);
+ return rv;
+}
+
+struct brigade_vprintf_data_t {
+ apr_vformatter_buff_t vbuff;
+
+ apr_bucket_brigade *b; /* associated brigade */
+ apr_brigade_flush *flusher; /* flushing function */
+ void *ctx;
+
+ char *cbuff; /* buffer to flush from */
+};
+
+static apr_status_t brigade_flush(apr_vformatter_buff_t *buff)
+{
+ /* callback function passed to ap_vformatter to be
+ * called when vformatter needs to buff and
+ * buff.curpos > buff.endpos
+ */
+
+ /* "downcast," have really passed a brigade_vprintf_data_t* */
+ struct brigade_vprintf_data_t *vd = (struct brigade_vprintf_data_t*)buff;
+ apr_status_t res = APR_SUCCESS;
+
+ res = apr_brigade_write(vd->b, *vd->flusher, vd->ctx, vd->cbuff,
+ APR_BUCKET_BUFF_SIZE);
+
+ if(res != APR_SUCCESS) {
+ return -1;
+ }
+
+ vd->vbuff.curpos = vd->cbuff;
+ vd->vbuff.endpos = vd->cbuff + APR_BUCKET_BUFF_SIZE;
+
+ return res;
+}
+
+APU_DECLARE(apr_status_t) apr_brigade_vprintf(apr_bucket_brigade *b,
+ apr_brigade_flush flush,
+ void *ctx,
+ const char *fmt, va_list va)
+{
+ /* the cast, in order of appearance */
+ struct brigade_vprintf_data_t vd;
+ char buf[APR_BUCKET_BUFF_SIZE];
+ int written;
+
+ vd.vbuff.curpos = buf;
+ vd.vbuff.endpos = buf + APR_BUCKET_BUFF_SIZE;
+ vd.b = b;
+ vd.flusher = &flush;
+ vd.ctx = ctx;
+ vd.cbuff = buf;
+
+ written = apr_vformatter(brigade_flush, &vd.vbuff, fmt, va);
+
+ if (written == -1) {
+ return -1;
+ }
+
+ /* write out what remains in the buffer */
+ return apr_brigade_write(b, flush, ctx, buf, vd.vbuff.curpos - buf);
+}
+
+/* A "safe" maximum bucket size, 1Gb */
+#define MAX_BUCKET_SIZE (0x40000000)
+
+APU_DECLARE(apr_bucket *) apr_brigade_insert_file(apr_bucket_brigade *bb,
+ apr_file_t *f,
+ apr_off_t start,
+ apr_off_t length,
+ apr_pool_t *p)
+{
+ apr_bucket *e;
+
+ if (sizeof(apr_off_t) == sizeof(apr_size_t) || length < MAX_BUCKET_SIZE) {
+ e = apr_bucket_file_create(f, start, (apr_size_t)length, p,
+ bb->bucket_alloc);
+ }
+ else {
+ /* Several buckets are needed. */
+ e = apr_bucket_file_create(f, start, MAX_BUCKET_SIZE, p,
+ bb->bucket_alloc);
+
+ while (length > MAX_BUCKET_SIZE) {
+ apr_bucket *ce;
+ apr_bucket_copy(e, &ce);
+ APR_BRIGADE_INSERT_TAIL(bb, ce);
+ e->start += MAX_BUCKET_SIZE;
+ length -= MAX_BUCKET_SIZE;
+ }
+ e->length = (apr_size_t)length; /* Resize just the last bucket */
+ }
+
+ APR_BRIGADE_INSERT_TAIL(bb, e);
+ return e;
+}
diff --git a/buckets/apr_buckets.c b/buckets/apr_buckets.c
new file mode 100644
index 0000000..802f4e2
--- /dev/null
+++ b/buckets/apr_buckets.c
@@ -0,0 +1,46 @@
+/* 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.
+ */
+
+#include "apr_buckets.h"
+
+APU_DECLARE_NONSTD(apr_status_t) apr_bucket_setaside_noop(apr_bucket *data,
+ apr_pool_t *pool)
+{
+ return APR_SUCCESS;
+}
+
+APU_DECLARE_NONSTD(apr_status_t) apr_bucket_setaside_notimpl(apr_bucket *data,
+ apr_pool_t *pool)
+{
+ return APR_ENOTIMPL;
+}
+
+APU_DECLARE_NONSTD(apr_status_t) apr_bucket_split_notimpl(apr_bucket *data,
+ apr_size_t point)
+{
+ return APR_ENOTIMPL;
+}
+
+APU_DECLARE_NONSTD(apr_status_t) apr_bucket_copy_notimpl(apr_bucket *e,
+ apr_bucket **c)
+{
+ return APR_ENOTIMPL;
+}
+
+APU_DECLARE_NONSTD(void) apr_bucket_destroy_noop(void *data)
+{
+ return;
+}
diff --git a/buckets/apr_buckets_alloc.c b/buckets/apr_buckets_alloc.c
new file mode 100644
index 0000000..e5838dd
--- /dev/null
+++ b/buckets/apr_buckets_alloc.c
@@ -0,0 +1,234 @@
+/* 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.
+ */
+
+#include <stdlib.h>
+
+#include "apr_buckets.h"
+#include "apr_allocator.h"
+#include "apr_version.h"
+
+#define ALLOC_AMT (8192 - APR_MEMNODE_T_SIZE)
+
+typedef struct node_header_t {
+ apr_size_t size;
+ apr_bucket_alloc_t *alloc;
+ apr_memnode_t *memnode;
+ struct node_header_t *next;
+} node_header_t;
+
+#define SIZEOF_NODE_HEADER_T APR_ALIGN_DEFAULT(sizeof(node_header_t))
+#define SMALL_NODE_SIZE (APR_BUCKET_ALLOC_SIZE + SIZEOF_NODE_HEADER_T)
+
+/** A list of free memory from which new buckets or private bucket
+ * structures can be allocated.
+ */
+struct apr_bucket_alloc_t {
+ apr_pool_t *pool;
+ apr_allocator_t *allocator;
+ node_header_t *freelist;
+ apr_memnode_t *blocks;
+};
+
+static apr_status_t alloc_cleanup(void *data)
+{
+ apr_bucket_alloc_t *list = data;
+
+ apr_allocator_free(list->allocator, list->blocks);
+
+#if APR_POOL_DEBUG
+ if (list->pool && list->allocator != apr_pool_allocator_get(list->pool)) {
+ apr_allocator_destroy(list->allocator);
+ }
+#endif
+
+ return APR_SUCCESS;
+}
+
+APU_DECLARE_NONSTD(apr_bucket_alloc_t *) apr_bucket_alloc_create(apr_pool_t *p)
+{
+ apr_allocator_t *allocator = apr_pool_allocator_get(p);
+ apr_bucket_alloc_t *list;
+
+#if APR_POOL_DEBUG
+ /* may be NULL for debug mode. */
+ if (allocator == NULL) {
+ if (apr_allocator_create(&allocator) != APR_SUCCESS) {
+ apr_abortfunc_t fn = apr_pool_abort_get(p);
+ if (fn)
+ (fn)(APR_ENOMEM);
+ abort();
+ }
+ }
+#endif
+ list = apr_bucket_alloc_create_ex(allocator);
+ if (list == NULL) {
+ apr_abortfunc_t fn = apr_pool_abort_get(p);
+ if (fn)
+ (fn)(APR_ENOMEM);
+ abort();
+ }
+ list->pool = p;
+ apr_pool_cleanup_register(list->pool, list, alloc_cleanup,
+ apr_pool_cleanup_null);
+
+ return list;
+}
+
+APU_DECLARE_NONSTD(apr_bucket_alloc_t *) apr_bucket_alloc_create_ex(
+ apr_allocator_t *allocator)
+{
+ apr_bucket_alloc_t *list;
+ apr_memnode_t *block;
+
+ block = apr_allocator_alloc(allocator, ALLOC_AMT);
+ if (!block) {
+ return NULL;
+ }
+ list = (apr_bucket_alloc_t *)block->first_avail;
+ list->pool = NULL;
+ list->allocator = allocator;
+ list->freelist = NULL;
+ list->blocks = block;
+ block->first_avail += APR_ALIGN_DEFAULT(sizeof(*list));
+
+ return list;
+}
+
+APU_DECLARE_NONSTD(void) apr_bucket_alloc_destroy(apr_bucket_alloc_t *list)
+{
+ if (list->pool) {
+ apr_pool_cleanup_kill(list->pool, list, alloc_cleanup);
+ }
+
+ apr_allocator_free(list->allocator, list->blocks);
+
+#if APR_POOL_DEBUG
+ if (list->pool && list->allocator != apr_pool_allocator_get(list->pool)) {
+ apr_allocator_destroy(list->allocator);
+ }
+#endif
+}
+
+APU_DECLARE_NONSTD(apr_size_t) apr_bucket_alloc_aligned_floor(apr_bucket_alloc_t *list,
+ apr_size_t size)
+{
+ if (size <= SMALL_NODE_SIZE) {
+ size = SMALL_NODE_SIZE;
+ }
+ else {
+#if APR_VERSION_AT_LEAST(1,6,0)
+ if (size < APR_MEMNODE_T_SIZE) {
+ size = apr_allocator_align(list->allocator, 0);
+ }
+ else {
+ size = apr_allocator_align(list->allocator,
+ size - APR_MEMNODE_T_SIZE);
+ }
+#else
+ /* Assumes the minimum (default) allocator's boundary of 4K and
+ * minimum (immutable before APR-1.6.x) allocation size of 8K,
+ * hence possibly (yet unlikely) under-estimating the floor...
+ */
+ size = APR_ALIGN(size, 4096);
+ if (size < 8192) {
+ size = 8192;
+ }
+#endif
+ size -= APR_MEMNODE_T_SIZE;
+ }
+ size -= SIZEOF_NODE_HEADER_T;
+ return size;
+}
+
+APU_DECLARE_NONSTD(void *) apr_bucket_alloc(apr_size_t size,
+ apr_bucket_alloc_t *list)
+{
+ node_header_t *node;
+ apr_memnode_t *active = list->blocks;
+ char *endp;
+
+ size += SIZEOF_NODE_HEADER_T;
+ if (size <= SMALL_NODE_SIZE) {
+ if (list->freelist) {
+ node = list->freelist;
+ list->freelist = node->next;
+ }
+ else {
+ endp = active->first_avail + SMALL_NODE_SIZE;
+ if (endp >= active->endp) {
+ list->blocks = apr_allocator_alloc(list->allocator, ALLOC_AMT);
+ if (!list->blocks) {
+ list->blocks = active;
+ return NULL;
+ }
+ list->blocks->next = active;
+ active = list->blocks;
+ endp = active->first_avail + SMALL_NODE_SIZE;
+ }
+ node = (node_header_t *)active->first_avail;
+ node->alloc = list;
+ node->memnode = active;
+ node->size = SMALL_NODE_SIZE;
+ active->first_avail = endp;
+ }
+ }
+ else {
+ apr_memnode_t *memnode = apr_allocator_alloc(list->allocator, size);
+ if (!memnode) {
+ return NULL;
+ }
+ node = (node_header_t *)memnode->first_avail;
+ node->alloc = list;
+ node->memnode = memnode;
+ node->size = size;
+ }
+ return ((char *)node) + SIZEOF_NODE_HEADER_T;
+}
+
+#ifdef APR_BUCKET_DEBUG
+#if APR_HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+static void check_not_already_free(node_header_t *node)
+{
+ apr_bucket_alloc_t *list = node->alloc;
+ node_header_t *curr = list->freelist;
+
+ while (curr) {
+ if (node == curr) {
+ abort();
+ }
+ curr = curr->next;
+ }
+}
+#else
+#define check_not_already_free(node)
+#endif
+
+APU_DECLARE_NONSTD(void) apr_bucket_free(void *mem)
+{
+ node_header_t *node = (node_header_t *)((char *)mem - SIZEOF_NODE_HEADER_T);
+ apr_bucket_alloc_t *list = node->alloc;
+
+ if (node->size == SMALL_NODE_SIZE) {
+ check_not_already_free(node);
+ node->next = list->freelist;
+ list->freelist = node;
+ }
+ else {
+ apr_allocator_free(list->allocator, node->memnode);
+ }
+}
diff --git a/buckets/apr_buckets_eos.c b/buckets/apr_buckets_eos.c
new file mode 100644
index 0000000..25cff75
--- /dev/null
+++ b/buckets/apr_buckets_eos.c
@@ -0,0 +1,54 @@
+/* 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.
+ */
+
+#include "apr_buckets.h"
+
+static apr_status_t eos_bucket_read(apr_bucket *b, const char **str,
+ apr_size_t *len, apr_read_type_e block)
+{
+ *str = NULL;
+ *len = 0;
+ return APR_SUCCESS;
+}
+
+APU_DECLARE(apr_bucket *) apr_bucket_eos_make(apr_bucket *b)
+{
+ b->length = 0;
+ b->start = 0;
+ b->data = NULL;
+ b->type = &apr_bucket_type_eos;
+
+ return b;
+}
+
+APU_DECLARE(apr_bucket *) apr_bucket_eos_create(apr_bucket_alloc_t *list)
+{
+ apr_bucket *b = apr_bucket_alloc(sizeof(*b), list);
+
+ APR_BUCKET_INIT(b);
+ b->free = apr_bucket_free;
+ b->list = list;
+ return apr_bucket_eos_make(b);
+}
+
+APU_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_eos = {
+ "EOS", 5, APR_BUCKET_METADATA,
+ apr_bucket_destroy_noop,
+ eos_bucket_read,
+ apr_bucket_setaside_noop,
+ apr_bucket_split_notimpl,
+ apr_bucket_simple_copy
+};
diff --git a/buckets/apr_buckets_file.c b/buckets/apr_buckets_file.c
new file mode 100644
index 0000000..06b7cf0
--- /dev/null
+++ b/buckets/apr_buckets_file.c
@@ -0,0 +1,242 @@
+/* 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.
+ */
+
+#include "apr.h"
+#include "apr_general.h"
+#include "apr_file_io.h"
+#include "apr_buckets.h"
+
+#if APR_HAS_MMAP
+#include "apr_mmap.h"
+
+/* mmap support for static files based on ideas from John Heidemann's
+ * patch against 1.0.5. See
+ * <http://www.isi.edu/~johnh/SOFTWARE/APACHE/index.html>.
+ */
+
+#endif /* APR_HAS_MMAP */
+
+static void file_bucket_destroy(void *data)
+{
+ apr_bucket_file *f = data;
+
+ if (apr_bucket_shared_destroy(f)) {
+ /* no need to close the file here; it will get
+ * done automatically when the pool gets cleaned up */
+ apr_bucket_free(f);
+ }
+}
+
+#if APR_HAS_MMAP
+static int file_make_mmap(apr_bucket *e, apr_size_t filelength,
+ apr_off_t fileoffset, apr_pool_t *p)
+{
+ apr_bucket_file *a = e->data;
+ apr_mmap_t *mm;
+
+ if (!a->can_mmap) {
+ return 0;
+ }
+
+ if (filelength > APR_MMAP_LIMIT) {
+ if (apr_mmap_create(&mm, a->fd, fileoffset, APR_MMAP_LIMIT,
+ APR_MMAP_READ, p) != APR_SUCCESS)
+ {
+ return 0;
+ }
+ apr_bucket_split(e, APR_MMAP_LIMIT);
+ filelength = APR_MMAP_LIMIT;
+ }
+ else if ((filelength < APR_MMAP_THRESHOLD) ||
+ (apr_mmap_create(&mm, a->fd, fileoffset, filelength,
+ APR_MMAP_READ, p) != APR_SUCCESS))
+ {
+ return 0;
+ }
+ apr_bucket_mmap_make(e, mm, 0, filelength);
+ file_bucket_destroy(a);
+ return 1;
+}
+#endif
+
+static apr_status_t file_bucket_read(apr_bucket *e, const char **str,
+ apr_size_t *len, apr_read_type_e block)
+{
+ apr_bucket_file *a = e->data;
+ apr_file_t *f = a->fd;
+ apr_bucket *b = NULL;
+ char *buf;
+ apr_status_t rv;
+ apr_size_t filelength = e->length; /* bytes remaining in file past offset */
+ apr_off_t fileoffset = e->start;
+#if APR_HAS_THREADS && !APR_HAS_XTHREAD_FILES
+ apr_int32_t flags;
+#endif
+
+#if APR_HAS_MMAP
+ if (file_make_mmap(e, filelength, fileoffset, a->readpool)) {
+ return apr_bucket_read(e, str, len, block);
+ }
+#endif
+
+#if APR_HAS_THREADS && !APR_HAS_XTHREAD_FILES
+ if ((flags = apr_file_flags_get(f)) & APR_FOPEN_XTHREAD) {
+ /* this file descriptor is shared across multiple threads and
+ * this OS doesn't support that natively, so as a workaround
+ * we must reopen the file into a->readpool */
+ const char *fname;
+ apr_file_name_get(&fname, f);
+
+ rv = apr_file_open(&f, fname, (flags & ~APR_FOPEN_XTHREAD), 0, a->readpool);
+ if (rv != APR_SUCCESS)
+ return rv;
+
+ a->fd = f;
+ }
+#endif
+
+ *str = NULL; /* in case we die prematurely */
+ *len = (filelength > a->read_size) ? a->read_size : filelength;
+ buf = apr_bucket_alloc(*len, e->list);
+
+ /* Handle offset ... */
+ rv = apr_file_seek(f, APR_SET, &fileoffset);
+ if (rv != APR_SUCCESS) {
+ apr_bucket_free(buf);
+ return rv;
+ }
+ rv = apr_file_read(f, buf, len);
+ if (rv != APR_SUCCESS && rv != APR_EOF) {
+ apr_bucket_free(buf);
+ return rv;
+ }
+ filelength -= *len;
+ /*
+ * Change the current bucket to refer to what we read,
+ * even if we read nothing because we hit EOF.
+ */
+ apr_bucket_heap_make(e, buf, *len, apr_bucket_free);
+
+ /* If we have more to read from the file, then create another bucket */
+ if (filelength > 0 && rv != APR_EOF) {
+ /* for efficiency, we can just build a new apr_bucket struct
+ * to wrap around the existing file bucket */
+ b = apr_bucket_alloc(sizeof(*b), e->list);
+ b->start = fileoffset + (*len);
+ b->length = filelength;
+ b->data = a;
+ b->type = &apr_bucket_type_file;
+ b->free = apr_bucket_free;
+ b->list = e->list;
+ APR_BUCKET_INSERT_AFTER(e, b);
+ }
+ else {
+ file_bucket_destroy(a);
+ }
+
+ *str = buf;
+ return rv;
+}
+
+APU_DECLARE(apr_bucket *) apr_bucket_file_make(apr_bucket *b, apr_file_t *fd,
+ apr_off_t offset,
+ apr_size_t len, apr_pool_t *p)
+{
+ apr_bucket_file *f;
+
+ f = apr_bucket_alloc(sizeof(*f), b->list);
+ f->fd = fd;
+ f->readpool = p;
+#if APR_HAS_MMAP
+ f->can_mmap = 1;
+#endif
+ f->read_size = APR_BUCKET_BUFF_SIZE;
+
+ b = apr_bucket_shared_make(b, f, offset, len);
+ b->type = &apr_bucket_type_file;
+
+ return b;
+}
+
+APU_DECLARE(apr_bucket *) apr_bucket_file_create(apr_file_t *fd,
+ apr_off_t offset,
+ apr_size_t len, apr_pool_t *p,
+ apr_bucket_alloc_t *list)
+{
+ apr_bucket *b = apr_bucket_alloc(sizeof(*b), list);
+
+ APR_BUCKET_INIT(b);
+ b->free = apr_bucket_free;
+ b->list = list;
+ return apr_bucket_file_make(b, fd, offset, len, p);
+}
+
+APU_DECLARE(apr_status_t) apr_bucket_file_enable_mmap(apr_bucket *e,
+ int enabled)
+{
+#if APR_HAS_MMAP
+ apr_bucket_file *a = e->data;
+ a->can_mmap = enabled;
+ return APR_SUCCESS;
+#else
+ return APR_ENOTIMPL;
+#endif /* APR_HAS_MMAP */
+}
+
+APU_DECLARE(apr_status_t) apr_bucket_file_set_buf_size(apr_bucket *e,
+ apr_size_t size)
+{
+ apr_bucket_file *a = e->data;
+
+ if (size <= APR_BUCKET_BUFF_SIZE) {
+ a->read_size = APR_BUCKET_BUFF_SIZE;
+ }
+ else {
+ apr_size_t floor = apr_bucket_alloc_aligned_floor(e->list, size);
+ a->read_size = (size < floor) ? size : floor;
+ }
+
+ return APR_SUCCESS;
+}
+
+static apr_status_t file_bucket_setaside(apr_bucket *data, apr_pool_t *reqpool)
+{
+ apr_bucket_file *a = data->data;
+ apr_file_t *fd = NULL;
+ apr_file_t *f = a->fd;
+ apr_pool_t *curpool = apr_file_pool_get(f);
+
+ if (apr_pool_is_ancestor(curpool, reqpool)) {
+ return APR_SUCCESS;
+ }
+
+ if (!apr_pool_is_ancestor(a->readpool, reqpool)) {
+ a->readpool = reqpool;
+ }
+
+ apr_file_setaside(&fd, f, reqpool);
+ a->fd = fd;
+ return APR_SUCCESS;
+}
+
+APU_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_file = {
+ "FILE", 5, APR_BUCKET_DATA,
+ file_bucket_destroy,
+ file_bucket_read,
+ file_bucket_setaside,
+ apr_bucket_shared_split,
+ apr_bucket_shared_copy
+};
diff --git a/buckets/apr_buckets_flush.c b/buckets/apr_buckets_flush.c
new file mode 100644
index 0000000..a5d84d7
--- /dev/null
+++ b/buckets/apr_buckets_flush.c
@@ -0,0 +1,54 @@
+/* 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.
+ */
+
+#include "apr_buckets.h"
+
+static apr_status_t flush_bucket_read(apr_bucket *b, const char **str,
+ apr_size_t *len, apr_read_type_e block)
+{
+ *str = NULL;
+ *len = 0;
+ return APR_SUCCESS;
+}
+
+APU_DECLARE(apr_bucket *) apr_bucket_flush_make(apr_bucket *b)
+{
+ b->length = 0;
+ b->start = 0;
+ b->data = NULL;
+ b->type = &apr_bucket_type_flush;
+
+ return b;
+}
+
+APU_DECLARE(apr_bucket *) apr_bucket_flush_create(apr_bucket_alloc_t *list)
+{
+ apr_bucket *b = apr_bucket_alloc(sizeof(*b), list);
+
+ APR_BUCKET_INIT(b);
+ b->free = apr_bucket_free;
+ b->list = list;
+ return apr_bucket_flush_make(b);
+}
+
+APU_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_flush = {
+ "FLUSH", 5, APR_BUCKET_METADATA,
+ apr_bucket_destroy_noop,
+ flush_bucket_read,
+ apr_bucket_setaside_noop,
+ apr_bucket_split_notimpl,
+ apr_bucket_simple_copy
+};
diff --git a/buckets/apr_buckets_heap.c b/buckets/apr_buckets_heap.c
new file mode 100644
index 0000000..00f9808
--- /dev/null
+++ b/buckets/apr_buckets_heap.c
@@ -0,0 +1,96 @@
+/* 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.
+ */
+
+#include "apr_buckets.h"
+#define APR_WANT_MEMFUNC
+#include "apr_want.h"
+
+static apr_status_t heap_bucket_read(apr_bucket *b, const char **str,
+ apr_size_t *len, apr_read_type_e block)
+{
+ apr_bucket_heap *h = b->data;
+
+ *str = h->base + b->start;
+ *len = b->length;
+ return APR_SUCCESS;
+}
+
+static void heap_bucket_destroy(void *data)
+{
+ apr_bucket_heap *h = data;
+
+ if (apr_bucket_shared_destroy(h)) {
+ (*h->free_func)(h->base);
+ apr_bucket_free(h);
+ }
+}
+
+/* Warning: if you change this function, be sure to
+ * change apr_bucket_pool_make() too! */
+APU_DECLARE(apr_bucket *) apr_bucket_heap_make(apr_bucket *b, const char *buf,
+ apr_size_t length,
+ void (*free_func)(void *data))
+{
+ apr_bucket_heap *h;
+
+ h = apr_bucket_alloc(sizeof(*h), b->list);
+
+ if (!free_func) {
+ h->alloc_len = length;
+ h->base = apr_bucket_alloc(h->alloc_len, b->list);
+ if (h->base == NULL) {
+ apr_bucket_free(h);
+ return NULL;
+ }
+ h->free_func = apr_bucket_free;
+ memcpy(h->base, buf, length);
+ }
+ else {
+ /* XXX: we lose the const qualifier here which indicates
+ * there's something screwy with the API...
+ */
+ h->base = (char *) buf;
+ h->alloc_len = length;
+ h->free_func = free_func;
+ }
+
+ b = apr_bucket_shared_make(b, h, 0, length);
+ b->type = &apr_bucket_type_heap;
+
+ return b;
+}
+
+APU_DECLARE(apr_bucket *) apr_bucket_heap_create(const char *buf,
+ apr_size_t length,
+ void (*free_func)(void *data),
+ apr_bucket_alloc_t *list)
+{
+ apr_bucket *b = apr_bucket_alloc(sizeof(*b), list);
+
+ APR_BUCKET_INIT(b);
+ b->free = apr_bucket_free;
+ b->list = list;
+ return apr_bucket_heap_make(b, buf, length, free_func);
+}
+
+APU_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_heap = {
+ "HEAP", 5, APR_BUCKET_DATA,
+ heap_bucket_destroy,
+ heap_bucket_read,
+ apr_bucket_setaside_noop,
+ apr_bucket_shared_split,
+ apr_bucket_shared_copy
+};
diff --git a/buckets/apr_buckets_mmap.c b/buckets/apr_buckets_mmap.c
new file mode 100644
index 0000000..19de291
--- /dev/null
+++ b/buckets/apr_buckets_mmap.c
@@ -0,0 +1,144 @@
+/* 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.
+ */
+
+#include "apr_buckets.h"
+
+#if APR_HAS_MMAP
+
+static apr_status_t mmap_bucket_read(apr_bucket *b, const char **str,
+ apr_size_t *length, apr_read_type_e block)
+{
+ apr_bucket_mmap *m = b->data;
+ apr_status_t ok;
+ void *addr;
+
+ if (!m->mmap) {
+ /* the apr_mmap_t was already cleaned up out from under us */
+ return APR_EINVAL;
+ }
+
+ ok = apr_mmap_offset(&addr, m->mmap, b->start);
+ if (ok != APR_SUCCESS) {
+ return ok;
+ }
+ *str = addr;
+ *length = b->length;
+ return APR_SUCCESS;
+}
+
+static apr_status_t mmap_bucket_cleanup(void *data)
+{
+ /* the apr_mmap_t is about to disappear out from under us, so we
+ * have no choice but to pretend it doesn't exist anymore. the
+ * refcount is now useless because there's nothing to refer to
+ * anymore. so the only valid action on any remaining referrer
+ * is to delete it. no more reads, no more anything. */
+ apr_bucket_mmap *m = data;
+
+ m->mmap = NULL;
+ return APR_SUCCESS;
+}
+
+static void mmap_bucket_destroy(void *data)
+{
+ apr_bucket_mmap *m = data;
+
+ if (apr_bucket_shared_destroy(m)) {
+ if (m->mmap) {
+ apr_pool_cleanup_kill(m->mmap->cntxt, m, mmap_bucket_cleanup);
+ apr_mmap_delete(m->mmap);
+ }
+ apr_bucket_free(m);
+ }
+}
+
+/*
+ * XXX: are the start and length arguments useful?
+ */
+APU_DECLARE(apr_bucket *) apr_bucket_mmap_make(apr_bucket *b, apr_mmap_t *mm,
+ apr_off_t start,
+ apr_size_t length)
+{
+ apr_bucket_mmap *m;
+
+ m = apr_bucket_alloc(sizeof(*m), b->list);
+ m->mmap = mm;
+
+ apr_pool_cleanup_register(mm->cntxt, m, mmap_bucket_cleanup,
+ apr_pool_cleanup_null);
+
+ b = apr_bucket_shared_make(b, m, start, length);
+ b->type = &apr_bucket_type_mmap;
+
+ return b;
+}
+
+
+APU_DECLARE(apr_bucket *) apr_bucket_mmap_create(apr_mmap_t *mm,
+ apr_off_t start,
+ apr_size_t length,
+ apr_bucket_alloc_t *list)
+{
+ apr_bucket *b = apr_bucket_alloc(sizeof(*b), list);
+
+ APR_BUCKET_INIT(b);
+ b->free = apr_bucket_free;
+ b->list = list;
+ return apr_bucket_mmap_make(b, mm, start, length);
+}
+
+static apr_status_t mmap_bucket_setaside(apr_bucket *b, apr_pool_t *p)
+{
+ apr_bucket_mmap *m = b->data;
+ apr_mmap_t *mm = m->mmap;
+ apr_mmap_t *new_mm;
+ apr_status_t ok;
+
+ if (!mm) {
+ /* the apr_mmap_t was already cleaned up out from under us */
+ return APR_EINVAL;
+ }
+
+ /* shortcut if possible */
+ if (apr_pool_is_ancestor(mm->cntxt, p)) {
+ return APR_SUCCESS;
+ }
+
+ /* duplicate apr_mmap_t into new pool */
+ ok = apr_mmap_dup(&new_mm, mm, p);
+ if (ok != APR_SUCCESS) {
+ return ok;
+ }
+
+ /* decrement refcount on old apr_bucket_mmap */
+ mmap_bucket_destroy(m);
+
+ /* create new apr_bucket_mmap pointing to new apr_mmap_t */
+ apr_bucket_mmap_make(b, new_mm, b->start, b->length);
+
+ return APR_SUCCESS;
+}
+
+APU_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_mmap = {
+ "MMAP", 5, APR_BUCKET_DATA,
+ mmap_bucket_destroy,
+ mmap_bucket_read,
+ mmap_bucket_setaside,
+ apr_bucket_shared_split,
+ apr_bucket_shared_copy
+};
+
+#endif
diff --git a/buckets/apr_buckets_pipe.c b/buckets/apr_buckets_pipe.c
new file mode 100644
index 0000000..46b4697
--- /dev/null
+++ b/buckets/apr_buckets_pipe.c
@@ -0,0 +1,119 @@
+/* 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.
+ */
+
+#include "apr_buckets.h"
+
+static apr_status_t pipe_bucket_read(apr_bucket *a, const char **str,
+ apr_size_t *len, apr_read_type_e block)
+{
+ apr_file_t *p = a->data;
+ char *buf;
+ apr_status_t rv;
+ apr_interval_time_t timeout;
+
+ if (block == APR_NONBLOCK_READ) {
+ apr_file_pipe_timeout_get(p, &timeout);
+ apr_file_pipe_timeout_set(p, 0);
+ }
+
+ *str = NULL;
+ *len = APR_BUCKET_BUFF_SIZE;
+ buf = apr_bucket_alloc(*len, a->list); /* XXX: check for failure? */
+
+ rv = apr_file_read(p, buf, len);
+
+ if (block == APR_NONBLOCK_READ) {
+ apr_file_pipe_timeout_set(p, timeout);
+ }
+
+ if (rv != APR_SUCCESS && rv != APR_EOF) {
+ apr_bucket_free(buf);
+ return rv;
+ }
+ /*
+ * If there's more to read we have to keep the rest of the pipe
+ * for later. Otherwise, we'll close the pipe.
+ * XXX: Note that more complicated bucket types that
+ * refer to data not in memory and must therefore have a read()
+ * function similar to this one should be wary of copying this
+ * code because if they have a destroy function they probably
+ * want to migrate the bucket's subordinate structure from the
+ * old bucket to a raw new one and adjust it as appropriate,
+ * rather than destroying the old one and creating a completely
+ * new bucket.
+ */
+ if (*len > 0) {
+ apr_bucket_heap *h;
+ /* Change the current bucket to refer to what we read */
+ a = apr_bucket_heap_make(a, buf, *len, apr_bucket_free);
+ h = a->data;
+ h->alloc_len = APR_BUCKET_BUFF_SIZE; /* note the real buffer size */
+ *str = buf;
+ APR_BUCKET_INSERT_AFTER(a, apr_bucket_pipe_create(p, a->list));
+ }
+ else {
+ apr_bucket_free(buf);
+ a = apr_bucket_immortal_make(a, "", 0);
+ *str = a->data;
+ if (rv == APR_EOF) {
+ apr_file_close(p);
+ }
+ }
+ return APR_SUCCESS;
+}
+
+APU_DECLARE(apr_bucket *) apr_bucket_pipe_make(apr_bucket *b, apr_file_t *p)
+{
+ /*
+ * A pipe is closed when the end is reached in pipe_bucket_read(). If
+ * the pipe isn't read to the end (e.g., error path), the pipe will be
+ * closed when its pool goes away.
+ *
+ * Note that typically the pipe is allocated from the request pool
+ * so it will disappear when the request is finished. However the
+ * core filter may decide to set aside the tail end of a CGI
+ * response if the connection is pipelined. This turns out not to
+ * be a problem because the core will have read to the end of the
+ * stream so the bucket(s) that it sets aside will be the heap
+ * buckets created by pipe_bucket_read() above.
+ */
+ b->type = &apr_bucket_type_pipe;
+ b->length = (apr_size_t)(-1);
+ b->start = -1;
+ b->data = p;
+
+ return b;
+}
+
+APU_DECLARE(apr_bucket *) apr_bucket_pipe_create(apr_file_t *p,
+ apr_bucket_alloc_t *list)
+{
+ apr_bucket *b = apr_bucket_alloc(sizeof(*b), list);
+
+ APR_BUCKET_INIT(b);
+ b->free = apr_bucket_free;
+ b->list = list;
+ return apr_bucket_pipe_make(b, p);
+}
+
+APU_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_pipe = {
+ "PIPE", 5, APR_BUCKET_DATA,
+ apr_bucket_destroy_noop,
+ pipe_bucket_read,
+ apr_bucket_setaside_notimpl,
+ apr_bucket_split_notimpl,
+ apr_bucket_copy_notimpl
+};
diff --git a/buckets/apr_buckets_pool.c b/buckets/apr_buckets_pool.c
new file mode 100644
index 0000000..56ba585
--- /dev/null
+++ b/buckets/apr_buckets_pool.c
@@ -0,0 +1,142 @@
+/* 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.
+ */
+
+#include "apr_buckets.h"
+#define APR_WANT_MEMFUNC
+#include "apr_want.h"
+
+static apr_status_t pool_bucket_cleanup(void *data)
+{
+ apr_bucket_pool *p = data;
+
+ /*
+ * If the pool gets cleaned up, we have to copy the data out
+ * of the pool and onto the heap. But the apr_buckets out there
+ * that point to this pool bucket need to be notified such that
+ * they can morph themselves into a regular heap bucket the next
+ * time they try to read. To avoid having to manipulate
+ * reference counts and b->data pointers, the apr_bucket_pool
+ * actually _contains_ an apr_bucket_heap as its first element,
+ * so the two share their apr_bucket_refcount member, and you
+ * can typecast a pool bucket struct to make it look like a
+ * regular old heap bucket struct.
+ */
+ p->heap.base = apr_bucket_alloc(p->heap.alloc_len, p->list);
+ memcpy(p->heap.base, p->base, p->heap.alloc_len);
+ p->base = NULL;
+ p->pool = NULL;
+
+ return APR_SUCCESS;
+}
+
+static apr_status_t pool_bucket_read(apr_bucket *b, const char **str,
+ apr_size_t *len, apr_read_type_e block)
+{
+ apr_bucket_pool *p = b->data;
+ const char *base = p->base;
+
+ if (p->pool == NULL) {
+ /*
+ * pool has been cleaned up... masquerade as a heap bucket from now
+ * on. subsequent bucket operations will use the heap bucket code.
+ */
+ b->type = &apr_bucket_type_heap;
+ base = p->heap.base;
+ }
+ *str = base + b->start;
+ *len = b->length;
+ return APR_SUCCESS;
+}
+
+static void pool_bucket_destroy(void *data)
+{
+ apr_bucket_pool *p = data;
+
+ /* If the pool is cleaned up before the last reference goes
+ * away, the data is really now on the heap; heap_destroy() takes
+ * over. free() in heap_destroy() thinks it's freeing
+ * an apr_bucket_heap, when in reality it's freeing the whole
+ * apr_bucket_pool for us.
+ */
+ if (p->pool) {
+ /* the shared resource is still in the pool
+ * because the pool has not been cleaned up yet
+ */
+ if (apr_bucket_shared_destroy(p)) {
+ apr_pool_cleanup_kill(p->pool, p, pool_bucket_cleanup);
+ apr_bucket_free(p);
+ }
+ }
+ else {
+ /* the shared resource is no longer in the pool, it's
+ * on the heap, but this reference still thinks it's a pool
+ * bucket. we should just go ahead and pass control to
+ * heap_destroy() for it since it doesn't know any better.
+ */
+ apr_bucket_type_heap.destroy(p);
+ }
+}
+
+APU_DECLARE(apr_bucket *) apr_bucket_pool_make(apr_bucket *b,
+ const char *buf, apr_size_t length, apr_pool_t *pool)
+{
+ apr_bucket_pool *p;
+
+ p = apr_bucket_alloc(sizeof(*p), b->list);
+
+ /* XXX: we lose the const qualifier here which indicates
+ * there's something screwy with the API...
+ */
+ /* XXX: why is this? buf is const, p->base is const... what's
+ * the problem? --jcw */
+ p->base = (char *) buf;
+ p->pool = pool;
+ p->list = b->list;
+
+ b = apr_bucket_shared_make(b, p, 0, length);
+ b->type = &apr_bucket_type_pool;
+
+ /* pre-initialize heap bucket member */
+ p->heap.alloc_len = length;
+ p->heap.base = NULL;
+ p->heap.free_func = apr_bucket_free;
+
+ apr_pool_cleanup_register(p->pool, p, pool_bucket_cleanup,
+ apr_pool_cleanup_null);
+ return b;
+}
+
+APU_DECLARE(apr_bucket *) apr_bucket_pool_create(const char *buf,
+ apr_size_t length,
+ apr_pool_t *pool,
+ apr_bucket_alloc_t *list)
+{
+ apr_bucket *b = apr_bucket_alloc(sizeof(*b), list);
+
+ APR_BUCKET_INIT(b);
+ b->free = apr_bucket_free;
+ b->list = list;
+ return apr_bucket_pool_make(b, buf, length, pool);
+}
+
+APU_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_pool = {
+ "POOL", 5, APR_BUCKET_DATA,
+ pool_bucket_destroy,
+ pool_bucket_read,
+ apr_bucket_setaside_noop, /* don't need to setaside thanks to the cleanup*/
+ apr_bucket_shared_split,
+ apr_bucket_shared_copy
+};
diff --git a/buckets/apr_buckets_refcount.c b/buckets/apr_buckets_refcount.c
new file mode 100644
index 0000000..0e765d9
--- /dev/null
+++ b/buckets/apr_buckets_refcount.c
@@ -0,0 +1,64 @@
+/* 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.
+ */
+
+#include "apr_buckets.h"
+
+APU_DECLARE_NONSTD(apr_status_t) apr_bucket_shared_split(apr_bucket *a,
+ apr_size_t point)
+{
+ apr_bucket_refcount *r = a->data;
+ apr_status_t rv;
+
+ if ((rv = apr_bucket_simple_split(a, point)) != APR_SUCCESS) {
+ return rv;
+ }
+ r->refcount++;
+
+ return APR_SUCCESS;
+}
+
+APU_DECLARE_NONSTD(apr_status_t) apr_bucket_shared_copy(apr_bucket *a,
+ apr_bucket **b)
+{
+ apr_bucket_refcount *r = a->data;
+
+ apr_bucket_simple_copy(a, b);
+ r->refcount++;
+
+ return APR_SUCCESS;
+}
+
+APU_DECLARE(int) apr_bucket_shared_destroy(void *data)
+{
+ apr_bucket_refcount *r = data;
+ r->refcount--;
+ return (r->refcount == 0);
+}
+
+APU_DECLARE(apr_bucket *) apr_bucket_shared_make(apr_bucket *b, void *data,
+ apr_off_t start,
+ apr_size_t length)
+{
+ apr_bucket_refcount *r = data;
+
+ b->data = r;
+ b->start = start;
+ b->length = length;
+ /* caller initializes the type field */
+ r->refcount = 1;
+
+ return b;
+}
diff --git a/buckets/apr_buckets_simple.c b/buckets/apr_buckets_simple.c
new file mode 100644
index 0000000..cef748b
--- /dev/null
+++ b/buckets/apr_buckets_simple.c
@@ -0,0 +1,137 @@
+/* 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.
+ */
+
+#include "apr_buckets.h"
+
+APU_DECLARE_NONSTD(apr_status_t) apr_bucket_simple_copy(apr_bucket *a,
+ apr_bucket **b)
+{
+ *b = apr_bucket_alloc(sizeof(**b), a->list); /* XXX: check for failure? */
+ **b = *a;
+
+ return APR_SUCCESS;
+}
+
+APU_DECLARE_NONSTD(apr_status_t) apr_bucket_simple_split(apr_bucket *a,
+ apr_size_t point)
+{
+ apr_bucket *b;
+
+ if (point > a->length) {
+ return APR_EINVAL;
+ }
+
+ apr_bucket_simple_copy(a, &b);
+
+ a->length = point;
+ b->length -= point;
+ b->start += point;
+
+ APR_BUCKET_INSERT_AFTER(a, b);
+
+ return APR_SUCCESS;
+}
+
+static apr_status_t simple_bucket_read(apr_bucket *b, const char **str,
+ apr_size_t *len, apr_read_type_e block)
+{
+ *str = (char *)b->data + b->start;
+ *len = b->length;
+ return APR_SUCCESS;
+}
+
+APU_DECLARE(apr_bucket *) apr_bucket_immortal_make(apr_bucket *b,
+ const char *buf,
+ apr_size_t length)
+{
+ b->data = (char *)buf;
+ b->length = length;
+ b->start = 0;
+ b->type = &apr_bucket_type_immortal;
+
+ return b;
+}
+
+APU_DECLARE(apr_bucket *) apr_bucket_immortal_create(const char *buf,
+ apr_size_t length,
+ apr_bucket_alloc_t *list)
+{
+ apr_bucket *b = apr_bucket_alloc(sizeof(*b), list);
+
+ APR_BUCKET_INIT(b);
+ b->free = apr_bucket_free;
+ b->list = list;
+ return apr_bucket_immortal_make(b, buf, length);
+}
+
+/*
+ * XXX: This function could do with some tweaking to reduce memory
+ * usage in various cases, e.g. share buffers in the heap between all
+ * the buckets that are set aside, or even spool set-aside data to
+ * disk if it gets too voluminous (but if it does then that's probably
+ * a bug elsewhere). There should probably be a apr_brigade_setaside()
+ * function that co-ordinates the action of all the bucket setaside
+ * functions to improve memory efficiency.
+ */
+static apr_status_t transient_bucket_setaside(apr_bucket *b, apr_pool_t *pool)
+{
+ b = apr_bucket_heap_make(b, (char *)b->data + b->start, b->length, NULL);
+ if (b == NULL) {
+ return APR_ENOMEM;
+ }
+ return APR_SUCCESS;
+}
+
+APU_DECLARE(apr_bucket *) apr_bucket_transient_make(apr_bucket *b,
+ const char *buf,
+ apr_size_t length)
+{
+ b->data = (char *)buf;
+ b->length = length;
+ b->start = 0;
+ b->type = &apr_bucket_type_transient;
+ return b;
+}
+
+APU_DECLARE(apr_bucket *) apr_bucket_transient_create(const char *buf,
+ apr_size_t length,
+ apr_bucket_alloc_t *list)
+{
+ apr_bucket *b = apr_bucket_alloc(sizeof(*b), list);
+
+ APR_BUCKET_INIT(b);
+ b->free = apr_bucket_free;
+ b->list = list;
+ return apr_bucket_transient_make(b, buf, length);
+}
+
+const apr_bucket_type_t apr_bucket_type_immortal = {
+ "IMMORTAL", 5, APR_BUCKET_DATA,
+ apr_bucket_destroy_noop,
+ simple_bucket_read,
+ apr_bucket_setaside_noop,
+ apr_bucket_simple_split,
+ apr_bucket_simple_copy
+};
+
+APU_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_transient = {
+ "TRANSIENT", 5, APR_BUCKET_DATA,
+ apr_bucket_destroy_noop,
+ simple_bucket_read,
+ transient_bucket_setaside,
+ apr_bucket_simple_split,
+ apr_bucket_simple_copy
+};
diff --git a/buckets/apr_buckets_socket.c b/buckets/apr_buckets_socket.c
new file mode 100644
index 0000000..68eae43
--- /dev/null
+++ b/buckets/apr_buckets_socket.c
@@ -0,0 +1,114 @@
+/* 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.
+ */
+
+#include "apr_buckets.h"
+
+static apr_status_t socket_bucket_read(apr_bucket *a, const char **str,
+ apr_size_t *len, apr_read_type_e block)
+{
+ apr_socket_t *p = a->data;
+ char *buf;
+ apr_status_t rv;
+ apr_interval_time_t timeout;
+
+ if (block == APR_NONBLOCK_READ) {
+ apr_socket_timeout_get(p, &timeout);
+ apr_socket_timeout_set(p, 0);
+ }
+
+ *str = NULL;
+ *len = APR_BUCKET_BUFF_SIZE;
+ buf = apr_bucket_alloc(*len, a->list); /* XXX: check for failure? */
+
+ rv = apr_socket_recv(p, buf, len);
+
+ if (block == APR_NONBLOCK_READ) {
+ apr_socket_timeout_set(p, timeout);
+ }
+
+ if (rv != APR_SUCCESS && rv != APR_EOF) {
+ apr_bucket_free(buf);
+ return rv;
+ }
+ /*
+ * If there's more to read we have to keep the rest of the socket
+ * for later. XXX: Note that more complicated bucket types that
+ * refer to data not in memory and must therefore have a read()
+ * function similar to this one should be wary of copying this
+ * code because if they have a destroy function they probably
+ * want to migrate the bucket's subordinate structure from the
+ * old bucket to a raw new one and adjust it as appropriate,
+ * rather than destroying the old one and creating a completely
+ * new bucket.
+ *
+ * Even if there is nothing more to read, don't close the socket here
+ * as we have to use it to send any response :) We could shut it
+ * down for reading, but there is no benefit to doing so.
+ */
+ if (*len > 0) {
+ apr_bucket_heap *h;
+ /* Change the current bucket to refer to what we read */
+ a = apr_bucket_heap_make(a, buf, *len, apr_bucket_free);
+ h = a->data;
+ h->alloc_len = APR_BUCKET_BUFF_SIZE; /* note the real buffer size */
+ *str = buf;
+ APR_BUCKET_INSERT_AFTER(a, apr_bucket_socket_create(p, a->list));
+ }
+ else {
+ apr_bucket_free(buf);
+ a = apr_bucket_immortal_make(a, "", 0);
+ *str = a->data;
+ }
+ return APR_SUCCESS;
+}
+
+APU_DECLARE(apr_bucket *) apr_bucket_socket_make(apr_bucket *b, apr_socket_t *p)
+{
+ /*
+ * XXX: We rely on a cleanup on some pool or other to actually
+ * destroy the socket. We should probably explicitly call apr to
+ * destroy it instead.
+ *
+ * Note that typically the socket is allocated from the connection pool
+ * so it will disappear when the connection is finished.
+ */
+ b->type = &apr_bucket_type_socket;
+ b->length = (apr_size_t)(-1);
+ b->start = -1;
+ b->data = p;
+
+ return b;
+}
+
+APU_DECLARE(apr_bucket *) apr_bucket_socket_create(apr_socket_t *p,
+ apr_bucket_alloc_t *list)
+{
+ apr_bucket *b = apr_bucket_alloc(sizeof(*b), list);
+
+ APR_BUCKET_INIT(b);
+ b->free = apr_bucket_free;
+ b->list = list;
+ return apr_bucket_socket_make(b, p);
+}
+
+APU_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_socket = {
+ "SOCKET", 5, APR_BUCKET_DATA,
+ apr_bucket_destroy_noop,
+ socket_bucket_read,
+ apr_bucket_setaside_notimpl,
+ apr_bucket_split_notimpl,
+ apr_bucket_copy_notimpl
+};
diff --git a/build-outputs.mk b/build-outputs.mk
new file mode 100644
index 0000000..f6042d6
--- /dev/null
+++ b/build-outputs.mk
@@ -0,0 +1,152 @@
+# DO NOT EDIT. AUTOMATICALLY GENERATED.
+
+buckets/apr_brigade.lo: buckets/apr_brigade.c .make.dirs include/apr_buckets.h
+buckets/apr_buckets.lo: buckets/apr_buckets.c .make.dirs include/apr_buckets.h
+buckets/apr_buckets_alloc.lo: buckets/apr_buckets_alloc.c .make.dirs include/apr_buckets.h
+buckets/apr_buckets_eos.lo: buckets/apr_buckets_eos.c .make.dirs include/apr_buckets.h
+buckets/apr_buckets_file.lo: buckets/apr_buckets_file.c .make.dirs include/apr_buckets.h
+buckets/apr_buckets_flush.lo: buckets/apr_buckets_flush.c .make.dirs include/apr_buckets.h
+buckets/apr_buckets_heap.lo: buckets/apr_buckets_heap.c .make.dirs include/apr_buckets.h
+buckets/apr_buckets_mmap.lo: buckets/apr_buckets_mmap.c .make.dirs include/apr_buckets.h
+buckets/apr_buckets_pipe.lo: buckets/apr_buckets_pipe.c .make.dirs include/apr_buckets.h
+buckets/apr_buckets_pool.lo: buckets/apr_buckets_pool.c .make.dirs include/apr_buckets.h
+buckets/apr_buckets_refcount.lo: buckets/apr_buckets_refcount.c .make.dirs include/apr_buckets.h
+buckets/apr_buckets_simple.lo: buckets/apr_buckets_simple.c .make.dirs include/apr_buckets.h
+buckets/apr_buckets_socket.lo: buckets/apr_buckets_socket.c .make.dirs include/apr_buckets.h
+crypto/apr_crypto.lo: crypto/apr_crypto.c .make.dirs include/apr_crypto.h include/apu_errno.h include/apu_version.h include/private/apr_crypto_internal.h include/private/apu_internal.h
+crypto/apr_md4.lo: crypto/apr_md4.c .make.dirs include/apr_md4.h include/apr_xlate.h
+crypto/apr_md5.lo: crypto/apr_md5.c .make.dirs include/apr_md5.h include/apr_xlate.h
+crypto/apr_passwd.lo: crypto/apr_passwd.c .make.dirs include/apr_md5.h include/apr_sha1.h include/apr_xlate.h
+crypto/apr_sha1.lo: crypto/apr_sha1.c .make.dirs include/apr_base64.h include/apr_sha1.h include/apr_xlate.h
+crypto/apr_siphash.lo: crypto/apr_siphash.c .make.dirs include/apr_siphash.h
+crypto/crypt_blowfish.lo: crypto/crypt_blowfish.c .make.dirs
+crypto/getuuid.lo: crypto/getuuid.c .make.dirs include/apr_md5.h include/apr_uuid.h include/apr_xlate.h
+crypto/uuid.lo: crypto/uuid.c .make.dirs include/apr_uuid.h
+dbd/apr_dbd.lo: dbd/apr_dbd.c .make.dirs include/apr_dbd.h include/apu_version.h include/private/apr_dbd_internal.h include/private/apu_internal.h
+dbm/apr_dbm.lo: dbm/apr_dbm.c .make.dirs include/apr_dbm.h include/apu_version.h include/private/apr_dbm_private.h include/private/apu_internal.h
+dbm/apr_dbm_sdbm.lo: dbm/apr_dbm_sdbm.c .make.dirs include/apr_dbm.h include/apr_sdbm.h include/private/apr_dbm_private.h
+dbm/sdbm/sdbm.lo: dbm/sdbm/sdbm.c .make.dirs include/apr_sdbm.h
+dbm/sdbm/sdbm_hash.lo: dbm/sdbm/sdbm_hash.c .make.dirs include/apr_sdbm.h
+dbm/sdbm/sdbm_lock.lo: dbm/sdbm/sdbm_lock.c .make.dirs include/apr_sdbm.h
+dbm/sdbm/sdbm_pair.lo: dbm/sdbm/sdbm_pair.c .make.dirs include/apr_sdbm.h
+encoding/apr_base64.lo: encoding/apr_base64.c .make.dirs include/apr_base64.h include/apr_xlate.h
+hooks/apr_hooks.lo: hooks/apr_hooks.c .make.dirs include/apr_hooks.h include/apr_optional.h include/apr_optional_hooks.h
+ldap/apr_ldap_stub.lo: ldap/apr_ldap_stub.c .make.dirs include/apu_version.h include/private/apu_internal.h
+ldap/apr_ldap_url.lo: ldap/apr_ldap_url.c .make.dirs
+memcache/apr_memcache.lo: memcache/apr_memcache.c .make.dirs include/apr_buckets.h include/apr_memcache.h include/apr_reslist.h
+misc/apr_date.lo: misc/apr_date.c .make.dirs include/apr_date.h
+misc/apr_queue.lo: misc/apr_queue.c .make.dirs include/apr_queue.h
+misc/apr_reslist.lo: misc/apr_reslist.c .make.dirs include/apr_reslist.h
+misc/apr_rmm.lo: misc/apr_rmm.c .make.dirs include/apr_anylock.h include/apr_rmm.h
+misc/apr_thread_pool.lo: misc/apr_thread_pool.c .make.dirs include/apr_thread_pool.h
+misc/apu_dso.lo: misc/apu_dso.c .make.dirs include/apu_version.h include/private/apu_internal.h
+misc/apu_version.lo: misc/apu_version.c .make.dirs include/apu_version.h
+redis/apr_redis.lo: redis/apr_redis.c .make.dirs include/apr_buckets.h include/apr_redis.h include/apr_reslist.h
+strmatch/apr_strmatch.lo: strmatch/apr_strmatch.c .make.dirs include/apr_strmatch.h
+uri/apr_uri.lo: uri/apr_uri.c .make.dirs include/apr_uri.h
+xlate/xlate.lo: xlate/xlate.c .make.dirs include/apr_xlate.h
+xml/apr_xml.lo: xml/apr_xml.c .make.dirs include/apr_xlate.h include/apr_xml.h
+
+OBJECTS_all = buckets/apr_brigade.lo buckets/apr_buckets.lo buckets/apr_buckets_alloc.lo buckets/apr_buckets_eos.lo buckets/apr_buckets_file.lo buckets/apr_buckets_flush.lo buckets/apr_buckets_heap.lo buckets/apr_buckets_mmap.lo buckets/apr_buckets_pipe.lo buckets/apr_buckets_pool.lo buckets/apr_buckets_refcount.lo buckets/apr_buckets_simple.lo buckets/apr_buckets_socket.lo crypto/apr_crypto.lo crypto/apr_md4.lo crypto/apr_md5.lo crypto/apr_passwd.lo crypto/apr_sha1.lo crypto/apr_siphash.lo crypto/crypt_blowfish.lo crypto/getuuid.lo crypto/uuid.lo dbd/apr_dbd.lo dbm/apr_dbm.lo dbm/apr_dbm_sdbm.lo dbm/sdbm/sdbm.lo dbm/sdbm/sdbm_hash.lo dbm/sdbm/sdbm_lock.lo dbm/sdbm/sdbm_pair.lo encoding/apr_base64.lo hooks/apr_hooks.lo ldap/apr_ldap_stub.lo ldap/apr_ldap_url.lo memcache/apr_memcache.lo misc/apr_date.lo misc/apr_queue.lo misc/apr_reslist.lo misc/apr_rmm.lo misc/apr_thread_pool.lo misc/apu_dso.lo misc/apu_version.lo redis/apr_redis.lo strmatch/apr_strmatch.lo uri/apr_uri.lo xlate/xlate.lo xml/apr_xml.lo
+
+OBJECTS_unix = $(OBJECTS_all)
+
+OBJECTS_aix = $(OBJECTS_all)
+
+OBJECTS_beos = $(OBJECTS_all)
+
+OBJECTS_os2 = $(OBJECTS_all)
+
+OBJECTS_os390 = $(OBJECTS_all)
+
+OBJECTS_win32 = $(OBJECTS_all)
+
+HEADERS = $(top_srcdir)/include/apr_anylock.h $(top_srcdir)/include/apr_base64.h $(top_srcdir)/include/apr_buckets.h $(top_srcdir)/include/apr_crypto.h $(top_srcdir)/include/apr_date.h $(top_srcdir)/include/apr_dbd.h $(top_srcdir)/include/apr_dbm.h $(top_srcdir)/include/apr_hooks.h $(top_srcdir)/include/apr_ldap_init.h $(top_srcdir)/include/apr_ldap_option.h $(top_srcdir)/include/apr_ldap_rebind.h $(top_srcdir)/include/apr_ldap_url.h $(top_srcdir)/include/apr_md4.h $(top_srcdir)/include/apr_md5.h $(top_srcdir)/include/apr_memcache.h $(top_srcdir)/include/apr_optional.h $(top_srcdir)/include/apr_optional_hooks.h $(top_srcdir)/include/apr_queue.h $(top_srcdir)/include/apr_redis.h $(top_srcdir)/include/apr_reslist.h $(top_srcdir)/include/apr_rmm.h $(top_srcdir)/include/apr_sdbm.h $(top_srcdir)/include/apr_sha1.h $(top_srcdir)/include/apr_siphash.h $(top_srcdir)/include/apr_strmatch.h $(top_srcdir)/include/apr_thread_pool.h $(top_srcdir)/include/apr_uri.h $(top_srcdir)/include/apr_uuid.h $(top_srcdir)/include/apr_xlate.h $(top_srcdir)/include/apr_xml.h $(top_srcdir)/include/apu_errno.h $(top_srcdir)/include/apu_version.h $(top_srcdir)/include/private/apr_crypto_internal.h $(top_srcdir)/include/private/apr_dbd_internal.h $(top_srcdir)/include/private/apr_dbd_odbc_v2.h $(top_srcdir)/include/private/apr_dbm_private.h $(top_srcdir)/include/private/apu_internal.h
+
+SOURCE_DIRS = xml redis dbm encoding hooks buckets uri misc crypto dbd strmatch memcache dbm/sdbm ldap xlate $(EXTRA_SOURCE_DIRS)
+
+ldap/apr_ldap_init.lo: ldap/apr_ldap_init.c .make.dirs include/private/apu_internal.h
+ldap/apr_ldap_option.lo: ldap/apr_ldap_option.c .make.dirs
+ldap/apr_ldap_rebind.lo: ldap/apr_ldap_rebind.c .make.dirs include/apr_ldap_rebind.h
+OBJECTS_ldap = ldap/apr_ldap_init.lo ldap/apr_ldap_option.lo ldap/apr_ldap_rebind.lo
+MODULE_ldap = ldap/apr_ldap.la
+ldap/apr_ldap.la: ldap/apr_ldap_init.lo ldap/apr_ldap_option.lo ldap/apr_ldap_rebind.lo
+ $(LINK_MODULE) -o $@ $(OBJECTS_ldap) $(LDADD_ldap)
+
+crypto/apr_crypto_openssl.lo: crypto/apr_crypto_openssl.c .make.dirs include/apr_buckets.h include/apr_crypto.h include/apu_errno.h include/private/apr_crypto_internal.h
+OBJECTS_crypto_openssl = crypto/apr_crypto_openssl.lo
+MODULE_crypto_openssl = crypto/apr_crypto_openssl.la
+crypto/apr_crypto_openssl.la: crypto/apr_crypto_openssl.lo
+ $(LINK_MODULE) -o $@ $(OBJECTS_crypto_openssl) $(LDADD_crypto_openssl)
+
+crypto/apr_crypto_nss.lo: crypto/apr_crypto_nss.c .make.dirs include/apr_buckets.h include/apr_crypto.h include/apu_errno.h include/private/apr_crypto_internal.h
+OBJECTS_crypto_nss = crypto/apr_crypto_nss.lo
+MODULE_crypto_nss = crypto/apr_crypto_nss.la
+crypto/apr_crypto_nss.la: crypto/apr_crypto_nss.lo
+ $(LINK_MODULE) -o $@ $(OBJECTS_crypto_nss) $(LDADD_crypto_nss)
+
+crypto/apr_crypto_commoncrypto.lo: crypto/apr_crypto_commoncrypto.c .make.dirs include/apr_buckets.h include/apr_crypto.h include/apu_errno.h include/private/apr_crypto_internal.h
+OBJECTS_crypto_commoncrypto = crypto/apr_crypto_commoncrypto.lo
+MODULE_crypto_commoncrypto = crypto/apr_crypto_commoncrypto.la
+crypto/apr_crypto_commoncrypto.la: crypto/apr_crypto_commoncrypto.lo
+ $(LINK_MODULE) -o $@ $(OBJECTS_crypto_commoncrypto) $(LDADD_crypto_commoncrypto)
+
+dbd/apr_dbd_pgsql.lo: dbd/apr_dbd_pgsql.c .make.dirs include/apr_buckets.h include/apr_dbd.h include/private/apr_dbd_internal.h
+OBJECTS_dbd_pgsql = dbd/apr_dbd_pgsql.lo
+MODULE_dbd_pgsql = dbd/apr_dbd_pgsql.la
+dbd/apr_dbd_pgsql.la: dbd/apr_dbd_pgsql.lo
+ $(LINK_MODULE) -o $@ $(OBJECTS_dbd_pgsql) $(LDADD_dbd_pgsql)
+
+dbd/apr_dbd_sqlite2.lo: dbd/apr_dbd_sqlite2.c .make.dirs include/apr_buckets.h include/apr_dbd.h include/private/apr_dbd_internal.h
+OBJECTS_dbd_sqlite2 = dbd/apr_dbd_sqlite2.lo
+MODULE_dbd_sqlite2 = dbd/apr_dbd_sqlite2.la
+dbd/apr_dbd_sqlite2.la: dbd/apr_dbd_sqlite2.lo
+ $(LINK_MODULE) -o $@ $(OBJECTS_dbd_sqlite2) $(LDADD_dbd_sqlite2)
+
+dbd/apr_dbd_sqlite3.lo: dbd/apr_dbd_sqlite3.c .make.dirs include/apr_buckets.h include/apr_dbd.h include/private/apr_dbd_internal.h
+OBJECTS_dbd_sqlite3 = dbd/apr_dbd_sqlite3.lo
+MODULE_dbd_sqlite3 = dbd/apr_dbd_sqlite3.la
+dbd/apr_dbd_sqlite3.la: dbd/apr_dbd_sqlite3.lo
+ $(LINK_MODULE) -o $@ $(OBJECTS_dbd_sqlite3) $(LDADD_dbd_sqlite3)
+
+dbd/apr_dbd_oracle.lo: dbd/apr_dbd_oracle.c .make.dirs include/apr_buckets.h include/apr_dbd.h include/private/apr_dbd_internal.h
+OBJECTS_dbd_oracle = dbd/apr_dbd_oracle.lo
+MODULE_dbd_oracle = dbd/apr_dbd_oracle.la
+dbd/apr_dbd_oracle.la: dbd/apr_dbd_oracle.lo
+ $(LINK_MODULE) -o $@ $(OBJECTS_dbd_oracle) $(LDADD_dbd_oracle)
+
+dbd/apr_dbd_mysql.lo: dbd/apr_dbd_mysql.c .make.dirs include/apr_buckets.h include/apr_dbd.h include/apu_version.h include/private/apr_dbd_internal.h
+OBJECTS_dbd_mysql = dbd/apr_dbd_mysql.lo
+MODULE_dbd_mysql = dbd/apr_dbd_mysql.la
+dbd/apr_dbd_mysql.la: dbd/apr_dbd_mysql.lo
+ $(LINK_MODULE) -o $@ $(OBJECTS_dbd_mysql) $(LDADD_dbd_mysql)
+
+dbd/apr_dbd_odbc.lo: dbd/apr_dbd_odbc.c .make.dirs include/apr_buckets.h include/apr_dbd.h include/apu_version.h include/private/apr_dbd_internal.h include/private/apr_dbd_odbc_v2.h
+OBJECTS_dbd_odbc = dbd/apr_dbd_odbc.lo
+MODULE_dbd_odbc = dbd/apr_dbd_odbc.la
+dbd/apr_dbd_odbc.la: dbd/apr_dbd_odbc.lo
+ $(LINK_MODULE) -o $@ $(OBJECTS_dbd_odbc) $(LDADD_dbd_odbc)
+
+dbm/apr_dbm_berkeleydb.lo: dbm/apr_dbm_berkeleydb.c .make.dirs include/apr_dbm.h include/private/apr_dbm_private.h
+OBJECTS_dbm_db = dbm/apr_dbm_berkeleydb.lo
+MODULE_dbm_db = dbm/apr_dbm_db.la
+dbm/apr_dbm_db.la: dbm/apr_dbm_berkeleydb.lo
+ $(LINK_MODULE) -o $@ $(OBJECTS_dbm_db) $(LDADD_dbm_db)
+
+dbm/apr_dbm_gdbm.lo: dbm/apr_dbm_gdbm.c .make.dirs include/apr_dbm.h include/private/apr_dbm_private.h
+OBJECTS_dbm_gdbm = dbm/apr_dbm_gdbm.lo
+MODULE_dbm_gdbm = dbm/apr_dbm_gdbm.la
+dbm/apr_dbm_gdbm.la: dbm/apr_dbm_gdbm.lo
+ $(LINK_MODULE) -o $@ $(OBJECTS_dbm_gdbm) $(LDADD_dbm_gdbm)
+
+dbm/apr_dbm_ndbm.lo: dbm/apr_dbm_ndbm.c .make.dirs include/apr_dbm.h include/private/apr_dbm_private.h
+OBJECTS_dbm_ndbm = dbm/apr_dbm_ndbm.lo
+MODULE_dbm_ndbm = dbm/apr_dbm_ndbm.la
+dbm/apr_dbm_ndbm.la: dbm/apr_dbm_ndbm.lo
+ $(LINK_MODULE) -o $@ $(OBJECTS_dbm_ndbm) $(LDADD_dbm_ndbm)
+
+BUILD_DIRS = buckets crypto dbd dbm dbm/sdbm encoding hooks ldap memcache misc redis strmatch uri xlate xml
+
+.make.dirs: $(srcdir)/build-outputs.mk
+ @for d in $(BUILD_DIRS); do test -d $$d || mkdir $$d; done
+ @echo timestamp > $@
diff --git a/build.conf b/build.conf
new file mode 100644
index 0000000..86e8c34
--- /dev/null
+++ b/build.conf
@@ -0,0 +1,104 @@
+#
+# Configuration file for APRUTIL. Used by APR/build/gen-build.py
+#
+
+[options]
+
+# the platform-independent .c files
+paths =
+ buckets/*.c
+ crypto/apr_crypto.c
+ crypto/apr_md4.c
+ crypto/apr_md5.c
+ crypto/apr_passwd.c
+ crypto/apr_sha1.c
+ crypto/apr_siphash.c
+ crypto/getuuid.c
+ crypto/uuid.c
+ crypto/crypt_blowfish.c
+ dbm/apr_dbm_sdbm.c
+ dbm/apr_dbm.c
+ dbm/sdbm/*.c
+ encoding/*.c
+ hooks/*.c
+ ldap/apr_ldap_stub.c
+ ldap/apr_ldap_url.c
+ misc/*.c
+ memcache/*.c
+ redis/*.c
+ uri/apr_uri.c
+ xml/*.c
+ strmatch/*.c
+ xlate/*.c
+ dbd/apr_dbd.c
+
+# we have no platform-specific subdirs
+platform_dirs =
+
+# the public headers
+headers = include/*.h include/private/*.h
+
+modules =
+ ldap crypto_openssl crypto_nss crypto_commoncrypto dbd_pgsql
+ dbd_sqlite2 dbd_sqlite3 dbd_oracle dbd_mysql dbd_odbc
+ dbm_db dbm_gdbm dbm_ndbm
+
+# gen_uri_delim.c
+
+# we have a recursive makefile for the test files (for now)
+# test/*.c
+
+[crypto_commoncrypto]
+paths = crypto/apr_crypto_commoncrypto.c
+target = crypto/apr_crypto_commoncrypto.la
+
+[crypto_openssl]
+paths = crypto/apr_crypto_openssl.c
+target = crypto/apr_crypto_openssl.la
+
+[crypto_nss]
+paths = crypto/apr_crypto_nss.c
+target = crypto/apr_crypto_nss.la
+
+[dbd_pgsql]
+paths = dbd/apr_dbd_pgsql.c
+target = dbd/apr_dbd_pgsql.la
+
+[dbd_sqlite2]
+paths = dbd/apr_dbd_sqlite2.c
+target = dbd/apr_dbd_sqlite2.la
+
+[dbd_sqlite3]
+paths = dbd/apr_dbd_sqlite3.c
+target = dbd/apr_dbd_sqlite3.la
+
+[dbd_oracle]
+paths = dbd/apr_dbd_oracle.c
+target = dbd/apr_dbd_oracle.la
+
+[dbd_mysql]
+paths = dbd/apr_dbd_mysql.c
+target = dbd/apr_dbd_mysql.la
+
+[dbd_odbc]
+paths = dbd/apr_dbd_odbc.c
+target = dbd/apr_dbd_odbc.la
+
+[dbm_db]
+paths = dbm/apr_dbm_berkeleydb.c
+target = dbm/apr_dbm_db.la
+
+[dbm_gdbm]
+paths = dbm/apr_dbm_gdbm.c
+target = dbm/apr_dbm_gdbm.la
+
+[dbm_ndbm]
+paths = dbm/apr_dbm_ndbm.c
+target = dbm/apr_dbm_ndbm.la
+
+[ldap]
+paths = ldap/apr_ldap_init.c
+ ldap/apr_ldap_option.c
+ ldap/apr_ldap_rebind.c
+target = ldap/apr_ldap.la
+
diff --git a/build/apr_common.m4 b/build/apr_common.m4
new file mode 100644
index 0000000..6b5c0f0
--- /dev/null
+++ b/build/apr_common.m4
@@ -0,0 +1,990 @@
+dnl -------------------------------------------------------- -*- autoconf -*-
+dnl Licensed to the Apache Software Foundation (ASF) under one or more
+dnl contributor license agreements. See the NOTICE file distributed with
+dnl this work for additional information regarding copyright ownership.
+dnl The ASF licenses this file to You under the Apache License, Version 2.0
+dnl (the "License"); you may not use this file except in compliance with
+dnl the License. You may obtain a copy of the License at
+dnl
+dnl http://www.apache.org/licenses/LICENSE-2.0
+dnl
+dnl Unless required by applicable law or agreed to in writing, software
+dnl distributed under the License is distributed on an "AS IS" BASIS,
+dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+dnl See the License for the specific language governing permissions and
+dnl limitations under the License.
+
+dnl
+dnl apr_common.m4: APR's general-purpose autoconf macros
+dnl
+
+dnl
+dnl APR_CONFIG_NICE(filename)
+dnl
+dnl Saves a snapshot of the configure command-line for later reuse
+dnl
+AC_DEFUN([APR_CONFIG_NICE], [
+ rm -f $1
+ cat >$1<<EOF
+#! /bin/sh
+#
+# Created by configure
+
+EOF
+ if test -n "$CC"; then
+ echo "CC=\"$CC\"; export CC" >> $1
+ fi
+ if test -n "$CFLAGS"; then
+ echo "CFLAGS=\"$CFLAGS\"; export CFLAGS" >> $1
+ fi
+ if test -n "$CPPFLAGS"; then
+ echo "CPPFLAGS=\"$CPPFLAGS\"; export CPPFLAGS" >> $1
+ fi
+ if test -n "$LDFLAGS"; then
+ echo "LDFLAGS=\"$LDFLAGS\"; export LDFLAGS" >> $1
+ fi
+ if test -n "$LTFLAGS"; then
+ echo "LTFLAGS=\"$LTFLAGS\"; export LTFLAGS" >> $1
+ fi
+ if test -n "$LIBS"; then
+ echo "LIBS=\"$LIBS\"; export LIBS" >> $1
+ fi
+ if test -n "$INCLUDES"; then
+ echo "INCLUDES=\"$INCLUDES\"; export INCLUDES" >> $1
+ fi
+ if test -n "$NOTEST_CFLAGS"; then
+ echo "NOTEST_CFLAGS=\"$NOTEST_CFLAGS\"; export NOTEST_CFLAGS" >> $1
+ fi
+ if test -n "$NOTEST_CPPFLAGS"; then
+ echo "NOTEST_CPPFLAGS=\"$NOTEST_CPPFLAGS\"; export NOTEST_CPPFLAGS" >> $1
+ fi
+ if test -n "$NOTEST_LDFLAGS"; then
+ echo "NOTEST_LDFLAGS=\"$NOTEST_LDFLAGS\"; export NOTEST_LDFLAGS" >> $1
+ fi
+ if test -n "$NOTEST_LIBS"; then
+ echo "NOTEST_LIBS=\"$NOTEST_LIBS\"; export NOTEST_LIBS" >> $1
+ fi
+
+ # Retrieve command-line arguments.
+ eval "set x $[0] $ac_configure_args"
+ shift
+
+ for arg
+ do
+ APR_EXPAND_VAR(arg, $arg)
+ echo "\"[$]arg\" \\" >> $1
+ done
+ echo '"[$]@"' >> $1
+ chmod +x $1
+])dnl
+
+dnl APR_MKDIR_P_CHECK(fallback-mkdir-p)
+dnl checks whether mkdir -p works
+AC_DEFUN([APR_MKDIR_P_CHECK], [
+ AC_CACHE_CHECK(for working mkdir -p, ac_cv_mkdir_p,[
+ test -d conftestdir && rm -rf conftestdir
+ mkdir -p conftestdir/somedir >/dev/null 2>&1
+ if test -d conftestdir/somedir; then
+ ac_cv_mkdir_p=yes
+ else
+ ac_cv_mkdir_p=no
+ fi
+ rm -rf conftestdir
+ ])
+ if test "$ac_cv_mkdir_p" = "yes"; then
+ mkdir_p="mkdir -p"
+ else
+ mkdir_p="$1"
+ fi
+])
+
+dnl
+dnl APR_SUBDIR_CONFIG(dir [, sub-package-cmdline-args, args-to-drop])
+dnl
+dnl dir: directory to find configure in
+dnl sub-package-cmdline-args: arguments to add to the invocation (optional)
+dnl args-to-drop: arguments to drop from the invocation (optional)
+dnl
+dnl Note: This macro relies on ac_configure_args being set properly.
+dnl
+dnl The args-to-drop argument is shoved into a case statement, so
+dnl multiple arguments can be separated with a |.
+dnl
+dnl Note: Older versions of autoconf do not single-quote args, while 2.54+
+dnl places quotes around every argument. So, if you want to drop the
+dnl argument called --enable-layout, you must pass the third argument as:
+dnl [--enable-layout=*|\'--enable-layout=*]
+dnl
+dnl Trying to optimize this is left as an exercise to the reader who wants
+dnl to put up with more autoconf craziness. I give up.
+dnl
+AC_DEFUN([APR_SUBDIR_CONFIG], [
+ # save our work to this point; this allows the sub-package to use it
+ AC_CACHE_SAVE
+
+ echo "configuring package in $1 now"
+ ac_popdir=`pwd`
+ apr_config_subdirs="$1"
+ test -d $1 || $mkdir_p $1
+ ac_abs_srcdir=`(cd $srcdir/$1 && pwd)`
+ cd $1
+
+changequote(, )dnl
+ # A "../" for each directory in /$config_subdirs.
+ ac_dots=`echo $apr_config_subdirs|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
+changequote([, ])dnl
+
+ # Make the cache file pathname absolute for the subdirs
+ # required to correctly handle subdirs that might actually
+ # be symlinks
+ case "$cache_file" in
+ /*) # already absolute
+ ac_sub_cache_file=$cache_file ;;
+ *) # Was relative path.
+ ac_sub_cache_file="$ac_popdir/$cache_file" ;;
+ esac
+
+ ifelse($3, [], [apr_configure_args=$ac_configure_args],[
+ apr_configure_args=
+ apr_sep=
+ for apr_configure_arg in $ac_configure_args
+ do
+ case "$apr_configure_arg" in
+ $3)
+ continue ;;
+ esac
+ apr_configure_args="$apr_configure_args$apr_sep'$apr_configure_arg'"
+ apr_sep=" "
+ done
+ ])
+
+ dnl autoconf doesn't add --silent to ac_configure_args; explicitly pass it
+ test "x$silent" = "xyes" && apr_configure_args="$apr_configure_args --silent"
+
+ dnl AC_CONFIG_SUBDIRS silences option warnings, emulate this for 2.62
+ apr_configure_args="--disable-option-checking $apr_configure_args"
+
+ dnl The eval makes quoting arguments work - specifically the second argument
+ dnl where the quoting mechanisms used is "" rather than [].
+ dnl
+ dnl We need to execute another shell because some autoconf/shell combinations
+ dnl will choke after doing repeated APR_SUBDIR_CONFIG()s. (Namely Solaris
+ dnl and autoconf-2.54+)
+ if eval $SHELL $ac_abs_srcdir/configure $apr_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_abs_srcdir $2
+ then :
+ echo "$1 configured properly"
+ else
+ echo "configure failed for $1"
+ exit 1
+ fi
+
+ cd $ac_popdir
+
+ # grab any updates from the sub-package
+ AC_CACHE_LOAD
+])dnl
+
+dnl
+dnl APR_SAVE_THE_ENVIRONMENT(variable_name)
+dnl
+dnl Stores the variable (usually a Makefile macro) for later restoration
+dnl
+AC_DEFUN([APR_SAVE_THE_ENVIRONMENT], [
+ apr_ste_save_$1="$$1"
+])dnl
+
+dnl
+dnl APR_RESTORE_THE_ENVIRONMENT(variable_name, prefix_)
+dnl
+dnl Uses the previously saved variable content to figure out what configure
+dnl has added to the variable, moving the new bits to prefix_variable_name
+dnl and restoring the original variable contents. This makes it possible
+dnl for a user to override configure when it does something stupid.
+dnl
+AC_DEFUN([APR_RESTORE_THE_ENVIRONMENT], [
+dnl Check whether $apr_ste_save_$1 is empty or
+dnl only whitespace. The verbatim "X" is token number 1,
+dnl the following whitespace will be ignored.
+set X $apr_ste_save_$1
+if test ${#} -eq 1; then
+ $2$1="$$1"
+ $1=
+else
+ if test "x$apr_ste_save_$1" = "x$$1"; then
+ $2$1=
+ else
+ $2$1=`echo "$$1" | sed -e "s%${apr_ste_save_$1}%%"`
+ $1="$apr_ste_save_$1"
+ fi
+fi
+if test "x$silent" != "xyes"; then
+ echo " restoring $1 to \"$$1\""
+ echo " setting $2$1 to \"$$2$1\""
+fi
+AC_SUBST($2$1)
+])dnl
+
+dnl
+dnl APR_SETIFNULL(variable, value)
+dnl
+dnl Set variable iff it's currently null
+dnl
+AC_DEFUN([APR_SETIFNULL], [
+ if test -z "$$1"; then
+ test "x$silent" != "xyes" && echo " setting $1 to \"$2\""
+ $1="$2"
+ fi
+])dnl
+
+dnl
+dnl APR_SETVAR(variable, value)
+dnl
+dnl Set variable no matter what
+dnl
+AC_DEFUN([APR_SETVAR], [
+ test "x$silent" != "xyes" && echo " forcing $1 to \"$2\""
+ $1="$2"
+])dnl
+
+dnl
+dnl APR_ADDTO(variable, value)
+dnl
+dnl Add value to variable
+dnl
+AC_DEFUN([APR_ADDTO], [
+ if test "x$$1" = "x"; then
+ test "x$silent" != "xyes" && echo " setting $1 to \"$2\""
+ $1="$2"
+ else
+ apr_addto_bugger="$2"
+ for i in $apr_addto_bugger; do
+ apr_addto_duplicate="0"
+ for j in $$1; do
+ if test "x$i" = "x$j"; then
+ apr_addto_duplicate="1"
+ break
+ fi
+ done
+ if test $apr_addto_duplicate = "0"; then
+ test "x$silent" != "xyes" && echo " adding \"$i\" to $1"
+ $1="$$1 $i"
+ fi
+ done
+ fi
+])dnl
+
+dnl
+dnl APR_REMOVEFROM(variable, value)
+dnl
+dnl Remove a value from a variable
+dnl
+AC_DEFUN([APR_REMOVEFROM], [
+ if test "x$$1" = "x$2"; then
+ test "x$silent" != "xyes" && echo " nulling $1"
+ $1=""
+ else
+ apr_new_bugger=""
+ apr_removed=0
+ for i in $$1; do
+ if test "x$i" != "x$2"; then
+ apr_new_bugger="$apr_new_bugger $i"
+ else
+ apr_removed=1
+ fi
+ done
+ if test $apr_removed = "1"; then
+ test "x$silent" != "xyes" && echo " removed \"$2\" from $1"
+ $1=$apr_new_bugger
+ fi
+ fi
+]) dnl
+
+dnl
+dnl APR_CHECK_DEFINE_FILES( symbol, header_file [header_file ...] )
+dnl
+AC_DEFUN([APR_CHECK_DEFINE_FILES], [
+ AC_CACHE_CHECK([for $1 in $2],ac_cv_define_$1,[
+ ac_cv_define_$1=no
+ for curhdr in $2
+ do
+ AC_EGREP_CPP(YES_IS_DEFINED, [
+#include <$curhdr>
+#ifdef $1
+YES_IS_DEFINED
+#endif
+ ], ac_cv_define_$1=yes)
+ done
+ ])
+ if test "$ac_cv_define_$1" = "yes"; then
+ AC_DEFINE(HAVE_$1, 1, [Define if $1 is defined])
+ fi
+])
+
+
+dnl
+dnl APR_CHECK_DEFINE(symbol, header_file)
+dnl
+AC_DEFUN([APR_CHECK_DEFINE], [
+ AC_CACHE_CHECK([for $1 in $2],ac_cv_define_$1,[
+ AC_EGREP_CPP(YES_IS_DEFINED, [
+#include <$2>
+#ifdef $1
+YES_IS_DEFINED
+#endif
+ ], ac_cv_define_$1=yes, ac_cv_define_$1=no)
+ ])
+ if test "$ac_cv_define_$1" = "yes"; then
+ AC_DEFINE(HAVE_$1, 1, [Define if $1 is defined in $2])
+ fi
+])
+
+dnl
+dnl APR_CHECK_APR_DEFINE( symbol )
+dnl
+AC_DEFUN([APR_CHECK_APR_DEFINE], [
+apr_old_cppflags=$CPPFLAGS
+CPPFLAGS="$CPPFLAGS $INCLUDES"
+AC_EGREP_CPP(YES_IS_DEFINED, [
+#include <apr.h>
+#if $1
+YES_IS_DEFINED
+#endif
+], ac_cv_define_$1=yes, ac_cv_define_$1=no)
+CPPFLAGS=$apr_old_cppflags
+])
+
+dnl APR_CHECK_FILE(filename); set ac_cv_file_filename to
+dnl "yes" if 'filename' is readable, else "no".
+dnl @deprecated! - use AC_CHECK_FILE instead
+AC_DEFUN([APR_CHECK_FILE], [
+dnl Pick a safe variable name
+define([apr_cvname], ac_cv_file_[]translit([$1], [./+-], [__p_]))
+AC_CACHE_CHECK([for $1], [apr_cvname],
+[if test -r $1; then
+ apr_cvname=yes
+ else
+ apr_cvname=no
+ fi])
+])
+
+define(APR_IFALLYES,[dnl
+ac_rc=yes
+for ac_spec in $1; do
+ ac_type=`echo "$ac_spec" | sed -e 's/:.*$//'`
+ ac_item=`echo "$ac_spec" | sed -e 's/^.*://'`
+ case $ac_type in
+ header )
+ ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
+ ac_var="ac_cv_header_$ac_item"
+ ;;
+ file )
+ ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
+ ac_var="ac_cv_file_$ac_item"
+ ;;
+ func ) ac_var="ac_cv_func_$ac_item" ;;
+ struct ) ac_var="ac_cv_struct_$ac_item" ;;
+ define ) ac_var="ac_cv_define_$ac_item" ;;
+ custom ) ac_var="$ac_item" ;;
+ esac
+ eval "ac_val=\$$ac_var"
+ if test ".$ac_val" != .yes; then
+ ac_rc=no
+ break
+ fi
+done
+if test ".$ac_rc" = .yes; then
+ :
+ $2
+else
+ :
+ $3
+fi
+])
+
+
+define(APR_BEGIN_DECISION,[dnl
+ac_decision_item='$1'
+ac_decision_msg='FAILED'
+ac_decision=''
+])
+
+
+AC_DEFUN([APR_DECIDE],[dnl
+dnl Define the flag (or not) in apr_private.h via autoheader
+AH_TEMPLATE($1, [Define if $2 will be used])
+ac_decision='$1'
+ac_decision_msg='$2'
+ac_decision_$1=yes
+ac_decision_$1_msg='$2'
+])
+
+
+define(APR_DECISION_OVERRIDE,[dnl
+ ac_decision=''
+ for ac_item in $1; do
+ eval "ac_decision_this=\$ac_decision_${ac_item}"
+ if test ".$ac_decision_this" = .yes; then
+ ac_decision=$ac_item
+ eval "ac_decision_msg=\$ac_decision_${ac_item}_msg"
+ fi
+ done
+])
+
+
+define(APR_DECISION_FORCE,[dnl
+ac_decision="$1"
+eval "ac_decision_msg=\"\$ac_decision_${ac_decision}_msg\""
+])
+
+
+define(APR_END_DECISION,[dnl
+if test ".$ac_decision" = .; then
+ echo "[$]0:Error: decision on $ac_decision_item failed" 1>&2
+ exit 1
+else
+ if test ".$ac_decision_msg" = .; then
+ ac_decision_msg="$ac_decision"
+ fi
+ AC_DEFINE_UNQUOTED(${ac_decision_item})
+ AC_MSG_RESULT([decision on $ac_decision_item... $ac_decision_msg])
+fi
+])
+
+
+dnl
+dnl APR_CHECK_SIZEOF_EXTENDED(INCLUDES, TYPE [, CROSS_SIZE])
+dnl
+dnl A variant of AC_CHECK_SIZEOF which allows the checking of
+dnl sizes of non-builtin types
+dnl
+AC_DEFUN([APR_CHECK_SIZEOF_EXTENDED],
+[changequote(<<, >>)dnl
+dnl The name to #define.
+define(<<AC_TYPE_NAME>>, translit(sizeof_$2, [a-z *], [A-Z_P]))dnl
+dnl The cache variable name.
+define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$2, [ *], [_p]))dnl
+changequote([, ])dnl
+AC_MSG_CHECKING(size of $2)
+AC_CACHE_VAL(AC_CV_NAME,
+[AC_TRY_RUN([#include <stdio.h>
+$1
+#ifdef WIN32
+#define binmode "b"
+#else
+#define binmode
+#endif
+main()
+{
+ FILE *f=fopen("conftestval", "w" binmode);
+ if (!f) exit(1);
+ fprintf(f, "%d\n", sizeof($2));
+ exit(0);
+}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$3],,,
+AC_CV_NAME=$3))])dnl
+AC_MSG_RESULT($AC_CV_NAME)
+AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The size of ]$2)
+undefine([AC_TYPE_NAME])dnl
+undefine([AC_CV_NAME])dnl
+])
+
+
+dnl
+dnl APR_TRY_COMPILE_NO_WARNING(INCLUDES, FUNCTION-BODY,
+dnl [ACTIONS-IF-NO-WARNINGS], [ACTIONS-IF-WARNINGS])
+dnl
+dnl Tries a compile test with warnings activated so that the result
+dnl is false if the code doesn't compile cleanly. For compilers
+dnl where it is not known how to activate a "fail-on-error" mode,
+dnl it is undefined which of the sets of actions will be run.
+dnl
+AC_DEFUN([APR_TRY_COMPILE_NO_WARNING],
+[apr_save_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS $CFLAGS_WARN"
+ if test "$ac_cv_prog_gcc" = "yes"; then
+ CFLAGS="$CFLAGS -Werror"
+ fi
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [#include "confdefs.h"
+ ]
+ [[$1]]
+ [int main(int argc, const char *const *argv) {]
+ [[$2]]
+ [ return 0; }]
+ )],
+ [$3], [$4])
+ CFLAGS=$apr_save_CFLAGS
+])
+
+dnl
+dnl APR_CHECK_STRERROR_R_RC
+dnl
+dnl Decide which style of retcode is used by this system's
+dnl strerror_r(). It either returns int (0 for success, -1
+dnl for failure), or it returns a pointer to the error
+dnl string.
+dnl
+dnl
+AC_DEFUN([APR_CHECK_STRERROR_R_RC], [
+AC_MSG_CHECKING(for type of return code from strerror_r)
+AC_TRY_RUN([
+#include <errno.h>
+#include <string.h>
+#include <stdio.h>
+main()
+{
+ char buf[1024];
+ if (strerror_r(ERANGE, buf, sizeof buf) < 1) {
+ exit(0);
+ }
+ else {
+ exit(1);
+ }
+}], [
+ ac_cv_strerror_r_rc_int=yes ], [
+ ac_cv_strerror_r_rc_int=no ], [
+ ac_cv_strerror_r_rc_int=no ] )
+if test "x$ac_cv_strerror_r_rc_int" = xyes; then
+ AC_DEFINE(STRERROR_R_RC_INT, 1, [Define if strerror returns int])
+ msg="int"
+else
+ msg="pointer"
+fi
+AC_MSG_RESULT([$msg])
+] )
+
+dnl
+dnl APR_CHECK_DIRENT_INODE
+dnl
+dnl Decide if d_fileno or d_ino are available in the dirent
+dnl structure on this platform. Single UNIX Spec says d_ino,
+dnl BSD uses d_fileno. Undef to find the real beast.
+dnl
+AC_DEFUN([APR_CHECK_DIRENT_INODE], [
+AC_CACHE_CHECK([for inode member of struct dirent], apr_cv_dirent_inode, [
+apr_cv_dirent_inode=no
+AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <dirent.h>
+],[
+#ifdef d_ino
+#undef d_ino
+#endif
+struct dirent de; de.d_fileno;
+], apr_cv_dirent_inode=d_fileno)
+if test "$apr_cv_dirent_inode" = "no"; then
+AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <dirent.h>
+],[
+#ifdef d_fileno
+#undef d_fileno
+#endif
+struct dirent de; de.d_ino;
+], apr_cv_dirent_inode=d_ino)
+fi
+])
+if test "$apr_cv_dirent_inode" != "no"; then
+ AC_DEFINE_UNQUOTED(DIRENT_INODE, $apr_cv_dirent_inode,
+ [Define if struct dirent has an inode member])
+fi
+])
+
+dnl
+dnl APR_CHECK_DIRENT_TYPE
+dnl
+dnl Decide if d_type is available in the dirent structure
+dnl on this platform. Not part of the Single UNIX Spec.
+dnl Note that this is worthless without DT_xxx macros, so
+dnl look for one while we are at it.
+dnl
+AC_DEFUN([APR_CHECK_DIRENT_TYPE], [
+AC_CACHE_CHECK([for file type member of struct dirent], apr_cv_dirent_type,[
+apr_cv_dirent_type=no
+AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <dirent.h>
+],[
+struct dirent de; de.d_type = DT_REG;
+], apr_cv_dirent_type=d_type)
+])
+if test "$apr_cv_dirent_type" != "no"; then
+ AC_DEFINE_UNQUOTED(DIRENT_TYPE, $apr_cv_dirent_type,
+ [Define if struct dirent has a d_type member])
+fi
+])
+
+dnl the following is a newline, a space, a tab, and a backslash (the
+dnl backslash is used by the shell to skip newlines, but m4 sees it;
+dnl treat it like whitespace).
+dnl WARNING: don't reindent these lines, or the space/tab will be lost!
+define([apr_whitespace],[
+ \])
+
+dnl
+dnl APR_COMMA_ARGS(ARG1 ...)
+dnl convert the whitespace-separated arguments into comman-separated
+dnl arguments.
+dnl
+dnl APR_FOREACH(CODE-BLOCK, ARG1, ARG2, ...)
+dnl subsitute CODE-BLOCK for each ARG[i]. "eachval" will be set to ARG[i]
+dnl within each iteration.
+dnl
+changequote({,})
+define({APR_COMMA_ARGS},{patsubst([$}{1],[[}apr_whitespace{]+],[,])})
+define({APR_FOREACH},
+ {ifelse($}{2,,,
+ [define([eachval],
+ $}{2)$}{1[]APR_FOREACH([$}{1],
+ builtin([shift],
+ builtin([shift], $}{@)))])})
+changequote([,])
+
+dnl APR_FLAG_HEADERS(HEADER-FILE ... [, FLAG-TO-SET ] [, "yes" ])
+dnl we set FLAG-TO-SET to 1 if we find HEADER-FILE, otherwise we set to 0
+dnl if FLAG-TO-SET is null, we automagically determine it's name
+dnl by changing all "/" to "_" in the HEADER-FILE and dropping
+dnl all "." and "-" chars. If the 3rd parameter is "yes" then instead of
+dnl setting to 1 or 0, we set FLAG-TO-SET to yes or no.
+dnl
+AC_DEFUN([APR_FLAG_HEADERS], [
+AC_CHECK_HEADERS($1)
+for aprt_i in $1
+do
+ ac_safe=`echo "$aprt_i" | sed 'y%./+-%__p_%'`
+ aprt_2=`echo "$aprt_i" | sed -e 's%/%_%g' -e 's/\.//g' -e 's/-//g'`
+ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ eval "ifelse($2,,$aprt_2,$2)=ifelse($3,yes,yes,1)"
+ else
+ eval "ifelse($2,,$aprt_2,$2)=ifelse($3,yes,no,0)"
+ fi
+done
+])
+
+dnl APR_FLAG_FUNCS(FUNC ... [, FLAG-TO-SET] [, "yes" ])
+dnl if FLAG-TO-SET is null, we automagically determine it's name
+dnl prepending "have_" to the function name in FUNC, otherwise
+dnl we use what's provided as FLAG-TO-SET. If the 3rd parameter
+dnl is "yes" then instead of setting to 1 or 0, we set FLAG-TO-SET
+dnl to yes or no.
+dnl
+AC_DEFUN([APR_FLAG_FUNCS], [
+AC_CHECK_FUNCS($1)
+for aprt_j in $1
+do
+ aprt_3="have_$aprt_j"
+ if eval "test \"`echo '$ac_cv_func_'$aprt_j`\" = yes"; then
+ eval "ifelse($2,,$aprt_3,$2)=ifelse($3,yes,yes,1)"
+ else
+ eval "ifelse($2,,$aprt_3,$2)=ifelse($3,yes,no,0)"
+ fi
+done
+])
+
+dnl Iteratively interpolate the contents of the second argument
+dnl until interpolation offers no new result. Then assign the
+dnl final result to $1.
+dnl
+dnl Example:
+dnl
+dnl foo=1
+dnl bar='${foo}/2'
+dnl baz='${bar}/3'
+dnl APR_EXPAND_VAR(fraz, $baz)
+dnl $fraz is now "1/2/3"
+dnl
+AC_DEFUN([APR_EXPAND_VAR], [
+ap_last=
+ap_cur="$2"
+while test "x${ap_cur}" != "x${ap_last}";
+do
+ ap_last="${ap_cur}"
+ ap_cur=`eval "echo ${ap_cur}"`
+done
+$1="${ap_cur}"
+])
+
+dnl
+dnl Removes the value of $3 from the string in $2, strips of any leading
+dnl slashes, and returns the value in $1.
+dnl
+dnl Example:
+dnl orig_path="${prefix}/bar"
+dnl APR_PATH_RELATIVE(final_path, $orig_path, $prefix)
+dnl $final_path now contains "bar"
+AC_DEFUN([APR_PATH_RELATIVE], [
+ap_stripped=`echo $2 | sed -e "s#^$3##"`
+# check if the stripping was successful
+if test "x$2" != "x${ap_stripped}"; then
+ # it was, so strip of any leading slashes
+ $1="`echo ${ap_stripped} | sed -e 's#^/*##'`"
+else
+ # it wasn't so return the original
+ $1="$2"
+fi
+])
+
+dnl APR_HELP_STRING(LHS, RHS)
+dnl Autoconf 2.50 can not handle substr correctly. It does have
+dnl AC_HELP_STRING, so let's try to call it if we can.
+dnl Note: this define must be on one line so that it can be properly returned
+dnl as the help string. When using this macro with a multi-line RHS, ensure
+dnl that you surround the macro invocation with []s
+AC_DEFUN([APR_HELP_STRING], [ifelse(regexp(AC_ACVERSION, 2\.1), -1, AC_HELP_STRING([$1],[$2]),[ ][$1] substr([ ],len($1))[$2])])
+
+dnl
+dnl APR_LAYOUT(configlayout, layoutname [, extravars])
+dnl
+AC_DEFUN([APR_LAYOUT], [
+ if test ! -f $srcdir/config.layout; then
+ echo "** Error: Layout file $srcdir/config.layout not found"
+ echo "** Error: Cannot use undefined layout '$LAYOUT'"
+ exit 1
+ fi
+ # Catch layout names including a slash which will otherwise
+ # confuse the heck out of the sed script.
+ case $2 in
+ */*)
+ echo "** Error: $2 is not a valid layout name"
+ exit 1 ;;
+ esac
+ pldconf=./config.pld
+ changequote({,})
+ sed -e "1s/[ ]*<[lL]ayout[ ]*$2[ ]*>[ ]*//;1t" \
+ -e "1,/[ ]*<[lL]ayout[ ]*$2[ ]*>[ ]*/d" \
+ -e '/[ ]*<\/Layout>[ ]*/,$d' \
+ -e "s/^[ ]*//g" \
+ -e "s/:[ ]*/=\'/g" \
+ -e "s/[ ]*$/'/g" \
+ $1 > $pldconf
+ layout_name=$2
+ if test ! -s $pldconf; then
+ echo "** Error: unable to find layout $layout_name"
+ exit 1
+ fi
+ . $pldconf
+ rm $pldconf
+ for var in prefix exec_prefix bindir sbindir libexecdir mandir \
+ sysconfdir datadir includedir localstatedir runtimedir \
+ logfiledir libdir installbuilddir libsuffix $3; do
+ eval "val=\"\$$var\""
+ case $val in
+ *+)
+ val=`echo $val | sed -e 's;\+$;;'`
+ eval "$var=\"\$val\""
+ autosuffix=yes
+ ;;
+ *)
+ autosuffix=no
+ ;;
+ esac
+ val=`echo $val | sed -e 's:\(.\)/*$:\1:'`
+ val=`echo $val | sed -e 's:[\$]\([a-z_]*\):${\1}:g'`
+ if test "$autosuffix" = "yes"; then
+ if echo $val | grep apache >/dev/null; then
+ addtarget=no
+ else
+ addtarget=yes
+ fi
+ if test "$addtarget" = "yes"; then
+ val="$val/apache2"
+ fi
+ fi
+ eval "$var='$val'"
+ done
+ changequote([,])
+])dnl
+
+dnl
+dnl APR_ENABLE_LAYOUT(default layout name [, extra vars])
+dnl
+AC_DEFUN([APR_ENABLE_LAYOUT], [
+AC_ARG_ENABLE(layout,
+[ --enable-layout=LAYOUT],[
+ LAYOUT=$enableval
+])
+
+if test -z "$LAYOUT"; then
+ LAYOUT="$1"
+fi
+APR_LAYOUT($srcdir/config.layout, $LAYOUT, $2)
+
+AC_MSG_CHECKING(for chosen layout)
+AC_MSG_RESULT($layout_name)
+])
+
+
+dnl
+dnl APR_PARSE_ARGUMENTS
+dnl a reimplementation of autoconf's argument parser,
+dnl used here to allow us to co-exist layouts and argument based
+dnl set ups.
+AC_DEFUN([APR_PARSE_ARGUMENTS], [
+ac_prev=
+# Retrieve the command-line arguments. The eval is needed because
+# the arguments are quoted to preserve accuracy.
+eval "set x $ac_configure_args"
+shift
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ ac_optarg=`expr "x$ac_option" : 'x[[^=]]*=\(.*\)'`
+
+ case $ac_option in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir="$ac_optarg" ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir="$ac_optarg" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix="$ac_optarg" ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir="$ac_optarg" ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir="$ac_optarg" ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir="$ac_optarg" ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir="$ac_optarg" ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir="$ac_optarg" ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir="$ac_optarg" ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix="$ac_optarg" ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir="$ac_optarg" ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir="$ac_optarg" ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir="$ac_optarg" ;;
+
+ esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [[\\/$]]* | ?:[[\\/]]* | NONE | '' ) ;;
+ *) AC_MSG_ERROR([expected an absolute path for --$ac_var: $ac_val]);;
+ esac
+done
+
+])dnl
+
+dnl
+dnl APR_CHECK_DEPEND
+dnl
+dnl Determine what program we can use to generate .deps-style dependencies
+dnl
+AC_DEFUN([APR_CHECK_DEPEND], [
+dnl Try to determine what depend program we can use
+dnl All GCC-variants should have -MM.
+dnl If not, then we can check on those, too.
+if test "$GCC" = "yes"; then
+ MKDEP='$(CC) -MM'
+else
+ rm -f conftest.c
+dnl <sys/types.h> should be available everywhere!
+ cat > conftest.c <<EOF
+#include <sys/types.h>
+ int main() { return 0; }
+EOF
+ MKDEP="true"
+ for i in "$CC -MM" "$CC -M" "$CPP -MM" "$CPP -M" "cpp -M"; do
+ AC_MSG_CHECKING([if $i can create proper make dependencies])
+ if $i conftest.c 2>/dev/null | grep 'conftest.o: conftest.c' >/dev/null; then
+ MKDEP=$i
+ AC_MSG_RESULT(yes)
+ break;
+ fi
+ AC_MSG_RESULT(no)
+ done
+ rm -f conftest.c
+fi
+
+AC_SUBST(MKDEP)
+])
+
+dnl
+dnl APR_CHECK_TYPES_COMPATIBLE(TYPE-1, TYPE-2, [ACTION-IF-TRUE])
+dnl
+dnl Try to determine whether two types are the same. Only works
+dnl for gcc and icc.
+dnl
+AC_DEFUN([APR_CHECK_TYPES_COMPATIBLE], [
+define([apr_cvname], apr_cv_typematch_[]translit([$1], [ ], [_])_[]translit([$2], [ ], [_]))
+AC_CACHE_CHECK([whether $1 and $2 are the same], apr_cvname, [
+AC_TRY_COMPILE(AC_INCLUDES_DEFAULT, [
+ int foo[0 - !__builtin_types_compatible_p($1, $2)];
+], [apr_cvname=yes
+$3], [apr_cvname=no])])
+])
diff --git a/build/apu-conf.m4 b/build/apu-conf.m4
new file mode 100644
index 0000000..127d75f
--- /dev/null
+++ b/build/apu-conf.m4
@@ -0,0 +1,439 @@
+dnl -------------------------------------------------------- -*- autoconf -*-
+dnl Licensed to the Apache Software Foundation (ASF) under one or more
+dnl contributor license agreements. See the NOTICE file distributed with
+dnl this work for additional information regarding copyright ownership.
+dnl The ASF licenses this file to You under the Apache License, Version 2.0
+dnl (the "License"); you may not use this file except in compliance with
+dnl the License. You may obtain a copy of the License at
+dnl
+dnl http://www.apache.org/licenses/LICENSE-2.0
+dnl
+dnl Unless required by applicable law or agreed to in writing, software
+dnl distributed under the License is distributed on an "AS IS" BASIS,
+dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+dnl See the License for the specific language governing permissions and
+dnl limitations under the License.
+
+
+dnl
+dnl custom autoconf rules for APRUTIL
+dnl
+
+dnl
+dnl APU_FIND_APR: figure out where APR is located
+dnl
+AC_DEFUN([APU_FIND_APR], [
+
+ dnl use the find_apr.m4 script to locate APR. sets apr_found and apr_config
+ APR_FIND_APR(,,,[1])
+ if test "$apr_found" = "no"; then
+ AC_MSG_ERROR(APR could not be located. Please use the --with-apr option.)
+ fi
+
+ APR_BUILD_DIR="`$apr_config --installbuilddir`"
+
+ dnl make APR_BUILD_DIR an absolute directory (we'll need it in the
+ dnl sub-projects in some cases)
+ APR_BUILD_DIR="`cd $APR_BUILD_DIR && pwd`"
+
+ APR_INCLUDES="`$apr_config --includes`"
+ APR_LIBS="`$apr_config --link-libtool --libs`"
+ APR_SO_EXT="`$apr_config --apr-so-ext`"
+ APR_LIB_TARGET="`$apr_config --apr-lib-target`"
+
+ AC_SUBST(APR_INCLUDES)
+ AC_SUBST(APR_LIBS)
+ AC_SUBST(APR_BUILD_DIR)
+])
+
+dnl
+dnl APU_TRY_EXPAT_LINK(
+dnl test-message, cache-var-name, hdrs, libs,
+dnl [actions-on-success], [actions-on-failure])
+dnl
+dnl Tests linking against expat with libraries 'libs' and includes
+dnl 'hdrs', passing message + cache-var-name to AC_CACHE_CHECK.
+dnl On success, sets $expat_libs to libs, sets $apu_have_expat to 1,
+dnl and runs actions-on-success; on failure runs actions-on-failure.
+dnl
+AC_DEFUN([APU_TRY_EXPAT_LINK], [
+AC_CACHE_CHECK([$1], [$2], [
+ apu_expat_LIBS=$LIBS
+ LIBS="$LIBS $4"
+ AC_TRY_LINK([#include <stdlib.h>
+#include <$3>], [XML_ParserCreate(NULL);],
+ [$2=yes], [$2=no])
+ LIBS=$apu_expat_LIBS
+])
+
+if test $[$2] = yes; then
+ AC_DEFINE([HAVE_]translit([$3], [a-z./], [A-Z__]), 1,
+ [Define if $3 is available])
+ apu_expat_libs="$4"
+ apu_has_expat=1
+ $5
+else
+ apu_has_expat=0
+ $6
+fi
+])
+
+dnl
+dnl APU_SYSTEM_EXPAT: tests for a system expat installation
+dnl If present, sets $apu_has_expat to 1 and adjusts LDFLAGS/CPPFLAGS
+dnl appropriately. This is mostly for compatibility with existing
+dnl expat releases; all but the first APU_TRY_EXPAT_LINK call could
+dnl be dropped later.
+dnl
+AC_DEFUN([APU_SYSTEM_EXPAT], [
+
+ APU_TRY_EXPAT_LINK([Expat 1.95.x], apu_cv_expat_system,
+ [expat.h], [-lexpat])
+
+ if test $apu_has_expat = 0; then
+ APU_TRY_EXPAT_LINK([old Debian-packaged expat], apu_cv_expat_debian,
+ [xmltok/xmlparse.h], [-lxmlparse -lxmltok])
+ fi
+
+ if test $apu_has_expat = 0; then
+ APU_TRY_EXPAT_LINK([old FreeBSD-packaged expat], apu_cv_expat_freebsd,
+ [xml/xmlparse.h], [-lexpat])
+ fi
+
+ if test $apu_has_expat = 0; then
+ APU_TRY_EXPAT_LINK([Expat 1.0/1.1], apu_cv_expat_1011,
+ [xmlparse/xmlparse.h], [-lexpat])
+ fi
+
+ if test $apu_has_expat = 0; then
+ APR_ADDTO(LDFLAGS, [-L/usr/local/lib])
+ APR_ADDTO(CPPFLAGS, [-I/usr/local/include])
+
+ APU_TRY_EXPAT_LINK([Expat 1.95.x in /usr/local],
+ apu_cv_expat_usrlocal, [expat.h], [-lexpat],
+ [APR_ADDTO(APRUTIL_INCLUDES, [-I/usr/local/include])
+ APR_ADDTO(APRUTIL_LDFLAGS, [-L/usr/local/lib])],[
+ APR_REMOVEFROM(LDFLAGS, [-L/usr/local/lib])
+ APR_REMOVEFROM(CPPFLAGS, [-I/usr/local/include])
+ ])
+ fi
+])
+
+
+dnl
+dnl APU_FIND_EXPAT: figure out where EXPAT is located
+dnl
+AC_DEFUN([APU_FIND_EXPAT], [
+
+save_cppflags="$CPPFLAGS"
+save_ldflags="$LDFLAGS"
+
+apu_has_expat=0
+
+apu_try_external_expat=1
+
+AC_ARG_WITH([expat],
+[ --with-expat=DIR specify Expat location], [
+ if test "$withval" = "yes"; then
+ AC_MSG_ERROR([a directory must be specified for --with-expat])
+ elif test "$withval" = "no"; then
+ AC_MSG_ERROR([Expat cannot be disabled (at this time)])
+ else
+ # Add given path to standard search paths if appropriate:
+ if test "$withval" != "/usr"; then
+ APR_ADDTO(LDFLAGS, [-L$withval/lib])
+ APR_ADDTO(CPPFLAGS, [-I$withval/include])
+ APR_ADDTO(APRUTIL_INCLUDES, [-I$withval/include])
+ APR_ADDTO(APRUTIL_LDFLAGS, [-L$withval/lib])
+ fi
+ fi
+])
+
+if test $apu_try_external_expat = 1; then
+ APU_SYSTEM_EXPAT
+fi
+
+APR_ADDTO(APRUTIL_EXPORT_LIBS, [$apu_expat_libs])
+APR_ADDTO(APRUTIL_LIBS, [$apu_expat_libs])
+
+CPPFLAGS=$save_cppflags
+LDFLAGS=$save_ldflags
+])
+
+
+dnl
+dnl Find a particular LDAP library
+dnl
+AC_DEFUN([APU_FIND_LDAPLIB], [
+ if test ${apu_has_ldap} != "1"; then
+ ldaplib=$1
+ extralib=$2
+ # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
+ changequote(,)
+ ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
+ changequote([,])
+ unset ac_cv_lib_${ldaplib_cache_id}_ldap_init
+ unset ac_cv_lib_${ldaplib_cache_id}___ldap_init
+ AC_CHECK_LIB(${ldaplib}, ldap_init,
+ [
+ LDADD_ldap_found="-l${ldaplib} ${extralib}"
+ AC_CHECK_LIB(${ldaplib}, ldapssl_client_init, apu_has_ldapssl_client_init="1", , ${extralib})
+ AC_CHECK_LIB(${ldaplib}, ldapssl_client_deinit, apu_has_ldapssl_client_deinit="1", , ${extralib})
+ AC_CHECK_LIB(${ldaplib}, ldapssl_add_trusted_cert, apu_has_ldapssl_add_trusted_cert="1", , ${extralib})
+ AC_CHECK_LIB(${ldaplib}, ldap_start_tls_s, apu_has_ldap_start_tls_s="1", , ${extralib})
+ AC_CHECK_LIB(${ldaplib}, ldap_sslinit, apu_has_ldap_sslinit="1", , ${extralib})
+ AC_CHECK_LIB(${ldaplib}, ldapssl_init, apu_has_ldapssl_init="1", , ${extralib})
+ AC_CHECK_LIB(${ldaplib}, ldapssl_install_routines, apu_has_ldapssl_install_routines="1", , ${extralib})
+ apu_has_ldap="1";
+ ], , ${extralib})
+ fi
+])
+
+
+dnl
+dnl APU_FIND_LDAP: figure out where LDAP is located
+dnl
+AC_DEFUN([APU_FIND_LDAP], [
+
+echo $ac_n "${nl}checking for ldap support..."
+
+apu_has_ldap="0";
+apu_has_ldapssl_client_init="0"
+apu_has_ldapssl_client_deinit="0"
+apu_has_ldapssl_add_trusted_cert="0"
+apu_has_ldap_start_tls_s="0"
+apu_has_ldapssl_init="0"
+apu_has_ldap_sslinit="0"
+apu_has_ldapssl_install_routines="0"
+apu_has_ldap_openldap="0"
+apu_has_ldap_solaris="0"
+apu_has_ldap_novell="0"
+apu_has_ldap_microsoft="0"
+apu_has_ldap_netscape="0"
+apu_has_ldap_mozilla="0"
+apu_has_ldap_tivoli="0"
+apu_has_ldap_zos="0"
+apu_has_ldap_other="0"
+LDADD_ldap_found=""
+
+AC_ARG_WITH(lber,[ --with-lber=library lber library to use],
+ [
+ if test "$withval" = "yes"; then
+ apu_liblber_name="lber"
+ else
+ apu_liblber_name="$withval"
+ fi
+ ],
+ [
+ apu_liblber_name="lber"
+ ])
+
+AC_ARG_WITH(ldap-include,[ --with-ldap-include=path path to ldap include files with trailing slash])
+AC_ARG_WITH(ldap-lib,[ --with-ldap-lib=path path to ldap lib file])
+AC_ARG_WITH(ldap,[ --with-ldap=library ldap library to use],
+ [
+ if test "$with_ldap" != "no"; then
+ save_cppflags="$CPPFLAGS"
+ save_ldflags="$LDFLAGS"
+ save_libs="$LIBS"
+ if test -n "$with_ldap_include"; then
+ CPPFLAGS="$CPPFLAGS -I$with_ldap_include"
+ APR_ADDTO(APRUTIL_INCLUDES, [-I$with_ldap_include])
+ fi
+ if test -n "$with_ldap_lib"; then
+ LDFLAGS="$LDFLAGS -L$with_ldap_lib"
+ APR_ADDTO(APRUTIL_LDFLAGS, [-L$with_ldap_lib])
+ fi
+
+ LIBLDAP="$withval"
+ if test "$LIBLDAP" = "yes"; then
+ dnl The iPlanet C SDK 5.0 is as yet untested...
+ APU_FIND_LDAPLIB("ldap50", "-lnspr4 -lplc4 -lplds4 -liutil50 -llber50 -lldif50 -lnss3 -lprldap50 -lssl3 -lssldap50")
+ APU_FIND_LDAPLIB("ldapssl41", "-lnspr3 -lplc3 -lplds3")
+ APU_FIND_LDAPLIB("ldapssl40")
+ APU_FIND_LDAPLIB("ldapssl30")
+ APU_FIND_LDAPLIB("ldapssl20")
+ APU_FIND_LDAPLIB("ldapsdk", "-lldapx -lldapssl -lldapgss -lgssapi_krb5")
+ APU_FIND_LDAPLIB("ldapsdk", "-lldapx -lldapssl -lldapgss -lgss -lresolv -lsocket")
+ APU_FIND_LDAPLIB("ldap", "-llber")
+ APU_FIND_LDAPLIB("ldap", "-llber -lresolv")
+ APU_FIND_LDAPLIB("ldap", "-llber -lresolv -lsocket -lnsl")
+ APU_FIND_LDAPLIB("ldap", "-ldl -lpthread")
+ else
+ APU_FIND_LDAPLIB($LIBLDAP)
+ APU_FIND_LDAPLIB($LIBLDAP, "-lresolv")
+ APU_FIND_LDAPLIB($LIBLDAP, "-lresolv -lsocket -lnsl")
+ APU_FIND_LDAPLIB($LIBLDAP, "-ldl -lpthread")
+ fi
+
+ if test ${apu_has_ldap} != "1"; then
+ AC_MSG_ERROR(could not find an LDAP library)
+ else
+ APR_ADDTO(LDADD_ldap, [$LDADD_ldap_found])
+ fi
+ AC_CHECK_LIB($apu_liblber_name, ber_init,
+ [APR_ADDTO(LDADD_ldap, [-l${apu_liblber_name}])])
+
+ AC_CHECK_HEADERS(lber.h, lber_h=["#include <lber.h>"])
+
+ # Solaris has a problem in <ldap.h> which prevents it from
+ # being included by itself. Check for <ldap.h> manually,
+ # including lber.h first.
+ AC_CACHE_CHECK([for ldap.h], [apr_cv_hdr_ldap_h],
+ [AC_TRY_CPP(
+ [#ifdef HAVE_LBER_H
+ #include <lber.h>
+ #endif
+ #include <ldap.h>
+ ], [apr_cv_hdr_ldap_h=yes], [apr_cv_hdr_ldap_h=no])])
+ if test "$apr_cv_hdr_ldap_h" = "yes"; then
+ ldap_h=["#include <ldap.h>"]
+ AC_DEFINE([HAVE_LDAP_H], 1, [Defined if ldap.h is present])
+ fi
+
+ AC_CHECK_HEADERS(ldap_ssl.h, ldap_ssl_h=["#include <ldap_ssl.h>"])
+
+ if test "$apr_cv_hdr_ldap_h" = "yes"; then
+ AC_CACHE_CHECK([for LDAP toolkit],
+ [apr_cv_ldap_toolkit], [
+ if test "x$apr_cv_ldap_toolkit" = "x"; then
+ AC_EGREP_CPP([OpenLDAP], [$lber_h
+ $ldap_h
+ LDAP_VENDOR_NAME], [apu_has_ldap_openldap="1"
+ apr_cv_ldap_toolkit="OpenLDAP"])
+ fi
+ if test "x$apr_cv_ldap_toolkit" = "x"; then
+ AC_EGREP_CPP([Sun Microsystems Inc.], [$lber_h
+ $ldap_h
+ LDAP_VENDOR_NAME], [apu_has_ldap_solaris="1"
+ apr_cv_ldap_toolkit="Solaris"])
+ fi
+ if test "x$apr_cv_ldap_toolkit" = "x"; then
+ AC_EGREP_CPP([Novell], [$lber_h
+ $ldap_h
+ LDAP_VENDOR_NAME], [apu_has_ldap_novell="1"
+ apr_cv_ldap_toolkit="Novell"])
+ fi
+ if test "x$apr_cv_ldap_toolkit" = "x"; then
+ AC_EGREP_CPP([Microsoft Corporation.], [$lber_h
+ $ldap_h
+ LDAP_VENDOR_NAME], [apu_has_ldap_microsoft="1"
+ apr_cv_ldap_toolkit="Microsoft"])
+ fi
+ if test "x$apr_cv_ldap_toolkit" = "x"; then
+ AC_EGREP_CPP([Netscape Communications Corp.], [$lber_h
+ $ldap_h
+ LDAP_VENDOR_NAME], [apu_has_ldap_netscape="1"
+ apr_cv_ldap_toolkit="Netscape"])
+ fi
+ if test "x$apr_cv_ldap_toolkit" = "x"; then
+ AC_EGREP_CPP([mozilla.org], [$lber_h
+ $ldap_h
+ LDAP_VENDOR_NAME], [apu_has_ldap_mozilla="1"
+ apr_cv_ldap_toolkit="Mozilla"])
+ fi
+ if test "x$apr_cv_ldap_toolkit" = "x"; then
+ AC_EGREP_CPP([International Business Machines], [$lber_h
+ $ldap_h
+ LDAP_VENDOR_NAME], [apu_has_ldap_tivoli="1"
+ apr_cv_ldap_toolkit="Tivoli"])
+ fi
+ if test "x$apr_cv_ldap_toolkit" = "x"; then
+ case "$host" in
+ *-ibm-os390)
+ AC_EGREP_CPP([IBM], [$lber_h
+ $ldap_h], [apu_has_ldap_zos="1"
+ apr_cv_ldap_toolkit="z/OS"])
+ ;;
+ esac
+ fi
+ if test "x$apr_cv_ldap_toolkit" = "x"; then
+ apu_has_ldap_other="1"
+ apr_cv_ldap_toolkit="unknown"
+ fi
+ ])
+ fi
+
+ CPPFLAGS=$save_cppflags
+ LDFLAGS=$save_ldflags
+ LIBS=$save_libs
+ fi
+ ])
+
+if test "$apu_has_ldap_openldap" = "1"; then
+ save_cppflags="$CPPFLAGS"
+ save_ldflags="$LDFLAGS"
+ save_libs="$LIBS"
+
+ CPPFLAGS="$CPPFLAGS $APRUTIL_INCLUDES"
+ LDFLAGS="$LDFLAGS $APRUTIL_LDFLAGS"
+ AC_CACHE_CHECK([style of ldap_set_rebind_proc routine], ac_cv_ldap_set_rebind_proc_style,
+ APR_TRY_COMPILE_NO_WARNING([
+ #ifdef HAVE_LBER_H
+ #include <lber.h>
+ #endif
+ #ifdef HAVE_LDAP_H
+ #include <ldap.h>
+ #endif
+ ], [
+ ldap_set_rebind_proc((LDAP *)0, (LDAP_REBIND_PROC *)0, (void *)0);
+ ], ac_cv_ldap_set_rebind_proc_style=three, ac_cv_ldap_set_rebind_proc_style=two))
+
+ if test "$ac_cv_ldap_set_rebind_proc_style" = "three"; then
+ AC_DEFINE(LDAP_SET_REBIND_PROC_THREE, 1, [Define if ldap_set_rebind_proc takes three arguments])
+ fi
+
+ CPPFLAGS="$save_cppflags"
+ LDFLAGS="$save_ldflags"
+ LIBS="$save_libs"
+fi
+
+AC_SUBST(ldap_h)
+AC_SUBST(lber_h)
+AC_SUBST(ldap_ssl_h)
+AC_SUBST(apu_has_ldapssl_client_init)
+AC_SUBST(apu_has_ldapssl_client_deinit)
+AC_SUBST(apu_has_ldapssl_add_trusted_cert)
+AC_SUBST(apu_has_ldap_start_tls_s)
+AC_SUBST(apu_has_ldapssl_init)
+AC_SUBST(apu_has_ldap_sslinit)
+AC_SUBST(apu_has_ldapssl_install_routines)
+AC_SUBST(apu_has_ldap)
+AC_SUBST(apu_has_ldap_openldap)
+AC_SUBST(apu_has_ldap_solaris)
+AC_SUBST(apu_has_ldap_novell)
+AC_SUBST(apu_has_ldap_microsoft)
+AC_SUBST(apu_has_ldap_netscape)
+AC_SUBST(apu_has_ldap_mozilla)
+AC_SUBST(apu_has_ldap_tivoli)
+AC_SUBST(apu_has_ldap_zos)
+AC_SUBST(apu_has_ldap_other)
+AC_SUBST(LDADD_ldap)
+
+])
+
+dnl
+dnl APU_CHECK_CRYPT_R_STYLE
+dnl
+dnl Decide which of a couple of flavors of crypt_r() is necessary for
+dnl this platform.
+dnl
+AC_DEFUN([APU_CHECK_CRYPT_R_STYLE], [
+
+AC_CACHE_CHECK([style of crypt_r], apr_cv_crypt_r_style,
+[AC_TRY_COMPILE([#include <crypt.h>],
+ [CRYPTD buffer;
+ crypt_r("passwd", "hash", &buffer);],
+ [apr_cv_crypt_r_style=cryptd],
+ [AC_TRY_COMPILE([#include <crypt.h>],
+ [struct crypt_data buffer;
+ crypt_r("passwd", "hash", &buffer);],
+ [apr_cv_crypt_r_style=struct_crypt_data],
+ [apr_cv_crypt_r_style=none])])])
+
+if test "$apr_cv_crypt_r_style" = "cryptd"; then
+ AC_DEFINE(CRYPT_R_CRYPTD, 1, [Define if crypt_r has uses CRYPTD])
+elif test "$apr_cv_crypt_r_style" = "struct_crypt_data"; then
+ AC_DEFINE(CRYPT_R_STRUCT_CRYPT_DATA, 1, [Define if crypt_r uses struct crypt_data])
+fi
+])
diff --git a/build/apu-hints.m4 b/build/apu-hints.m4
new file mode 100644
index 0000000..6d6784a
--- /dev/null
+++ b/build/apu-hints.m4
@@ -0,0 +1,62 @@
+dnl -------------------------------------------------------- -*- autoconf -*-
+dnl Licensed to the Apache Software Foundation (ASF) under one or more
+dnl contributor license agreements. See the NOTICE file distributed with
+dnl this work for additional information regarding copyright ownership.
+dnl The ASF licenses this file to You under the Apache License, Version 2.0
+dnl (the "License"); you may not use this file except in compliance with
+dnl the License. You may obtain a copy of the License at
+dnl
+dnl http://www.apache.org/licenses/LICENSE-2.0
+dnl
+dnl Unless required by applicable law or agreed to in writing, software
+dnl distributed under the License is distributed on an "AS IS" BASIS,
+dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+dnl See the License for the specific language governing permissions and
+dnl limitations under the License.
+
+dnl -----------------------------------------------------------------
+dnl apu-hints.m4: apr-util's autoconf macros for platform-specific hints
+dnl
+dnl We preload various configure settings depending
+dnl on previously obtained platform knowledge.
+dnl We allow all settings to be overridden from
+dnl the command-line.
+
+dnl
+dnl APU_PRELOAD
+dnl
+dnl Preload various build parameters based on outside knowledge.
+dnl
+AC_DEFUN([APU_PRELOAD], [
+if test "x$apu_preload_done" != "xyes" ; then
+ apu_preload_done="yes"
+
+ echo "Applying apr-util hints file rules for $host"
+
+ case "$host" in
+ *-dec-osf*)
+ APR_SETIFNULL(apu_crypt_threadsafe, [1])
+ ;;
+ *-hp-hpux11.*)
+ APR_SETIFNULL(apu_crypt_threadsafe, [1])
+ ;;
+ *-ibm-aix4*|*-ibm-aix5.1*)
+ APR_SETIFNULL(apu_iconv_inbuf_const, [1])
+ ;;
+ *-ibm-os390)
+ APR_SETIFNULL(apu_crypt_threadsafe, [1])
+ ;;
+ *-solaris2*)
+ APR_SETIFNULL(apu_iconv_inbuf_const, [1])
+ APR_SETIFNULL(apu_crypt_threadsafe, [1])
+ AC_SEARCH_LIBS(fdatasync, [rt posix4])
+ ;;
+ *-sco3.2v5*)
+ APR_SETIFNULL(apu_db_xtra_libs, [-lsocket])
+ ;;
+ esac
+
+fi
+])
+
+
diff --git a/build/apu-iconv.m4 b/build/apu-iconv.m4
new file mode 100644
index 0000000..1304227
--- /dev/null
+++ b/build/apu-iconv.m4
@@ -0,0 +1,132 @@
+dnl -------------------------------------------------------- -*- autoconf -*-
+dnl Licensed to the Apache Software Foundation (ASF) under one or more
+dnl contributor license agreements. See the NOTICE file distributed with
+dnl this work for additional information regarding copyright ownership.
+dnl The ASF licenses this file to You under the Apache License, Version 2.0
+dnl (the "License"); you may not use this file except in compliance with
+dnl the License. You may obtain a copy of the License at
+dnl
+dnl http://www.apache.org/licenses/LICENSE-2.0
+dnl
+dnl Unless required by applicable law or agreed to in writing, software
+dnl distributed under the License is distributed on an "AS IS" BASIS,
+dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+dnl See the License for the specific language governing permissions and
+dnl limitations under the License.
+
+dnl
+dnl APU_TRY_ICONV[ IF-SUCCESS, IF-FAILURE ]: try to compile for iconv.
+dnl
+AC_DEFUN([APU_TRY_ICONV], [
+ AC_TRY_LINK([
+#include <stdlib.h>
+#include <iconv.h>
+],
+[
+ iconv_t cd = iconv_open("", "");
+ iconv(cd, NULL, NULL, NULL, NULL);
+], [$1], [$2])
+])
+
+dnl
+dnl APU_FIND_ICONV: find an iconv library
+dnl
+AC_DEFUN([APU_FIND_ICONV], [
+
+apu_iconv_dir="unknown"
+have_apr_iconv="0"
+want_iconv="1"
+AC_ARG_WITH(iconv,[ --with-iconv[=DIR] path to iconv installation],
+ [ apu_iconv_dir="$withval"
+ if test "$apu_iconv_dir" = "no"; then
+ have_apr_iconv="0"
+ have_iconv="0"
+ want_iconv="0"
+ elif test "$apu_iconv_dir" != "yes"; then
+ if test -f "$apu_iconv_dir/include/apr-1/api_version.h"; then
+ have_apr_iconv="1"
+ have_iconv="0"
+ APR_ADDTO(APRUTIL_INCLUDES,[-I$apu_iconv_dir/include/apr-1])
+ APR_ADDTO(APRUTIL_LIBS,[$apu_iconv_dir/lib/libapriconv-1.la])
+ AC_MSG_RESULT(using apr-iconv)
+ elif test -f "$apu_iconv_dir/include/iconv.h"; then
+ have_apr_iconv="0"
+ have_iconv="1"
+ APR_ADDTO(CPPFLAGS,[-I$apu_iconv_dir/include])
+ APR_ADDTO(LDFLAGS,[-L$apu_iconv_dir/lib])
+ fi
+ fi
+ ])
+
+if test "$want_iconv" = "1" -a "$have_apr_iconv" != "1"; then
+ AC_CHECK_HEADER(iconv.h, [
+ APU_TRY_ICONV([ have_iconv="1" ], [
+
+ APR_ADDTO(LIBS,[-liconv])
+
+ APU_TRY_ICONV([
+ APR_ADDTO(APRUTIL_LIBS,[-liconv])
+ APR_ADDTO(APRUTIL_EXPORT_LIBS,[-liconv])
+ have_iconv="1" ],
+ [ have_iconv="0" ])
+
+ APR_REMOVEFROM(LIBS,[-liconv])
+
+ ])
+ ], [ have_iconv="0" ])
+fi
+
+if test "$want_iconv" = "1" -a "$apu_iconv_dir" != "unknown"; then
+ if test "$have_iconv" != "1"; then
+ if test "$have_apr_iconv" != "1"; then
+ AC_MSG_ERROR([iconv support requested, but not found])
+ fi
+ fi
+ APR_REMOVEFROM(CPPFLAGS,[-I$apu_iconv_dir/include])
+ APR_REMOVEFROM(LDFLAGS,[-L$apu_iconv_dir/lib])
+ APR_ADDTO(APRUTIL_INCLUDES,[-I$apu_iconv_dir/include])
+ APR_ADDTO(APRUTIL_LDFLAGS,[-L$apu_iconv_dir/lib])
+fi
+
+if test "$have_iconv" = "1"; then
+ APU_CHECK_ICONV_INBUF
+fi
+
+APR_FLAG_HEADERS(iconv.h langinfo.h)
+APR_FLAG_FUNCS(nl_langinfo)
+APR_CHECK_DEFINE(CODESET, langinfo.h, [CODESET defined in langinfo.h])
+
+AC_SUBST(have_iconv)
+AC_SUBST(have_apr_iconv)
+])dnl
+
+dnl
+dnl APU_CHECK_ICONV_INBUF
+dnl
+dnl Decide whether or not the inbuf parameter to iconv() is const.
+dnl
+dnl We try to compile something without const. If it fails to
+dnl compile, we assume that the system's iconv() has const.
+dnl Unfortunately, we won't realize when there was a compile
+dnl warning, so we allow a variable -- apu_iconv_inbuf_const -- to
+dnl be set in hints.m4 to specify whether or not iconv() has const
+dnl on this parameter.
+dnl
+AC_DEFUN([APU_CHECK_ICONV_INBUF], [
+AC_MSG_CHECKING(for type of inbuf parameter to iconv)
+if test "x$apu_iconv_inbuf_const" = "x"; then
+ APR_TRY_COMPILE_NO_WARNING([
+ #include <stddef.h>
+ #include <iconv.h>
+ ],[
+ iconv(0,(char **)0,(size_t *)0,(char **)0,(size_t *)0);
+ ], apu_iconv_inbuf_const="0", apu_iconv_inbuf_const="1")
+fi
+if test "$apu_iconv_inbuf_const" = "1"; then
+ AC_DEFINE(APU_ICONV_INBUF_CONST, 1, [Define if the inbuf parm to iconv() is const char **])
+ msg="const char **"
+else
+ msg="char **"
+fi
+AC_MSG_RESULT([$msg])
+])dnl
diff --git a/build/config.guess b/build/config.guess
new file mode 100755
index 0000000..8bd1095
--- /dev/null
+++ b/build/config.guess
@@ -0,0 +1,1448 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright 1992-2017 Free Software Foundation, Inc.
+
+timestamp='2017-09-16'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program 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
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+#
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
+#
+# You can get the latest version of this script from:
+# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+#
+# Please send patches to <config-patches@gnu.org>.
+
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright 1992-2017 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+ # If the system lacks a compiler, then just pick glibc.
+ # We could probably try harder.
+ LIBC=gnu
+
+ eval $set_cc_for_build
+ cat <<-EOF > $dummy.c
+ #include <features.h>
+ #if defined(__UCLIBC__)
+ LIBC=uclibc
+ #elif defined(__dietlibc__)
+ LIBC=dietlibc
+ #else
+ LIBC=gnu
+ #endif
+ EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+ ;;
+esac
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+ /sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || \
+ echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
+ earmv*)
+ arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+ endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
+ machine=${arch}${endian}-unknown
+ ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently (or will in the future) and ABI.
+ case "${UNAME_MACHINE_ARCH}" in
+ earm*)
+ os=netbsdelf
+ ;;
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ELF__
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # Determine ABI tags.
+ case "${UNAME_MACHINE_ARCH}" in
+ earm*)
+ expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+ abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}${abi}"
+ exit ;;
+ *:Bitrig:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:LibertyBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:Sortix:*:*)
+ echo ${UNAME_MACHINE}-unknown-sortix
+ exit ;;
+ *:Redox:*:*)
+ echo ${UNAME_MACHINE}-unknown-redox
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE=alpha ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE=alpha ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE=alpha ;;
+ "EV5 (21164)")
+ UNAME_MACHINE=alphaev5 ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE=alphaev56 ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE=alphapca56 ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE=alphapca57 ;;
+ "EV6 (21264)")
+ UNAME_MACHINE=alphaev6 ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE=alphaev67 ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE=alphaev68 ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE=alphaev68 ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE=alphaev68 ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE=alphaev69 ;;
+ "EV7 (21364)")
+ UNAME_MACHINE=alphaev7 ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE=alphaev79 ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+ exitcode=$?
+ trap '' 0
+ exit $exitcode ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ s390x:SunOS:*:*)
+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ echo i386-pc-auroraux${UNAME_RELEASE}
+ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ eval $set_cc_for_build
+ SUN_ARCH=i386
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH=x86_64
+ fi
+ fi
+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *:AIX:*:[4567])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/lslpp ] ; then
+ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
+ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH=hppa2.0n ;;
+ 64) HP_ARCH=hppa2.0w ;;
+ '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = hppa2.0w ]
+ then
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep -q __LP64__
+ then
+ HP_ARCH=hppa2.0w
+ else
+ HP_ARCH=hppa64
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ case ${UNAME_PROCESSOR} in
+ amd64)
+ UNAME_PROCESSOR=x86_64 ;;
+ i386)
+ UNAME_PROCESSOR=i586 ;;
+ esac
+ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
+ *:MINGW64*:*)
+ echo ${UNAME_MACHINE}-pc-mingw64
+ exit ;;
+ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ *:MSYS*:*)
+ echo ${UNAME_MACHINE}-pc-msys
+ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit ;;
+ *:Interix*:*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ authenticamd | genuineintel | EM64T)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ aarch64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arc:Linux:*:* | arceb:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ else
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+ fi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ cris:Linux:*:*)
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ exit ;;
+ crisv32:Linux:*:*)
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ exit ;;
+ e2k:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ frv:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ hexagon:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ i*86:Linux:*:*)
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ k1om:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef ${UNAME_MACHINE}
+ #undef ${UNAME_MACHINE}el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=${UNAME_MACHINE}el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=${UNAME_MACHINE}
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+ ;;
+ mips64el:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ openrisc*:Linux:*:*)
+ echo or1k-unknown-linux-${LIBC}
+ exit ;;
+ or32:Linux:*:* | or1k*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-${LIBC}
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-${LIBC}
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+ *) echo hppa-unknown-linux-${LIBC} ;;
+ esac
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-${LIBC}
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-${LIBC}
+ exit ;;
+ ppc64le:Linux:*:*)
+ echo powerpc64le-unknown-linux-${LIBC}
+ exit ;;
+ ppcle:Linux:*:*)
+ echo powerpcle-unknown-linux-${LIBC}
+ exit ;;
+ riscv32:Linux:*:* | riscv64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
+ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ tile*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+ exit ;;
+ x86_64:Linux:*:*)
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+ exit ;;
+ xtensa*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configure will decide that
+ # this is a cross-build.
+ echo i586-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
+ x86_64:Haiku:*:*)
+ echo x86_64-unknown-haiku
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-ACE:SUPER-UX:*:*)
+ echo sxace-nec-superux${UNAME_RELEASE}
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ eval $set_cc_for_build
+ if test "$UNAME_PROCESSOR" = unknown ; then
+ UNAME_PROCESSOR=powerpc
+ fi
+ if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
+ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
+ # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+ if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_PPC >/dev/null
+ then
+ UNAME_PROCESSOR=powerpc
+ fi
+ fi
+ elif test "$UNAME_PROCESSOR" = i386 ; then
+ # Avoid executing cc on OS X 10.9, as it ships with a stub
+ # that puts up a graphical alert prompting to install
+ # developer tools. Any system running Mac OS X 10.7 or
+ # later (Darwin 11 and later) is required to have a 64-bit
+ # processor. This is not true of the ARM version of Darwin
+ # that Apple uses in portable devices.
+ UNAME_PROCESSOR=x86_64
+ fi
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = x86; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NEO-*:NONSTOP_KERNEL:*:*)
+ echo neo-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSE-*:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-*:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSX-*:NONSTOP_KERNEL:*:*)
+ echo nsx-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = 386; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
+ i*86:AROS:*:*)
+ echo ${UNAME_MACHINE}-pc-aros
+ exit ;;
+ x86_64:VMkernel:*:*)
+ echo ${UNAME_MACHINE}-unknown-esx
+ exit ;;
+ amd64:Isilon\ OneFS:*:*)
+ echo x86_64-unknown-onefs
+ exit ;;
+esac
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script (version $timestamp), has failed to recognize the
+operating system you are using. If your script is old, overwrite *all*
+copies of config.guess and config.sub with the latest versions from:
+
+ https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+and
+ https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+
+If $0 has already been updated, send the following data and any
+information you think might be pertinent to config-patches@gnu.org to
+provide the necessary information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/build/config.sub b/build/config.sub
new file mode 100755
index 0000000..95dc3d0
--- /dev/null
+++ b/build/config.sub
@@ -0,0 +1,1836 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright 1992-2017 Free Software Foundation, Inc.
+
+timestamp='2017-09-16'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program 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
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+
+
+# Please send patches to <config-patches@gnu.org>.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright 1992-2017 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
+ kopensolaris*-gnu* | cloudabi*-eabi* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ android-linux)
+ os=-linux-android
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple | -axis | -knuth | -cray | -microblaze*)
+ os=
+ basic_machine=$1
+ ;;
+ -bluegene*)
+ os=-cnk
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*178)
+ os=-lynxos178
+ ;;
+ -lynx*5)
+ os=-lynxos5
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | aarch64 | aarch64_be \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arceb \
+ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+ | avr | avr32 \
+ | ba \
+ | be32 | be64 \
+ | bfin \
+ | c4x | c8051 | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | e2k | epiphany \
+ | fido | fr30 | frv | ft32 \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | hexagon \
+ | i370 | i860 | i960 | ia16 | ia64 \
+ | ip2k | iq2000 \
+ | k1om \
+ | le32 | le64 \
+ | lm32 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa32r6 | mipsisa32r6el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64r6 | mipsisa64r6el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipsr5900 | mipsr5900el \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nds32 | nds32le | nds32be \
+ | nios | nios2 | nios2eb | nios2el \
+ | ns16k | ns32k \
+ | open8 | or1k | or1knd | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle \
+ | pru \
+ | pyramid \
+ | riscv32 | riscv64 \
+ | rl78 | rx \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu \
+ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+ | ubicom32 \
+ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+ | visium \
+ | wasm32 \
+ | we32k \
+ | x86 | xc16x | xstormy16 | xtensa \
+ | z8k | z80)
+ basic_machine=$basic_machine-unknown
+ ;;
+ c54x)
+ basic_machine=tic54x-unknown
+ ;;
+ c55x)
+ basic_machine=tic55x-unknown
+ ;;
+ c6x)
+ basic_machine=tic6x-unknown
+ ;;
+ leon|leon[3-9])
+ basic_machine=sparc-$basic_machine
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
+
+ strongarm | thumb | xscale)
+ basic_machine=arm-unknown
+ ;;
+ xgate)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ xscaleeb)
+ basic_machine=armeb-unknown
+ ;;
+
+ xscaleel)
+ basic_machine=armel-unknown
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | aarch64-* | aarch64_be-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* | avr32-* \
+ | ba-* \
+ | be32-* | be64-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* \
+ | c8051-* | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | e2k-* | elxsi-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | hexagon-* \
+ | i*86-* | i860-* | i960-* | ia16-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | k1om-* \
+ | le32-* | le64-* \
+ | lm32-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ | microblaze-* | microblazeel-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64octeon-* | mips64octeonel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64r5900-* | mips64r5900el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa32r6-* | mipsisa32r6el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64r6-* | mipsisa64r6el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipsr5900-* | mipsr5900el-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
+ | nds32-* | nds32le-* | nds32be-* \
+ | nios-* | nios2-* | nios2eb-* | nios2el-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | open8-* \
+ | or1k*-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+ | pru-* \
+ | pyramid-* \
+ | riscv32-* | riscv64-* \
+ | rl78-* | romp-* | rs6000-* | rx-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
+ | tahoe-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tile*-* \
+ | tron-* \
+ | ubicom32-* \
+ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+ | vax-* \
+ | visium-* \
+ | wasm32-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* \
+ | xstormy16-* | xtensa*-* \
+ | ymp-* \
+ | z8k-* | z80-*)
+ ;;
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+ basic_machine=$basic_machine-unknown
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ os=-aros
+ ;;
+ asmjs)
+ basic_machine=asmjs-unknown
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=-linux
+ ;;
+ blackfin-*)
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ bluegene*)
+ basic_machine=powerpc-ibm
+ os=-cnk
+ ;;
+ c54x-*)
+ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c55x-*)
+ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c6x-*)
+ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=-cegcc
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16 | cr16-*)
+ basic_machine=cr16-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=-dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ e500v[12])
+ basic_machine=powerpc-unknown
+ os=$os"spe"
+ ;;
+ e500v[12]-*)
+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=$os"spe"
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ leon-*|leon[3-9]-*)
+ basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=-linux
+ ;;
+ m68knommu-*)
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ microblaze*)
+ basic_machine=microblaze-xilinx
+ ;;
+ mingw64)
+ basic_machine=x86_64-pc
+ os=-mingw64
+ ;;
+ mingw32)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ moxiebox)
+ basic_machine=moxie-unknown
+ os=-moxiebox
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
+ msys)
+ basic_machine=i686-pc
+ os=-msys
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ nacl)
+ basic_machine=le32-unknown
+ os=-nacl
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ neo-tandem)
+ basic_machine=neo-tandem
+ ;;
+ nse-tandem)
+ basic_machine=nse-tandem
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ nsx-tandem)
+ basic_machine=nsx-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=-linux
+ ;;
+ parisc-*)
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc | ppcbe) basic_machine=powerpc-unknown
+ ;;
+ ppc-* | ppcbe-*)
+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ os=-rdos
+ ;;
+ rdos32)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ strongarm-* | thumb-*)
+ basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tile*)
+ basic_machine=$basic_machine-unknown
+ os=-linux-gnu
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ wasm32)
+ basic_machine=wasm32-unknown
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ x64)
+ basic_machine=x86_64-pc
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ xscale-* | xscalee[bl]-*)
+ basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ z80-*-coff)
+ basic_machine=z80-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases that might get confused
+ # with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -auroraux)
+ os=-auroraux
+ ;;
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # Now accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST end in a * to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+ | -sym* | -kopensolaris* | -plan9* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* | -aros* | -cloudabi* | -sortix* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
+ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-musl* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
+ | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -dicos*)
+ os=-dicos
+ ;;
+ -nacl*)
+ ;;
+ -ios)
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ c8051-*)
+ os=-elf
+ ;;
+ hexagon-*)
+ os=-elf
+ ;;
+ tic54x-*)
+ os=-coff
+ ;;
+ tic55x-*)
+ os=-coff
+ ;;
+ tic6x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mep-*)
+ os=-elf
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ pru-*)
+ os=-elf
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-haiku)
+ os=-haiku
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-knuth)
+ os=-mmixware
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -cnk*|-aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -os400*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -tpf*)
+ vendor=ibm
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/build/crypto.m4 b/build/crypto.m4
new file mode 100644
index 0000000..fc9e17b
--- /dev/null
+++ b/build/crypto.m4
@@ -0,0 +1,290 @@
+dnl -------------------------------------------------------- -*- autoconf -*-
+dnl Copyright 2006 The Apache Software Foundation or its licensors, as
+dnl applicable.
+dnl
+dnl Licensed under the Apache License, Version 2.0 (the "License");
+dnl you may not use this file except in compliance with the License.
+dnl You may obtain a copy of the License at
+dnl
+dnl http://www.apache.org/licenses/LICENSE-2.0
+dnl
+dnl Unless required by applicable law or agreed to in writing, software
+dnl distributed under the License is distributed on an "AS IS" BASIS,
+dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+dnl See the License for the specific language governing permissions and
+dnl limitations under the License.
+
+dnl
+dnl Crypto module
+dnl
+
+dnl
+dnl APU_CHECK_CRYPTO: look for crypto libraries and headers
+dnl
+AC_DEFUN([APU_CHECK_CRYPTO], [
+ apu_have_crypto=0
+ apu_have_openssl=0
+ apu_have_nss=0
+ apu_have_commoncrypto=0
+
+ old_libs="$LIBS"
+ old_cppflags="$CPPFLAGS"
+ old_ldflags="$LDFLAGS"
+
+ AC_ARG_WITH([crypto], [APR_HELP_STRING([--with-crypto], [enable crypto support])],
+ [
+ cryptolibs="openssl nss commoncrypto"
+
+ if test "$withval" = "yes"; then
+
+ crypto_library_enabled=0
+ for cryptolib in $cryptolibs; do
+ eval v=\$with_$cryptolib
+ if test "$v" != "" -a "$v" != "no"; then
+ crypto_library_enabled=1
+ fi
+ done
+
+ if test "$crypto_library_enabled" = "0"; then
+ for cryptolib in $cryptolibs; do
+ eval v=\$with_$cryptolib
+ if test "$v" != "no"; then
+ eval with_$cryptolib=yes
+ crypto_library_enabled=1
+ fi
+ done
+ if test "$crypto_library_enabled" = "1"; then
+ AC_MSG_NOTICE([Crypto was requested but no crypto library was found; autodetecting possible libraries])
+ else
+ AC_ERROR([Crypto was requested but all possible crypto libraries were disabled.])
+ fi
+ fi
+
+ APU_CHECK_CRYPTO_OPENSSL
+ APU_CHECK_CRYPTO_NSS
+ APU_CHECK_CRYPTO_COMMONCRYPTO
+ dnl add checks for other varieties of ssl here
+ if test "$apu_have_crypto" = "0"; then
+ AC_ERROR([Crypto was requested but no crypto library could be enabled; specify the location of a crypto library using --with-openssl, --with-nss, and/or --with-commoncrypto.])
+ fi
+ fi
+ ], [
+ apu_have_crypto=0
+ ])
+
+ AC_SUBST(apu_have_crypto)
+
+])
+dnl
+
+AC_DEFUN([APU_CHECK_CRYPTO_OPENSSL], [
+ openssl_have_headers=0
+ openssl_have_libs=0
+
+ old_libs="$LIBS"
+ old_cppflags="$CPPFLAGS"
+ old_ldflags="$LDFLAGS"
+
+ AC_ARG_WITH([openssl],
+ [APR_HELP_STRING([--with-openssl=DIR], [specify location of OpenSSL])],
+ [
+ if test "$withval" = "yes"; then
+ AC_CHECK_HEADERS(openssl/x509.h, [openssl_have_headers=1])
+ AC_CHECK_LIB(crypto, EVP_CIPHER_CTX_new, AC_CHECK_LIB(ssl, SSL_accept, [openssl_have_libs=1],,-lcrypto))
+ if test "$openssl_have_headers" != "0" && test "$openssl_have_libs" != "0"; then
+ apu_have_openssl=1
+ fi
+ elif test "$withval" = "no"; then
+ apu_have_openssl=0
+ else
+
+ openssl_CPPFLAGS="-I$withval/include"
+ openssl_LDFLAGS="-L$withval/lib "
+
+ APR_ADDTO(CPPFLAGS, [$openssl_CPPFLAGS])
+ APR_ADDTO(LDFLAGS, [$openssl_LDFLAGS])
+
+ AC_MSG_NOTICE(checking for openssl in $withval)
+ AC_CHECK_HEADERS(openssl/x509.h, [openssl_have_headers=1])
+ AC_CHECK_LIB(crypto, EVP_CIPHER_CTX_new, AC_CHECK_LIB(ssl, SSL_accept, [openssl_have_libs=1],,-lcrypto))
+ if test "$openssl_have_headers" != "0" && test "$openssl_have_libs" != "0"; then
+ apu_have_openssl=1
+ APR_ADDTO(APRUTIL_LDFLAGS, [-L$withval/lib])
+ APR_ADDTO(APRUTIL_INCLUDES, [-I$withval/include])
+ fi
+
+ AC_CHECK_DECLS([EVP_PKEY_CTX_new], [], [],
+ [#include <openssl/evp.h>])
+
+ fi
+ ], [
+ apu_have_openssl=0
+ ])
+
+ AC_SUBST(apu_have_openssl)
+
+ dnl Since we have already done the AC_CHECK_LIB tests, if we have it,
+ dnl we know the library is there.
+ if test "$apu_have_openssl" = "1"; then
+ APR_ADDTO(LDADD_crypto_openssl, [$openssl_LDFLAGS -lssl -lcrypto])
+ apu_have_crypto=1
+
+ AC_MSG_CHECKING([for const input buffers in OpenSSL])
+ AC_TRY_COMPILE([#include <openssl/rsa.h>],
+ [ const unsigned char * buf;
+ unsigned char * outbuf;
+ RSA rsa;
+
+ RSA_private_decrypt(1,
+ buf,
+ outbuf,
+ &rsa,
+ RSA_PKCS1_PADDING);
+
+ ],
+ [AC_MSG_RESULT([yes])]
+ [AC_DEFINE([CRYPTO_OPENSSL_CONST_BUFFERS], 1, [Define that OpenSSL uses const buffers])],
+ [AC_MSG_RESULT([no])])
+
+ fi
+ AC_SUBST(LDADD_crypto_openssl)
+ AC_SUBST(apu_have_crypto)
+
+ LIBS="$old_libs"
+ CPPFLAGS="$old_cppflags"
+ LDFLAGS="$old_ldflags"
+])
+
+AC_DEFUN([APU_CHECK_CRYPTO_NSS], [
+ nss_have_libs=0
+
+ old_libs="$LIBS"
+ old_cppflags="$CPPFLAGS"
+ old_ldflags="$LDFLAGS"
+
+ AC_ARG_WITH([nss],
+ [APR_HELP_STRING([--with-nss=DIR], [specify location of NSS])],
+ [
+ if test "$withval" = "yes"; then
+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+ if test -n "$PKG_CONFIG"; then
+ nss_CPPFLAGS=`$PKG_CONFIG --cflags-only-I nss`
+ nss_LDFLAGS=`$PKG_CONFIG --libs nss`
+ APR_ADDTO(CPPFLAGS, [$nss_CPPFLAGS])
+ APR_ADDTO(LDFLAGS, [$nss_LDFLAGS])
+ fi
+ nss_have_prerrorh=0
+ nss_have_nssh=0
+ nss_have_pk11pubh=0
+ AC_CHECK_HEADERS(prerror.h, [nss_have_prerrorh=1])
+ AC_CHECK_HEADERS(nss/nss.h nss.h, [nss_have_nssh=1])
+ AC_CHECK_HEADERS(nss/pk11pub.h pk11pub.h, [nss_have_pk11pubh=1])
+ nss_have_headers=${nss_have_prerrorh}${nss_have_nssh}${nss_have_pk11pubh}
+ AC_CHECK_LIB(nspr4, PR_Initialize, AC_CHECK_LIB(nss3, PK11_CreatePBEV2AlgorithmID, [nss_have_libs=1],,-lnspr4))
+ if test "$nss_have_headers" = "111" && test "$nss_have_libs" != "0"; then
+ apu_have_nss=1
+ fi
+ elif test "$withval" = "no"; then
+ apu_have_nss=0
+ elif test "x$withval" != "x"; then
+
+ nss_CPPFLAGS="-I$withval/include/nss -I$withval/include/nss3 -I$withval/include/nspr -I$withval/include/nspr4 -I$withval/include -I$withval/../public"
+ nss_LDFLAGS="-L$withval/lib "
+
+ APR_ADDTO(CPPFLAGS, [$nss_CPPFLAGS])
+ APR_ADDTO(LDFLAGS, [$nss_LDFLAGS])
+
+ AC_MSG_NOTICE(checking for nss in $withval)
+ nss_have_prerrorh=0
+ nss_have_nssh=0
+ nss_have_pk11pubh=0
+ AC_CHECK_HEADERS(prerror.h, [nss_have_prerrorh=1])
+ AC_CHECK_HEADERS(nss/nss.h nss.h, [nss_have_nssh=1])
+ AC_CHECK_HEADERS(nss/pk11pub.h pk11pub.h, [nss_have_pk11pubh=1])
+ nss_have_headers=${nss_have_prerrorh}${nss_have_nssh}${nss_have_pk11pubh}
+ AC_CHECK_LIB(nspr4, PR_Initialize, AC_CHECK_LIB(nss3, PK11_CreatePBEV2AlgorithmID, [nss_have_libs=1],,-lnspr4))
+ if test "$nss_have_headers" = "111" && test "$nss_have_libs" != "0"; then
+ apu_have_nss=1
+ fi
+
+ fi
+ if test "$apu_have_nss" != "0"; then
+ APR_ADDTO(APRUTIL_PRIV_INCLUDES, [$nss_CPPFLAGS])
+ fi
+ ], [
+ apu_have_nss=0
+ ])
+
+ AC_SUBST(apu_have_nss)
+
+ dnl Since we have already done the AC_CHECK_LIB tests, if we have it,
+ dnl we know the library is there.
+ if test "$apu_have_nss" = "1"; then
+ APR_ADDTO(LDADD_crypto_nss, [$nss_LDFLAGS -lnspr4 -lnss3])
+ apu_have_crypto=1
+ fi
+ AC_SUBST(LDADD_crypto_nss)
+ AC_SUBST(apu_have_crypto)
+
+ LIBS="$old_libs"
+ CPPFLAGS="$old_cppflags"
+ LDFLAGS="$old_ldflags"
+])
+
+AC_DEFUN([APU_CHECK_CRYPTO_COMMONCRYPTO], [
+ apu_have_commoncrypto=0
+ commoncrypto_have_headers=0
+ commoncrypto_have_libs=0
+
+ old_libs="$LIBS"
+ old_cppflags="$CPPFLAGS"
+ old_ldflags="$LDFLAGS"
+
+ AC_ARG_WITH([commoncrypto],
+ [APR_HELP_STRING([--with-commoncrypto=DIR], [specify location of CommonCrypto])],
+ [
+ if test "$withval" = "yes"; then
+ AC_CHECK_HEADERS(CommonCrypto/CommonKeyDerivation.h, [commoncrypto_have_headers=1])
+ AC_CHECK_LIB(System, CCKeyDerivationPBKDF, AC_CHECK_LIB(System, CCCryptorCreate, [commoncrypto_have_libs=1],,-lcrypto))
+ if test "$commoncrypto_have_headers" != "0" && test "$commoncrypto_have_libs" != "0"; then
+ apu_have_commoncrypto=1
+ fi
+ elif test "$withval" = "no"; then
+ apu_have_commoncrypto=0
+ else
+
+ commoncrypto_CPPFLAGS="-I$withval/include"
+ commoncrypto_LDFLAGS="-L$withval/lib "
+
+ APR_ADDTO(CPPFLAGS, [$commoncrypto_CPPFLAGS])
+ APR_ADDTO(LDFLAGS, [$commoncrypto_LDFLAGS])
+
+ AC_MSG_NOTICE(checking for commoncrypto in $withval)
+ AC_CHECK_HEADERS(CommonCrypto/CommonKeyDerivation.h, [commoncrypto_have_headers=1])
+ AC_CHECK_LIB(System, CCKeyDerivationPBKDF, AC_CHECK_LIB(System, CCCryptorCreate, [commoncrypto_have_libs=1],,-lcrypto))
+ if test "$commoncrypto_have_headers" != "0" && test "$commoncrypto_have_libs" != "0"; then
+ apu_have_commoncrypto=1
+ APR_ADDTO(LDFLAGS, [-L$withval/lib])
+ APR_ADDTO(INCLUDES, [-I$withval/include])
+ fi
+
+ fi
+ ], [
+ apu_have_commoncrypto=0
+ ])
+
+ dnl Since we have already done the AC_CHECK_LIB tests, if we have it,
+ dnl we know the library is there.
+ if test "$apu_have_commoncrypto" = "1"; then
+ apu_have_crypto=1
+ fi
+ AC_SUBST(apu_have_commoncrypto)
+ AC_SUBST(LDADD_crypto_commoncrypto)
+ AC_SUBST(apu_have_crypto)
+
+ LIBS="$old_libs"
+ CPPFLAGS="$old_cppflags"
+ LDFLAGS="$old_ldflags"
+])
+
+dnl
diff --git a/build/dbd.m4 b/build/dbd.m4
new file mode 100644
index 0000000..c6e40e0
--- /dev/null
+++ b/build/dbd.m4
@@ -0,0 +1,514 @@
+dnl -------------------------------------------------------- -*- autoconf -*-
+dnl Licensed to the Apache Software Foundation (ASF) under one or more
+dnl contributor license agreements. See the NOTICE file distributed with
+dnl this work for additional information regarding copyright ownership.
+dnl The ASF licenses this file to You under the Apache License, Version 2.0
+dnl (the "License"); you may not use this file except in compliance with
+dnl the License. You may obtain a copy of the License at
+dnl
+dnl http://www.apache.org/licenses/LICENSE-2.0
+dnl
+dnl Unless required by applicable law or agreed to in writing, software
+dnl distributed under the License is distributed on an "AS IS" BASIS,
+dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+dnl See the License for the specific language governing permissions and
+dnl limitations under the License.
+
+dnl
+dnl DBD module
+dnl
+
+dnl
+dnl APU_CHECK_DBD: compile backends for apr_dbd.
+dnl
+AC_DEFUN([APU_CHECK_DBD], [
+ apu_have_pgsql=0
+
+ old_libs="$LIBS"
+ old_cppflags="$CPPFLAGS"
+ old_ldflags="$LDFLAGS"
+
+ AC_ARG_WITH([pgsql], APR_HELP_STRING([--with-pgsql=DIR], [specify PostgreSQL location]),
+ [
+ if test "$withval" = "yes"; then
+ AC_PATH_PROG([PGSQL_CONFIG],[pg_config])
+ if test "x$PGSQL_CONFIG" != 'x'; then
+ pgsql_CPPFLAGS="-I`$PGSQL_CONFIG --includedir`"
+ pgsql_LDFLAGS="-L`$PGSQL_CONFIG --libdir`"
+
+ APR_ADDTO(CPPFLAGS, [$pgsql_CPPFLAGS])
+ APR_ADDTO(LDFLAGS, [$pgsql_LDFLAGS])
+ fi
+
+ AC_CHECK_HEADERS(libpq-fe.h, [
+ AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1],[
+ if test "x$PGSQL_CONFIG" != 'x'; then
+ unset ac_cv_lib_pq_PQsendQueryPrepared
+ pgsql_LIBS="`$PGSQL_CONFIG --libs`"
+ APR_ADDTO(LIBS, [$pgsql_LIBS])
+ AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1])
+ fi
+ ])
+ ])
+ if test "$apu_have_pgsql" = "0"; then
+ AC_CHECK_HEADERS(postgresql/libpq-fe.h, [
+ AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1],[
+ if test "x$PGSQL_CONFIG" != 'x'; then
+ unset ac_cv_lib_pq_PQsendQueryPrepared
+ pgsql_LIBS="`$PGSQL_CONFIG --libs`"
+ APR_ADDTO(LIBS, [$pgsql_LIBS])
+ AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1])
+ fi
+ ])
+ ])
+ fi
+ if test "$apu_have_pgsql" != "0" && test "x$PGSQL_CONFIG" != 'x'; then
+ APR_ADDTO(APRUTIL_PRIV_INCLUDES, [$pgsql_CPPFLAGS])
+ fi
+ elif test "$withval" = "no"; then
+ :
+ else
+ AC_PATH_PROG([PGSQL_CONFIG],[pg_config],,[$withval/bin])
+ if test "x$PGSQL_CONFIG" != 'x'; then
+ pgsql_CPPFLAGS="-I`$PGSQL_CONFIG --includedir`"
+ pgsql_LDFLAGS="-L`$PGSQL_CONFIG --libdir`"
+ else
+ pgsql_CPPFLAGS="-I$withval/include"
+ pgsql_LDFLAGS="-L$withval/lib "
+ fi
+
+ APR_ADDTO(CPPFLAGS, [$pgsql_CPPFLAGS])
+ APR_ADDTO(LDFLAGS, [$pgsql_LDFLAGS])
+
+ AC_MSG_NOTICE(checking for pgsql in $withval)
+ AC_CHECK_HEADERS(libpq-fe.h, [
+ AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1],[
+ if test "x$PGSQL_CONFIG" != 'x'; then
+ unset ac_cv_lib_pq_PQsendQueryPrepared
+ pgsql_LIBS="`$PGSQL_CONFIG --libs`"
+ APR_ADDTO(LIBS, [$pgsql_LIBS])
+ AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1])
+ fi
+ ])
+ ])
+ if test "$apu_have_pgsql" != "1"; then
+ AC_CHECK_HEADERS(postgresql/libpq-fe.h, [
+ AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1],[
+ if test "x$PGSQL_CONFIG" != 'x'; then
+ unset ac_cv_lib_pq_PQsendQueryPrepared
+ pgsql_LIBS="`$PGSQL_CONFIG --libs`"
+ APR_ADDTO(LIBS, [$pgsql_LIBS])
+ AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1])
+ fi
+ ])
+ ])
+ fi
+ if test "$apu_have_pgsql" != "0"; then
+ APR_ADDTO(APRUTIL_PRIV_INCLUDES, [$pgsql_CPPFLAGS])
+ fi
+ fi
+ ], [
+ AC_PATH_PROG([PGSQL_CONFIG],[pg_config])
+ if test "x$PGSQL_CONFIG" != 'x'; then
+ pgsql_CPPFLAGS="-I`$PGSQL_CONFIG --includedir`"
+ pgsql_LDFLAGS="-L`$PGSQL_CONFIG --libdir`"
+
+ APR_ADDTO(CPPFLAGS, [$pgsql_CPPFLAGS])
+ APR_ADDTO(LDFLAGS, [$pgsql_LDFLAGS])
+ fi
+
+ AC_CHECK_HEADERS(libpq-fe.h, [
+ AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1],[
+ if test "x$PGSQL_CONFIG" != 'x'; then
+ unset ac_cv_lib_pq_PQsendQueryPrepared
+ pgsql_LIBS="`$PGSQL_CONFIG --libs`"
+ APR_ADDTO(LIBS, [$pgsql_LIBS])
+ AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1])
+ fi
+ ])
+ ])
+ if test "$apu_have_pgsql" = "0"; then
+ AC_CHECK_HEADERS(postgresql/libpq-fe.h, [
+ AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1],[
+ if test "x$PGSQL_CONFIG" != 'x'; then
+ unset ac_cv_lib_pq_PQsendQueryPrepared
+ pgsql_LIBS="`$PGSQL_CONFIG --libs`"
+ APR_ADDTO(LIBS, [$pgsql_LIBS])
+ AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1])
+ fi
+ ])
+ ])
+ fi
+ if test "$apu_have_pgsql" != "0" && test "x$PGSQL_CONFIG" != 'x'; then
+ APR_ADDTO(APRUTIL_PRIV_INCLUDES, [$pgsql_CPPFLAGS])
+ fi
+ ])
+ AC_SUBST(apu_have_pgsql)
+ dnl Since we have already done the AC_CHECK_LIB tests, if we have it,
+ dnl we know the library is there.
+ if test "$apu_have_pgsql" = "1"; then
+ APR_ADDTO(LDADD_dbd_pgsql, [$pgsql_LDFLAGS -lpq $pgsql_LIBS])
+ fi
+ AC_SUBST(LDADD_dbd_pgsql)
+
+ LIBS="$old_libs"
+ CPPFLAGS="$old_cppflags"
+ LDFLAGS="$old_ldflags"
+])
+dnl
+AC_DEFUN([APU_CHECK_DBD_MYSQL], [
+ apu_have_mysql=0
+
+ old_libs="$LIBS"
+ old_cppflags="$CPPFLAGS"
+ old_ldflags="$LDFLAGS"
+
+ AC_ARG_WITH([mysql], APR_HELP_STRING([--with-mysql=DIR], [enable MySQL DBD driver]),
+ [
+ if test "$withval" = "yes"; then
+ AC_PATH_PROG([MYSQL_CONFIG],[mysql_config])
+ if test "x$MYSQL_CONFIG" != 'x'; then
+ mysql_CPPFLAGS="`$MYSQL_CONFIG --include`"
+ mysql_LDFLAGS="`$MYSQL_CONFIG --libs_r | sed -e 's/-l[[^ ]]\+//g'`"
+ mysql_LIBS="`$MYSQL_CONFIG --libs_r`"
+
+ APR_ADDTO(CPPFLAGS, [$mysql_CPPFLAGS])
+ APR_ADDTO(LIBS, [$mysql_LIBS])
+ fi
+
+ AC_CHECK_HEADERS([mysql.h my_global.h my_sys.h],
+ AC_CHECK_LIB(mysqlclient, mysql_init, [apu_have_mysql=1]),
+ [apu_have_mysql=0; break],
+ [#include <my_global.h>])
+ if test "$apu_have_mysql" = "0"; then
+ AC_CHECK_HEADERS([mysql/mysql.h mysql/my_global.h mysql/my_sys.h],
+ AC_CHECK_LIB(mysqlclient, mysql_init, [apu_have_mysql=1]),
+ [apu_have_mysql=0; break],
+ [#include <mysql/my_global.h>])
+ fi
+ if test "$apu_have_mysql" != "0" && test "x$MYSQL_CONFIG" != 'x'; then
+ APR_ADDTO(APRUTIL_PRIV_INCLUDES, [$mysql_CPPFLAGS])
+ fi
+ elif test "$withval" = "no"; then
+ :
+ else
+ AC_PATH_PROG([MYSQL_CONFIG],[mysql_config],,[$withval/bin])
+ if test "x$MYSQL_CONFIG" != 'x'; then
+ mysql_CPPFLAGS="`$MYSQL_CONFIG --include`"
+ mysql_LDFLAGS="`$MYSQL_CONFIG --libs_r | sed -e 's/-l[[^ ]]\+//g'`"
+ mysql_LIBS="`$MYSQL_CONFIG --libs_r`"
+ else
+ mysql_CPPFLAGS="-I$withval/include"
+ mysql_LDFLAGS="-L$withval/lib "
+ fi
+
+ APR_ADDTO(CPPFLAGS, [$mysql_CPPFLAGS])
+ APR_ADDTO(LDFLAGS, [$mysql_LDFLAGS])
+ APR_ADDTO(LIBS, [$mysql_LIBS])
+
+ AC_MSG_NOTICE(checking for mysql in $withval)
+ AC_CHECK_HEADERS([mysql.h my_global.h my_sys.h],
+ AC_CHECK_LIB(mysqlclient, mysql_init, [apu_have_mysql=1]),
+ [apu_have_mysql=0; break],
+ [#include <my_global.h>])
+
+ if test "$apu_have_mysql" != "1"; then
+ AC_CHECK_HEADERS([mysql/mysql.h mysql/my_global.h mysql/my_sys.h],
+ AC_CHECK_LIB(mysqlclient, mysql_init, [apu_have_mysql=1]),
+ [apu_have_mysql=0; break],
+ [#include <mysql/my_global.h>])
+ fi
+ if test "$apu_have_mysql" != "0"; then
+ APR_ADDTO(APRUTIL_PRIV_INCLUDES, [$mysql_CPPFLAGS])
+ fi
+ fi
+ ])
+
+ AC_SUBST(apu_have_mysql)
+
+ dnl Since we have already done the AC_CHECK_LIB tests, if we have it,
+ dnl we know the library is there.
+ if test "$apu_have_mysql" = "1"; then
+ APR_ADDTO(LDADD_dbd_mysql, [$mysql_LDFLAGS -lmysqlclient $mysql_LIBS])
+ fi
+ AC_SUBST(LDADD_dbd_mysql)
+
+ LIBS="$old_libs"
+ CPPFLAGS="$old_cppflags"
+ LDFLAGS="$old_ldflags"
+])
+dnl
+AC_DEFUN([APU_CHECK_DBD_SQLITE3], [
+ apu_have_sqlite3=0
+
+ old_libs="$LIBS"
+ old_cppflags="$CPPFLAGS"
+ old_ldflags="$LDFLAGS"
+
+ AC_ARG_WITH([sqlite3], APR_HELP_STRING([--with-sqlite3=DIR], [enable sqlite3 DBD driver]),
+ [
+ if test "$withval" = "yes"; then
+ AC_CHECK_HEADERS(sqlite3.h, AC_CHECK_LIB(sqlite3, sqlite3_open, [apu_have_sqlite3=1]))
+ elif test "$withval" = "no"; then
+ :
+ else
+ sqlite3_CPPFLAGS="-I$withval/include"
+ sqlite3_LDFLAGS="-L$withval/lib "
+
+ APR_ADDTO(CPPFLAGS, [$sqlite3_CPPFLAGS])
+ APR_ADDTO(LDFLAGS, [$sqlite3_LDFLAGS])
+
+ AC_MSG_NOTICE(checking for sqlite3 in $withval)
+ AC_CHECK_HEADERS(sqlite3.h, AC_CHECK_LIB(sqlite3, sqlite3_open, [apu_have_sqlite3=1]))
+ if test "$apu_have_sqlite3" != "0"; then
+ APR_ADDTO(APRUTIL_PRIV_INCLUDES, [-I$withval/include])
+ fi
+ fi
+ ], [
+ AC_CHECK_HEADERS(sqlite3.h, AC_CHECK_LIB(sqlite3, sqlite3_open, [apu_have_sqlite3=1]))
+ ])
+
+ AC_SUBST(apu_have_sqlite3)
+
+ dnl Since we have already done the AC_CHECK_LIB tests, if we have it,
+ dnl we know the library is there.
+ if test "$apu_have_sqlite3" = "1"; then
+ APR_ADDTO(LDADD_dbd_sqlite3, [$sqlite3_LDFLAGS -lsqlite3])
+ fi
+ AC_SUBST(LDADD_dbd_sqlite3)
+
+ LIBS="$old_libs"
+ CPPFLAGS="$old_cppflags"
+ LDFLAGS="$old_ldflags"
+])
+dnl
+AC_DEFUN([APU_CHECK_DBD_SQLITE2], [
+ apu_have_sqlite2=0
+
+ old_libs="$LIBS"
+ old_cppflags="$CPPFLAGS"
+ old_ldflags="$LDFLAGS"
+
+ AC_ARG_WITH([sqlite2], APR_HELP_STRING([--with-sqlite2=DIR], [enable sqlite2 DBD driver]),
+ [
+ if test "$withval" = "yes"; then
+ AC_CHECK_HEADERS(sqlite.h, AC_CHECK_LIB(sqlite, sqlite_open, [apu_have_sqlite2=1]))
+ elif test "$withval" = "no"; then
+ :
+ else
+ sqlite2_CPPFLAGS="-I$withval/include"
+ sqlite2_LDFLAGS="-L$withval/lib "
+
+ APR_ADDTO(CPPFLAGS, [$sqlite2_CPPFLAGS])
+ APR_ADDTO(LDFLAGS, [$sqlite2_LDFLAGS])
+
+ AC_MSG_NOTICE(checking for sqlite2 in $withval)
+ AC_CHECK_HEADERS(sqlite.h, AC_CHECK_LIB(sqlite, sqlite_open, [apu_have_sqlite2=1]))
+ if test "$apu_have_sqlite2" != "0"; then
+ APR_ADDTO(APRUTIL_PRIV_INCLUDES, [-I$withval/include])
+ fi
+ fi
+ ], [
+ AC_CHECK_HEADERS(sqlite.h, AC_CHECK_LIB(sqlite, sqlite_open, [apu_have_sqlite2=1]))
+ ])
+
+ AC_SUBST(apu_have_sqlite2)
+
+ dnl Since we have already done the AC_CHECK_LIB tests, if we have it,
+ dnl we know the library is there.
+ if test "$apu_have_sqlite2" = "1"; then
+ APR_ADDTO(LDADD_dbd_sqlite2, [$sqlite2_LDFLAGS -lsqlite])
+ fi
+ AC_SUBST(LDADD_dbd_sqlite2)
+
+ LIBS="$old_libs"
+ CPPFLAGS="$old_cppflags"
+ LDFLAGS="$old_ldflags"
+])
+dnl
+AC_DEFUN([APU_CHECK_DBD_ORACLE], [
+ apu_have_oracle=0
+
+ old_libs="$LIBS"
+ old_cppflags="$CPPFLAGS"
+ old_ldflags="$LDFLAGS"
+
+ AC_ARG_WITH([oracle-include],
+ APR_HELP_STRING([--with-oracle-include=DIR], [path to Oracle include files]))
+ AC_ARG_WITH([oracle],
+ APR_HELP_STRING([--with-oracle=DIR], [enable Oracle DBD driver; giving ORACLE_HOME as DIR]),
+ [
+ if test "$withval" = "yes"; then
+ if test -n "$with_oracle_include"; then
+ oracle_CPPFLAGS="$CPPFLAGS -I$with_oracle_include"
+ APR_ADDTO(APRUTIL_PRIV_INCLUDES, [-I$with_oracle_include])
+ fi
+
+ APR_ADDTO(CPPFLAGS, [$oracle_CPPFLAGS])
+
+ AC_CHECK_HEADERS(oci.h, AC_CHECK_LIB(clntsh, OCIEnvCreate, [apu_have_oracle=1],[
+ unset ac_cv_lib_clntsh_OCIEnvCreate
+ oracle_LIBS="-lnnz11"
+ APR_ADDTO(LIBS, [$oracle_LIBS])
+ AC_CHECK_LIB(clntsh, OCIEnvCreate, [apu_have_oracle=1],[
+ unset ac_cv_lib_clntsh_OCIEnvCreate
+ APR_REMOVEFROM(LIBS, [$oracle_LIBS])
+ oracle_LIBS="-lnnz10"
+ APR_ADDTO(LIBS, [$oracle_LIBS])
+ AC_CHECK_LIB(clntsh, OCIEnvCreate, [apu_have_oracle=1])
+ ])
+ ]))
+ elif test "$withval" = "no"; then
+ :
+ else
+ if test -n "$with_oracle_include"; then
+ oracle_CPPFLAGS="$CPPFLAGS -I$with_oracle_include"
+ APR_ADDTO(APRUTIL_PRIV_INCLUDES, [-I$with_oracle_include])
+ else
+ oracle_CPPFLAGS="-I$withval/rdbms/demo -I$withval/rdbms/public"
+ fi
+ oracle_LDFLAGS="-L$withval/lib "
+
+ APR_ADDTO(CPPFLAGS, [$oracle_CPPFLAGS])
+ APR_ADDTO(LDFLAGS, [$oracle_LDFLAGS])
+
+ AC_MSG_NOTICE(checking for oracle in $withval)
+ AC_CHECK_HEADERS(oci.h, AC_CHECK_LIB(clntsh, OCIEnvCreate, [apu_have_oracle=1],[
+ unset ac_cv_lib_clntsh_OCIEnvCreate
+ oracle_LIBS="-lnnz11"
+ APR_ADDTO(LIBS, [$oracle_LIBS])
+ AC_CHECK_LIB(clntsh, OCIEnvCreate, [apu_have_oracle=1],[
+ unset ac_cv_lib_clntsh_OCIEnvCreate
+ APR_REMOVEFROM(LIBS, [$oracle_LIBS])
+ oracle_LIBS="-lnnz10"
+ APR_ADDTO(LIBS, [$oracle_LIBS])
+ AC_CHECK_LIB(clntsh, OCIEnvCreate, [apu_have_oracle=1])
+ ])
+ ]))
+ if test "$apu_have_oracle" != "0"; then
+ oracle_LDFLAGS="$oracle_LDFLAGS -R$withval/lib"
+ if test -z "$with_oracle_include"; then
+ APR_ADDTO(APRUTIL_PRIV_INCLUDES, [-I$withval/rdbms/demo])
+ APR_ADDTO(APRUTIL_PRIV_INCLUDES, [-I$withval/rdbms/public])
+ fi
+ fi
+ fi
+ ])
+
+ AC_SUBST(apu_have_oracle)
+
+ dnl Since we have already done the AC_CHECK_LIB tests, if we have it,
+ dnl we know the library is there.
+ if test "$apu_have_oracle" = "1"; then
+ APR_ADDTO(LDADD_dbd_oracle, [$oracle_LDFLAGS -lclntsh $oracle_LIBS])
+ fi
+ AC_SUBST(LDADD_dbd_oracle)
+
+ LIBS="$old_libs"
+ CPPFLAGS="$old_cppflags"
+ LDFLAGS="$old_ldflags"
+])
+
+dnl
+
+AC_DEFUN([APU_CHECK_DBD_ODBC], [
+ apu_have_odbc=0
+
+ old_libs="$LIBS"
+ old_cppflags="$CPPFLAGS"
+ old_ldflags="$LDFLAGS"
+
+ AC_ARG_WITH([odbc], APR_HELP_STRING([--with-odbc=DIR], [specify ODBC location]),
+ [
+ if test "$withval" = "yes"; then
+ AC_PATH_PROG([ODBC_CONFIG],[odbc_config])
+ if test "x$ODBC_CONFIG" != 'x'; then
+ odbc_CPPFLAGS="-I`$ODBC_CONFIG --include-prefix`"
+ odbc_LDFLAGS="-L`$ODBC_CONFIG --lib-prefix`"
+ odbc_LIBS="`$ODBC_CONFIG --libs`"
+
+ APR_ADDTO(CPPFLAGS, [$odbc_CPPFLAGS])
+ APR_ADDTO(LDFLAGS, [$odbc_LDFLAGS])
+ APR_ADDTO(LIBS, [$odbc_LIBS])
+ fi
+
+ AC_CHECK_HEADERS(sql.h, AC_CHECK_LIB(odbc, SQLAllocHandle, [apu_have_odbc=1]))
+ if test "$apu_have_odbc" = "0"; then
+ AC_CHECK_HEADERS(odbc/sql.h, AC_CHECK_LIB(odbc, SQLAllocHandle, [apu_have_odbc=1]))
+ fi
+ if test "$apu_have_odbc" != "0" && test "x$ODBC_CONFIG" != 'x'; then
+ APR_ADDTO(APRUTIL_PRIV_INCLUDES, [$odbc_CPPFLAGS])
+ fi
+ elif test "$withval" = "no"; then
+ :
+ else
+ AC_PATH_PROG([ODBC_CONFIG],[odbc_config],,[$withval/bin])
+ if test "x$ODBC_CONFIG" != 'x'; then
+ odbc_CPPFLAGS="-I`$ODBC_CONFIG --include-prefix`"
+ odbc_LDFLAGS="-L`$ODBC_CONFIG --lib-prefix`"
+ odbc_LIBS="`$ODBC_CONFIG --libs`"
+ else
+ if test -f "$withval" && test -x "$withval"; then
+ odbc_CPPFLAGS="-I`$withval --include-prefix`"
+ odbc_LDFLAGS="-L`$withval --lib-prefix`"
+ odbc_LIBS="`$withval --libs`"
+ else
+ odbc_CPPFLAGS="-I$withval/include"
+ odbc_LDFLAGS="-L$withval/lib "
+ fi
+ fi
+
+ APR_ADDTO(CPPFLAGS, [$odbc_CPPFLAGS])
+ APR_ADDTO(LDFLAGS, [$odbc_LDFLAGS])
+ APR_ADDTO(LIBS, [$odbc_LIBS])
+
+ AC_MSG_NOTICE(checking for odbc in $withval)
+ AC_CHECK_HEADERS(sql.h, AC_CHECK_LIB(odbc, SQLAllocHandle, [apu_have_odbc=1]))
+ if test "$apu_have_odbc" = "0"; then
+ AC_CHECK_HEADERS(odbc/sql.h, AC_CHECK_LIB(odbc, SQLAllocHandle, [apu_have_odbc=1]))
+ fi
+ if test "$apu_have_odbc" != "0" && test "x$ODBC_CONFIG" != 'x'; then
+ APR_ADDTO(APRUTIL_PRIV_INCLUDES, [$odbc_CPPFLAGS])
+ fi
+ fi
+ ], [
+ AC_PATH_PROG([ODBC_CONFIG],[odbc_config])
+ if test "x$ODBC_CONFIG" != 'x'; then
+ odbc_CPPFLAGS="-I`$ODBC_CONFIG --include-prefix`"
+ odbc_LDFLAGS="-L`$ODBC_CONFIG --lib-prefix`"
+ odbc_LIBS="`$ODBC_CONFIG --libs`"
+
+ APR_ADDTO(CPPFLAGS, [$odbc_CPPFLAGS])
+ APR_ADDTO(LDFLAGS, [$odbc_LDFLAGS])
+ APR_ADDTO(LIBS, [$odbc_LIBS])
+ fi
+
+ AC_CHECK_HEADERS(sql.h, AC_CHECK_LIB(odbc, SQLAllocHandle, [apu_have_odbc=1]))
+ if test "$apu_have_odbc" = "0"; then
+ AC_CHECK_HEADERS(odbc/sql.h, AC_CHECK_LIB(odbc, SQLAllocHandle, [apu_have_odbc=1]))
+ fi
+ if test "$apu_have_odbc" != "0" && test "x$ODBC_CONFIG" != 'x'; then
+ APR_ADDTO(APRUTIL_PRIV_INCLUDES, [$odbc_CPPFLAGS])
+ fi
+ ])
+ AC_SUBST(apu_have_odbc)
+ dnl Since we have already done the AC_CHECK_LIB tests, if we have it,
+ dnl we know the library is there.
+ if test "$apu_have_odbc" = "1"; then
+ APR_ADDTO(LDADD_dbd_odbc, [$odbc_LDFLAGS -lodbc $odbc_LIBS])
+ fi
+ AC_SUBST(LDADD_dbd_odbc)
+
+ LIBS="$old_libs"
+ CPPFLAGS="$old_cppflags"
+ LDFLAGS="$old_ldflags"
+
+ apu_dbd_tests=""
+ test $apu_have_oracle = 1 && apu_dbd_tests="$apu_dbd_tests oracle"
+ test $apu_have_pgsql = 1 && apu_dbd_tests="$apu_dbd_tests pgsql"
+ test $apu_have_mysql = 1 && apu_dbd_tests="$apu_dbd_tests mysql"
+ test $apu_have_sqlite2 = 1 && apu_dbd_tests="$apu_dbd_tests sqlite2"
+ test $apu_have_sqlite3 = 1 && apu_dbd_tests="$apu_dbd_tests sqlite3"
+ test $apu_have_odbc = 1 && apu_dbd_tests="$apu_dbd_tests odbc"
+ AC_SUBST(apu_dbd_tests)
+])
diff --git a/build/dbm.m4 b/build/dbm.m4
new file mode 100644
index 0000000..57bd131
--- /dev/null
+++ b/build/dbm.m4
@@ -0,0 +1,745 @@
+dnl -------------------------------------------------------- -*- autoconf -*-
+dnl Licensed to the Apache Software Foundation (ASF) under one or more
+dnl contributor license agreements. See the NOTICE file distributed with
+dnl this work for additional information regarding copyright ownership.
+dnl The ASF licenses this file to You under the Apache License, Version 2.0
+dnl (the "License"); you may not use this file except in compliance with
+dnl the License. You may obtain a copy of the License at
+dnl
+dnl http://www.apache.org/licenses/LICENSE-2.0
+dnl
+dnl Unless required by applicable law or agreed to in writing, software
+dnl distributed under the License is distributed on an "AS IS" BASIS,
+dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+dnl See the License for the specific language governing permissions and
+dnl limitations under the License.
+
+
+dnl
+dnl DBM module
+dnl
+
+dnl APU_LIB_BERKELEY_DB(major, minor, patch, places, headers, libnames)
+dnl
+dnl Search for a useable version of Berkeley DB in a number of
+dnl common places. The installed DB must be no older than the
+dnl version given by MAJOR, MINOR, and PATCH. All of these
+dnl arguments are allowed to be '-1', indicating we don't care.
+dnl PLACES is a list of places to search for a Berkeley DB
+dnl installation. HEADERS is a list of headers to try. LIBNAMES
+dnl is a list of names of the library to attempt to link against,
+dnl typically 'db' and 'db4'.
+dnl
+dnl If we find a useable version, set CPPFLAGS and LIBS as
+dnl appropriate, and set the shell variable `apu_have_db' to
+dnl `1', and apu_db_lib to the matching lib name, and apu_db_header
+dnl to the header to use. Otherwise, set `apu_have_db' to `0'.
+dnl
+dnl This macro also checks for the `--with-berkeley-db=PATH' flag;
+dnl if given, the macro will use the PATH specified, and the
+dnl configuration script will die if it can't find the library. If
+dnl the user gives the `--without-berkeley-db' flag, the entire
+dnl search is skipped.
+dnl
+dnl We cache the results of individual searches under particular
+dnl prefixes, not the overall result of whether we found Berkeley
+dnl DB. That way, the user can re-run the configure script with
+dnl different --with-berkeley-db switch values, without interference
+dnl from the cache.
+
+
+AC_DEFUN([APU_CHECK_BERKELEY_DB], [
+ bdb_version=$1
+ if test "$2" != "-1"; then
+ bdb_version="$bdb_version.$2"
+ if test "$3" != "-1"; then
+ bdb_version="$bdb_version.$3"
+ fi
+ fi
+ bdb_places=$4
+ bdb_default_search_headers=$5
+ bdb_default_search_lib_names=$6
+
+ apu_have_db=0
+
+ # Save the original values of the flags we tweak.
+ apu_check_lib_save_libs="$LIBS"
+ apu_check_lib_save_ldflags="$LDFLAGS"
+ apu_check_lib_save_cppflags="$CPPFLAGS"
+
+ # The variable `found' is the prefix under which we've found
+ # Berkeley DB, or `not' if we haven't found it anywhere yet.
+ found=not
+ for bdb_place in $bdb_places; do
+
+ LDFLAGS="$apu_check_lib_save_ldflags"
+ CPPFLAGS="$apu_check_lib_save_cppflags"
+ case "$bdb_place" in
+ "std" )
+ description="the standard places"
+ ;;
+ *":"* )
+ header="`echo $bdb_place | sed -e 's/:.*$//'`"
+ lib="`echo $bdb_place | sed -e 's/^.*://'`"
+ CPPFLAGS="$CPPFLAGS -I$header"
+ LDFLAGS="$LDFLAGS -L$lib"
+ description="$header and $lib"
+ ;;
+ * )
+ if test -d $bdb_place; then
+ LDFLAGS="$LDFLAGS -L$bdb_place/lib"
+ CPPFLAGS="$CPPFLAGS -I$bdb_place/include"
+ else
+ AC_MSG_CHECKING([for Berkeley DB $bdb_version in $bdb_place])
+ AC_MSG_RESULT([directory not found])
+ continue
+ fi
+ description="$bdb_place"
+ ;;
+ esac
+
+ # Since there is no AC_MSG_NOTICE in autoconf 2.13, we use this
+ # trick to display a message instead.
+ AC_MSG_CHECKING([for Berkeley DB $bdb_version in $description])
+ AC_MSG_RESULT()
+
+ for bdb_libname in $bdb_default_search_lib_names; do
+ for bdb_header in $bdb_default_search_headers; do
+ # Clear the header cache variable for each location
+ changequote(,)
+ cache_id="`echo ac_cv_header_${bdb_header} \
+ | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
+ changequote([,])
+ unset $cache_id
+ AC_CHECK_HEADER([$bdb_header], [
+ if test "$1" = "3" -o "$1" = "4" -o "$1" = "5" -o "$1" = "6"; then
+ # We generate a separate cache variable for each prefix and libname
+ # we search under. That way, we avoid caching information that
+ # changes if the user runs `configure' with a different set of
+ # switches.
+ changequote(,)
+ cache_id="`echo apu_cv_check_berkeley_db_$1_$2_$3_${bdb_header}_${bdb_libname}_in_${bdb_place} \
+ | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
+ changequote([,])
+
+ AC_MSG_CHECKING([for -l$bdb_libname])
+ dnl We can't use AC_CACHE_CHECK here, because that won't print out
+ dnl the value of the computed cache variable properly.
+ AC_CACHE_VAL($cache_id,
+ [
+ APU_TRY_BERKELEY_DB($1, $2, $3, $bdb_header, $bdb_libname)
+ eval "$cache_id=$apu_try_berkeley_db"
+ ])
+ result="`eval echo '$'$cache_id`"
+ AC_MSG_RESULT($result)
+ elif test "$1" = "1"; then
+ AC_CHECK_LIB($bdb_libname,
+ dbopen,
+ [result=yes],
+ [result=no]
+ )
+ elif test "$1" = "2"; then
+ AC_CHECK_LIB($bdb_libname,
+ db_open,
+ [result=yes],
+ [result=no]
+ )
+ fi
+ ], [result="no"])
+
+ # If we found it, no need to search any more.
+ if test "$result" = "yes"; then
+ found="$bdb_place"
+ break
+ fi
+ done
+ test "$found" != "not" && break
+ done
+ test "$found" != "not" && break
+ done
+
+ # Restore the original values of the flags we tweak.
+ LDFLAGS="$apu_check_lib_save_ldflags"
+ CPPFLAGS="$apu_check_lib_save_cppflags"
+
+ case "$found" in
+ "not")
+ apu_have_db=0
+ ;;
+ "std")
+ apu_db_header=$bdb_header
+ apu_db_lib=$bdb_libname
+ apu_have_db=1
+ ;;
+ *":"*)
+ header="`echo $found | sed -e 's/:.*$//'`"
+ lib="`echo $found | sed -e 's/^.*://'`"
+
+ APR_ADDTO(APRUTIL_INCLUDES, [-I$header])
+ APR_ADDTO(APRUTIL_LDFLAGS, [-L$lib])
+ apu_db_header=$bdb_header
+ apu_db_lib=$bdb_libname
+ apu_have_db=1
+ ;;
+ *)
+ APR_ADDTO(APRUTIL_INCLUDES, [-I$found/include])
+ APR_ADDTO(APRUTIL_LDFLAGS, [-L$found/lib])
+ apu_db_header=$bdb_header
+ apu_db_lib=$bdb_libname
+ apu_have_db=1
+ ;;
+ esac
+])
+
+
+dnl APU_TRY_BERKELEY_DB(major, minor, patch, header, libname)
+dnl
+dnl A subroutine of APU_CHECK_BERKELEY_DB.
+dnl
+dnl Check that a new-enough version of Berkeley DB is installed.
+dnl "New enough" means no older than the version given by MAJOR,
+dnl MINOR, and PATCH. The result of the test is not cached; no
+dnl messages are printed. Use HEADER as the header file to include.
+dnl Use LIBNAME as the library to link against.
+dnl (e.g. LIBNAME should usually be "db" or "db4".)
+dnl
+dnl Set the shell variable `apu_try_berkeley_db' to `yes' if we found
+dnl an appropriate version installed, or `no' otherwise.
+dnl
+dnl This macro uses the Berkeley DB library function `db_version' to
+dnl find the version. If the library installed doesn't have this
+dnl function, then this macro assumes it is too old.
+
+dnl NOTE: This is pretty messed up. It seems that the FreeBSD port of
+dnl Berkeley DB 4 puts the header file in /usr/local/include/db4, but the
+dnl database library in /usr/local/lib, as libdb4.[a|so]. There is no
+dnl /usr/local/include/db.h. So if you check for /usr/local first, you'll
+dnl get the old header file from /usr/include, and the new library from
+dnl /usr/local/lib. Disaster. Thus this test compares the version constants
+dnl in the db.h header with the ones returned by db_version().
+
+
+AC_DEFUN([APU_TRY_BERKELEY_DB],
+ [
+ apu_try_berkeley_db_save_libs="$LIBS"
+
+ apu_check_berkeley_db_major=$1
+ apu_check_berkeley_db_minor=$2
+ apu_check_berkeley_db_patch=$3
+ apu_try_berkeley_db_header=$4
+ apu_try_berkeley_db_libname=$5
+
+ LIBS="$LIBS -l$apu_try_berkeley_db_libname"
+ AC_TRY_RUN(
+ [
+#include <stdlib.h>
+#include <stdio.h>
+#include <$apu_try_berkeley_db_header>
+main ()
+{
+ int major, minor, patch;
+
+ db_version(&major, &minor, &patch);
+
+ /* Sanity check: ensure that db.h constants actually match the db library */
+ if (major != DB_VERSION_MAJOR
+ || minor != DB_VERSION_MINOR
+ || patch != DB_VERSION_PATCH)
+ exit (1);
+
+ /* Run-time check: ensure the library claims to be the correct version. */
+
+ if ($apu_check_berkeley_db_major != -1) {
+ if (major < $apu_check_berkeley_db_major)
+ exit (1);
+ if (major > $apu_check_berkeley_db_major)
+ exit (0);
+ }
+
+ if ($apu_check_berkeley_db_minor != -1) {
+ if (minor < $apu_check_berkeley_db_minor)
+ exit (1);
+ if (minor > $apu_check_berkeley_db_minor)
+ exit (0);
+ }
+
+ if ($apu_check_berkeley_db_patch == -1
+ || patch >= $apu_check_berkeley_db_patch)
+ exit (0);
+ else
+ exit (1);
+}
+ ],
+ [apu_try_berkeley_db=yes],
+ [apu_try_berkeley_db=no],
+ [apu_try_berkeley_db=yes]
+ )
+
+ LIBS="$apu_try_berkeley_db_save_libs"
+ ]
+)
+
+
+dnl
+dnl APU_CHECK_DB1: is DB1 present?
+dnl
+dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
+dnl
+AC_DEFUN([APU_CHECK_DB1], [
+ places=$1
+ if test -z "$places"; then
+ places="std"
+ fi
+ APU_CHECK_BERKELEY_DB(1, 0, 0,
+ "$places",
+ "db1/db.h db.h",
+ "db1"
+ )
+ if test "$apu_have_db" = "1"; then
+ apu_db_version=1
+ fi
+])
+
+
+dnl
+dnl APU_CHECK_DB185: is DB1.85 present?
+dnl
+dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
+dnl
+dnl NB: BerkelyDB v2 and above can be compiled in 1.85 mode
+dnl which has a libdb not libdb1 or libdb185
+AC_DEFUN([APU_CHECK_DB185], [
+ places=$1
+ if test -z "$places"; then
+ places="std"
+ fi
+ APU_CHECK_BERKELEY_DB(1, -1, -1,
+ "$places",
+ "db_185.h",
+ "db"
+ )
+ if test "$apu_have_db" = "1"; then
+ apu_db_version=185
+ fi
+])
+
+
+dnl
+dnl APU_CHECK_DB2: is DB2 present?
+dnl
+dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
+dnl
+AC_DEFUN([APU_CHECK_DB2], [
+ places=$1
+ if test -z "$places"; then
+ places="std"
+ fi
+ APU_CHECK_BERKELEY_DB(2, -1, -1,
+ "$places",
+ "db2/db.h db.h",
+ "db2 db"
+ )
+ if test "$apu_have_db" = "1"; then
+ apu_db_version=2
+ fi
+])
+
+
+dnl
+dnl APU_CHECK_DB3: is DB3 present?
+dnl
+dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
+dnl
+AC_DEFUN([APU_CHECK_DB3], [
+ places=$1
+ if test -z "$places"; then
+ places="std"
+ fi
+ APU_CHECK_BERKELEY_DB(3, -1, -1,
+ "$places",
+ "db3/db.h db.h",
+ "db3 db"
+ )
+ if test "$apu_have_db" = "1"; then
+ apu_db_version=3
+ fi
+])
+
+
+dnl
+dnl APU_CHECK_DBXY: is DBX.Y present?
+dnl
+dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
+dnl
+AC_DEFUN([APU_CHECK_DBXY], [
+ places=$1
+ db_major=$2
+ db_minor=$3
+ if test -z "$places"; then
+ places="std /usr/local /usr/local/BerkeleyDB.${db_major}.${db_minor} /boot/home/config"
+ fi
+ APU_CHECK_BERKELEY_DB("${db_major}", "${db_minor}", "-1",
+ "$places",
+ "db${db_major}${db_minor}/db.h db${db_major}/db.h db.h",
+ "db-${db_major}.${db_minor} db${db_major}-${db_major}.${db_minor} db${db_major}${db_minor} db-${db_major} db${db_major} db"
+ )
+ if test "$apu_have_db" = "1"; then
+ apu_db_version=${db_major}
+ fi
+])
+
+
+AC_DEFUN([APU_CHECK_DB], [
+ requested=$1
+ check_places=$2
+
+ case "$requested" in
+ db)
+ APU_CHECK_DB_ALL("$check_places")
+ if test "$apu_have_db" = "0"; then
+ AC_MSG_ERROR(Berkeley db requested, but not found)
+ fi
+ ;;
+ db1)
+ APU_CHECK_DB1("$check_places")
+ if test "$apu_db_version" != "1"; then
+ AC_MSG_ERROR(Berkeley db1 not found)
+ fi
+ ;;
+ db185)
+ APU_CHECK_DB185("$check_places")
+ if test "$apu_db_version" != "185"; then
+ AC_MSG_ERROR(Berkeley db185 not found)
+ fi
+ ;;
+ db2)
+ APU_CHECK_DB2("$check_places")
+ if test "$apu_db_version" != "2"; then
+ AC_MSG_ERROR(Berkeley db2 not found)
+ fi
+ ;;
+ db3)
+ APU_CHECK_DB3("$check_places")
+ if test "$apu_db_version" != "3"; then
+ AC_MSG_ERROR(Berkeley db3 not found)
+ fi
+ ;;
+ db[[456]][[0-9]])
+ db_major=`echo "$requested" | sed -e 's/db//' -e 's/.$//'`
+ db_minor=`echo "$requested" | sed -e 's/db//' -e 's/.//'`
+ APU_CHECK_DBXY("$check_places", "$db_major", "$db_minor")
+ if test "$apu_db_version" != "$db_major"; then
+ AC_MSG_ERROR(Berkeley db$db_major not found)
+ fi
+ ;;
+ db[[456]])
+ db_major=`echo "$requested" | sed -e 's/db//'`
+ # Start version search at version x.9
+ db_minor=9
+ while [[ $db_minor -ge 0 ]]
+ do
+ APU_CHECK_DBXY("$check_places", "$db_major", "$db_minor")
+ if test "$apu_have_db" = "1"; then
+ break
+ fi
+ db_minor=`expr $db_minor - 1`
+ done
+ if test "$apu_db_version" != "$db_major"; then
+ AC_MSG_ERROR(Berkeley db$db_major not found)
+ fi
+ ;;
+ default)
+ APU_CHECK_DB_ALL("$check_places")
+ ;;
+ esac
+])
+
+dnl
+dnl APU_CHECK_DB_ALL: Try all Berkeley DB versions, from 6.X to 1.
+dnl
+AC_DEFUN([APU_CHECK_DB_ALL], [
+ all_places=$1
+
+ # Start version search at version 6.9
+ db_version=69
+ while [[ $db_version -ge 40 ]]
+ do
+ db_major=`echo $db_version | sed -e 's/.$//'`
+ db_minor=`echo $db_version | sed -e 's/.//'`
+ APU_CHECK_DBXY("$all_places", "$db_major", "$db_minor")
+ if test "$apu_have_db" = "1"; then
+ break
+ fi
+ db_version=`expr $db_version - 1`
+ done
+ if test "$apu_have_db" = "0"; then
+ APU_CHECK_DB3("$all_places")
+ fi
+ if test "$apu_have_db" = "0"; then
+ APU_CHECK_DB2("$all_places")
+ fi
+ if test "$apu_have_db" = "0"; then
+ APU_CHECK_DB1("$all_places")
+ fi
+ if test "$apu_have_db" = "0"; then
+ APU_CHECK_DB185("$all_places")
+ fi
+ AC_MSG_CHECKING(for Berkeley DB)
+ if test "$apu_have_db" = "1"; then
+ AC_MSG_RESULT(found db$apu_db_version)
+ else
+ AC_MSG_RESULT(not found)
+ fi
+])
+
+
+dnl
+dnl APU_CHECK_DBM: see what kind of DBM backend to use for apr_dbm.
+dnl
+AC_DEFUN([APU_CHECK_DBM], [
+ apu_use_sdbm=0
+ apu_use_ndbm=0
+ apu_use_gdbm=0
+ apu_use_db=0
+ dnl it's in our codebase
+ apu_have_sdbm=1
+ apu_have_gdbm=0
+ apu_have_ndbm=0
+ apu_have_db=0
+
+ apu_db_header=db.h # default so apu_select_dbm.h is syntactically correct
+ apu_db_version=0
+
+ # Maximum supported version announced in help string.
+ # Although we search for all versions up to 6.9,
+ # we should only include existing versions in our
+ # help string.
+ dbm_list="sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4"
+ db_max_version=48
+ db_min_version=41
+ db_version="$db_min_version"
+ while [[ $db_version -le $db_max_version ]]
+ do
+ dbm_list="$dbm_list, db$db_version"
+ db_version=`expr $db_version + 1`
+ done
+ db_max_version=53
+ db_min_version=50
+ db_version="$db_min_version"
+ while [[ $db_version -le $db_max_version ]]
+ do
+ dbm_list="$dbm_list, db$db_version"
+ db_version=`expr $db_version + 1`
+ done
+ db_max_version=60
+ db_min_version=60
+ db_version="$db_min_version"
+ while [[ $db_version -le $db_max_version ]]
+ do
+ dbm_list="$dbm_list, db$db_version"
+ db_version=`expr $db_version + 1`
+ done
+
+ AC_ARG_WITH(dbm, [APR_HELP_STRING([--with-dbm=DBM], [choose the DBM type to use.
+ DBM={sdbm,gdbm,ndbm,db,db1,db185,db2,db3,db4,db4X,db5X,db6X} for some X=0,...,9])],
+ [
+ if test "$withval" = "yes"; then
+ AC_MSG_ERROR([--with-dbm needs to specify a DBM type to use.
+ One of: $dbm_list])
+ fi
+ requested="$withval"
+ ], [
+ requested=default
+ ])
+
+ dnl We don't pull in GDBM unless the user asks for it, since it's GPL
+ AC_ARG_WITH([gdbm], [APR_HELP_STRING([--with-gdbm=DIR], [enable GDBM support])],
+ [
+ apu_have_gdbm=0
+ if test "$withval" = "yes"; then
+ AC_CHECK_HEADER(gdbm.h, AC_CHECK_LIB(gdbm, gdbm_open, [apu_have_gdbm=1]))
+ elif test "$withval" = "no"; then
+ apu_have_gdbm=0
+ else
+ saved_cppflags="$CPPFLAGS"
+ saved_ldflags="$LDFLAGS"
+ CPPFLAGS="$CPPFLAGS -I$withval/include"
+ LDFLAGS="$LDFLAGS -L$withval/lib "
+
+ AC_MSG_CHECKING(checking for gdbm in $withval)
+ AC_CHECK_HEADER(gdbm.h, AC_CHECK_LIB(gdbm, gdbm_open, [apu_have_gdbm=1]))
+ if test "$apu_have_gdbm" != "0"; then
+ APR_ADDTO(APRUTIL_LDFLAGS, [-L$withval/lib])
+ APR_ADDTO(APRUTIL_INCLUDES, [-I$withval/include])
+ fi
+ CPPFLAGS="$saved_cppflags"
+ LDFLAGS="$saved_ldflags"
+ fi
+ ])
+
+ AC_ARG_WITH([ndbm], [APR_HELP_STRING([--with-ndbm=PATH], [
+ Find the NDBM header and library in `PATH/include' and
+ `PATH/lib'. If PATH is of the form `HEADER:LIB', then search
+ for header files in HEADER, and the library in LIB. If you omit
+ the `=PATH' part completely, the configure script will search
+ for NDBM in a number of standard places.])],
+ [
+ apu_have_ndbm=0
+ if test "$withval" = "yes"; then
+ AC_MSG_CHECKING(checking for ndbm in the usual places)
+ apu_want_ndbm=1
+ NDBM_INC=""
+ NDBM_LDFLAGS=""
+ elif test "$withval" = "no"; then
+ apu_want_ndbm=0
+ else
+ apu_want_ndbm=1
+ case "$withval" in
+ *":"*)
+ NDBM_INC="-I`echo $withval |sed -e 's/:.*$//'`"
+ NDBM_LDFLAGS="-L`echo $withval |sed -e 's/^.*://'`"
+ AC_MSG_CHECKING(checking for ndbm includes with $NDBM_INC libs with $NDBM_LDFLAGS )
+ ;;
+ *)
+ NDBM_INC="-I$withval/include"
+ NDBM_LDFLAGS="-L$withval/lib"
+ AC_MSG_CHECKING(checking for ndbm includes in $withval)
+ ;;
+ esac
+ fi
+
+ save_cppflags="$CPPFLAGS"
+ save_ldflags="$LDFLAGS"
+ CPPFLAGS="$CPPFLAGS $NDBM_INC"
+ LDFLAGS="$LDFLAGS $NDBM_LDFLAGS"
+ dnl db_ndbm_open is what sleepcat's compatibility library actually has in it's lib
+ if test "$apu_want_ndbm" != "0"; then
+ AC_CHECK_HEADER(ndbm.h,
+ AC_CHECK_LIB(c, dbm_open, [apu_have_ndbm=1;apu_ndbm_lib=c],
+ AC_CHECK_LIB(dbm, dbm_open, [apu_have_ndbm=1;apu_ndbm_lib=dbm],
+ AC_CHECK_LIB(db, dbm_open, [apu_have_ndbm=1;apu_ndbm_lib=db],
+ AC_CHECK_LIB(db, __db_ndbm_open, [apu_have_ndbm=1;apu_ndbm_lib=db])
+ )
+ )
+ )
+ )
+ if test "$apu_have_ndbm" != "0"; then
+ if test "$withval" != "yes"; then
+ APR_ADDTO(APRUTIL_INCLUDES, [$NDBM_INC])
+ APR_ADDTO(APRUTIL_LDFLAGS, [$NDBM_LDFLAGS])
+ fi
+ elif test "$withval" != "yes"; then
+ AC_ERROR( NDBM not found in the specified directory)
+ fi
+ fi
+ CPPFLAGS="$save_cppflags"
+ LDFLAGS="$save_ldflags"
+ ], [
+ dnl don't check it no one has asked us for it
+ apu_have_ndbm=0
+ ])
+
+
+ if test -n "$apu_db_xtra_libs"; then
+ saveddbxtralibs="$LIBS"
+ LIBS="$apu_db_xtra_libs $LIBS"
+ fi
+
+ dnl We're going to try to find the highest version of Berkeley DB supported.
+ dnl
+ dnl Note that we only do this if the user requested it, since the Sleepycat
+ dnl license is viral and requires distribution of source along with programs
+ dnl that use it.
+ AC_ARG_WITH([berkeley-db], [APR_HELP_STRING([--with-berkeley-db=PATH],
+ [Find the Berkeley DB header and library in `PATH/include' and
+ `PATH/lib'. If PATH is of the form `HEADER:LIB', then search
+ for header files in HEADER, and the library in LIB. If you omit
+ the `=PATH' part completely, the configure script will search
+ for Berkeley DB in a number of standard places.])],
+ [
+ if test "$withval" = "yes"; then
+ apu_want_db=1
+ user_places=""
+ elif test "$withval" = "no"; then
+ apu_want_db=0
+ else
+ apu_want_db=1
+ user_places="$withval"
+ fi
+
+ if test "$apu_want_db" != "0"; then
+ APU_CHECK_DB($requested, $user_places)
+ if test "$apu_have_db" = "0"; then
+ AC_ERROR(Berkeley DB not found.)
+ fi
+ fi
+ ])
+
+ if test -n "$apu_db_xtra_libs"; then
+ LIBS="$saveddbxtralibs"
+ fi
+
+ case "$requested" in
+ sdbm | gdbm | ndbm | db)
+ eval "apu_use_$requested=1"
+ apu_default_dbm=$requested
+ ;;
+ db185 | db[[123456]])
+ apu_use_db=1
+ apu_default_dbm=$requested
+ ;;
+ db[[456]][[0-9]])
+ apu_use_db=1
+ apu_default_dbm=`echo $requested | sed -e 's/.$//'`
+ ;;
+ default)
+ dnl ### use more sophisticated DBMs for the default?
+ apu_default_dbm="sdbm (default)"
+ apu_use_sdbm=1
+ ;;
+ *)
+ AC_MSG_ERROR([--with-dbm=$requested is an unknown DBM type.
+ Use one of: $dbm_list])
+ ;;
+ esac
+
+ dnl Yes, it'd be nice if we could collate the output in an order
+ dnl so that the AC_MSG_CHECKING would be output before the actual
+ dnl checks, but it isn't happening now.
+ AC_MSG_CHECKING(for default DBM)
+ AC_MSG_RESULT($apu_default_dbm)
+
+ AC_SUBST(apu_use_sdbm)
+ AC_SUBST(apu_use_gdbm)
+ AC_SUBST(apu_use_ndbm)
+ AC_SUBST(apu_use_db)
+
+ AC_SUBST(apu_have_sdbm)
+ AC_SUBST(apu_have_gdbm)
+ AC_SUBST(apu_have_ndbm)
+ AC_SUBST(apu_have_db)
+ AC_SUBST(apu_db_header)
+ AC_SUBST(apu_db_version)
+
+ if test "$apu_have_db" = "1"; then
+ APR_ADDTO(LDADD_dbm_db, [-l$apu_db_lib])
+ if test -n "apu_db_xtra_libs"; then
+ APR_ADDTO(LDADD_dbm_db, [$apu_db_xtra_libs])
+ fi
+ fi
+
+ dnl Since we have already done the AC_CHECK_LIB tests, if we have it,
+ dnl we know the library is there.
+ if test "$apu_have_gdbm" = "1"; then
+ APR_ADDTO(LDADD_dbm_gdbm, [-lgdbm])
+ fi
+
+ if test "$apu_have_ndbm" = "1"; then
+ APR_ADDTO(LDADD_dbm_ndbm, [-l$apu_ndbm_lib])
+ fi
+
+ AC_SUBST(LDADD_dbm_db)
+ AC_SUBST(LDADD_dbm_gdbm)
+ AC_SUBST(LDADD_dbm_ndbm)
+])
+
diff --git a/build/dso.m4 b/build/dso.m4
new file mode 100644
index 0000000..2c5df6b
--- /dev/null
+++ b/build/dso.m4
@@ -0,0 +1,117 @@
+dnl -------------------------------------------------------- -*- autoconf -*-
+dnl Licensed to the Apache Software Foundation (ASF) under one or more
+dnl contributor license agreements. See the NOTICE file distributed with
+dnl this work for additional information regarding copyright ownership.
+dnl The ASF licenses this file to You under the Apache License, Version 2.0
+dnl (the "License"); you may not use this file except in compliance with
+dnl the License. You may obtain a copy of the License at
+dnl
+dnl http://www.apache.org/licenses/LICENSE-2.0
+dnl
+dnl Unless required by applicable law or agreed to in writing, software
+dnl distributed under the License is distributed on an "AS IS" BASIS,
+dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+dnl See the License for the specific language governing permissions and
+dnl limitations under the License.
+
+dnl
+dnl DSO module
+dnl
+
+AC_DEFUN([APU_CHECK_UTIL_DSO], [
+
+ AC_ARG_ENABLE([util-dso],
+ APR_HELP_STRING([--disable-util-dso],
+ [disable DSO build of modular components (crypto, dbd, dbm, ldap)]))
+
+ if test "$enable_util_dso" = "no"; then
+ apu_dso_build="0"
+ else
+ AC_CACHE_CHECK([whether APR has DSO support], [apu_cv_aprdso],
+ [apu_save_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS $APR_INCLUDES"
+ AC_EGREP_CPP([yes], [#include "apr.h"
+#if APR_HAS_DSO
+yes
+#endif
+], [apu_cv_aprdso=yes], [apu_cv_aprdso=no])
+ CPPFLAGS=$apu_save_CPPFLAGS])
+
+ if test $apu_cv_aprdso = yes; then
+ apu_dso_build=1
+ else
+ apu_dso_build=0
+ fi
+ fi
+
+ if test "$apu_dso_build" = "0"; then
+
+ # Statically link the drivers:
+ objs=
+ test $apu_have_openssl = 1 && objs="$objs crypto/apr_crypto_openssl.lo"
+ test $apu_have_nss = 1 && objs="$objs crypto/apr_crypto_nss.lo"
+ test $apu_have_commoncrypto = 1 && objs="$objs crypto/apr_crypto_commoncrypto.lo"
+ test $apu_have_oracle = 1 && objs="$objs dbd/apr_dbd_oracle.lo"
+ test $apu_have_pgsql = 1 && objs="$objs dbd/apr_dbd_pgsql.lo"
+ test $apu_have_mysql = 1 && objs="$objs dbd/apr_dbd_mysql.lo"
+ test $apu_have_sqlite2 = 1 && objs="$objs dbd/apr_dbd_sqlite2.lo"
+ test $apu_have_sqlite3 = 1 && objs="$objs dbd/apr_dbd_sqlite3.lo"
+ test $apu_have_odbc = 1 && objs="$objs dbd/apr_dbd_odbc.lo"
+ test $apu_have_db = 1 && objs="$objs dbm/apr_dbm_berkeleydb.lo"
+ test $apu_have_gdbm = 1 && objs="$objs dbm/apr_dbm_gdbm.lo"
+ test $apu_have_ndbm = 1 && objs="$objs dbm/apr_dbm_ndbm.lo"
+ test $apu_has_ldap = 1 && objs="$objs ldap/apr_ldap_init.lo"
+ test $apu_has_ldap = 1 && objs="$objs ldap/apr_ldap_option.lo"
+ test $apu_has_ldap = 1 && objs="$objs ldap/apr_ldap_rebind.lo"
+ EXTRA_OBJECTS="$EXTRA_OBJECTS $objs"
+
+ # Use libtool *.la for mysql if available
+ if test $apu_have_mysql = 1; then
+ for flag in $LDADD_dbd_mysql
+ do
+ dir=`echo $flag | grep "^-L" | sed s:-L::`
+ if test "x$dir" != 'x'; then
+ if test -f "$dir/libmysqlclient_r.la"; then
+ LDADD_dbd_mysql=$dir/libmysqlclient_r.la
+ break
+ fi
+ fi
+ done
+ fi
+
+ APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_crypto_openssl $LDADD_crypto_nss $LDADD_crypto_commoncrypto"
+ APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_dbd_pgsql $LDADD_dbd_sqlite2 $LDADD_dbd_sqlite3 $LDADD_dbd_oracle $LDADD_dbd_mysql $LDADD_dbd_odbc"
+ APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_dbm_db $LDADD_dbm_gdbm $LDADD_dbm_ndbm"
+ APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_ldap"
+ APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_crypto_openssl $LDADD_crypto_nss $LDADD_crypto_commoncrypto"
+ APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_dbd_pgsql $LDADD_dbd_sqlite2 $LDADD_dbd_sqlite3 $LDADD_dbd_oracle $LDADD_dbd_mysql $LDADD_dbd_odbc"
+ APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_dbm_db $LDADD_dbm_gdbm $LDADD_dbm_ndbm"
+ APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_ldap"
+
+ else
+
+ # Build the drivers as loadable modules:
+ dsos=
+ test $apu_have_openssl = 1 && dsos="$dsos crypto/apr_crypto_openssl.la"
+ test $apu_have_nss = 1 && dsos="$dsos crypto/apr_crypto_nss.la"
+ test $apu_have_commoncrypto = 1 && dsos="$dsos crypto/apr_crypto_commoncrypto.la"
+ test $apu_have_oracle = 1 && dsos="$dsos dbd/apr_dbd_oracle.la"
+ test $apu_have_pgsql = 1 && dsos="$dsos dbd/apr_dbd_pgsql.la"
+ test $apu_have_mysql = 1 && dsos="$dsos dbd/apr_dbd_mysql.la"
+ test $apu_have_sqlite2 = 1 && dsos="$dsos dbd/apr_dbd_sqlite2.la"
+ test $apu_have_sqlite3 = 1 && dsos="$dsos dbd/apr_dbd_sqlite3.la"
+ test $apu_have_odbc = 1 && dsos="$dsos dbd/apr_dbd_odbc.la"
+ test $apu_have_db = 1 && dsos="$dsos dbm/apr_dbm_db.la"
+ test $apu_have_gdbm = 1 && dsos="$dsos dbm/apr_dbm_gdbm.la"
+ test $apu_have_ndbm = 1 && dsos="$dsos dbm/apr_dbm_ndbm.la"
+ test $apu_has_ldap = 1 && dsos="$dsos ldap/apr_ldap.la"
+
+ if test -n "$dsos"; then
+ APU_MODULES="$APU_MODULES $dsos"
+ fi
+
+ fi
+
+ AC_DEFINE_UNQUOTED([APU_DSO_BUILD], $apu_dso_build,
+ [Define to 1 if modular components are built as DSOs])
+])
diff --git a/build/find_apr.m4 b/build/find_apr.m4
new file mode 100644
index 0000000..925e523
--- /dev/null
+++ b/build/find_apr.m4
@@ -0,0 +1,202 @@
+dnl -------------------------------------------------------- -*- autoconf -*-
+dnl Licensed to the Apache Software Foundation (ASF) under one or more
+dnl contributor license agreements. See the NOTICE file distributed with
+dnl this work for additional information regarding copyright ownership.
+dnl The ASF licenses this file to You under the Apache License, Version 2.0
+dnl (the "License"); you may not use this file except in compliance with
+dnl the License. You may obtain a copy of the License at
+dnl
+dnl http://www.apache.org/licenses/LICENSE-2.0
+dnl
+dnl Unless required by applicable law or agreed to in writing, software
+dnl distributed under the License is distributed on an "AS IS" BASIS,
+dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+dnl See the License for the specific language governing permissions and
+dnl limitations under the License.
+
+dnl
+dnl find_apr.m4 : locate the APR include files and libraries
+dnl
+dnl This macro file can be used by applications to find and use the APR
+dnl library. It provides a standardized mechanism for using APR. It supports
+dnl embedding APR into the application source, or locating an installed
+dnl copy of APR.
+dnl
+dnl APR_FIND_APR(srcdir, builddir, implicit-install-check, acceptable-majors,
+dnl detailed-check)
+dnl
+dnl where srcdir is the location of the bundled APR source directory, or
+dnl empty if source is not bundled.
+dnl
+dnl where builddir is the location where the bundled APR will will be built,
+dnl or empty if the build will occur in the srcdir.
+dnl
+dnl where implicit-install-check set to 1 indicates if there is no
+dnl --with-apr option specified, we will look for installed copies.
+dnl
+dnl where acceptable-majors is a space separated list of acceptable major
+dnl version numbers. Often only a single major version will be acceptable.
+dnl If multiple versions are specified, and --with-apr=PREFIX or the
+dnl implicit installed search are used, then the first (leftmost) version
+dnl in the list that is found will be used. Currently defaults to [0 1].
+dnl
+dnl where detailed-check is an M4 macro which sets the apr_acceptable to
+dnl either "yes" or "no". The macro will be invoked for each installed
+dnl copy of APR found, with the apr_config variable set appropriately.
+dnl Only installed copies of APR which are considered acceptable by
+dnl this macro will be considered found. If no installed copies are
+dnl considered acceptable by this macro, apr_found will be set to either
+dnl either "no" or "reconfig".
+dnl
+dnl Sets the following variables on exit:
+dnl
+dnl apr_found : "yes", "no", "reconfig"
+dnl
+dnl apr_config : If the apr-config tool exists, this refers to it. If
+dnl apr_found is "reconfig", then the bundled directory
+dnl should be reconfigured *before* using apr_config.
+dnl
+dnl Note: this macro file assumes that apr-config has been installed; it
+dnl is normally considered a required part of an APR installation.
+dnl
+dnl If a bundled source directory is available and needs to be (re)configured,
+dnl then apr_found is set to "reconfig". The caller should reconfigure the
+dnl (passed-in) source directory, placing the result in the build directory,
+dnl as appropriate.
+dnl
+dnl If apr_found is "yes" or "reconfig", then the caller should use the
+dnl value of apr_config to fetch any necessary build/link information.
+dnl
+
+AC_DEFUN([APR_FIND_APR], [
+ apr_found="no"
+
+ if test "$target_os" = "os2-emx"; then
+ # Scripts don't pass test -x on OS/2
+ TEST_X="test -f"
+ else
+ TEST_X="test -x"
+ fi
+
+ ifelse([$4], [], [
+ ifdef(AC_WARNING,AC_WARNING([$0: missing argument 4 (acceptable-majors): Defaulting to APR 0.x then APR 1.x]))
+ acceptable_majors="0 1"],
+ [acceptable_majors="$4"])
+
+ apr_temp_acceptable_apr_config=""
+ for apr_temp_major in $acceptable_majors
+ do
+ case $apr_temp_major in
+ 0)
+ apr_temp_acceptable_apr_config="$apr_temp_acceptable_apr_config apr-config"
+ ;;
+ *)
+ apr_temp_acceptable_apr_config="$apr_temp_acceptable_apr_config apr-$apr_temp_major-config"
+ ;;
+ esac
+ done
+
+ AC_MSG_CHECKING(for APR)
+ AC_ARG_WITH(apr,
+ [ --with-apr=PATH prefix for installed APR or the full path to
+ apr-config],
+ [
+ if test "$withval" = "no" || test "$withval" = "yes"; then
+ AC_MSG_ERROR([--with-apr requires a directory or file to be provided])
+ fi
+
+ for apr_temp_apr_config_file in $apr_temp_acceptable_apr_config
+ do
+ for lookdir in "$withval/bin" "$withval"
+ do
+ if $TEST_X "$lookdir/$apr_temp_apr_config_file"; then
+ apr_config="$lookdir/$apr_temp_apr_config_file"
+ ifelse([$5], [], [], [
+ apr_acceptable="yes"
+ $5
+ if test "$apr_acceptable" != "yes"; then
+ AC_MSG_WARN([Found APR in $apr_config, but we think it is considered unacceptable])
+ continue
+ fi])
+ apr_found="yes"
+ break 2
+ fi
+ done
+ done
+
+ if test "$apr_found" != "yes" && $TEST_X "$withval" && $withval --help > /dev/null 2>&1 ; then
+ apr_config="$withval"
+ ifelse([$5], [], [apr_found="yes"], [
+ apr_acceptable="yes"
+ $5
+ if test "$apr_acceptable" = "yes"; then
+ apr_found="yes"
+ fi])
+ fi
+
+ dnl if --with-apr is used, it is a fatal error for its argument
+ dnl to be invalid
+ if test "$apr_found" != "yes"; then
+ AC_MSG_ERROR([the --with-apr parameter is incorrect. It must specify an install prefix, a build directory, or an apr-config file.])
+ fi
+ ],[
+ dnl If we allow installed copies, check those before using bundled copy.
+ if test -n "$3" && test "$3" = "1"; then
+ for apr_temp_apr_config_file in $apr_temp_acceptable_apr_config
+ do
+ if $apr_temp_apr_config_file --help > /dev/null 2>&1 ; then
+ apr_config="$apr_temp_apr_config_file"
+ ifelse([$5], [], [], [
+ apr_acceptable="yes"
+ $5
+ if test "$apr_acceptable" != "yes"; then
+ AC_MSG_WARN([skipped APR at $apr_config, version not acceptable])
+ continue
+ fi])
+ apr_found="yes"
+ break
+ else
+ dnl look in some standard places
+ for lookdir in /usr /usr/local /usr/local/apr /opt/apr; do
+ if $TEST_X "$lookdir/bin/$apr_temp_apr_config_file"; then
+ apr_config="$lookdir/bin/$apr_temp_apr_config_file"
+ ifelse([$5], [], [], [
+ apr_acceptable="yes"
+ $5
+ if test "$apr_acceptable" != "yes"; then
+ AC_MSG_WARN([skipped APR at $apr_config, version not acceptable])
+ continue
+ fi])
+ apr_found="yes"
+ break 2
+ fi
+ done
+ fi
+ done
+ fi
+ dnl if we have not found anything yet and have bundled source, use that
+ if test "$apr_found" = "no" && test -d "$1"; then
+ apr_temp_abs_srcdir="`cd \"$1\" && pwd`"
+ apr_found="reconfig"
+ apr_bundled_major="`sed -n '/#define.*APR_MAJOR_VERSION/s/^[^0-9]*\([0-9]*\).*$/\1/p' \"$1/include/apr_version.h\"`"
+ case $apr_bundled_major in
+ "")
+ AC_MSG_ERROR([failed to find major version of bundled APR])
+ ;;
+ 0)
+ apr_temp_apr_config_file="apr-config"
+ ;;
+ *)
+ apr_temp_apr_config_file="apr-$apr_bundled_major-config"
+ ;;
+ esac
+ if test -n "$2"; then
+ apr_config="$2/$apr_temp_apr_config_file"
+ else
+ apr_config="$1/$apr_temp_apr_config_file"
+ fi
+ fi
+ ])
+
+ AC_MSG_RESULT($apr_found)
+])
diff --git a/build/find_apu.m4 b/build/find_apu.m4
new file mode 100644
index 0000000..7937e00
--- /dev/null
+++ b/build/find_apu.m4
@@ -0,0 +1,211 @@
+dnl -------------------------------------------------------- -*- autoconf -*-
+dnl Licensed to the Apache Software Foundation (ASF) under one or more
+dnl contributor license agreements. See the NOTICE file distributed with
+dnl this work for additional information regarding copyright ownership.
+dnl The ASF licenses this file to You under the Apache License, Version 2.0
+dnl (the "License"); you may not use this file except in compliance with
+dnl the License. You may obtain a copy of the License at
+dnl
+dnl http://www.apache.org/licenses/LICENSE-2.0
+dnl
+dnl Unless required by applicable law or agreed to in writing, software
+dnl distributed under the License is distributed on an "AS IS" BASIS,
+dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+dnl See the License for the specific language governing permissions and
+dnl limitations under the License.
+
+dnl
+dnl find_apu.m4 : locate the APR-util (APU) include files and libraries
+dnl
+dnl This macro file can be used by applications to find and use the APU
+dnl library. It provides a standardized mechanism for using APU. It supports
+dnl embedding APU into the application source, or locating an installed
+dnl copy of APU.
+dnl
+dnl APR_FIND_APU(srcdir, builddir, implicit-install-check, acceptable-majors,
+dnl detailed-check)
+dnl
+dnl where srcdir is the location of the bundled APU source directory, or
+dnl empty if source is not bundled.
+dnl
+dnl where builddir is the location where the bundled APU will be built,
+dnl or empty if the build will occur in the srcdir.
+dnl
+dnl where implicit-install-check set to 1 indicates if there is no
+dnl --with-apr-util option specified, we will look for installed copies.
+dnl
+dnl where acceptable-majors is a space separated list of acceptable major
+dnl version numbers. Often only a single major version will be acceptable.
+dnl If multiple versions are specified, and --with-apr-util=PREFIX or the
+dnl implicit installed search are used, then the first (leftmost) version
+dnl in the list that is found will be used. Currently defaults to [0 1].
+dnl
+dnl where detailed-check is an M4 macro which sets the apu_acceptable to
+dnl either "yes" or "no". The macro will be invoked for each installed
+dnl copy of APU found, with the apu_config variable set appropriately.
+dnl Only installed copies of APU which are considered acceptable by
+dnl this macro will be considered found. If no installed copies are
+dnl considered acceptable by this macro, apu_found will be set to either
+dnl either "no" or "reconfig".
+dnl
+dnl Sets the following variables on exit:
+dnl
+dnl apu_found : "yes", "no", "reconfig"
+dnl
+dnl apu_config : If the apu-config tool exists, this refers to it. If
+dnl apu_found is "reconfig", then the bundled directory
+dnl should be reconfigured *before* using apu_config.
+dnl
+dnl Note: this macro file assumes that apr-config has been installed; it
+dnl is normally considered a required part of an APR installation.
+dnl
+dnl Note: At this time, we cannot find *both* a source dir and a build dir.
+dnl If both are available, the build directory should be passed to
+dnl the --with-apr-util switch.
+dnl
+dnl Note: the installation layout is presumed to follow the standard
+dnl PREFIX/lib and PREFIX/include pattern. If the APU config file
+dnl is available (and can be found), then non-standard layouts are
+dnl possible, since it will be described in the config file.
+dnl
+dnl If a bundled source directory is available and needs to be (re)configured,
+dnl then apu_found is set to "reconfig". The caller should reconfigure the
+dnl (passed-in) source directory, placing the result in the build directory,
+dnl as appropriate.
+dnl
+dnl If apu_found is "yes" or "reconfig", then the caller should use the
+dnl value of apu_config to fetch any necessary build/link information.
+dnl
+
+AC_DEFUN([APR_FIND_APU], [
+ apu_found="no"
+
+ if test "$target_os" = "os2-emx"; then
+ # Scripts don't pass test -x on OS/2
+ TEST_X="test -f"
+ else
+ TEST_X="test -x"
+ fi
+
+ ifelse([$4], [],
+ [
+ ifdef(AC_WARNING,([$0: missing argument 4 (acceptable-majors): Defaulting to APU 0.x then APU 1.x]))
+ acceptable_majors="0 1"
+ ], [acceptable_majors="$4"])
+
+ apu_temp_acceptable_apu_config=""
+ for apu_temp_major in $acceptable_majors
+ do
+ case $apu_temp_major in
+ 0)
+ apu_temp_acceptable_apu_config="$apu_temp_acceptable_apu_config apu-config"
+ ;;
+ *)
+ apu_temp_acceptable_apu_config="$apu_temp_acceptable_apu_config apu-$apu_temp_major-config"
+ ;;
+ esac
+ done
+
+ AC_MSG_CHECKING(for APR-util)
+ AC_ARG_WITH(apr-util,
+ [ --with-apr-util=PATH prefix for installed APU or the full path to
+ apu-config],
+ [
+ if test "$withval" = "no" || test "$withval" = "yes"; then
+ AC_MSG_ERROR([--with-apr-util requires a directory or file to be provided])
+ fi
+
+ for apu_temp_apu_config_file in $apu_temp_acceptable_apu_config
+ do
+ for lookdir in "$withval/bin" "$withval"
+ do
+ if $TEST_X "$lookdir/$apu_temp_apu_config_file"; then
+ apu_config="$lookdir/$apu_temp_apu_config_file"
+ ifelse([$5], [], [], [
+ apu_acceptable="yes"
+ $5
+ if test "$apu_acceptable" != "yes"; then
+ AC_MSG_WARN([Found APU in $apu_config, but it is considered unacceptable])
+ continue
+ fi])
+ apu_found="yes"
+ break 2
+ fi
+ done
+ done
+
+ if test "$apu_found" != "yes" && $TEST_X "$withval" && $withval --help > /dev/null 2>&1 ; then
+ apu_config="$withval"
+ ifelse([$5], [], [apu_found="yes"], [
+ apu_acceptable="yes"
+ $5
+ if test "$apu_acceptable" = "yes"; then
+ apu_found="yes"
+ fi])
+ fi
+
+ dnl if --with-apr-util is used, it is a fatal error for its argument
+ dnl to be invalid
+ if test "$apu_found" != "yes"; then
+ AC_MSG_ERROR([the --with-apr-util parameter is incorrect. It must specify an install prefix, a build directory, or an apu-config file.])
+ fi
+ ],[
+ if test -n "$3" && test "$3" = "1"; then
+ for apu_temp_apu_config_file in $apu_temp_acceptable_apu_config
+ do
+ if $apu_temp_apu_config_file --help > /dev/null 2>&1 ; then
+ apu_config="$apu_temp_apu_config_file"
+ ifelse([$5], [], [], [
+ apu_acceptable="yes"
+ $5
+ if test "$apu_acceptable" != "yes"; then
+ AC_MSG_WARN([skipped APR-util at $apu_config, version not acceptable])
+ continue
+ fi])
+ apu_found="yes"
+ break
+ else
+ dnl look in some standard places (apparently not in builtin/default)
+ for lookdir in /usr /usr/local /usr/local/apr /opt/apr; do
+ if $TEST_X "$lookdir/bin/$apu_temp_apu_config_file"; then
+ apu_config="$lookdir/bin/$apu_temp_apu_config_file"
+ ifelse([$5], [], [], [
+ apu_acceptable="yes"
+ $5
+ if test "$apu_acceptable" != "yes"; then
+ AC_MSG_WARN([skipped APR-util at $apu_config, version not acceptable])
+ continue
+ fi])
+ apu_found="yes"
+ break 2
+ fi
+ done
+ fi
+ done
+ fi
+ dnl if we have not found anything yet and have bundled source, use that
+ if test "$apu_found" = "no" && test -d "$1"; then
+ apu_temp_abs_srcdir="`cd \"$1\" && pwd`"
+ apu_found="reconfig"
+ apu_bundled_major="`sed -n '/#define.*APU_MAJOR_VERSION/s/^[^0-9]*\([0-9]*\).*$/\1/p' \"$1/include/apu_version.h\"`"
+ case $apu_bundled_major in
+ "")
+ AC_MSG_ERROR([failed to find major version of bundled APU])
+ ;;
+ 0)
+ apu_temp_apu_config_file="apu-config"
+ ;;
+ *)
+ apu_temp_apu_config_file="apu-$apu_bundled_major-config"
+ ;;
+ esac
+ if test -n "$2"; then
+ apu_config="$2/$apu_temp_apu_config_file"
+ else
+ apu_config="$1/$apu_temp_apu_config_file"
+ fi
+ fi
+ ])
+
+ AC_MSG_RESULT($apu_found)
+])
diff --git a/build/get-version.sh b/build/get-version.sh
new file mode 100755
index 0000000..fd685b2
--- /dev/null
+++ b/build/get-version.sh
@@ -0,0 +1,37 @@
+#!/bin/sh
+#
+# extract version numbers from a header file
+#
+# USAGE: get-version.sh CMD VERSION_HEADER PREFIX
+# where CMD is one of: all, major, libtool
+# where PREFIX is the prefix to {MAJOR|MINOR|PATCH}_VERSION defines
+#
+# get-version.sh all returns a dotted version number
+# get-version.sh major returns just the major version number
+# get-version.sh libtool returns a version "libtool -version-info" format
+#
+
+if test $# != 3; then
+ echo "USAGE: $0 CMD VERSION_HEADER PREFIX"
+ echo " where CMD is one of: all, major, libtool"
+ exit 1
+fi
+
+major_sed="/#define.*$3_MAJOR_VERSION/s/^[^0-9]*\([0-9]*\).*$/\1/p"
+minor_sed="/#define.*$3_MINOR_VERSION/s/^[^0-9]*\([0-9]*\).*$/\1/p"
+patch_sed="/#define.*$3_PATCH_VERSION/s/^[^0-9]*\([0-9]*\).*$/\1/p"
+major="`sed -n $major_sed $2`"
+minor="`sed -n $minor_sed $2`"
+patch="`sed -n $patch_sed $2`"
+
+if test "$1" = "all"; then
+ echo ${major}.${minor}.${patch}
+elif test "$1" = "major"; then
+ echo ${major}
+elif test "$1" = "libtool"; then
+ # Yes, ${minor}:${patch}:${minor} is correct due to libtool idiocy.
+ echo ${minor}:${patch}:${minor}
+else
+ echo "ERROR: unknown version CMD ($1)"
+ exit 1
+fi
diff --git a/build/install.sh b/build/install.sh
new file mode 100755
index 0000000..9a8821f
--- /dev/null
+++ b/build/install.sh
@@ -0,0 +1,112 @@
+#!/bin/sh
+##
+## install.sh -- install a program, script or datafile
+##
+## Based on `install-sh' from the X Consortium's X11R5 distribution
+## as of 89/12/18 which is freely available.
+## Cleaned up for Apache's Autoconf-style Interface (APACI)
+## by Ralf S. Engelschall <rse@apache.org>
+##
+#
+# This script falls under the Apache License.
+# See http://www.apache.org/docs/LICENSE
+
+
+#
+# put in absolute paths if you don't have them in your path;
+# or use env. vars.
+#
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+
+#
+# parse argument line
+#
+instcmd="$mvprog"
+chmodcmd=""
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+ext=""
+src=""
+dst=""
+while [ "x$1" != "x" ]; do
+ case $1 in
+ -c) instcmd="$cpprog"
+ shift; continue
+ ;;
+ -m) chmodcmd="$chmodprog $2"
+ shift; shift; continue
+ ;;
+ -o) chowncmd="$chownprog $2"
+ shift; shift; continue
+ ;;
+ -g) chgrpcmd="$chgrpprog $2"
+ shift; shift; continue
+ ;;
+ -s) stripcmd="$stripprog"
+ shift; continue
+ ;;
+ -S) stripcmd="$stripprog $2"
+ shift; shift; continue
+ ;;
+ -e) ext="$2"
+ shift; shift; continue
+ ;;
+ *) if [ "x$src" = "x" ]; then
+ src=$1
+ else
+ dst=$1
+ fi
+ shift; continue
+ ;;
+ esac
+done
+if [ "x$src" = "x" ]; then
+ echo "install.sh: no input file specified"
+ exit 1
+fi
+if [ "x$dst" = "x" ]; then
+ echo "install.sh: no destination specified"
+ exit 1
+fi
+
+#
+# If destination is a directory, append the input filename; if
+# your system does not like double slashes in filenames, you may
+# need to add some logic
+#
+if [ -d $dst ]; then
+ dst="$dst/`basename $src`"
+fi
+
+# Add a possible extension (such as ".exe") to src and dst
+src="$src$ext"
+dst="$dst$ext"
+
+# Make a temp file name in the proper directory.
+dstdir=`dirname $dst`
+dsttmp=$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+$instcmd $src $dsttmp
+
+# And set any options; do chmod last to preserve setuid bits
+if [ "x$chowncmd" != "x" ]; then $chowncmd $dsttmp; fi
+if [ "x$chgrpcmd" != "x" ]; then $chgrpcmd $dsttmp; fi
+if [ "x$stripcmd" != "x" ]; then $stripcmd $dsttmp; fi
+if [ "x$chmodcmd" != "x" ]; then $chmodcmd $dsttmp; fi
+
+# Now rename the file to the real destination.
+$rmcmd $dst
+$mvcmd $dsttmp $dst
+
+exit 0
+
diff --git a/build/mkdir.sh b/build/mkdir.sh
new file mode 100755
index 0000000..c59f03e
--- /dev/null
+++ b/build/mkdir.sh
@@ -0,0 +1,43 @@
+#!/bin/sh
+##
+## mkdir.sh -- make directory hierarchy
+##
+## Based on `mkinstalldirs' from Noah Friedman <friedman@prep.ai.mit.edu>
+## as of 1994-03-25, which was placed in the Public Domain.
+## Cleaned up for Apache's Autoconf-style Interface (APACI)
+## by Ralf S. Engelschall <rse@apache.org>
+##
+#
+# This script falls under the Apache License.
+# See http://www.apache.org/docs/LICENSE
+
+
+umask 022
+errstatus=0
+for file in ${1+"$@"} ; do
+ set fnord `echo ":$file" |\
+ sed -e 's/^:\//%/' -e 's/^://' -e 's/\// /g' -e 's/^%/\//'`
+ shift
+ pathcomp=
+ for d in ${1+"$@"}; do
+ pathcomp="$pathcomp$d"
+ case "$pathcomp" in
+ -* ) pathcomp=./$pathcomp ;;
+ ?: ) pathcomp="$pathcomp/"
+ continue ;;
+ esac
+ if test ! -d "$pathcomp"; then
+ echo "mkdir $pathcomp" 1>&2
+ thiserrstatus=0
+ mkdir "$pathcomp" || thiserrstatus=$?
+ # ignore errors due to races if a parallel mkdir.sh already
+ # created the dir
+ if test $thiserrstatus != 0 && test ! -d "$pathcomp" ; then
+ errstatus=$thiserrstatus
+ fi
+ fi
+ pathcomp="$pathcomp/"
+ done
+done
+exit $errstatus
+
diff --git a/build/nw_apu_export.inc b/build/nw_apu_export.inc
new file mode 100644
index 0000000..1bdfb1c
--- /dev/null
+++ b/build/nw_apu_export.inc
@@ -0,0 +1,44 @@
+
+/* Must include apu.h first so that we can undefine
+ the standard prototypes macros after it messes with
+ them. */
+#include "apu.h"
+
+#undef APU_DECLARE
+#undef APU_DECLARE_NONSTD
+#undef APU_DECLARE_DATA
+
+/* Preprocess all of the standard APR headers. */
+#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_dbm_private.h"
+#include "apr_hooks.h"
+#include "apr_ldap.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_siphash.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_version.h"
+#include "apu_want.h"
diff --git a/build/pkg/README b/build/pkg/README
new file mode 100644
index 0000000..d7e61a7
--- /dev/null
+++ b/build/pkg/README
@@ -0,0 +1,20 @@
+The script in this directory will attempt to build a Solaris package
+out of a source tree for APR-util.
+
+To build a package, make sure you are in the root of the source tree,
+and run:
+
+build/pkg/buildpkg.sh
+
+A Solaris package called apr-util-<version>-<architecture>-local.gz will be
+created in the root of the source tree.
+
+By default, if you attempt to build packages for apr-util, it will
+search for the sources for apr in:
+
+../apr
+
+You may override the location of apr like so:
+
+build/pkg/buildpkg.sh --with-apr=some/other/path
+
diff --git a/build/pkg/buildpkg.sh b/build/pkg/buildpkg.sh
new file mode 100755
index 0000000..b0a35aa
--- /dev/null
+++ b/build/pkg/buildpkg.sh
@@ -0,0 +1,99 @@
+#!/bin/sh
+# 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.
+#
+#
+
+# buildpkg.sh: This script builds a Solaris PKG from the source tree
+# provided.
+
+PREFIX=/usr/local
+TEMPDIR=/var/tmp/$USER/apr-util-root
+rm -rf $TEMPDIR
+
+apr_util_src_dir=.
+apr_src_dir=../apr
+expat_dir=/usr
+
+while test $# -gt 0
+do
+ # Normalize
+ case "$1" in
+ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ case "$1" in
+ --with-apr=*)
+ apr_src_dir=$optarg
+ ;;
+ esac
+
+ case "$1" in
+ --with-apr-util=*)
+ apr_util_src_dir=$optarg
+ ;;
+ esac
+
+ case "$1" in
+ --with-expat=*)
+ expat_dir=$optarg
+ ;;
+ esac
+
+ shift
+done
+
+if [ -f "$apr_util_src_dir/configure.in" ]; then
+ cd $apr_util_src_dir
+else
+ echo "The apr-util source could not be found within $apr_util_src_dir"
+ echo "Usage: buildpkg [--with-apr=dir] [--with-apr-util=dir] [--with-expat=dir]"
+ exit 1
+fi
+
+if [ ! -f "$apr_src_dir/configure.in" ]; then
+ echo "The apr source could not be found within $apr_src_dir"
+ echo "Usage: buildpkg [--with-apr=dir] [--with-apr-util=dir] [--with-expat=dir]"
+ exit 1
+fi
+
+if [ ! -d "$expat_dir" ]; then
+ echo "The expat directory could not be found within $expat_dir"
+ echo "Usage: buildpkg [--with-apr=dir] [--with-apr-util=dir] [--with-expat=dir]"
+ exit 1
+fi
+
+./configure --prefix=$PREFIX --with-apr=$apr_src_dir \
+ --with-ldap --with-expat=$expat_dir
+make
+make install DESTDIR=$TEMPDIR
+rm $TEMPDIR$PREFIX/lib/aprutil.exp
+. build/pkg/pkginfo
+cp build/pkg/pkginfo $TEMPDIR$PREFIX
+
+current=`pwd`
+cd $TEMPDIR$PREFIX
+echo "i pkginfo=./pkginfo" > prototype
+find . -print | grep -v ./prototype | grep -v ./pkginfo | pkgproto | awk '{print $1" "$2" "$3" "$4" root bin"}' >> prototype
+mkdir $TEMPDIR/pkg
+pkgmk -r $TEMPDIR$PREFIX -d $TEMPDIR/pkg
+
+cd $current
+pkgtrans -s $TEMPDIR/pkg $current/$NAME-$VERSION-$ARCH-local
+gzip $current/$NAME-$VERSION-$ARCH-local
+
+rm -rf $TEMPDIR
+
diff --git a/build/pkg/pkginfo.in b/build/pkg/pkginfo.in
new file mode 100644
index 0000000..1b6359a
--- /dev/null
+++ b/build/pkg/pkginfo.in
@@ -0,0 +1,11 @@
+PKG="ASFapu-1"
+NAME="apr-util"
+ARCH="@target_cpu@"
+VERSION="@APRUTIL_DOTTED_VERSION@"
+CATEGORY="application"
+VENDOR="Apache Software Foundation"
+EMAIL="dev@apr.apache.org"
+PSTAMP="dev@apr.apache.org"
+BASEDIR="@prefix@"
+CLASSES="none"
+
diff --git a/build/preaprutil.dsp b/build/preaprutil.dsp
new file mode 100644
index 0000000..9292149
--- /dev/null
+++ b/build/preaprutil.dsp
@@ -0,0 +1,131 @@
+# Microsoft Developer Studio Project File - Name="preaprutil" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) External Target" 0x0106
+
+CFG=preaprutil - Win32 Release
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "preaprutil.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "preaprutil.mak" CFG="preaprutil - Win32 Release"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "preaprutil - Win32 Release" (based on "Win32 (x86) External Target")
+!MESSAGE "preaprutil - Win32 Debug" (based on "Win32 (x86) External Target")
+!MESSAGE "preaprutil - x64 Release" (based on "Win32 (x86) External Target")
+!MESSAGE "preaprutil - x64 Debug" (based on "Win32 (x86) External Target")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+
+!IF "$(CFG)" == "preaprutil - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir ""
+# PROP BASE Intermediate_Dir ""
+# PROP BASE Cmd_Line "NMAKE /nologo /f NUL"
+# PROP BASE Rebuild_Opt "/a"
+# PROP BASE Target_File "preaprutil.exe"
+# PROP BASE Bsc_Name "preaprutil.bsc"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ""
+# PROP Intermediate_Dir ""
+# PROP Cmd_Line "NMAKE /nologo /f NUL"
+# PROP Rebuild_Opt "/a"
+# PROP Bsc_Name ""
+# PROP Target_Dir ""
+
+!ELSEIF "$(CFG)" == "preaprutil - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir ""
+# PROP BASE Intermediate_Dir ""
+# PROP BASE Cmd_Line "NMAKE /nologo /f NUL"
+# PROP BASE Rebuild_Opt "/a"
+# PROP BASE Target_File "preaprutil.exe"
+# PROP BASE Bsc_Name "preaprutil.bsc"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir ""
+# PROP Cmd_Line "NMAKE /nologo /f NUL"
+# PROP Rebuild_Opt "/a"
+# PROP Bsc_Name ""
+# PROP Target_Dir ""
+
+!ELSEIF "$(CFG)" == "preaprutil - x64 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir ""
+# PROP BASE Intermediate_Dir ""
+# PROP BASE Cmd_Line "NMAKE /nologo /f NUL"
+# PROP BASE Rebuild_Opt "/a"
+# PROP BASE Target_File "preaprutil.exe"
+# PROP BASE Bsc_Name "preaprutil.bsc"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ""
+# PROP Intermediate_Dir ""
+# PROP Cmd_Line "NMAKE /nologo /f NUL"
+# PROP Rebuild_Opt "/a"
+# PROP Bsc_Name ""
+# PROP Target_Dir ""
+
+!ELSEIF "$(CFG)" == "preaprutil - x64 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir ""
+# PROP BASE Intermediate_Dir ""
+# PROP BASE Cmd_Line "NMAKE /nologo /f NUL"
+# PROP BASE Rebuild_Opt "/a"
+# PROP BASE Target_File "preaprutil.exe"
+# PROP BASE Bsc_Name "preaprutil.bsc"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir ""
+# PROP Cmd_Line "NMAKE /nologo /f NUL"
+# PROP Rebuild_Opt "/a"
+# PROP Bsc_Name ""
+# PROP Target_Dir ""
+
+!ENDIF
+
+# Begin Target
+
+# Name "preaprutil - Win32 Release"
+# Name "preaprutil - Win32 Debug"
+# Name "preaprutil - x64 Release"
+# Name "preaprutil - x64 Debug"
+
+!IF "$(CFG)" == "preaprutil - Win32 Release"
+
+!ELSEIF "$(CFG)" == "preaprutil - Win32 Debug"
+
+!ELSEIF "$(CFG)" == "preaprutil - x64 Release"
+
+!ELSEIF "$(CFG)" == "preaprutil - x64 Debug"
+
+!ENDIF
+
+# End Target
+# End Project
diff --git a/build/rpm/apr-util.spec.in b/build/rpm/apr-util.spec.in
new file mode 100644
index 0000000..e926034
--- /dev/null
+++ b/build/rpm/apr-util.spec.in
@@ -0,0 +1,200 @@
+
+%define apuver 1
+
+Summary: Apache Portable Runtime Utility library
+Name: apr-util
+Version: APU_VERSION
+Release: APU_RELEASE
+License: Apache Software License
+Group: System Environment/Libraries
+URL: http://apr.apache.org/
+Source0: http://www.apache.org/dist/apr/%{name}-%{version}.tar.bz2
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
+BuildRequires: autoconf, libtool, doxygen, apr-devel >= 1.4.0
+BuildRequires: expat-devel, libuuid-devel
+
+%description
+The mission of the Apache Portable Runtime (APR) is to provide a
+free library of C data structures and routines. This library
+contains additional utility interfaces for APR; including support
+for XML, LDAP, database interfaces, URI parsing and more.
+
+%package devel
+Group: Development/Libraries
+Summary: APR utility library development kit
+Requires: apr-util = %{version}-%{release}, apr-devel
+Requires: db4-devel, expat-devel
+
+%description devel
+This package provides the support files which can be used to
+build applications using the APR utility library. The mission
+of the Apache Portable Runtime (APR) is to provide a free
+library of C data structures and routines.
+
+%package dbm
+Group: Development/Libraries
+Summary: APR utility library DBM driver
+BuildRequires: db4-devel
+Requires: apr-util = %{version}-%{release}
+
+%description dbm
+This package provides the DBM driver for the apr-util.
+
+%package pgsql
+Group: Development/Libraries
+Summary: APR utility library PostgreSQL DBD driver
+BuildRequires: postgresql-devel
+Requires: apr-util = %{version}-%{release}
+
+%description pgsql
+This package provides the PostgreSQL driver for the apr-util
+DBD (database abstraction) interface.
+
+%package mysql
+Group: Development/Libraries
+Summary: APR utility library MySQL DBD driver
+BuildRequires: mysql-devel
+Requires: apr-util = %{version}-%{release}
+
+%description mysql
+This package provides the MySQL driver for the apr-util DBD
+(database abstraction) interface.
+
+%package sqlite
+Group: Development/Libraries
+Summary: APR utility library SQLite DBD driver
+BuildRequires: sqlite-devel >= 3.0.0
+Requires: apr-util = %{version}-%{release}
+
+%description sqlite
+This package provides the SQLite driver for the apr-util DBD
+(database abstraction) interface.
+
+%package odbc
+Group: Development/Libraries
+Summary: APR utility library ODBC DBD driver
+BuildRequires: unixODBC-devel
+Requires: apr-util = %{version}-%{release}
+
+%description odbc
+This package provides the ODBC driver for the apr-util DBD
+(database abstraction) interface.
+
+%package ldap
+Group: Development/Libraries
+Summary: APR utility library LDAP support
+BuildRequires: openldap-devel
+Requires: apr-util = %{version}-%{release}
+
+%description ldap
+This package provides the LDAP support for the apr-util.
+
+%package openssl
+Group: Development/Libraries
+Summary: APR utility library OpenSSL crypto support
+BuildRequires: openssl-devel
+Requires: apr-util = %{version}-%{release}
+
+%description openssl
+This package provides crypto support for apr-util based on OpenSSL.
+
+%package nss
+Group: Development/Libraries
+Summary: APR utility library NSS crypto support
+BuildRequires: nss-devel
+Requires: apr-util = %{version}-%{release}
+
+%description nss
+This package provides crypto support for apr-util based on Mozilla NSS.
+
+%prep
+%setup -q
+
+%build
+%configure --with-apr=%{_prefix} \
+ --includedir=%{_includedir}/apr-%{apuver} \
+ --with-ldap --without-gdbm \
+ --with-sqlite3 --with-pgsql --with-mysql --with-odbc \
+ --with-berkeley-db \
+ --with-crypto --with-openssl --with-nss \
+ --without-sqlite2
+make %{?_smp_mflags} && make dox
+
+%check
+# Run non-interactive tests
+pushd test
+make %{?_smp_mflags} all CFLAGS=-fno-strict-aliasing
+make check || exit 1
+popd
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make install DESTDIR=$RPM_BUILD_ROOT
+
+# Documentation
+mv docs/dox/html html
+
+# Unpackaged files
+rm -f $RPM_BUILD_ROOT%{_libdir}/aprutil.exp
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(-,root,root,-)
+%doc CHANGES LICENSE NOTICE
+%{_libdir}/libaprutil-%{apuver}.so.*
+%dir %{_libdir}/apr-util-%{apuver}
+
+%files dbm
+%defattr(-,root,root,-)
+%{_libdir}/apr-util-%{apuver}/apr_dbm_db*
+
+%files pgsql
+%defattr(-,root,root,-)
+%{_libdir}/apr-util-%{apuver}/apr_dbd_pgsql*
+
+%files mysql
+%defattr(-,root,root,-)
+%{_libdir}/apr-util-%{apuver}/apr_dbd_mysql*
+
+%files sqlite
+%defattr(-,root,root,-)
+%{_libdir}/apr-util-%{apuver}/apr_dbd_sqlite*
+
+%files odbc
+%defattr(-,root,root,-)
+%{_libdir}/apr-util-%{apuver}/apr_dbd_odbc*
+
+%files ldap
+%defattr(-,root,root,-)
+%{_libdir}/apr-util-%{apuver}/apr_ldap*
+
+%files openssl
+%defattr(-,root,root,-)
+%{_libdir}/apr-util-%{apuver}/apr_crypto_openssl*
+
+%files nss
+%defattr(-,root,root,-)
+%{_libdir}/apr-util-%{apuver}/apr_crypto_nss*
+
+%files devel
+%defattr(-,root,root,-)
+%{_bindir}/apu-%{apuver}-config
+%{_libdir}/libaprutil-%{apuver}.*a
+%{_libdir}/libaprutil-%{apuver}.so
+%{_libdir}/pkgconfig/apr-util-%{apuver}.pc
+%{_includedir}/apr-%{apuver}/*.h
+%doc html
+
+%changelog
+* Tue Jun 22 2004 Graham Leggett <minfrin@sharp.fm> 1.0.0-1
+- update to support v1.0.0 of APR
+
+* Tue Jun 22 2004 Graham Leggett <minfrin@sharp.fm> 1.0.0-1
+- derived from Fedora Core apr.spec
+
diff --git a/build/w32locatedb.pl b/build/w32locatedb.pl
new file mode 100644
index 0000000..121dbf8
--- /dev/null
+++ b/build/w32locatedb.pl
@@ -0,0 +1,217 @@
+#! perl -w
+#
+# w32locatedb.pl -- Build apr-util with Berkeley DB on Win32
+#
+# Usage: perl w32locatedb.pl <type> <incdir> <libdir>
+# type: Library type to link with ('lib' or 'dll')
+# incdir: BDB includes directory (for db.h)
+# libdir: Library directory (for libdbXY[s][d].lib)
+#
+# This script falls under the Apache License.
+# See http://www.apache.org/docs/LICENSE
+
+require 5.008;
+use strict;
+use File::Spec::Functions qw(canonpath rel2abs
+ splitpath catpath splitdir catdir);
+
+########
+# Subroutine prototypes
+sub usage();
+sub find_srcdir();
+sub get_lib_name($$);
+sub edit_header($$);
+sub edit_project($$);
+
+########
+# Parse program arguments and set globals
+die usage() unless scalar @ARGV >= 3;
+
+my $type = lc($ARGV[0]);
+die "Invalid library type '$type'\n"
+ unless $type eq 'lib' or $type eq 'dll';
+
+my $incdir = $ARGV[1];
+die "No 'db.h' in $incdir\n" unless -f "$incdir/db.h";
+
+my $libdir = $ARGV[2];
+die "$libdir: $!" unless -d $libdir;
+
+my $libname = get_lib_name($type, $incdir);
+die "No '$libname.lib' in $libdir" unless -f "$libdir/$libname.lib";
+die "No '${libname}d.lib' in $libdir" unless -f "$libdir/${libname}d.lib";
+
+my $srcdir = find_srcdir();
+my $apu_hw = canonpath("$srcdir/include/apu.hw");
+my $apu_want_hw = canonpath("$srcdir/include/apu_want.hw");
+my $apu_select_dbm_hw = canonpath("$srcdir/include/private/apu_select_dbm.hw");
+my $aprutil_dsp = canonpath("$srcdir/aprutil.dsp");
+my $libaprutil_dsp = canonpath("$srcdir/libaprutil.dsp");
+die "Can't find $apu_hw" unless -f $apu_hw;
+die "Can't find $apu_want_hw" unless -f $apu_want_hw;
+die "Can't find $apu_select_dbm_hw" unless -f $apu_select_dbm_hw;
+die "Can't find $aprutil_dsp" unless -f $aprutil_dsp;
+die "Can't find $libaprutil_dsp" unless -f $libaprutil_dsp;
+
+
+########
+# Edit the header file templates
+my $db_h = rel2abs(canonpath("$incdir/db.h"));
+$db_h =~ s/\\/\//g;
+edit_header($apu_hw,
+ [['^\s*\#\s*define\s+APU_HAVE_DB\s+0\s*$',
+ '#define APU_HAVE_DB 1']]);
+edit_header($apu_want_hw,
+ [['^\s*\#\s*include\s+\<db\.h\>\s*$',
+ "#include \"$db_h\""]]);
+edit_header($apu_select_dbm_hw,
+ [['^\s*\#\s*define\s+APU_USE_DB\s+0\s*$',
+ '#define APU_USE_DB 1'],
+ ['^\s*\#\s*include\s+\<db\.h\>\s*$',
+ "#include \"$db_h\""]]);
+
+########
+# Edit the .dsp files
+my $libpath = rel2abs(canonpath("$libdir/$libname"));
+edit_project($aprutil_dsp, $libpath);
+edit_project($libaprutil_dsp, $libpath);
+
+
+########
+# Print usage
+sub usage()
+{
+ return ("Usage: perl w32locatedb.pl <type> <incdir> <libdir>\n"
+ . " type: Library type to link with ('lib' or 'dll')\n"
+ . " incdir: BDB includes directory (for db.h)\n"
+ . " libdir: Library directory (for libdbXY[s][d].lib)\n");
+}
+
+########
+# Calculate the (possibly relative) path to the top of the apr-util
+# source dir.
+sub find_srcdir()
+{
+ my $srcdir = rel2abs(canonpath($0));
+ my ($vol, $dir, $file) = splitpath($srcdir);
+ my @dirs = splitdir($dir);
+ die if scalar @dirs < 1;
+ do { $_ = pop @dirs } while ($_ eq '');
+ return catpath($vol, catdir(@dirs), '');
+}
+
+########
+# Construct the name of the BDB library, based on the type and
+# version information in db.h
+sub get_lib_name($$)
+{
+ my ($type, $incdir) = @_;
+ my $major = undef;
+ my $minor = undef;
+ my $patch = undef;
+
+ open(DBH, "< $incdir/db.h")
+ or die "Can't open $incdir/db.h: $!";
+ while (<DBH>) {
+ chomp;
+ m/^\s*\#\s*define\s+DB_VERSION_(MAJOR|MINOR|PATCH)\s+(\d+)\s*$/;
+ next unless defined $1 and defined $2;
+ if ($1 eq 'MAJOR') { $major = $2; }
+ elsif ($1 eq 'MINOR') { $minor = $2; }
+ elsif ($1 eq 'PATCH') { $patch = $2; }
+ last if defined $major and defined $minor and defined $patch;
+ }
+ close(DBH);
+ die "Can't determine BDB version\n"
+ unless defined $major and defined $minor and defined $patch;
+
+ print "Using BDB version $major.$minor.$patch\n";
+
+ my $libname = "libdb$major$minor";
+ $libname .= 's' if $type eq 'lib';
+ return $libname;
+}
+
+########
+# Replace a file, keeping a backup copy
+sub maybe_rename_with_backup($$$)
+{
+ my ($tmpfile, $file, $maybe) = @_;
+ if ($maybe) {
+ # Make the file writable by the owner. On Windows, this removes
+ # any read-only bits.
+ chmod((stat($file))[2] | 0600, $file);
+ rename($file, "${file}~");
+ rename($tmpfile, $file);
+ } else {
+ print "No changes in $file\n";
+ unlink($tmpfile);
+ }
+}
+
+########
+# Edit a header template in-place.
+sub edit_header($$)
+{
+ my ($file, $pairs) = @_;
+ my $tmpfile = "$file.tmp";
+ my $substs = 0;
+
+ open(IN, "< $file") or die "Can't open $file: $!";
+ open(TMP, "> $tmpfile") or die "Can't open $tmpfile: $!";
+ while (<IN>) {
+ chomp;
+ foreach my $pair (@$pairs) {
+ $substs += s/${$pair}[0]/${$pair}[1]/;
+ }
+ print TMP $_, "\n";
+ }
+ close(IN);
+ close(TMP);
+
+ maybe_rename_with_backup($tmpfile, $file, $substs > 0);
+}
+
+########
+# Edit a project file in-place
+sub edit_project($$)
+{
+ my ($file, $libpath) = @_;
+ my $tmpfile = "$file.tmp";
+ my $substs = 0;
+ my ($prog, $debug) = (undef, undef);
+
+ my $libsearch = $libpath;
+ $libsearch =~ s/\\/\\\\/g;
+
+ open(IN, "< $file") or die "Can't open $file: $!";
+ open(TMP, "> $tmpfile") or die "Can't open $tmpfile: $!";
+ while (<IN>) {
+ chomp;
+
+ if (m/^\# TARGTYPE \"[^\"]+\" 0x([0-9A-Za-z]+)/
+ and defined $1) {
+ $prog = 'LINK32' if $1 eq '0102';
+ $prog = 'LIB32' if $1 eq '0104';
+ die "Unknown project type 0x$1" unless defined $prog;
+ } elsif (defined $prog
+ and m/^\# PROP Use_Debug_Libraries ([01])/
+ and defined $1) {
+ $debug = $1;
+ } elsif (defined $prog and defined $debug
+ and m/^\# ADD $prog (\"$libsearch)?/
+ and not defined $1) {
+ my $fullpath =
+ ($debug eq '1' ? "${libpath}d.lib" : "$libpath.lib");
+ $substs += s/^\# ADD $prog /\# ADD $prog \"$fullpath\" /;
+ } elsif (m/^\# ADD CPP/) {
+ $substs += s/APU_USE_SDBM/APU_USE_DB/g;
+ }
+
+ print TMP $_, "\n";
+ }
+ close(IN);
+ close(TMP);
+
+ maybe_rename_with_backup($tmpfile, $file, $substs > 0);
+}
diff --git a/buildconf b/buildconf
new file mode 100755
index 0000000..3abfe10
--- /dev/null
+++ b/buildconf
@@ -0,0 +1,118 @@
+#!/bin/sh
+#
+# 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.
+#
+#
+
+if [ "$1" = "--verbose" -o "$1" = "-v" ]; then
+ verbose="--verbose"
+ shift
+fi
+
+# Default place to look for apr source. Can be overridden with
+# --with-apr=[directory]
+apr_src_dir=../apr
+
+while test $# -gt 0
+do
+ # Normalize
+ case "$1" in
+ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ case "$1" in
+ --with-apr=*)
+ apr_src_dir=$optarg
+ ;;
+ esac
+
+ shift
+done
+
+if [ -f "$apr_src_dir/build/apr_common.m4" ]; then
+ apr_src_dir=`cd $apr_src_dir; pwd`
+ echo ""
+ echo "Looking for apr source in $apr_src_dir"
+else
+ echo ""
+ echo "Problem finding apr source in $apr_src_dir."
+ echo "Use:"
+ echo " --with-apr=[directory]"
+ exit 1
+fi
+
+set -e
+
+# Remove some files, then copy them from apr source tree
+rm -f build/apr_common.m4 build/find_apr.m4 build/install.sh \
+ build/config.guess build/config.sub build/get-version.sh
+cp -p $apr_src_dir/build/apr_common.m4 $apr_src_dir/build/find_apr.m4 \
+ $apr_src_dir/build/install.sh $apr_src_dir/build/config.guess \
+ $apr_src_dir/build/config.sub $apr_src_dir/build/get-version.sh \
+ build/
+
+# Remove aclocal.m4 as it'll break some builds...
+rm -rf aclocal.m4 autom4te*.cache
+
+#
+# Generate the autoconf header (include/apu_config.h) and ./configure
+#
+echo "Creating include/private/apu_config.h ..."
+${AUTOHEADER:-autoheader} $verbose
+
+echo "Creating configure ..."
+### do some work to toss config.cache?
+if ${AUTOCONF:-autoconf} $verbose; then
+ :
+else
+ echo "autoconf failed"
+ exit 1
+fi
+
+#
+# Generate build-outputs.mk for the build system
+#
+echo "Generating 'make' outputs ..."
+$apr_src_dir/build/gen-build.py $verbose make
+
+# Remove autoconf cache again
+rm -rf autom4te*.cache
+
+# Create RPM Spec file
+if [ -f `which cut` ]; then
+ echo rebuilding rpm spec file
+ REVISION=`build/get-version.sh all include/apu_version.h APU`
+ VERSION=`echo $REVISION | cut -d- -s -f1`
+ RELEASE=`echo $REVISION | cut -d- -s -f2`
+ if [ "x$VERSION" = "x" ]; then
+ VERSION=$REVISION
+ RELEASE=1
+ fi
+ sed -e "s/APU_VERSION/$VERSION/" -e "s/APU_RELEASE/$RELEASE/" \
+ ./build/rpm/apr-util.spec.in > apr-util.spec
+fi
+
+# Verify the tree was clean, notify user if not (normal in development)
+#
+if [ -f "include/apu.h" -o -f "include/private/apu_config.h" -o \
+ -f "include/apu_want.h" -o -f "include/private/apu_select_dbm.h" ]; then
+ echo ""
+ echo "Generated include files already exist, the tree is not clean."
+ echo "The resulting build-outputs.mk file is incorrect"
+fi
+
+exit 0
diff --git a/config.layout b/config.layout
new file mode 100644
index 0000000..907d0bb
--- /dev/null
+++ b/config.layout
@@ -0,0 +1,232 @@
+##
+## config.layout -- Pre-defined Installation Path Layouts
+##
+## Hints:
+## - layouts can be loaded with configure's --enable-layout=ID option
+## - when no --enable-layout option is given, the default layout is `apr'
+## - a trailing plus character (`+') on paths is replaced with a
+## `/<target>' suffix where <target> is currently hardcoded to 'apr'.
+## (This may become a configurable parameter at some point.)
+##
+
+# Classical APR-util path layout designed for parallel installs.
+<Layout apr-util>
+ prefix: /usr/local/apr
+ exec_prefix: ${prefix}
+ bindir: ${exec_prefix}/bin
+ sbindir: ${exec_prefix}/bin
+ libdir: ${exec_prefix}/lib
+ libexecdir: ${exec_prefix}/modules
+ mandir: ${prefix}/man
+ sysconfdir: ${prefix}/conf
+ datadir: ${prefix}
+ installbuilddir: ${datadir}/build
+ includedir: ${prefix}/include/apr-${APRUTIL_MAJOR_VERSION}
+ localstatedir: ${prefix}
+ libsuffix: -${APRUTIL_MAJOR_VERSION}
+</Layout>
+
+# Classical single-installation APR path layout.
+<Layout classic>
+ prefix: /usr/local/apr
+ exec_prefix: ${prefix}
+ bindir: ${exec_prefix}/bin
+ sbindir: ${exec_prefix}/bin
+ libdir: ${exec_prefix}/lib
+ libexecdir: ${exec_prefix}/modules
+ mandir: ${prefix}/man
+ sysconfdir: ${prefix}/conf
+ datadir: ${prefix}
+ installbuilddir: ${datadir}/build
+ includedir: ${prefix}/include
+ localstatedir: ${prefix}
+</Layout>
+
+# GNU standards conforming path layout.
+# See FSF's GNU project `make-stds' document for details.
+<Layout GNU>
+ prefix: /usr/local
+ exec_prefix: ${prefix}
+ bindir: ${exec_prefix}/bin
+ sbindir: ${exec_prefix}/sbin
+ libdir: ${exec_prefix}/lib
+ libexecdir: ${exec_prefix}/libexec
+ mandir: ${prefix}/man
+ sysconfdir: ${prefix}/etc+
+ datadir: ${prefix}/share+
+ installbuilddir: ${datadir}/build
+ includedir: ${prefix}/include+
+ localstatedir: ${prefix}/var+
+ runtimedir: ${localstatedir}/run
+</Layout>
+
+# Mac OS X Server (Rhapsody)
+<Layout Mac OS X Server>
+ prefix: /Local/Library/WebServer
+ exec_prefix: /usr
+ bindir: ${exec_prefix}/bin
+ sbindir: ${exec_prefix}/sbin
+ libdir: ${exec_prefix}/lib
+ libexecdir: /System/Library/apr/Modules
+ mandir: ${exec_prefix}/share/man
+ sysconfdir: ${prefix}/Configuration
+ datadir: ${prefix}
+ installbuilddir: /System/Library/apr/Build
+ includedir: /System/Library/Frameworks/apr.framework/Versions/2.0/Headers
+ localstatedir: /var
+ runtimedir: ${prefix}/Logs
+</Layout>
+
+# Darwin/Mac OS Layout
+<Layout Darwin>
+ prefix: /usr
+ exec_prefix: ${prefix}
+ bindir: ${exec_prefix}/bin
+ sbindir: ${exec_prefix}/sbin
+ libdir: ${exec_prefix}/lib
+ libexecdir: ${exec_prefix}/libexec+
+ mandir: ${prefix}/share/man
+ datadir: /Library/WebServer
+ sysconfdir: /etc+
+ installbuilddir: ${prefix}/share/httpd/build
+ includedir: ${prefix}/include+
+ localstatedir: /var
+ runtimedir: ${localstatedir}/run
+</Layout>
+
+# Red Hat Linux 7.x layout
+<Layout RedHat>
+ prefix: /usr
+ exec_prefix: ${prefix}
+ bindir: ${prefix}/bin
+ sbindir: ${prefix}/sbin
+ libdir: ${prefix}/lib
+ libexecdir: ${prefix}/lib/apr
+ mandir: ${prefix}/man
+ sysconfdir: /etc/httpd/conf
+ datadir: /var/www
+ installbuilddir: ${datadir}/build
+ includedir: ${prefix}/include/apr
+ localstatedir: /var
+ runtimedir: ${localstatedir}/run
+</Layout>
+
+# According to the /opt filesystem conventions
+<Layout opt>
+ prefix: /opt/apr
+ exec_prefix: ${prefix}
+ bindir: ${exec_prefix}/bin
+ sbindir: ${exec_prefix}/sbin
+ libdir: ${exec_prefix}/lib
+ libexecdir: ${exec_prefix}/libexec
+ mandir: ${prefix}/man
+ sysconfdir: /etc${prefix}
+ datadir: ${prefix}/share
+ installbuilddir: ${datadir}/build
+ includedir: ${prefix}/include
+ localstatedir: /var${prefix}
+ runtimedir: ${localstatedir}/run
+</Layout>
+
+# BeOS layout...
+<Layout beos>
+ prefix: /boot/home/apr
+ exec_prefix: ${prefix}
+ bindir: ${exec_prefix}/bin
+ sbindir: ${exec_prefix}/bin
+ libdir: ${exec_prefix}/lib
+ libexecdir: ${exec_prefix}/libexec
+ mandir: ${prefix}/man
+ sysconfdir: ${prefix}/conf
+ datadir: ${prefix}
+ installbuilddir: ${datadir}/build
+ includedir: ${prefix}/include
+ localstatedir: ${prefix}
+ runtimedir: ${localstatedir}/logs
+</Layout>
+
+# SuSE 6.x layout
+<Layout SuSE>
+ prefix: /usr
+ exec_prefix: ${prefix}
+ bindir: ${prefix}/bin
+ sbindir: ${prefix}/sbin
+ libdir: ${prefix}/lib
+ libexecdir: ${prefix}/lib/apr
+ mandir: ${prefix}/share/man
+ sysconfdir: /etc/httpd
+ datadir: /usr/local/httpd
+ installbuilddir: ${datadir}/build
+ includedir: ${prefix}/include/apr
+ localstatedir: /var/lib/httpd
+ runtimedir: /var/run
+</Layout>
+
+# BSD/OS layout
+<Layout BSDI>
+ prefix: /var/www
+ exec_prefix: /usr/contrib
+ bindir: ${exec_prefix}/bin
+ sbindir: ${exec_prefix}/bin
+ libdir: ${exec_prefix}/lib
+ libexecdir: ${exec_prefix}/libexec/apr
+ mandir: ${exec_prefix}/man
+ sysconfdir: ${prefix}/conf
+ datadir: ${prefix}
+ installbuilddir: ${datadir}/build
+ includedir: ${exec_prefix}/include/apr
+ localstatedir: /var
+ runtimedir: ${localstatedir}/run
+</Layout>
+
+# Solaris 8 Layout
+<Layout Solaris>
+ prefix: /usr/apr
+ exec_prefix: ${prefix}
+ bindir: ${exec_prefix}/bin
+ sbindir: ${exec_prefix}/bin
+ libdir: ${exec_prefix}/lib
+ libexecdir: ${exec_prefix}/libexec
+ mandir: ${exec_prefix}/man
+ sysconfdir: /etc/apr
+ datadir: /var/apr
+ installbuilddir: ${datadir}/build
+ includedir: ${exec_prefix}/include
+ localstatedir: ${prefix}
+ runtimedir: /var/run
+</Layout>
+
+# OpenBSD Layout
+<Layout OpenBSD>
+ prefix: /var/www
+ exec_prefix: /usr
+ bindir: ${exec_prefix}/bin
+ sbindir: ${exec_prefix}/sbin
+ libdir: ${exec_prefix}/lib
+ libexecdir: ${exec_prefix}/lib/apr/modules
+ mandir: ${exec_prefix}/share/man
+ sysconfdir: ${prefix}/conf
+ datadir: ${prefix}
+ installbuilddir: ${prefix}/build
+ includedir: ${exec_prefix}/lib/apr/include
+ localstatedir: ${prefix}
+ runtimedir: ${prefix}/logs
+</Layout>
+
+# Debian layout
+<Layout Debian>
+ prefix:
+ exec_prefix: ${prefix}/usr
+ bindir: ${exec_prefix}/bin
+ sbindir: ${exec_prefix}/sbin
+ libdir: ${exec_prefix}/lib
+ libexecdir: ${exec_prefix}/lib/apr/modules
+ mandir: ${exec_prefix}/share/man
+ datadir: ${exec_prefix}/share/apr
+ includedir: ${exec_prefix}/include/apr-${APRUTIL_MAJOR_VERSION}
+ localstatedir: ${prefix}/var/run
+ runtimedir: ${prefix}/var/run
+ infodir: ${exec_prefix}/share/info
+ libsuffix: -${APRUTIL_MAJOR_VERSION}
+ installbuilddir: ${prefix}/usr/share/apache2/build
+</Layout>
diff --git a/configure b/configure
new file mode 100755
index 0000000..7a1f026
--- /dev/null
+++ b/configure
@@ -0,0 +1,25340 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.69.
+#
+#
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
+ fi
+else
+ as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+PACKAGE_URL=
+
+ac_unique_file="export_vars.sh.in"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='LTLIBOBJS
+LIBOBJS
+INCLUDE_OUTPUTS
+INCLUDE_RULES
+APRUTIL_LIBS
+APRUTIL_LDFLAGS
+APRUTIL_INCLUDES
+APRUTIL_PRIV_INCLUDES
+APRUTIL_EXPORT_LIBS
+EXTRA_OBJECTS
+APU_MODULES
+APU_DSO_LIBDIR
+APU_HAVE_MODULES
+APRUTIL_LIBNAME
+lib_target
+so_ext
+have_apr_iconv
+have_iconv
+apu_dbd_tests
+LDADD_dbd_odbc
+apu_have_odbc
+ODBC_CONFIG
+LDADD_dbd_oracle
+apu_have_oracle
+LDADD_dbd_sqlite2
+apu_have_sqlite2
+LDADD_dbd_sqlite3
+apu_have_sqlite3
+LDADD_dbd_mysql
+apu_have_mysql
+MYSQL_CONFIG
+LDADD_dbd_pgsql
+apu_have_pgsql
+PGSQL_CONFIG
+LDADD_dbm_ndbm
+LDADD_dbm_gdbm
+LDADD_dbm_db
+apu_db_version
+apu_db_header
+apu_have_db
+apu_have_ndbm
+apu_have_gdbm
+apu_have_sdbm
+apu_use_db
+apu_use_ndbm
+apu_use_gdbm
+apu_use_sdbm
+LDADD_ldap
+apu_has_ldap_other
+apu_has_ldap_zos
+apu_has_ldap_tivoli
+apu_has_ldap_mozilla
+apu_has_ldap_netscape
+apu_has_ldap_microsoft
+apu_has_ldap_novell
+apu_has_ldap_solaris
+apu_has_ldap_openldap
+apu_has_ldap
+apu_has_ldapssl_install_routines
+apu_has_ldap_sslinit
+apu_has_ldapssl_init
+apu_has_ldap_start_tls_s
+apu_has_ldapssl_add_trusted_cert
+apu_has_ldapssl_client_deinit
+apu_has_ldapssl_client_init
+ldap_ssl_h
+lber_h
+ldap_h
+LDADD_crypto_commoncrypto
+apu_have_commoncrypto
+LDADD_crypto_nss
+apu_have_nss
+PKG_CONFIG
+apu_have_crypto
+LDADD_crypto_openssl
+apu_have_openssl
+EGREP
+GREP
+CPP
+APR_ICONV_DIR
+apr_shlibpath_var
+APR_BUILD_DIR
+APR_LIBS
+APR_INCLUDES
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+APU_LTVERSION
+APRUTIL_MAJOR_VERSION
+APRUTIL_DOTTED_VERSION
+abs_builddir
+abs_srcdir
+top_builddir
+LT_NO_INSTALL
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_os
+target_vendor
+target_cpu
+target
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+APU_CONFIG_LOCATION
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_layout
+with_apr
+with_apr_iconv
+with_crypto
+with_openssl
+with_nss
+with_commoncrypto
+with_lber
+with_ldap_include
+with_ldap_lib
+with_ldap
+with_dbm
+with_gdbm
+with_ndbm
+with_berkeley_db
+with_pgsql
+with_mysql
+with_sqlite3
+with_sqlite2
+with_oracle_include
+with_oracle
+with_odbc
+with_expat
+with_iconv
+enable_util_dso
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --