~ubuntu-branches/ubuntu/lucid/mc/lucid

« back to all changes in this revision

Viewing changes to m4/intdiv0.m4

  • Committer: Bazaar Package Importer
  • Author(s): Patrick Winnertz
  • Date: 2008-09-16 10:38:59 UTC
  • mfrom: (3.1.6 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080916103859-2uwn8w61xk5mbxxq
Tags: 2:4.6.2~git20080311-4
Corrected fix for odt2txt issue (Closes: #492019) 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# intdiv0.m4 serial 1 (gettext-0.11.3)
2
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3
 
dnl This file is free software, distributed under the terms of the GNU
4
 
dnl General Public License.  As a special exception to the GNU General
5
 
dnl Public License, this file may be distributed as part of a program
6
 
dnl that contains a configuration script generated by Autoconf, under
7
 
dnl the same distribution terms as the rest of that program.
 
1
# intdiv0.m4 serial 2 (gettext-0.16.2)
 
2
dnl Copyright (C) 2002, 2007 Free Software Foundation, Inc.
 
3
dnl This file is free software; the Free Software Foundation
 
4
dnl gives unlimited permission to copy and/or distribute it,
 
5
dnl with or without modifications, as long as this notice is preserved.
8
6
 
9
7
dnl From Bruno Haible.
10
8
 
16
14
  AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
17
15
    gt_cv_int_divbyzero_sigfpe,
18
16
    [
19
 
      AC_TRY_RUN([
 
17
      gt_cv_int_divbyzero_sigfpe=
 
18
changequote(,)dnl
 
19
      case "$host_os" in
 
20
        macos* | darwin[6-9]* | darwin[1-9][0-9]*)
 
21
          # On MacOS X 10.2 or newer, just assume the same as when cross-
 
22
          # compiling. If we were to perform the real test, 1 Crash Report
 
23
          # dialog window would pop up.
 
24
          case "$host_cpu" in
 
25
            i[34567]86 | x86_64)
 
26
              gt_cv_int_divbyzero_sigfpe="guessing yes" ;;
 
27
          esac
 
28
          ;;
 
29
      esac
 
30
changequote([,])dnl
 
31
      if test -z "$gt_cv_int_divbyzero_sigfpe"; then
 
32
        AC_TRY_RUN([
20
33
#include <stdlib.h>
21
34
#include <signal.h>
22
35
 
23
36
static void
24
 
#ifdef __cplusplus
25
37
sigfpe_handler (int sig)
26
 
#else
27
 
sigfpe_handler (sig) int sig;
28
 
#endif
29
38
{
30
39
  /* Exit with code 0 if SIGFPE, with code 1 if any other signal.  */
31
40
  exit (sig != SIGFPE);
53
62
  exit (1);
54
63
}
55
64
], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
56
 
        [
57
 
          # Guess based on the CPU.
58
 
          case "$host_cpu" in
59
 
            alpha* | i[34567]86 | m68k | s390*)
60
 
              gt_cv_int_divbyzero_sigfpe="guessing yes";;
61
 
            *)
62
 
              gt_cv_int_divbyzero_sigfpe="guessing no";;
63
 
          esac
64
 
        ])
 
65
          [
 
66
            # Guess based on the CPU.
 
67
changequote(,)dnl
 
68
            case "$host_cpu" in
 
69
              alpha* | i[34567]86 | x86_64 | m68k | s390*)
 
70
                gt_cv_int_divbyzero_sigfpe="guessing yes";;
 
71
              *)
 
72
                gt_cv_int_divbyzero_sigfpe="guessing no";;
 
73
            esac
 
74
changequote([,])dnl
 
75
          ])
 
76
      fi
65
77
    ])
66
78
  case "$gt_cv_int_divbyzero_sigfpe" in
67
79
    *yes) value=1;;