striker 2002/07/19 06:02:14
Modified: . configure.in
build apr_common.m4
include apr.h.in
. configure.in
include apu.h.in
Added: build apu-iconv.m4
Log:
Remove all iconv detection from APR.
Enable iconv detection in APR-util.
Submitted by: Branko Cibej <[EMAIL PROTECTED]>
Reviewed by: Sander Striker
Revision Changes Path
1.465 +0 -7 apr/configure.in
Index: configure.in
===================================================================
RCS file: /home/cvs/apr/configure.in,v
retrieving revision 1.464
retrieving revision 1.465
diff -u -r1.464 -r1.465
--- configure.in 17 Jul 2002 06:17:24 -0000 1.464
+++ configure.in 19 Jul 2002 13:02:13 -0000 1.465
@@ -456,7 +456,6 @@
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 @@
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_sigaction)
AC_SUBST(have_setrlimit)
AC_SUBST(have_getrlimit)
-AC_SUBST(have_iconv)
AC_SUBST(mmap)
AC_SUBST(have_memmove)
@@ -892,7 +886,6 @@
errno.h \
fcntl.h \
grp.h \
- iconv.h \
io.h \
langinfo.h \
limits.h \
1.34 +0 -31 apr/build/apr_common.m4
Index: apr_common.m4
===================================================================
RCS file: /home/cvs/apr/build/apr_common.m4,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- apr_common.m4 19 Jun 2002 20:06:58 -0000 1.33
+++ apr_common.m4 19 Jul 2002 13:02:13 -0000 1.34
@@ -534,37 +534,6 @@
fi
])
-dnl
-dnl APR_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 -- apr_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(APR_CHECK_ICONV_INBUF,[
-AC_MSG_CHECKING(for type of inbuf parameter to iconv)
-if test "x$apr_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);
- ], apr_iconv_inbuf_const="0", apr_iconv_inbuf_const="1")
-fi
-if test "$apr_iconv_inbuf_const" = "1"; then
- AC_DEFINE(APR_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
-
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;
1.113 +0 -1 apr/include/apr.h.in
Index: apr.h.in
===================================================================
RCS file: /home/cvs/apr/include/apr.h.in,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -r1.112 -r1.113
--- apr.h.in 17 Jul 2002 05:15:17 -0000 1.112
+++ apr.h.in 19 Jul 2002 13:02:13 -0000 1.113
@@ -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@
1.52 +3 -0 apr-util/configure.in
Index: configure.in
===================================================================
RCS file: /home/cvs/apr-util/configure.in,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- configure.in 17 Jul 2002 06:22:08 -0000 1.51
+++ configure.in 19 Jul 2002 13:02:13 -0000 1.52
@@ -9,6 +9,7 @@
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 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
1.1 apr-util/build/apu-iconv.m4
Index: apu-iconv.m4
===================================================================
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
APU_CHECK_ICONV_INBUF
fi
AC_SUBST(have_iconv)
APR_FLAG_HEADERS(iconv.h)
])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(APR_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
1.14 +2 -5 apr-util/include/apu.h.in
Index: apu.h.in
===================================================================
RCS file: /home/cvs/apr-util/include/apu.h.in,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- apu.h.in 19 Jul 2002 08:32:56 -0000 1.13
+++ apu.h.in 19 Jul 2002 13:02:14 -0000 1.14
@@ -55,10 +55,6 @@
/*
* apu.h is generated from apu.h.in by configure -- do not edit apu.h
*/
-/*
- * Note: This is a Windows specific version of apu.h. It is renamed to
- * apu.h at the start of a Windows build.
- */
/* @file apu.h
* @brief APR-Utility main file
*/
@@ -124,7 +120,8 @@
#endif
#define APU_HAVE_APR_ICONV 0
-#define APR_HAS_XLATE APR_HAVE_ICONV
+#define APU_HAVE_ICONV @have_iconv@
+#define APR_HAS_XLATE (APU_HAVE_APR_ICONV || APU_HAVE_ICONV)
#endif /* APU_H */
/** @} */