William A. Rowe, Jr. wrote:
>> - What's status on the move of apr_xlate* to apr-util?
>
>
> Finished, with the exception of the APR_CHECK_ICONV_INBUF
> m4 macro that tests for the iconv prototype differences, and one
> more hack to use our apr_* namespace protected entry points
> from xlate.c if APR_HAS_APR_ICONV is toggled. We also need
> that symbol set up in apu or apu_private.
>
> The first macro sticks the #define APR_ICONV_INBUF_CONST 1
> into apr_private.h which we don't see inside of apu_private.h, so
> we can't pick it up inside of apr-util/xlate/xlate.c.
>
> If someone who groks m4 much better than I would get this inserted
> into apu_private.h from apu_private.h.in ... we would be done with the
> new unix / using installed xlate problems.
Can you try the attached patch? It moves libiconv detection from APR to
APR-util, and tweaks things so that APR_ICONV_INBUF_CONST appears in
apu_config.h. I left the APR_CHECK_ICONV_INBUF macro in apr_common.m4,
but that could be moved to the new apu-iconv.m4 (and renamed to
APU_CHJECK_ICONV_INBUF) later.
I don't know what to do about apr_hints.m4, which sets teh value of
APR_ICONV_INBUF_CONST on AIX and Solaris. I don't want to include it in
APR-util's configure.
I don't have a Unix machine handy, unfortunately, so I can't test this
right now.
--
Brane Čibej <brane_at_xbc.nu> http://www.xbc.nu/brane/
Index: configure.in
===================================================================
RCS file: /home/cvs/apr/configure.in,v
retrieving revision 1.464
diff -u -p -r1.464 configure.in
--- configure.in 17 Jul 2002 06:17:24 -0000 1.464
+++ configure.in 18 Jul 2002 21:03:53 -0000
@@ -456,7 +456,6 @@ AC_SEARCH_LIBS(gethostname, nsl)
AC_CHECK_LIB(socket, socket)
AC_SEARCH_LIBS(crypt, crypt ufc)
AC_CHECK_LIB(truerand, main)
-AC_CHECK_LIB(iconv, iconv)
AC_CHECK_LIB(m, modf)
dnl #----------------------------- Checking for Threads
@@ -851,10 +850,6 @@ AC_CHECK_FUNCS(crypt_r, [ crypt_r="1" ],
if test "$crypt_r" = "1"; then
APR_CHECK_CRYPT_R_STYLE
fi
-AC_CHECK_FUNCS(iconv, [ have_iconv="1" ], [ have_iconv="0" ])
-if test "$iconv" = "1"; then
- APR_CHECK_ICONV_INBUF
-fi
AC_CHECK_FUNCS(mmap, [ mmap="1" ], [ mmap="0" ])
if test "$native_mmap_emul" = "1"; then
mmap="1"
@@ -871,7 +866,6 @@ AC_SUBST(have_inet_network)
AC_SUBST(have_sigaction)
AC_SUBST(have_setrlimit)
AC_SUBST(have_getrlimit)
-AC_SUBST(have_iconv)
AC_SUBST(mmap)
AC_SUBST(have_memmove)
@@ -892,7 +886,6 @@ APR_FLAG_HEADERS(
errno.h \
fcntl.h \
grp.h \
- iconv.h \
io.h \
langinfo.h \
limits.h \
Index: include/apr.h.in
===================================================================
RCS file: /home/cvs/apr/include/apr.h.in,v
retrieving revision 1.112
diff -u -p -r1.112 apr.h.in
--- include/apr.h.in 17 Jul 2002 05:15:17 -0000 1.112
+++ include/apr.h.in 18 Jul 2002 21:05:01 -0000
@@ -99,7 +99,6 @@
#define APR_HAVE_CORKABLE_TCP @have_corkable_tcp@
#define APR_HAVE_GETRLIMIT @have_getrlimit@
-#define APR_HAVE_ICONV @have_iconv@
#define APR_HAVE_IN_ADDR @have_in_addr@
#define APR_HAVE_INET_ADDR @have_inet_addr@
#define APR_HAVE_INET_NETWORK @have_inet_network@
Index: configure.in
===================================================================
RCS file: /home/cvs/apr-util/configure.in,v
retrieving revision 1.51
diff -u -p -r1.51 configure.in
--- configure.in 17 Jul 2002 06:22:08 -0000 1.51
+++ configure.in 18 Jul 2002 21:12:33 -0000
@@ -9,6 +9,7 @@ AC_CONFIG_HEADER(include/private/apu_con
AC_CONFIG_AUX_DIR(../apr/build)
sinclude(build/apu-conf.m4)
+sinclude(build/apu-iconv.m4)
sinclude(../apr/build/apr_common.m4)
sinclude(../apr/build/find_apr.m4)
@@ -52,11 +53,13 @@ dnl
dnl 1. Find the APR includes directory and (possibly) the source (base) dir.
dnl 2. Determine what DBM backend type to use.
dnl 3. Find Expat
+dnl 4. Find an iconv library
dnl
APU_FIND_APR
APU_FIND_LDAP
APU_CHECK_DBM
APU_FIND_EXPAT
+APU_FIND_ICONV
so_ext=$APR_SO_EXT
lib_target=$APR_LIB_TARGET
Index: build/apu-iconv.m4
===================================================================
RCS file: build/apu-iconv.m4
diff -N build/apu-iconv.m4
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ build/apu-iconv.m4 18 Jul 2002 21:12:33 -0000
@@ -0,0 +1,23 @@
+dnl
+dnl custom autoconf rules for APRUTIL
+dnl
+
+dnl
+dnl APU_FIND_ICONV: find an iconv library
+dnl
+AC_DEFUN(APU_FIND_ICONV,[
+
+dnl
+dnl TODO: Check for --with-iconv or --with-apr-iconv, or look for
+dnl apr-iconv sources or an installed apr-iconv ...
+dnl
+
+AC_CHECK_LIB(iconv, iconv)
+AC_CHECK_FUNCS(iconv, [ have_iconv="1" ], [ have_iconv="0" ])
+if test "$have_iconv" = "1"; then
+ APR_CHECK_ICONV_INBUF
+fi
+AC_SUBST(have_iconv)
+APR_FLAG_HEADERS(iconv.h)
+
+])
Index: include/apr_xlate.h
===================================================================
RCS file: /home/cvs/apr-util/include/apr_xlate.h,v
retrieving revision 1.2
diff -u -p -r1.2 apr_xlate.h
--- include/apr_xlate.h 17 Jul 2002 05:24:04 -0000 1.2
+++ include/apr_xlate.h 18 Jul 2002 21:12:33 -0000
@@ -81,7 +81,7 @@ extern "C" {
* If APR_HAS_XLATE is zero, apr_xlate_open() et al will all return
* APR_ENOTIMPL at run-time.
*/
-#define APR_HAS_XLATE APR_HAVE_ICONV
+#define APR_HAS_XLATE APU_HAVE_ICONV
typedef struct apr_xlate_t apr_xlate_t;
Index: include/apu.h.in
===================================================================
RCS file: /home/cvs/apr-util/include/apu.h.in,v
retrieving revision 1.12
diff -u -p -r1.12 apu.h.in
--- include/apu.h.in 13 Mar 2002 20:40:48 -0000 1.12
+++ include/apu.h.in 18 Jul 2002 21:12:33 -0000
@@ -123,6 +123,8 @@
#endif
#endif
+#define APU_HAVE_ICONV @have_iconv@
+
#endif /* APU_H */
/** @} */
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jul 18 23:24:12 2002