cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1 | dnl @synopsis AC_CXX_HAVE_LSTRING |
| 2 | dnl |
| 3 | dnl If the compiler can prevent names clashes using namespaces, define |
| 4 | dnl HAVE_LSTRING. |
| 5 | dnl |
| 6 | dnl @category Cxx |
| 7 | dnl @author James Berry |
| 8 | dnl @version 2005-02-21 |
| 9 | dnl @license AllPermissive |
| 10 | |
| 11 | AC_DEFUN([AC_CXX_HAVE_LSTRING], |
| 12 | [AC_CACHE_CHECK([whether the compiler implements L"widestring"], |
| 13 | ac_cv_cxx_have_lstring, |
| 14 | [AC_LANG_SAVE |
| 15 | AC_LANG_CPLUSPLUS |
| 16 | AC_COMPILE_IFELSE( |
| 17 | AC_LANG_SOURCE( |
| 18 | [[const wchar_t* s=L"wide string";]]), |
| 19 | ac_cv_cxx_have_lstring=yes, ac_cv_cxx_have_lstring=no) |
| 20 | AC_LANG_RESTORE |
| 21 | ]) |
| 22 | if test "$ac_cv_cxx_have_lstring" = yes; then |
| 23 | AC_DEFINE(HAVE_LSTRING,,[define if the compiler implements L"widestring"]) |
| 24 | fi |
| 25 | ]) |