From: Behdad Esfahbod Date: Mon, 10 Dec 2012 22:44:22 +0000 (-0500) Subject: [uniscribe] Enable Uniscribe backend only if it has ScriptShapeOpenType() X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5e7e52ddf2b0c4fbc9d933d24336100368d39a5c;p=platform%2Fupstream%2FlibHarfBuzzSharp.git [uniscribe] Enable Uniscribe backend only if it has ScriptShapeOpenType() Bug 55494 - ScriptItemizeOpenType doesn't exists under Windows XP --- diff --git a/config.h.in b/config.h.in index f465cc0..0973c93 100644 --- a/config.h.in +++ b/config.h.in @@ -114,12 +114,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H -/* Define to 1 if you have the header file. */ -#undef HAVE_USP10_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_WINDOWS_H - /* Define to 1 if you have the `_setmode' function. */ #undef HAVE__SETMODE diff --git a/configure.ac b/configure.ac index 49accd7..963af2e 100644 --- a/configure.ac +++ b/configure.ac @@ -208,7 +208,19 @@ AM_CONDITIONAL(HAVE_FREETYPE, $have_freetype) dnl =========================================================================== -AC_CHECK_HEADERS(usp10.h windows.h, have_uniscribe=true, have_uniscribe=false) +AC_MSG_CHECKING([for ScriptShapeOpenType in usp10]) +saved_LIBS=$LIBS +LIBS="$LIBS -lusp10 -lgdi32" +AC_LINK_IFELSE([AC_LANG_PROGRAM( + [[ + #define _WIN32_WINNT 0x0600 + #include + #include + ]], + ScriptShapeOpenType)], + [have_uniscribe=true; AC_MSG_RESULT(yes)], + [have_uniscribe=false;AC_MSG_RESULT(no)]) +LIBS=$saved_LIBS if $have_uniscribe; then UNISCRIBE_CFLAGS= UNISCRIBE_LIBS="-lusp10 -lgdi32"