diff --git a/hawk/configure b/hawk/configure index af6cd114..aeebc511 100755 --- a/hawk/configure +++ b/hawk/configure @@ -18371,7 +18371,7 @@ else fi -if test "${enable_unicode}" = "yes:4" +if test "${enable_unicode}" = "yes:4" -o "${enable_unicode}" = "yes:4w" then $as_echo "#define HAWK_UNICODE_SIZE 4" >>confdefs.h @@ -18390,7 +18390,14 @@ $as_echo "#define HAWK_ENABLE_UNICODE 1" >>confdefs.h CFLAGS="$CFLAGS -fno-short-wchar" CXXFLAGS="$CXXFLAGS -fno-short-wchar" fi -elif test "${enable_unicode}" = "yes:2" -o "${enable_unicode}" = "yes" + if test "${enable_unicode}" = "yes:4w" + then + +$as_echo "#define HAWK_PREFER_PREFIX_L 1" >>confdefs.h + + fi + +elif test "${enable_unicode}" = "yes:2" -o "${enable_unicode}" = "yes:2w" -o "${enable_unicode}" = "yes" then $as_echo "#define HAWK_UNICODE_SIZE 2" >>confdefs.h @@ -18408,7 +18415,14 @@ $as_echo "#define HAWK_ENABLE_UNICODE 1" >>confdefs.h CFLAGS="$CFLAGS -fshort-wchar" CXXFLAGS="$CXXFLAGS -fshort-wchar" fi -elif test "${enable_unicode}" = "no:4" + if test "${enable_unicode}" = "yes:2w" + then + +$as_echo "#define HAWK_PREFER_PREFIX_L 1" >>confdefs.h + + fi + +elif test "${enable_unicode}" = "no:4" -o test "${enable_unicode}" = "no:4w" then $as_echo "#define HAWK_UNICODE_SIZE 4" >>confdefs.h @@ -18419,6 +18433,13 @@ $as_echo "#define HAWK_UNICODE_SIZE 4" >>confdefs.h CFLAGS="$CFLAGS -fno-short-wchar" CXXFLAGS="$CXXFLAGS -fno-short-wchar" fi + + if test "${enable_unicode}" = "no:4w" + then + +$as_echo "#define HAWK_PREFER_PREFIX_L 1" >>confdefs.h + + fi else $as_echo "#define HAWK_UNICODE_SIZE 2" >>confdefs.h @@ -18429,6 +18450,13 @@ $as_echo "#define HAWK_UNICODE_SIZE 2" >>confdefs.h CFLAGS="$CFLAGS -fshort-wchar" CXXFLAGS="$CXXFLAGS -fshort-wchar" fi + + if test "${enable_unicode}" = "no:2w" + then + +$as_echo "#define HAWK_PREFER_PREFIX_L 1" >>confdefs.h + + fi fi diff --git a/hawk/configure.ac b/hawk/configure.ac index 79d78139..0bd22ee5 100644 --- a/hawk/configure.ac +++ b/hawk/configure.ac @@ -99,7 +99,7 @@ AC_ARG_ENABLE([unicode], enable_unicode=$enableval, enable_unicode=yes ) -if test "${enable_unicode}" = "yes:4" +if test "${enable_unicode}" = "yes:4" -o "${enable_unicode}" = "yes:4w" then AC_DEFINE([HAWK_UNICODE_SIZE],[4],[Unicode character type size]) AC_DEFINE([HAWK_ENABLE_UNICODE],[1],[Use the unicode character type as the default character type]) @@ -114,7 +114,12 @@ then [CFLAGS="$CFLAGS -fno-short-wchar"] [CXXFLAGS="$CXXFLAGS -fno-short-wchar"] fi -elif test "${enable_unicode}" = "yes:2" -o "${enable_unicode}" = "yes" + if test "${enable_unicode}" = "yes:4w" + then + AC_DEFINE([HAWK_PREFER_PREFIX_L],[1],[Prefix unicode literals with L]) + fi + +elif test "${enable_unicode}" = "yes:2" -o "${enable_unicode}" = "yes:2w" -o "${enable_unicode}" = "yes" then AC_DEFINE([HAWK_UNICODE_SIZE],[2],[Unicode character type size]) AC_DEFINE([HAWK_ENABLE_UNICODE],[1],[Use the unicode character type as the default character type]) @@ -128,7 +133,12 @@ then [CFLAGS="$CFLAGS -fshort-wchar"] [CXXFLAGS="$CXXFLAGS -fshort-wchar"] fi -elif test "${enable_unicode}" = "no:4" + if test "${enable_unicode}" = "yes:2w" + then + AC_DEFINE([HAWK_PREFER_PREFIX_L],[1],[Prefix unicode literals with L]) + fi + +elif test "${enable_unicode}" = "no:4" -o test "${enable_unicode}" = "no:4w" then AC_DEFINE([HAWK_UNICODE_SIZE],[4],[Unicode character type size]) @@ -137,8 +147,13 @@ then [CFLAGS="$CFLAGS -fno-short-wchar"] [CXXFLAGS="$CXXFLAGS -fno-short-wchar"] fi + + if test "${enable_unicode}" = "no:4w" + then + AC_DEFINE([HAWK_PREFER_PREFIX_L],[1],[Prefix unicode literals with L]) + fi else - dnl no:2, no, or anything else + dnl no:2, no:2w, no, or anything else AC_DEFINE([HAWK_UNICODE_SIZE],[2],[Unicode character type size]) if test "${ac_cv_cflags__fshort_wchar}" = "yes" @@ -146,6 +161,11 @@ else [CFLAGS="$CFLAGS -fshort-wchar"] [CXXFLAGS="$CXXFLAGS -fshort-wchar"] fi + + if test "${enable_unicode}" = "no:2w" + then + AC_DEFINE([HAWK_PREFER_PREFIX_L],[1],[Prefix unicode literals with L]) + fi fi diff --git a/hawk/lib/hawk-cfg.h.in b/hawk/lib/hawk-cfg.h.in index fa1caca0..53ba8e19 100644 --- a/hawk/lib/hawk-cfg.h.in +++ b/hawk/lib/hawk-cfg.h.in @@ -747,6 +747,9 @@ /* PATH_MAX */ #undef HAWK_PATH_MAX +/* Prefix unicode literals with L */ +#undef HAWK_PREFER_PREFIX_L + /* Define if pthread_cond_t is signed */ #undef HAWK_PTHREAD_MUTEX_T_IS_SIGNED