Please check the GNU Autoconf Macro Archive for Updates
AC-Archive
Autoconf Macro Archive

ac-archive.sf.net: - Project CVS - Download
Macro Index
- AM Support
- C++ Support
- C Support
- Fortran Support
- Java Support
- Cross Compilation
- Installed Packages
- Miscellaneous
- LaTeX Support
- Uncategorized
- archive macros
- adl's macros
- bkorb's macros
- guidod's macros
- latex's macros
- other's macros
- rleigh's macros
- obsoleted macros
- released macros
- search index

Documentation
- Contribute!
- History
- acincludedir m4
- acinclude (tool)
- macro howto
- ax tricks
- maintainers
- License
- Topics

generated...
2007年08月05日

(C) 2007 guidod
Synopsis
VL_CHECK_SIGN (TYPE, [ACTION-IF-SIGNED], [ACTION-IF-UNSIGNED], [INCLUDES])
, 
Version

2002年04月04日

Author

Ville Laurikari <vl@iki.fi>

License

AllPermissive
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. Users of this software should generally follow the principles of the MIT License includings its disclaimer.

Category

cryp.to ac-archive's C Support (released)

Documentation

Checks whether TYPE is signed or not. If no INCLUDES are specified, the default includes are used. If ACTION-IF-SIGNED is given, it is additional shell code to execute when the type is signed. If ACTION-IF-UNSIGNED is given, it is executed when the type is unsigned.

This macro assumes that the type exists. Therefore the existence of the type should be checked before calling this macro. For example:

 AC_CHECK_HEADERS([wchar.h])
 AC_CHECK_TYPE([wchar_t],,[ AC_MSG_ERROR([Type wchar_t not found.]) ])
 VL_CHECK_SIGN([wchar_t],
 [ AC_DEFINE(WCHAR_T_SIGNED, 1, [Define if wchar_t is signed]) ],
 [ AC_DEFINE(WCHAR_T_UNSIGNED, 1, [Define if wchar_t is unsigned]) ], [
 #ifdef HAVE_WCHAR_H
 #include <wchar.h>
 #endif
 ])
M4 Source Code
AC_DEFUN([VL_CHECK_SIGN], [
 typename=`echo 1ドル | sed "s/@&lt;:@^a-zA-Z0-9_@:&gt;@/_/g"`
 AC_CACHE_CHECK([whether 1ドル is signed], vl_cv_decl_${typename}_signed, [
 AC_TRY_COMPILE([4ドル],
 [ int foo @&lt;:@ 1 - 2 * !(((1ドル) -1) &lt; 0) @:&gt;@ ],
 [ eval "vl_cv_decl_${typename}_signed=\"yes\"" ],
 [ eval "vl_cv_decl_${typename}_signed=\"no\"" ])])
 symbolname=`echo 1ドル | sed "s/@&lt;:@^a-zA-Z0-9_@:&gt;@/_/g" | tr "a-z" "A-Z"`
 if eval "test \"\${vl_cv_decl_${typename}_signed}\" = \"yes\""; then
 2ドル
 elif eval "test \"\${vl_cv_decl_${typename}_signed}\" = \"no\""; then
 3ドル
 fi
])dnl

AltStyle によって変換されたページ (->オリジナル) /