@@ -699,6 +699,16 @@ PGAC_ARG_BOOL(with, selinux, no, [build with SELinux support])
699
699
AC_SUBST(with_selinux)
700
700
AC_MSG_RESULT([$with_selinux])
701
701
702
+ #
703
+ # ICU
704
+ #
705
+ AC_MSG_CHECKING([whether to build with ICU support])
706
+ PGAC_ARG_BOOL(with, icu, no, [ --with-icu build with ICU support],
707
+ [AC_DEFINE([USE_ICU], 1, [Define to build with ICU support. (--with-icu)])])
708
+ AC_MSG_RESULT([$with_icu])
709
+ AC_SUBST(with_icu)
710
+
711
+
702
712
#
703
713
# Readline
704
714
#
@@ -1036,6 +1046,63 @@ if test "$with_openssl" = yes ; then
1036
1046
AC_CHECK_FUNCS([SSL_get_current_compression])
1037
1047
fi
1038
1048
1049
+ if test "$with_icu" = yes ; then
1050
+ AC_SEARCH_LIBS(ucol_open_57, [icui18n icuin], [], [
1051
+ AC_SEARCH_LIBS(ucol_open_56, [icui18n icuin], [], [
1052
+ AC_SEARCH_LIBS(ucol_open_55, [icui18n icuin], [], [
1053
+ AC_SEARCH_LIBS(ucol_open_54, [icui18n icuin], [], [
1054
+ AC_SEARCH_LIBS(ucol_open_53, [icui18n icuin], [], [
1055
+ AC_SEARCH_LIBS(ucol_open_52, [icui18n icuin], [], [
1056
+ AC_SEARCH_LIBS(ucol_open_50, [icui18n icuin], [], [
1057
+ AC_SEARCH_LIBS(ucol_open_48, [icui18n icuin], [], [
1058
+ AC_SEARCH_LIBS(ucol_open_46, [icui18n icuin], [], [
1059
+ AC_SEARCH_LIBS(ucol_open_44, [icui18n icuin], [], [
1060
+ AC_SEARCH_LIBS(ucol_open_43, [icui18n icuin], [], [
1061
+ AC_SEARCH_LIBS(ucol_open_3_8, [icui18n icuin], [], [
1062
+ AC_SEARCH_LIBS(ucol_open_3_6, [icui18n icuin], [], [
1063
+ AC_SEARCH_LIBS(ucol_open_3_4, [icui18n icuin], [], [AC_MSG_ERROR([library 'icui18n' is required for ICU])])
1064
+ ])
1065
+ ])
1066
+ ])
1067
+ ])
1068
+ ])
1069
+ ])
1070
+ ])
1071
+ ])
1072
+ ])
1073
+ ])
1074
+ ])
1075
+ ])
1076
+ ])
1077
+ AC_CHECK_LIB(icuuc, ucnv_fromUChars_57, [], [
1078
+ AC_CHECK_LIB(icuuc, ucnv_fromUChars_56, [], [
1079
+ AC_CHECK_LIB(icuuc, ucnv_fromUChars_55, [], [
1080
+ AC_CHECK_LIB(icuuc, ucnv_fromUChars_54, [], [
1081
+ AC_CHECK_LIB(icuuc, ucnv_fromUChars_53, [], [
1082
+ AC_CHECK_LIB(icuuc, ucnv_fromUChars_52, [], [
1083
+ AC_CHECK_LIB(icuuc, ucnv_fromUChars_50, [], [
1084
+ AC_CHECK_LIB(icuuc, ucnv_fromUChars_48, [], [
1085
+ AC_CHECK_LIB(icuuc, ucnv_fromUChars_46, [], [
1086
+ AC_CHECK_LIB(icuuc, ucnv_fromUChars_44, [], [
1087
+ AC_CHECK_LIB(icuuc, ucnv_fromUChars_43, [], [
1088
+ AC_CHECK_LIB(icuuc, ucnv_fromUChars_3_8, [], [
1089
+ AC_CHECK_LIB(icuuc, ucnv_fromUChars_3_6, [], [
1090
+ AC_CHECK_LIB(icuuc, ucnv_fromUChars_3_4, [], [AC_MSG_ERROR([library 'icuuc' is required for ICU])])
1091
+ ])
1092
+ ])
1093
+ ])
1094
+ ])
1095
+ ])
1096
+ ])
1097
+ ])
1098
+ ])
1099
+ ])
1100
+ ])
1101
+ ])
1102
+ ])
1103
+ ])
1104
+ fi
1105
+
1039
1106
if test "$with_pam" = yes ; then
1040
1107
AC_CHECK_LIB(pam, pam_start, [], [AC_MSG_ERROR([library 'pam' is required for PAM])])
1041
1108
fi
@@ -1162,6 +1229,10 @@ if test "$with_openssl" = yes ; then
1162
1229
AC_CHECK_HEADER(openssl/err.h, [], [AC_MSG_ERROR([header file <openssl/err.h> is required for OpenSSL])])
1163
1230
fi
1164
1231
1232
+ if test "$with_icu" = yes ; then
1233
+ AC_CHECK_HEADER(unicode/utypes.h, [], [AC_MSG_ERROR([header file <unicode/utypes.h> is required for ICU])])
1234
+ fi
1235
+
1165
1236
if test "$with_pam" = yes ; then
1166
1237
AC_CHECK_HEADERS(security/pam_appl.h, [],
1167
1238
[AC_CHECK_HEADERS(pam/pam_appl.h, [],
0 commit comments