Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 37266 invoked from network); 5 Oct 2004 08:50:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 5 Oct 2004 08:50:55 -0000 Received: (qmail 54563 invoked by uid 500); 5 Oct 2004 08:50:44 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 54475 invoked by uid 500); 5 Oct 2004 08:50:43 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 54460 invoked by uid 99); 5 Oct 2004 08:50:42 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [217.115.66.8] (HELO plim.fujitsu-siemens.com) (217.115.66.8) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 05 Oct 2004 01:50:39 -0700 Received: from trulli.pdb.fsc.net ([172.25.96.53]) by plim.fujitsu-siemens.com (8.11.3/8.11.3) with ESMTP id i958oZo10671 for ; Tue, 5 Oct 2004 10:50:36 +0200 Received: from deejai2.mch.fsc.net (deejai2.mch.fsc.net [172.25.124.236]) by trulli.pdb.fsc.net (8.11.6/8.11.6) with ESMTP id i958oZu16959 for ; Tue, 5 Oct 2004 10:50:35 +0200 Received: from fujitsu-siemens.com (8us54vrp5c8w32ca@deejai2.mch.fsc.net [172.25.124.236]) by deejai2.mch.fsc.net (8.12.11/8.12.11) with ESMTP id i958oVxD068087 for ; Tue, 5 Oct 2004 10:50:31 +0200 (CEST) (envelope-from jfrederic.clere@fujitsu-siemens.com) Message-ID: <416261A3.4030200@fujitsu-siemens.com> Date: Tue, 05 Oct 2004 10:56:03 +0200 From: jean-frederic clere Reply-To: jfrederic.clere@fujitsu-siemens.com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7b) Gecko/20040517 X-Accept-Language: ca, en, fr, de MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: PATCH to use apr-iconv References: <416181BE.4040901@fujitsu-siemens.com> <6.1.2.0.2.20041004180424.099a18d0@pop3.rowe-clan.net> <28BD5A5AD79901A6A7B216DE@st-augustin.ics.uci.edu> <6.1.2.0.2.20041004190208.0977ee98@pop3.rowe-clan.net> In-Reply-To: <6.1.2.0.2.20041004190208.0977ee98@pop3.rowe-clan.net> X-Enigmail-Version: 0.84.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------010307050509020008090004" X-Virus-Scanned: by amavisd-new X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. --------------010307050509020008090004 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit William A. Rowe, Jr. wrote: > At 06:38 PM 10/4/2004, Justin Erenkrantz wrote: > > >>I have some issues with the proposed patch in that it moves some configure logic that really belongs in apr-util over to httpd: i.e. configuration of apr-iconv should be done by apr-util not by httpd, httpd should only be aware of iconv via the apu-*-config scripts, etc. -- justin > > > 100% agreed - if you look at the doxygen, these interfaces are > private to apr-util, users aren't to count on apr-iconv itself. I have now moved all the logic to apr-util. Find enclosed the new patch. To get it working checkout apr-iconv in srclib and add "--with-iconv=`pwd`/srclib/apr-iconv". More comments? > > Bill > > --------------010307050509020008090004 Content-Type: text/plain; name="patch.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch.txt" Index: srclib/apr-util/Makefile.in =================================================================== RCS file: /home/cvspublic/apr-util/Makefile.in,v retrieving revision 1.97 diff -u -r1.97 Makefile.in --- srclib/apr-util/Makefile.in 23 Aug 2004 20:22:18 -0000 1.97 +++ srclib/apr-util/Makefile.in 5 Oct 2004 08:40:12 -0000 @@ -15,8 +15,8 @@ APRUTIL_LIBS = @APRUTIL_LIBS@ TARGET_LIB = lib@APRUTIL_LIBNAME@.la -INSTALL_SUBDIRS = @APR_XML_DIR@ -EXTRA_SOURCE_DIRS = @APR_XML_DIR@ +INSTALL_SUBDIRS = @APR_ICONV_DIR@ @APR_XML_DIR@ +EXTRA_SOURCE_DIRS = @APR_ICONV_DIR@ @APR_XML_DIR@ EXTRA_OS_LINK=@EXTRA_OS_LINK@ APRUTIL_PCFILE = apr-util-$(APRUTIL_MAJOR_VERSION).pc APU_CONFIG = apu-$(APRUTIL_MAJOR_VERSION)-config Index: srclib/apr-util/buildconf =================================================================== RCS file: /home/cvspublic/apr-util/buildconf,v retrieving revision 1.13 diff -u -r1.13 buildconf --- srclib/apr-util/buildconf 1 Jul 2004 22:45:06 -0000 1.13 +++ srclib/apr-util/buildconf 5 Oct 2004 08:40:12 -0000 @@ -1,4 +1,20 @@ #!/bin/sh +# +# Copyright 1999-2004 The Apache Software Foundation +# +# 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. +# +# # Default place to look for apr source. Can be overridden with # --with-apr=[directory] @@ -63,6 +79,14 @@ # echo "Generating 'make' outputs ..." $apr_src_dir/build/gen-build.py make + +# +# If apr-iconv, then go and configure it. +# +if test -d ../apr-iconv; then + echo "Invoking ../apr-iconv/buildconf.sh ..." + (cd ../apr-iconv; ./buildconf) +fi # # If Expat has been bundled, then go and configure the thing Index: srclib/apr-util/configure.in =================================================================== RCS file: /home/cvspublic/apr-util/configure.in,v retrieving revision 1.79 diff -u -r1.79 configure.in --- srclib/apr-util/configure.in 2 Sep 2004 13:50:28 -0000 1.79 +++ srclib/apr-util/configure.in 5 Oct 2004 08:40:12 -0000 @@ -96,6 +96,21 @@ APR_ADDTO(CFLAGS, `$apr_config --cflags`) APR_ADDTO(CPPFLAGS, `$apr_config --cppflags`) +dnl +dnl Find the APR-ICONV directory. +dnl +if test -d ../apr-iconv; then + APR_SUBDIR_CONFIG(../apr-iconv, + [$apache_apr_flags --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir --includedir=$includedir --bindir=$bindir --datadir=$datadir --with-installbuilddir=$installbuilddir], + [--enable-layout=*|\'--enable-layout=*]) + APRUTIL_EXPORT_LIBS="$abs_srcdir/../apr-iconv/lib/libapriconv.la $APRUTIL_EXPORT_LIBS" + APRUTIL_INCLUDES="-I$abs_srcdir/../apr-iconv/include $APRUTIL_INCLUDES" + APR_ICONV_DIR=../apr-iconv +else + APR_ICONV_DIR="" +fi +AC_SUBST(APR_ICONV_DIR) + dnl Find LDAP library dnl Determine what DBM backend type to use. dnl Find Expat Index: srclib/apr-util/build/apu-iconv.m4 =================================================================== RCS file: /home/cvspublic/apr-util/build/apu-iconv.m4,v retrieving revision 1.5 diff -u -r1.5 apu-iconv.m4 --- srclib/apr-util/build/apu-iconv.m4 21 Jul 2002 11:09:12 -0000 1.5 +++ srclib/apr-util/build/apu-iconv.m4 5 Oct 2004 08:40:12 -0000 @@ -22,33 +22,44 @@ AC_DEFUN(APU_FIND_ICONV,[ apu_iconv_dir="unknown" +have_apr_iconv="0" AC_ARG_WITH(iconv,[ --with-iconv[=DIR] path to iconv installation], [ apu_iconv_dir="$withval" if test "$apu_iconv_dir" != "yes"; then APR_ADDTO(CPPFLAGS,[-I$apu_iconv_dir/include]) APR_ADDTO(LDFLAGS,[-L$apu_iconv_dir/lib]) fi + if test -f "$apu_iconv_dir/include/api_version.h"; then + have_apr_iconv="1" + have_iconv="0" + APR_REMOVEFROM(LIBS,[-lapriconv]) + AC_MSG_RESULT("Using apr-iconv") + fi ]) -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" ]) +if test "$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]) + APR_REMOVEFROM(LIBS,[-liconv]) - ]) -], [ have_iconv="0" ]) + ]) + ], [ have_iconv="0" ]) +fi if test "$apu_iconv_dir" != "unknown"; then if test "$have_iconv" != "1"; then - AC_MSG_ERROR([iconv support requested, but not found]) + 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]) @@ -65,6 +76,7 @@ APR_CHECK_DEFINE(CODESET, langinfo.h, [CODESET defined in langinfo.h]) AC_SUBST(have_iconv) +AC_SUBST(have_apr_iconv) ])dnl dnl Index: srclib/apr-util/include/apu.h.in =================================================================== RCS file: /home/cvspublic/apr-util/include/apu.h.in,v retrieving revision 1.20 diff -u -r1.20 apu.h.in --- srclib/apr-util/include/apu.h.in 26 Feb 2004 21:55:12 -0000 1.20 +++ srclib/apr-util/include/apu.h.in 5 Oct 2004 08:40:12 -0000 @@ -77,7 +77,7 @@ #define APU_HAVE_DB_VERSION @apu_db_version@ #endif /* APU_HAVE_DB */ -#define APU_HAVE_APR_ICONV 0 +#define APU_HAVE_APR_ICONV @have_apr_iconv@ #define APU_HAVE_ICONV @have_iconv@ #define APR_HAS_XLATE (APU_HAVE_APR_ICONV || APU_HAVE_ICONV) --------------010307050509020008090004--