summaryrefslogtreecommitdiff
path: root/srclib/apr-util/build
diff options
context:
space:
mode:
Diffstat (limited to 'srclib/apr-util/build')
-rw-r--r--srclib/apr-util/build/apu-conf.m44
-rw-r--r--srclib/apr-util/build/crypto.m4202
-rw-r--r--srclib/apr-util/build/dso.m48
-rw-r--r--srclib/apr-util/build/nw_apu_export.inc1
-rw-r--r--srclib/apr-util/build/preaprutil.dsp131
-rw-r--r--srclib/apr-util/build/rpm/apr-util.spec.in45
6 files changed, 378 insertions, 13 deletions
diff --git a/srclib/apr-util/build/apu-conf.m4 b/srclib/apr-util/build/apu-conf.m4
index a6f835fe..8fc3da11 100644
--- a/srclib/apr-util/build/apu-conf.m4
+++ b/srclib/apr-util/build/apu-conf.m4
@@ -391,9 +391,7 @@ if test "$apu_has_ldap_openldap" = "1"; then
#include <ldap.h>
#endif
], [
- int tmp = ldap_set_rebind_proc((LDAP *)0, (LDAP_REBIND_PROC *)0, (void *)0);
- /* use tmp to suppress the warning */
- tmp=0;
+ 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
diff --git a/srclib/apr-util/build/crypto.m4 b/srclib/apr-util/build/crypto.m4
new file mode 100644
index 00000000..e9a65c91
--- /dev/null
+++ b/srclib/apr-util/build/crypto.m4
@@ -0,0 +1,202 @@
+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
+
+ old_libs="$LIBS"
+ old_cppflags="$CPPFLAGS"
+ old_ldflags="$LDFLAGS"
+
+ AC_ARG_WITH([crypto], [APR_HELP_STRING([--with-crypto], [enable crypto support])],
+ [
+ if test "$withval" = "yes"; then
+ APU_CHECK_CRYPTO_OPENSSL
+ APU_CHECK_CRYPTO_NSS
+ dnl add checks for other varieties of ssl here
+ fi
+ ], [
+ apu_have_crypto=0
+ ])
+
+ AC_SUBST(apu_have_crypto)
+
+])
+dnl
+
+AC_DEFUN([APU_CHECK_CRYPTO_OPENSSL], [
+ apu_have_openssl=0
+ 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, BN_init, 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, BN_init, 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
+
+ if test "$apu_have_openssl" != "1"; then
+ AC_CHECK_HEADERS(openssl/x509.h, [openssl_have_headers=1])
+ AC_CHECK_LIB(crypto, BN_init, 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
+ 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
+ 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], [
+ apu_have_nss=0
+ nss_have_headers=0
+ 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
+ AC_CHECK_HEADERS(prerror.h nss/nss.h nss.h nss/pk11pub.h pk11pub.h, [nss_have_headers=1])
+ AC_CHECK_LIB(nspr4, PR_Initialize, AC_CHECK_LIB(nss3, PK11_CreatePBEV2AlgorithmID, [nss_have_libs=1],,-lnspr4))
+ if test "$nss_have_headers" != "0" && 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)
+ AC_CHECK_HEADERS(prerror.h nss/nss.h nss.h nss/pk11pub.h pk11pub.h, [nss_have_headers=1])
+ AC_CHECK_LIB(nspr4, PR_Initialize, AC_CHECK_LIB(nss3, PK11_CreatePBEV2AlgorithmID, [nss_have_libs=1],,-lnspr4))
+ if test "$nss_have_headers" != "0" && 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
+ 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"
+])
+dnl
diff --git a/srclib/apr-util/build/dso.m4 b/srclib/apr-util/build/dso.m4
index 4262337f..ec2f5c94 100644
--- a/srclib/apr-util/build/dso.m4
+++ b/srclib/apr-util/build/dso.m4
@@ -22,7 +22,7 @@ AC_DEFUN([APU_CHECK_UTIL_DSO], [
AC_ARG_ENABLE([util-dso],
APR_HELP_STRING([--disable-util-dso],
- [disable DSO build of modular components (dbd, dbm, ldap)]))
+ [disable DSO build of modular components (crypto, dbd, dbm, ldap)]))
if test "$enable_util_dso" = "no"; then
apu_dso_build="0"
@@ -48,6 +48,8 @@ yes
# 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_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"
@@ -77,9 +79,11 @@ yes
done
fi
+ APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_crypto_openssl $LDADD_crypto_nss"
APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_dbd_pgsql $LDADD_dbd_sqlite2 $LDADD_dbd_sqlite3 $LDADD_dbd_oracle $LDADD_dbd_mysql $LDADD_dbd_freetds $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"
APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_dbd_pgsql $LDADD_dbd_sqlite2 $LDADD_dbd_sqlite3 $LDADD_dbd_oracle $LDADD_dbd_mysql $LDADD_dbd_freetds $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"
@@ -88,6 +92,8 @@ yes
# 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_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"
diff --git a/srclib/apr-util/build/nw_apu_export.inc b/srclib/apr-util/build/nw_apu_export.inc
index 4f2c56ef..e883b1cb 100644
--- a/srclib/apr-util/build/nw_apu_export.inc
+++ b/srclib/apr-util/build/nw_apu_export.inc
@@ -12,6 +12,7 @@
#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"
diff --git a/srclib/apr-util/build/preaprutil.dsp b/srclib/apr-util/build/preaprutil.dsp
new file mode 100644
index 00000000..92921499
--- /dev/null
+++ b/srclib/apr-util/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/srclib/apr-util/build/rpm/apr-util.spec.in b/srclib/apr-util/build/rpm/apr-util.spec.in
index eb71ce12..bc6be9a6 100644
--- a/srclib/apr-util/build/rpm/apr-util.spec.in
+++ b/srclib/apr-util/build/rpm/apr-util.spec.in
@@ -10,8 +10,8 @@ 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
-BuildPrereq: autoconf, libtool, doxygen, apr-devel >= 1.3.0
-BuildPrereq: expat-devel
+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
@@ -31,6 +31,15 @@ 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
@@ -90,14 +99,23 @@ Requires: apr-util = %{version}-%{release}
%description ldap
This package provides the LDAP support for the apr-util.
-%package dbm
+%package openssl
Group: Development/Libraries
-Summary: APR utility library DBM support
-BuildRequires: db4-devel
+Summary: APR utility library OpenSSL crypto support
+BuildRequires: openssl-devel
Requires: apr-util = %{version}-%{release}
-%description dbm
-This package provides the dbm support for the apr-util.
+%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
@@ -108,6 +126,7 @@ This package provides the dbm support for the apr-util.
--with-ldap --without-gdbm \
--with-sqlite3 --with-pgsql --with-mysql --with-freetds --with-odbc \
--with-berkeley-db \
+ --with-crypto --with-openssl --with-nss \
--without-sqlite2
make %{?_smp_mflags} && make dox
@@ -141,6 +160,10 @@ rm -rf $RPM_BUILD_ROOT
%{_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*
@@ -165,9 +188,13 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root,-)
%{_libdir}/apr-util-%{apuver}/apr_ldap*
-%files dbm
+%files openssl
%defattr(-,root,root,-)
-%{_libdir}/apr-util-%{apuver}/apr_dbm_db*
+%{_libdir}/apr-util-%{apuver}/apr_crypto_openssl*
+
+%files nss
+%defattr(-,root,root,-)
+%{_libdir}/apr-util-%{apuver}/apr_crypto_nss*
%files devel
%defattr(-,root,root,-)