Artifact
99b8374f6631b3da77138af2318b7bab1c946b7f:
0000: 64 6e 6c 20 2d 2a 2d 20 41 75 74 6f 63 6f 6e 66 dnl -*- Autoconf
0010: 20 2d 2a 2d 0a 64 6e 6c 20 43 6f 70 79 72 69 67 -*-.dnl Copyrig
0020: 68 74 20 28 43 29 20 31 39 39 33 2d 32 30 30 39 ht (C) 1993-2009
0030: 20 46 72 65 65 20 53 6f 66 74 77 61 72 65 20 46 Free Software F
0040: 6f 75 6e 64 61 74 69 6f 6e 2c 20 49 6e 63 2e 0a oundation, Inc..
0050: 64 6e 6c 20 54 68 69 73 20 66 69 6c 65 20 69 73 dnl This file is
0060: 20 66 72 65 65 20 73 6f 66 74 77 61 72 65 2c 20 free software,
0070: 64 69 73 74 72 69 62 75 74 65 64 20 75 6e 64 65 distributed unde
0080: 72 20 74 68 65 20 74 65 72 6d 73 20 6f 66 20 74 r the terms of t
0090: 68 65 20 47 4e 55 0a 64 6e 6c 20 47 65 6e 65 72 he GNU.dnl Gener
00a0: 61 6c 20 50 75 62 6c 69 63 20 4c 69 63 65 6e 73 al Public Licens
00b0: 65 2e 20 20 41 73 20 61 20 73 70 65 63 69 61 6c e. As a special
00c0: 20 65 78 63 65 70 74 69 6f 6e 20 74 6f 20 74 68 exception to th
00d0: 65 20 47 4e 55 20 47 65 6e 65 72 61 6c 0a 64 6e e GNU General.dn
00e0: 6c 20 50 75 62 6c 69 63 20 4c 69 63 65 6e 73 65 l Public License
00f0: 2c 20 74 68 69 73 20 66 69 6c 65 20 6d 61 79 20 , this file may
0100: 62 65 20 64 69 73 74 72 69 62 75 74 65 64 20 61 be distributed a
0110: 73 20 70 61 72 74 20 6f 66 20 61 20 70 72 6f 67 s part of a prog
0120: 72 61 6d 0a 64 6e 6c 20 74 68 61 74 20 63 6f 6e ram.dnl that con
0130: 74 61 69 6e 73 20 61 20 63 6f 6e 66 69 67 75 72 tains a configur
0140: 61 74 69 6f 6e 20 73 63 72 69 70 74 20 67 65 6e ation script gen
0150: 65 72 61 74 65 64 20 62 79 20 41 75 74 6f 63 6f erated by Autoco
0160: 6e 66 2c 20 75 6e 64 65 72 0a 64 6e 6c 20 74 68 nf, under.dnl th
0170: 65 20 73 61 6d 65 20 64 69 73 74 72 69 62 75 74 e same distribut
0180: 69 6f 6e 20 74 65 72 6d 73 20 61 73 20 74 68 65 ion terms as the
0190: 20 72 65 73 74 20 6f 66 20 74 68 61 74 20 70 72 rest of that pr
01a0: 6f 67 72 61 6d 2e 0a 0a 64 6e 6c 20 46 72 6f 6d ogram...dnl From
01b0: 20 42 72 75 6e 6f 20 48 61 69 62 6c 65 2c 20 4d Bruno Haible, M
01c0: 61 72 63 75 73 20 44 61 6e 69 65 6c 73 2c 20 53 arcus Daniels, S
01d0: 61 6d 20 53 74 65 69 6e 67 6f 6c 64 2e 0a 0a 41 am Steingold...A
01e0: 43 5f 50 52 45 52 45 51 28 32 2e 31 33 29 0a 0a C_PREREQ(2.13)..
01f0: 41 43 5f 44 45 46 55 4e 28 5b 49 52 45 47 5f 44 AC_DEFUN([IREG_D
0200: 4f 43 5d 2c 5b 77 68 65 74 68 65 72 20 66 6c 6f OC],[whether flo
0210: 61 74 73 20 61 72 65 20 72 65 74 75 72 6e 65 64 ats are returned
0220: 20 69 6e 20 69 6e 74 65 67 65 72 20 72 65 67 69 in integer regi
0230: 73 74 65 72 73 5d 29 0a 41 43 5f 44 45 46 55 4e sters]).AC_DEFUN
0240: 28 5b 46 46 43 41 4c 4c 5f 49 52 45 47 5f 46 4c ([FFCALL_IREG_FL
0250: 4f 41 54 5f 52 45 54 55 52 4e 5d 2c 5b 64 6e 6c OAT_RETURN],[dnl
0260: 0a 41 43 5f 43 41 43 48 45 5f 43 48 45 43 4b 28 .AC_CACHE_CHECK(
0270: 49 52 45 47 5f 44 4f 43 2c 20 66 66 63 61 6c 6c IREG_DOC, ffcall
0280: 5f 63 76 5f 63 5f 66 6c 6f 61 74 5f 72 65 74 75 _cv_c_float_retu
0290: 72 6e 5f 69 72 65 67 2c 20 5b 41 43 5f 54 52 59 rn_ireg, [AC_TRY
02a0: 5f 52 55 4e 28 47 4c 5f 4e 4f 43 52 41 53 48 5b _RUN(GL_NOCRASH[
02b0: 0a 66 6c 6f 61 74 20 78 20 3d 20 28 66 6c 6f 61 .float x = (floa
02c0: 74 29 31 2e 32 3b 0a 66 6c 6f 61 74 20 79 20 3d t)1.2;.float y =
02d0: 20 28 66 6c 6f 61 74 29 31 2e 33 3b 0a 66 6c 6f (float)1.3;.flo
02e0: 61 74 20 66 75 6e 20 28 29 20 7b 20 72 65 74 75 at fun () { retu
02f0: 72 6e 20 78 2a 79 3b 20 7d 0a 69 6e 74 20 6d 61 rn x*y; }.int ma
0300: 69 6e 28 29 0a 7b 20 6e 6f 63 72 61 73 68 5f 69 in().{ nocrash_i
0310: 6e 69 74 28 29 3b 0a 20 7b 69 6e 74 20 76 61 6c nit();. {int val
0320: 20 3d 20 28 2a 20 28 69 6e 74 20 28 2a 29 20 28 = (* (int (*) (
0330: 29 29 20 66 75 6e 29 20 28 29 3b 0a 20 20 72 65 )) fun) ();. re
0340: 74 75 72 6e 20 21 28 76 61 6c 20 3d 3d 20 30 78 turn !(val == 0x
0350: 33 46 43 37 41 45 31 35 20 7c 7c 20 76 61 6c 20 3FC7AE15 || val
0360: 3d 3d 20 30 78 31 35 41 45 43 37 33 46 29 3b 0a == 0x15AEC73F);.
0370: 7d 7d 5d 2c 20 66 66 63 61 6c 6c 5f 63 76 5f 63 }}], ffcall_cv_c
0380: 5f 66 6c 6f 61 74 5f 72 65 74 75 72 6e 5f 69 72 _float_return_ir
0390: 65 67 3d 79 65 73 2c 20 66 66 63 61 6c 6c 5f 63 eg=yes, ffcall_c
03a0: 76 5f 63 5f 66 6c 6f 61 74 5f 72 65 74 75 72 6e v_c_float_return
03b0: 5f 69 72 65 67 3d 6e 6f 2c 0a 64 6e 6c 20 57 68 _ireg=no,.dnl Wh
03c0: 65 6e 20 63 72 6f 73 73 2d 63 6f 6d 70 69 6c 69 en cross-compili
03d0: 6e 67 2c 20 61 73 73 75 6d 65 20 6e 6f 2c 20 62 ng, assume no, b
03e0: 65 63 61 75 73 65 20 74 68 61 74 27 73 20 68 6f ecause that's ho
03f0: 77 20 69 74 20 63 6f 6d 65 73 20 6f 75 74 20 6f w it comes out o
0400: 6e 0a 64 6e 6c 20 6d 6f 73 74 20 70 6c 61 74 66 n.dnl most platf
0410: 6f 72 6d 73 20 77 69 74 68 20 66 6c 6f 61 74 69 orms with floati
0420: 6e 67 2d 70 6f 69 6e 74 20 75 6e 69 74 2c 20 69 ng-point unit, i
0430: 6e 63 6c 75 64 69 6e 67 20 6d 36 38 6b 2d 6c 69 ncluding m68k-li
0440: 6e 75 78 2e 0a 66 66 63 61 6c 6c 5f 63 76 5f 63 nux..ffcall_cv_c
0450: 5f 66 6c 6f 61 74 5f 72 65 74 75 72 6e 5f 69 72 _float_return_ir
0460: 65 67 3d 22 67 75 65 73 73 69 6e 67 20 6e 6f 22 eg="guessing no"
0470: 29 0a 5d 29 0a 63 61 73 65 20 22 24 66 66 63 61 ).]).case "$ffca
0480: 6c 6c 5f 63 76 5f 63 5f 66 6c 6f 61 74 5f 72 65 ll_cv_c_float_re
0490: 74 75 72 6e 5f 69 72 65 67 22 20 69 6e 0a 20 20 turn_ireg" in.
04a0: 2a 79 65 73 29 20 41 43 5f 44 45 46 49 4e 45 28 *yes) AC_DEFINE(
04b0: 5b 5f 5f 49 52 45 47 5f 46 4c 4f 41 54 5f 52 45 [__IREG_FLOAT_RE
04c0: 54 55 52 4e 5f 5f 5d 2c 20 5b 5d 2c 20 49 52 45 TURN__], [], IRE
04d0: 47 5f 44 4f 43 29 20 3b 3b 0a 20 20 2a 6e 6f 29 G_DOC) ;;. *no)
04e0: 20 3b 3b 0a 65 73 61 63 0a 5d 29 0a ;;.esac.]).