~ubuntu-branches/ubuntu/hardy/autoconf-archive/hardy

« back to all changes in this revision

Viewing changes to m4source/vl_check_sign.m4

  • Committer: Bazaar Package Importer
  • Author(s): Martin A. Godisch
  • Date: 2004-06-26 09:43:57 UTC
  • Revision ID: james.westby@ubuntu.com-20040626094357-3be3jwcz1vcdhpe8
Tags: upstream-20040616
ImportĀ upstreamĀ versionĀ 20040616

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl Available from the GNU Autoconf Macro Archive at:
 
2
dnl http://www.gnu.org/software/ac-archive/htmldoc/vl_check_sign.html
 
3
dnl
 
4
AC_DEFUN([VL_CHECK_SIGN], [
 
5
 typename=`echo $1 | sed "s/@<:@^a-zA-Z0-9_@:>@/_/g"`
 
6
 AC_CACHE_CHECK([whether $1 is signed], vl_cv_decl_${typename}_signed, [
 
7
   AC_TRY_COMPILE([$4],
 
8
     [ int foo @<:@ 1 - 2 * !((($1) -1) < 0) @:>@ ],
 
9
     [ eval "vl_cv_decl_${typename}_signed=\"yes\"" ],
 
10
     [ eval "vl_cv_decl_${typename}_signed=\"no\"" ])])
 
11
 symbolname=`echo $1 | sed "s/@<:@^a-zA-Z0-9_@:>@/_/g" | tr "a-z" "A-Z"`
 
12
 if eval "test \"\${vl_cv_decl_${typename}_signed}\" = \"yes\""; then
 
13
   $2
 
14
 elif eval "test \"\${vl_cv_decl_${typename}_signed}\" = \"no\""; then
 
15
   $3
 
16
 fi
 
17
])dnl