summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--unicode/ChangeLog6
-rw-r--r--unicode/Makefile.am2
-rw-r--r--unicode/configure.ac27
-rw-r--r--unicode/courier-unicode.h.in26
-rw-r--r--unicode/courier-unicode.spec.in5
-rw-r--r--unicode/linebreaktest.C8
-rw-r--r--unicode/m4/courier-unicode.m422
7 files changed, 57 insertions, 39 deletions
diff --git a/unicode/ChangeLog b/unicode/ChangeLog
index 75a47c9..7320565 100644
--- a/unicode/ChangeLog
+++ b/unicode/ChangeLog
@@ -1,3 +1,9 @@
+2.2.4
+
+2022-05-22 Sam Varshavchik <mrsam@courier-mta.com>
+
+ * configure.ac: gcc 12, autotool updates.
+
2022-03-13 Sam Varshavchik <mrsam@courier-mta.com>
* Add scripts to create installable .deb packages, update
diff --git a/unicode/Makefile.am b/unicode/Makefile.am
index 5299437..385bb1b 100644
--- a/unicode/Makefile.am
+++ b/unicode/Makefile.am
@@ -4,7 +4,7 @@
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4
-AM_CXXFLAGS= @COURIER_UNICODE_CXXFLAGS@
+AM_CXXFLAGS= @COURIER_UNICODE_CXXFLAGS@ @EXTRA_CXXFLAGS@
noinst_SCRIPTS=update.sh \
mkcategories.pl \
diff --git a/unicode/configure.ac b/unicode/configure.ac
index 3604371..552c203 100644
--- a/unicode/configure.ac
+++ b/unicode/configure.ac
@@ -1,9 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
-AC_INIT([courier-unicode], [2.2.3.20220416],
- [courier-users@lists.sourceforge.net])
-
->confdefs.h # Kill PACKAGE_ macros
+AC_INIT([courier-unicode],[2.2.4],[courier-users@lists.sourceforge.net])
AC_CONFIG_SRCDIR(unicodecpp.C)
@@ -16,15 +13,15 @@ AM_INIT_AUTOMAKE([foreign no-define dist-bzip2])
dnl Checks for programs.
AC_PROG_MAKE_SET
-AM_PROG_LIBTOOL
+LT_INIT
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_CC
-AC_PROG_CC_C99
AC_PROG_CXX
AX_COURIER_UNICODE_CXXFLAGS
AC_SUBST(COURIER_UNICODE_CXXFLAGS)
+AC_SUBST(EXTRA_CXXFLAGS)
AC_PATH_PROGS(PERL, perl5 perl, perl, $LPATH)
@@ -46,13 +43,13 @@ dnl Checks for library functions.
have_langinfo_l=0
AC_CHECK_FUNC(nl_langinfo_l,[
- AC_TRY_COMPILE([
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <langinfo.h>
-],[
+]], [[
nl_langinfo_l(CODESET, (locale_t)0);
-],[
+]])],[
have_langinfo_l=1
- ])])
+ ],[])])
if test "$have_langinfo_l" != 0
then
@@ -63,15 +60,13 @@ else
fi
-AC_TRY_COMPILE([
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <uchar.h>
char32_t c;
-],[
-],
-[
+]], [[
+]])],[
HAVE_UCHAR_H=1
-],
-[
+],[
HAVE_UCHAR_H=0
])
diff --git a/unicode/courier-unicode.h.in b/unicode/courier-unicode.h.in
index 6a6882e..95add35 100644
--- a/unicode/courier-unicode.h.in
+++ b/unicode/courier-unicode.h.in
@@ -1861,9 +1861,15 @@ private:
** an input iterator sequence over linebreak values.
*/
-template<typename input_t> class linebreak_iter
- : public std::iterator<std::input_iterator_tag, int, void>
-{
+template<typename input_t> class linebreak_iter {
+
+public:
+ typedef std::input_iterator_tag iterator_category;
+ typedef int value_type;
+ typedef void difference_type;
+ typedef value_type * pointer;
+ typedef value_type & reference;
+private:
mutable input_t iter_value, end_iter_value;
mutable linebreak_callback_save_buf *buf;
@@ -2054,10 +2060,16 @@ private:
** the character.
*/
-template<typename input_t> class linebreakc_iter
- : public std::iterator<std::input_iterator_tag,
- std::pair<int, char32_t>, void>
-{
+template<typename input_t> class linebreakc_iter {
+
+public:
+ typedef std::input_iterator_tag iterator_category;
+ typedef std::pair<int, char32_t> value_type;
+ typedef void difference_type;
+ typedef value_type * pointer;
+ typedef value_type & reference;
+private:
+
mutable input_t iter_value, end_iter_value;
mutable linebreakc_callback_save_buf *buf;
diff --git a/unicode/courier-unicode.spec.in b/unicode/courier-unicode.spec.in
index 07585d8..f66a79f 100644
--- a/unicode/courier-unicode.spec.in
+++ b/unicode/courier-unicode.spec.in
@@ -46,19 +46,19 @@ unicode library.
%prep
%setup -q -n courier-unicode-@PACKAGE_VERSION@
-%configure
%build
+%configure
%{__make} -s %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
%{__make} install DESTDIR=$RPM_BUILD_ROOT
+rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
%if 0%{?compat:1}
find $RPM_BUILD_ROOT%{_libdir} -type l -print | xargs rm -f
rm -rf $RPM_BUILD_ROOT%{_includedir}
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
-rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -rf $RPM_BUILD_ROOT%{_datadir}/aclocal
rm -rf $RPM_BUILD_ROOT%{_mandir}
%endif
@@ -85,7 +85,6 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/*/*
%{_includedir}/*
%{_libdir}/*.so
-%{_libdir}/*.la
%{_libdir}/*.a
%{_datadir}/aclocal/*.m4
%endif
diff --git a/unicode/linebreaktest.C b/unicode/linebreaktest.C
index 84ff83d..845215b 100644
--- a/unicode/linebreaktest.C
+++ b/unicode/linebreaktest.C
@@ -192,9 +192,11 @@ int main(int argc, char **argv)
std::u32string::iterator e(uc.first.end()),
b(std::find_if(uc.first.begin(), e,
- std::not1(std::bind2nd(std::equal_to<char32_t>
- (),
- char32_t('0')))));
+ []
+ (char32_t c)
+ {
+ return c != '0';
+ }));
if (b == e || *b++ != 0x30A2 || b != e)
{
diff --git a/unicode/m4/courier-unicode.m4 b/unicode/m4/courier-unicode.m4
index 673bc65..9619b45 100644
--- a/unicode/m4/courier-unicode.m4
+++ b/unicode/m4/courier-unicode.m4
@@ -4,16 +4,19 @@ dnl use the courier-unicode package.
AC_DEFUN([AX_COURIER_UNICODE_CXXFLAGS],[
+AC_REQUIRE([AC_PROG_CXX])
+
save_FLAGS="$CXXFLAGS"
AC_LANG_PUSH([C++])
-AC_TRY_COMPILE([
+
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <string>
-], [
+]], [[
std::u32string s;
char32_t c;
- ],
+ ]])],
[
],
[
@@ -21,12 +24,12 @@ AC_TRY_COMPILE([
COURIER_UNICODE_CXXFLAGS="-std=c++11"
CXXFLAGS="$save_CFLAGS $COURIER_UNICODE_CXXFLAGS"
-AC_TRY_COMPILE([
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <string>
-], [
+]], [[
std::u32string s;
char32_t c;
- ],
+ ]])],
[
],
[
@@ -34,12 +37,12 @@ AC_TRY_COMPILE([
COURIER_UNICODE_CXXFLAGS="-std=c++0x"
CXXFLAGS="$save_CFLAGS $COURIER_UNICODE_CXXFLAGS"
-AC_TRY_COMPILE([
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <string>
-], [
+]], [[
std::u32string s;
char32_t c;
- ],
+ ]])],
[
],
[
@@ -48,5 +51,6 @@ AC_MSG_ERROR([*** A compiler with C++11 Unicode support was not found])
])
])
CXXFLAGS="$save_FLAGS"
+
AC_LANG_POP([C++])
])