diff options
author | axel <axel@liljencrantz.se> | 2006-03-02 21:29:17 +1000 |
---|---|---|
committer | axel <axel@liljencrantz.se> | 2006-03-02 21:29:17 +1000 |
commit | 82bff9f40745bd807f0a95d39fdd602c4cf17b12 (patch) | |
tree | ffddd9d572c068de3a006d47f243c12a5c816123 /configure.ac | |
parent | 3b6d8756eaad427743bf1830a37dbdc7dab9f2d0 (diff) |
Unbreak fwprintf autoconf check cpp symbols
darcs-hash:20060302112917-ac50b-29d524dc3df09ad9a6e88669e6c20f46677ec2ee.gz
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/configure.ac b/configure.ac index 6ac3624d..bd66b43a 100644 --- a/configure.ac +++ b/configure.ac @@ -179,28 +179,29 @@ fi if test "$ac_cv_func_fwprintf" = yes; then -# Check if fwprintf is broken -AC_MSG_CHECKING([if fwprintf is broken]) -AC_RUN_IFELSE( - [AC_LANG_PROGRAM([ + # Check if fwprintf is broken + AC_MSG_CHECKING([if fwprintf is broken]) + AC_RUN_IFELSE( + [AC_LANG_PROGRAM([ #include <stdlib.h> #include <stdio.h> #include <locale.h> #include <wchar.h> -],[ - setlocale( LC_ALL, "" ); - fwprintf( stderr, L"%ls%ls", L"", L"fish:" ); -])], - [fwprintf_broken=no], - [fwprintf_broken=yes] ) - -if test "$fwprintf_broken" = yes; then - AC_MSG_RESULT(yes) - AC_DEFINE([HAVE_FWPRINTF], [0], - [Undefined if no fwprintf implementation exists, defined to 0 if fwprintf exist but is broken, 1 if it exists and works]) -else - AC_MSG_RESULT(no) -fi + ], + [ + setlocale( LC_ALL, "" ); + fwprintf( stderr, L"%ls%ls", L"", L"fish:" ); + ])], + [fwprintf_broken=no], + [fwprintf_broken=yes] ) + + if test "$fwprintf_broken" = yes; then + AC_MSG_RESULT(yes) + AC_DEFINE([HAVE_BROKEN_FWPRINTF], [1], + [Define to 1 one if the implemented fwprintf is broken]) + else + AC_MSG_RESULT(no) + fi fi |