diff options
| -rw-r--r-- | imap/ChangeLog | 4 | ||||
| -rw-r--r-- | unicode/Makefile.am | 7 | ||||
| -rw-r--r-- | unicode/book.xml | 42 | ||||
| -rw-r--r-- | unicode/configure.ac | 7 | ||||
| -rw-r--r-- | unicode/courier-unicode.h.in | 2 | ||||
| -rw-r--r-- | unicode/courier-unicode.spec.in | 2 | ||||
| -rw-r--r-- | unicode/m4/courier-unicode.m4 | 76 | 
7 files changed, 136 insertions, 4 deletions
| diff --git a/imap/ChangeLog b/imap/ChangeLog index 871505e..91eaea6 100644 --- a/imap/ChangeLog +++ b/imap/ChangeLog @@ -1,3 +1,7 @@ +2017-03-11  Sam Varshavchik  <mrsam@courier-mta.com> + +	* courier-unicode library API update. +  2017-02-07  Sam Varshavchik  <mrsam@courier-mta.com>  	* libs/tcpd/libcouriertls.c: OpenSSL API update. diff --git a/unicode/Makefile.am b/unicode/Makefile.am index 8d81b02..a7a0783 100644 --- a/unicode/Makefile.am +++ b/unicode/Makefile.am @@ -2,6 +2,9 @@  # Copyright 2000-2017 Double Precision, Inc.  See COPYING for  # distribution information. +ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4 + +AM_CXXFLAGS= @COURIER_UNICODE_CXXFLAGS@  noinst_SCRIPTS=update.sh \  	mkultcase.pl unicodefilter.pl \ @@ -12,6 +15,9 @@ noinst_SCRIPTS=update.sh \  noinst_PROGRAMS=unicodetest graphemetest linebreaktest wordbreaktest \  	enttest scripttest +aclocaldir=$(datadir)/aclocal +aclocal_DATA=m4/courier-unicode.m4 +  update-www:  	@$(MAKE) update-www-unicode  	@$(MAKE) update-www-eastasia @@ -80,6 +86,7 @@ libcourier_unicode_la_SOURCES=\  libcourier_unicode_la_LDFLAGS=-version-info 4:0:0  EXTRA_DIST=$(noinst_SCRIPTS) $(man_MANS) $(PACKAGE).spec \ +	m4/courier-unicode.m4 \  	packaging/freebsd10/pkg-descr  if UPDATE_UNICODE diff --git a/unicode/book.xml b/unicode/book.xml index abd4115..6568762 100644 --- a/unicode/book.xml +++ b/unicode/book.xml @@ -9,7 +9,7 @@  <!-- -Copyright 2014-2015 Double Precision, Inc. +Copyright 2014-2017 Double Precision, Inc.  See COPYING for distribution information.  --> @@ -109,7 +109,45 @@ See COPYING for distribution information.      </para>      <para> -      The starting point is +      The Courier Unicode library installs an +      <application>autoconf</application> macro to probe for C++11 support. +      In your <filename>configure.ac</filename> +    </para> + +    <blockquote> +      <informalexample> +	<programlisting> +	  AX_COURIER_UNICODE_VERSION +	  AX_COURIER_UNICODE_CXXFLAGS + +	  AC_SUBST(COURIER_UNICODE_CXXFLAGS) +	</programlisting> +      </informalexample> +    </blockquote> + +    <para> +      Then, in <filename>Makefile.am</filename>: +    </para> + +    <blockquote> +      <informalexample> +	<programlisting> +	  AM_CXXFLAGS = @COURIER_UNICODE_CXXFLAGS@ +	</programlisting> +      </informalexample> +    </blockquote> + +    <para> +      The <varname>AX_COURIER_UNICODE_VERSION</varname> macro +      checks the minimum library version. +      <varname>AX_COURIER_UNICODE_CXXFLAGS</varname> sets +      <varname>COURIER_UNICODE_CXXFLAGS</varname> to the appropriate option +      for older gcc compilers that require an option to enable C++11 +      support. +    </para> + +    <para> +      The starting point for the library documentation is        <link linkend="courier-unicode">  	<citerefentry>  	  <refentrytitle>courier-unicode</refentrytitle> diff --git a/unicode/configure.ac b/unicode/configure.ac index 7d71cf8..cffd031 100644 --- a/unicode/configure.ac +++ b/unicode/configure.ac @@ -1,11 +1,13 @@  dnl Process this file with autoconf to produce a configure script. -AC_INIT([courier-unicode], [1.5.20170306], [courier-users@lists.sourceforge.net]) +AC_INIT([courier-unicode], [1.5.20170309], [courier-users@lists.sourceforge.net])  >confdefs.h  # Kill PACKAGE_ macros  AC_CONFIG_SRCDIR(unicodecpp.C) +AC_CONFIG_MACRO_DIR([m4]) +  LPATH="$PATH:/usr/local/bin"  AC_CONFIG_HEADERS(unicode_config.h) @@ -18,6 +20,9 @@ AC_PROG_INSTALL  AC_PROG_LN_S  AC_PROG_CC  AC_PROG_CXX +AX_COURIER_UNICODE_CFLAGS +AC_SUBST(COURIER_UNICODE_CXXFLAGS) +  AC_PATH_PROGS(PERL, perl5 perl, perl, $LPATH)  if test "$PERL" = "perl" diff --git a/unicode/courier-unicode.h.in b/unicode/courier-unicode.h.in index ac12d25..6bf9c17 100644 --- a/unicode/courier-unicode.h.in +++ b/unicode/courier-unicode.h.in @@ -40,6 +40,8 @@ typedef uint32_t char32_t;  #endif  #endif +#define COURIER_UNICODE_VERSION 200 +  /*  ** The system default character set, from the locale.  */ diff --git a/unicode/courier-unicode.spec.in b/unicode/courier-unicode.spec.in index bbec1e7..ce67c22 100644 --- a/unicode/courier-unicode.spec.in +++ b/unicode/courier-unicode.spec.in @@ -54,8 +54,8 @@ rm -rf $RPM_BUILD_ROOT  %{_libdir}/*.so  %{_libdir}/*.la  %{_libdir}/*.a +%{_datadir}/aclocal/*.m4  %changelog  * Sun Jan 12 2014 Sam Varshavchik <mrsam@octopus.email-scan.com> - 1.0  - Initial build. - diff --git a/unicode/m4/courier-unicode.m4 b/unicode/m4/courier-unicode.m4 new file mode 100644 index 0000000..06b544a --- /dev/null +++ b/unicode/m4/courier-unicode.m4 @@ -0,0 +1,76 @@ +dnl Sets the COURIER_UNICODE_CXXFLAGS variable to any additional compiler +dnl flags needed to build the courier-unicode package and packages that +dnl use the courier-unicode package. + +AC_DEFUN([AX_COURIER_UNICODE_CXXFLAGS],[ + +save_FLAGS="$CXXFLAGS" + +AC_LANG_PUSH([C++]) + +AC_TRY_COMPILE([ +#include <string> +], [ +     std::u32string s; +     char32_t c; +     ], +     [ +     ], +     [ + +COURIER_UNICODE_CXXFLAGS="-std=c++11" +CXXFLAGS="$save_CFLAGS $COURIER_UNICODE_CXXFLAGS" + +AC_TRY_COMPILE([ +#include <string> +], [ +     std::u32string s; +     char32_t c; +     ], +     [ +     ], +     [ + +COURIER_UNICODE_CXXFLAGS="-std=c++0x" +CXXFLAGS="$save_CFLAGS $COURIER_UNICODE_CXXFLAGS" + +AC_TRY_COMPILE([ +#include <string> +], [ +     std::u32string s; +     char32_t c; +     ], +     [ +     ], +     [ +AC_MSG_ERROR([*** A compiler with C++11 Unicode support was not found]) +]) +]) +]) +CXXFLAGS="$save_FLAGS" +AC_LANG_POP([C++]) +]) + +AC_DEFUN([AX_COURIER_UNICODE_VERSION],[ + +AC_MSG_CHECKING(courier-unicode library and version) + +AC_TRY_COMPILE([ +#include <courier-unicode.h> +#ifndef COURIER_UNICODE_VERSION +#define COURIER_UNICODE_VERSION 0 +#endif + +#if COURIER_UNICODE_VERSION < 200 +#error "courier-unicode 2.0 library is required" +#endif + +],[],[], +AC_MSG_ERROR([ +ERROR: The Courier Unicode Library 2.0 header files appear not to be installed. +You may need to upgrade the library or install a separate development +subpackage in addition to the main package.]) +) + +AC_MSG_RESULT([ok]) +]) | 
