MOO_XT_DECLARE_EXTENSIONS([ ### Everything above this line is boilerplate; do not edit. ##================== %%extension unicode ##================== %disabled %? Character set: --enable- unicode = KWD,.. %?- use original ASCII charset %? support unicode %cdefine UNICODE_%s %option strings %alt strs %alt core %? in STR values and nonbinary connections %option numbers %alt nums %? in numeric constants %implies strs %option identifiers %alt ids %? in variable names %implies strs %option_set code = ids,nums %option_set all = code %option_set yes = strs XT_CSRCS = utf.c %require uclib --with- uclib = LIB,.. %? choose Unicode character data source: %?* (gnu=unistring, icu, ucd) %cdefine UNICODE_DATA UD_%s %lib unistring GNU %alt gnu %ac AC_SEARCH_LIBS([[unicode_character_name]], [[unistring]], [%USE%]) %lib icu %ac MOO_LIB_ICUUC([%USE%]) %lib ucd %ac AC_SEARCH_LIBS([[unicode_character_data]], [[ucd]], [%USE%]) %build --with- ucdpath = DIR %? use specified ucd build as uclib %dirvar ucd_dir CPPFLAGS = -I$(ucd_dir) XT_LOBJS = $(ucd_dir)/libucd.a %make <, ) # AC_DEFUN([MOO_LIB_ICUUC], [AC_CACHE_CHECK([[for icu being installed]],[moo_cv_icuuc_lib],[[ _moo_save_libs=$LIBS moo_cv_icuuc_lib= LIBS="-licuuc $_moo_save_libs"] AC_LINK_IFELSE([AC_LANG_PROGRAM( [[@%:@include ]], [[UChar32 c; int j = u_charDigitValue(c);]])],[[ moo_cv_icuuc_lib=yes ]],[[ moo_cv_icuuc_lib=no ]]) LIBS=$_moo_save_libs]) AS_IF([[test "$moo_cv_icuuc_lib" = yes]],[[ LIBS="-licuuc $LIBS"] $1],[$2])]) # MOO_LIB_PCRE1( , , ) # AC_DEFUN([MOO_LIB_PCRE1], [AC_CHECK_LIB([pcre], [pcre_exec], [ AC_CACHE_CHECK([[whether -lpcre was built with required features]], [moo_lib_cv_pcre_utf8], [[_moo_save_libs=$LIBS LIBS="-lpcre $LIBS"] AC_RUN_IFELSE([AC_LANG_PROGRAM([[@%:@ include ]],[[ int have_utf8, have_props; pcre_config(PCRE_CONFIG_UTF8, &have_utf8); pcre_config(PCRE_CONFIG_UNICODE_PROPERTIES, &have_props); return (have_utf8 && have_props) ? 0 : 1; ]])], [[moo_lib_cv_pcre_utf8=yes]], [[moo_lib_cv_pcre_utf8=no]])[ LIBS=$_moo_save_libs]]) AS_IF([[test $moo_lib_cv_pcre_utf8 = yes]],[[ LIBS="-lpcre $LIBS"] $1], [$3])], [[moo_lib_cv_pcre_utf8=no] $2])]) ### The next closing paren is boilerplate; do not edit. )dnl --- end of extensions.ac ---