You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by jean-frederic clere <jf...@fujitsu-siemens.com> on 2004/10/08 09:12:35 UTC
Re: cvs commit: apr-util/include apu.h.in
jfclere@apache.org wrote:
> jfclere 2004/10/07 01:16:45
>
> Modified: . Makefile.in buildconf configure.in
> build apu-iconv.m4
> include apu.h.in
> Log:
> Allow to use apr-iconv.
I tried to get apr-iconv configured from httpd but that wasn't a good idea.
The lastest mail about the topic (in httpd-dev) and before my commit in apr-util
was the following:
http://marc.theaimsgroup.com/?l=apache-httpd-dev&m=109719036119165&w=2
What is not done is to check that the system iconv() is suitable but apr-iconv
is be used only if "--with-iconv" points to apr-iconv sources.
Cheers
Jean-frederic
>
> Revision Changes Path
> 1.98 +3 -3 apr-util/Makefile.in
>
> Index: Makefile.in
> ===================================================================
> RCS file: /home/cvs/apr-util/Makefile.in,v
> retrieving revision 1.97
> retrieving revision 1.98
> diff -u -r1.97 -r1.98
> --- Makefile.in 23 Aug 2004 20:22:18 -0000 1.97
> +++ Makefile.in 7 Oct 2004 08:16:45 -0000 1.98
> @@ -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
> @@ -29,7 +29,7 @@
> @INCLUDE_RULES@
> @INCLUDE_OUTPUTS@
>
> -CLEAN_SUBDIRS = test
> +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 \
>
>
>
> 1.14 +24 -0 apr-util/buildconf
>
> Index: buildconf
> ===================================================================
> RCS file: /home/cvs/apr-util/buildconf,v
> retrieving revision 1.13
> retrieving revision 1.14
> diff -u -r1.13 -r1.14
> --- buildconf 1 Jul 2004 22:45:06 -0000 1.13
> +++ buildconf 7 Oct 2004 08:16:45 -0000 1.14
> @@ -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
>
>
>
> 1.80 +15 -0 apr-util/configure.in
>
> Index: configure.in
> ===================================================================
> RCS file: /home/cvs/apr-util/configure.in,v
> retrieving revision 1.79
> retrieving revision 1.80
> diff -u -r1.79 -r1.80
> --- configure.in 2 Sep 2004 13:50:28 -0000 1.79
> +++ configure.in 7 Oct 2004 08:16:45 -0000 1.80
> @@ -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
>
>
>
> 1.6 +26 -14 apr-util/build/apu-iconv.m4
>
> Index: apu-iconv.m4
> ===================================================================
> RCS file: /home/cvs/apr-util/build/apu-iconv.m4,v
> retrieving revision 1.5
> retrieving revision 1.6
> diff -u -r1.5 -r1.6
> --- apu-iconv.m4 21 Jul 2002 11:09:12 -0000 1.5
> +++ apu-iconv.m4 7 Oct 2004 08:16:45 -0000 1.6
> @@ -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
>
>
>
> 1.21 +1 -1 apr-util/include/apu.h.in
>
> Index: apu.h.in
> ===================================================================
> RCS file: /home/cvs/apr-util/include/apu.h.in,v
> retrieving revision 1.20
> retrieving revision 1.21
> diff -u -r1.20 -r1.21
> --- apu.h.in 26 Feb 2004 21:55:12 -0000 1.20
> +++ apu.h.in 7 Oct 2004 08:16:45 -0000 1.21
> @@ -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)
>
>
>
>
>
>