apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r586170 - /apr/apr-util/branches/1.2.x/build/apu-iconv.m4
Date Thu, 18 Oct 2007 23:15:18 GMT
Author: wrowe
Date: Thu Oct 18 16:15:17 2007
New Revision: 586170

URL: http://svn.apache.org/viewvc?rev=586170&view=rev
Log:
Build against apr-iconv (with libs and includes and stuff, maybe?)

Replace with .m4 of trunk which is much healthier at this point.

Modified:
    apr/apr-util/branches/1.2.x/build/apu-iconv.m4

Modified: apr/apr-util/branches/1.2.x/build/apu-iconv.m4
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.2.x/build/apu-iconv.m4?rev=586170&r1=586169&r2=586170&view=diff
==============================================================================
--- apr/apr-util/branches/1.2.x/build/apu-iconv.m4 (original)
+++ apr/apr-util/branches/1.2.x/build/apu-iconv.m4 Thu Oct 18 16:15:17 2007
@@ -35,21 +35,30 @@
 
 apu_iconv_dir="unknown"
 have_apr_iconv="0"
+want_iconv="1"
 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"
+    if test "$apu_iconv_dir" = "no"; then
+      have_apr_iconv="0"
       have_iconv="0"
-      APR_REMOVEFROM(LIBS,[-lapriconv])
-      AC_MSG_RESULT("Using apr-iconv")
+      want_iconv="0"
+    elif test "$apu_iconv_dir" != "yes"; then
+      if test -f "$apu_iconv_dir/include/apr-1/api_version.h"; then
+        have_apr_iconv="1"
+        have_iconv="0"
+        APR_ADDTO(APRUTIL_INCLUDES,[-I$apu_iconv_dir/include/apr-1])
+        APR_ADDTO(APRUTIL_LIBS,[$apu_iconv_dir/lib/libapriconv-1.la])
+        AC_MSG_RESULT(using apr-iconv)
+      elif test -f "$apu_iconv_dir/include/iconv.h"; then
+        have_apr_iconv="0"
+        have_iconv="1"
+        APR_ADDTO(CPPFLAGS,[-I$apu_iconv_dir/include])
+        APR_ADDTO(LDFLAGS,[-L$apu_iconv_dir/lib])
+      fi
     fi
   ])
 
-if test "$have_apr_iconv" != "1"; then
+if test "$want_iconv" = "1" -a "$have_apr_iconv" != "1"; then
   AC_CHECK_HEADER(iconv.h, [
     APU_TRY_ICONV([ have_iconv="1" ], [
 
@@ -67,7 +76,7 @@
   ], [ have_iconv="0" ])
 fi
 
-if test "$apu_iconv_dir" != "unknown"; then
+if test "$want_iconv" = "1" -a "$apu_iconv_dir" != "unknown"; then
   if test "$have_iconv" != "1"; then
     if test "$have_apr_iconv" != "1"; then 
       AC_MSG_ERROR([iconv support requested, but not found])



Mime
View raw message