Build ICU support by default.
authorJeff Davis
Tue, 18 Apr 2023 20:20:11 +0000 (13:20 -0700)
committerJeff Davis
Tue, 18 Apr 2023 20:25:44 +0000 (13:25 -0700)
Discussion: https://postgr.es/m/82c4c816-06f6-d3e3-ba02-fca4a5cef065%40enterprisedb.com
Reviewed-by: Peter Eisentraut
.cirrus.yml
configure
configure.ac
doc/src/sgml/installation.sgml

index d3f88821a85a8510cc19a22ec48ef7b4b62fbc6a..b47a8ae1009993c6814b74ee9dd010a4c39e5236 100644 (file)
@@ -776,6 +776,7 @@ task:
       time ./configure \
         --host=x86_64-w64-mingw32 \
         --enable-cassert \
+        --without-icu \
         CC="ccache x86_64-w64-mingw32-gcc" \
         CXX="ccache x86_64-w64-mingw32-g++"
       make -s -j${BUILD_JOBS} clean
index 82efa0d3f1f7a9b0b68105758f5fa4a8efa90eb2..e585b28bff6715955c6053826c00428483637b7f 100755 (executable)
--- a/configure
+++ b/configure
@@ -1558,7 +1558,7 @@ Optional Packages:
                           set WAL block size in kB [8]
   --with-CC=CMD           set compiler (deprecated)
   --with-llvm             build with LLVM based JIT support
-  --with-icu              build with ICU support
+  --without-icu           build without ICU support
   --with-tcl              build Tcl modules (PL/Tcl)
   --with-tclconfig=DIR    tclConfig.sh is in DIR
   --with-perl             build Perl modules (PL/Perl)
@@ -8401,7 +8401,9 @@ $as_echo "#define USE_ICU 1" >>confdefs.h
   esac
 
 else
-  with_icu=no
+  with_icu=yes
+
+$as_echo "#define USE_ICU 1" >>confdefs.h
 
 fi
 
@@ -8470,31 +8472,17 @@ fi
    # Put the nasty error message in config.log where it belongs
    echo "$ICU_PKG_ERRORS" >&5
 
-   as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
-
-$ICU_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables ICU_CFLAGS
-and ICU_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
+   as_fn_error $? "ICU library not found
+If you have ICU already installed, see config.log for details on the
+failure.  It is possible the compiler isn't looking in the proper directory.
+Use --without-icu to disable ICU support." "$LINENO" 5
 elif test $pkg_failed = untried; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables ICU_CFLAGS
-and ICU_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see .
-See \`config.log' for more details" "$LINENO" 5; }
+   as_fn_error $? "ICU library not found
+If you have ICU already installed, see config.log for details on the
+failure.  It is possible the compiler isn't looking in the proper directory.
+Use --without-icu to disable ICU support." "$LINENO" 5
 else
    ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
    ICU_LIBS=$pkg_cv_ICU_LIBS
index 1362f57a27cd6cef8a90dbab5667c0ba3fe7e99b..97f5be6c730a77acd41c7e5f382f97e43aa0d737 100644 (file)
@@ -853,13 +853,17 @@ AC_SUBST(enable_thread_safety)
 # ICU
 #
 AC_MSG_CHECKING([whether to build with ICU support])
-PGAC_ARG_BOOL(with, icu, no, [build with ICU support],
+PGAC_ARG_BOOL(with, icu, yes, [build without ICU support],
               [AC_DEFINE([USE_ICU], 1, [Define to build with ICU support. (--with-icu)])])
 AC_MSG_RESULT([$with_icu])
 AC_SUBST(with_icu)
 
 if test "$with_icu" = yes; then
-  PKG_CHECK_MODULES(ICU, icu-uc icu-i18n)
+  PKG_CHECK_MODULES(ICU, icu-uc icu-i18n, [],
+    [AC_MSG_ERROR([ICU library not found
+If you have ICU already installed, see config.log for details on the
+failure.  It is possible the compiler isn't looking in the proper directory.
+Use --without-icu to disable ICU support.])])
 fi
 
 #
index 3d839d665a7fa2ac0035968684e350e4679f0e73..75dc81a0a9e25c6f5a50a7caaf9b7191c309fa12 100644 (file)
@@ -146,6 +146,35 @@ documentation.  See standalone-profile.xsl for details.
       pg_restore.
      
     
+
+    
+     
+      The ICU locale provider (see ) is used by default. If you don't want to use it then you must specify the  option to configure. Using this option disables support for ICU collation features (see ).
+     
+     
+      ICU support requires the ICU4C package to be
+      installed.  The minimum required version of
+      ICU4C is currently 4.2.
+     
+
+     
+      By default,
+      pkg-configpkg-config
+      will be used to find the required compilation options.  This is
+      supported for ICU4C version 4.6 and later.
+      For older versions, or if pkg-config is not
+      available, the variables ICU_CFLAGS and
+      ICU_LIBS can be specified to
+      configure, like in this example:
+
+./configure ... ICU_CFLAGS='-I/some/where/include' ICU_LIBS='-L/some/where/lib -licui18n -licuuc -licudata'
+
+      (If ICU4C is in the default search path
+      for the compiler, then you still need to specify nonempty strings in
+      order to avoid use of pkg-config, for
+      example, ICU_CFLAGS=' '.)
+     
+    
    
   
 
@@ -926,40 +955,6 @@ build-postgresql:
        
       
 
-      
-       
-       
-        
-         Build with support for
-         the ICUICU
-         library, enabling use of ICU collation
-         features (see
-         ).
-         This requires the ICU4C package
-         to be installed.  The minimum required version
-         of ICU4C is currently 4.2.
-        
-
-        
-         By default,
-         pkg-configpkg-config
-         will be used to find the required compilation options.  This is
-         supported for ICU4C version 4.6 and later.
-         For older versions, or if pkg-config is
-         not available, the variables ICU_CFLAGS
-         and ICU_LIBS can be specified
-         to configure, like in this example:
-
-./configure ... --with-icu ICU_CFLAGS='-I/some/where/include' ICU_LIBS='-L/some/where/lib -licui18n -licuuc -licudata'
-
-         (If ICU4C is in the default search path
-         for the compiler, then you still need to specify nonempty strings in
-         order to avoid use of pkg-config, for
-         example, ICU_CFLAGS=' '.)
-        
-       
-      
-
       
        
        
@@ -1231,6 +1226,19 @@ build-postgresql:
 
      
 
+      
+       
+       
+        
+         Build without support for the
+         ICUICU
+         library, disabling the use of ICU collation features
+         condition="standalone-ignore"> (see 
+         linkend="collation"/>).
+        
+       
+      
+