changed configure.ac to accept yes:4w, yes:2w, no:4w, no:2w with enable-unicode

This commit is contained in:
hyung-hwan 2020-01-09 02:58:29 +00:00
parent c9854dd02c
commit 8d23aa3ab7
3 changed files with 58 additions and 7 deletions

34
hawk/configure vendored
View File

@ -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

View File

@ -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

View File

@ -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