Artifact
ed4ec4704c12dfd22e304a89160fd33f7e36d00b:
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 35 37 29 0a 0a C_PREREQ(2.57)..
01f0: 41 43 5f 44 45 46 55 4e 28 5b 43 4c 5f 41 53 5f AC_DEFUN([CL_AS_
0200: 55 4e 44 45 52 53 43 4f 52 45 5d 2c 0a 5b 41 43 UNDERSCORE],.[AC
0210: 5f 42 45 46 4f 52 45 28 5b 24 30 5d 2c 20 5b 43 _BEFORE([$0], [C
0220: 4c 5f 47 4c 4f 42 41 4c 5f 43 4f 4e 53 54 52 55 L_GLOBAL_CONSTRU
0230: 43 54 4f 52 53 5d 29 0a 6d 34 5f 70 61 74 74 65 CTORS]).m4_patte
0240: 72 6e 5f 61 6c 6c 6f 77 28 5b 5e 41 53 5f 55 4e rn_allow([^AS_UN
0250: 44 45 52 53 43 4f 52 45 24 5d 29 0a 41 43 5f 43 DERSCORE$]).AC_C
0260: 41 43 48 45 5f 43 48 45 43 4b 28 66 6f 72 20 75 ACHE_CHECK(for u
0270: 6e 64 65 72 73 63 6f 72 65 20 69 6e 20 65 78 74 nderscore in ext
0280: 65 72 6e 61 6c 20 6e 61 6d 65 73 2c 20 63 6c 5f ernal names, cl_
0290: 63 76 5f 70 72 6f 67 5f 61 73 5f 75 6e 64 65 72 cv_prog_as_under
02a0: 73 63 6f 72 65 2c 20 5b 0a 63 61 74 20 3e 20 63 score, [.cat > c
02b0: 6f 6e 66 74 65 73 74 2e 63 20 3c 3c 45 4f 46 0a onftest.c <<EOF.
02c0: 23 69 66 64 65 66 20 5f 5f 63 70 6c 75 73 70 6c #ifdef __cpluspl
02d0: 75 73 0a 65 78 74 65 72 6e 20 22 43 22 0a 23 65 us.extern "C".#e
02e0: 6e 64 69 66 0a 69 6e 74 20 66 6f 6f 28 29 20 7b ndif.int foo() {
02f0: 20 72 65 74 75 72 6e 20 30 3b 20 7d 0a 45 4f 46 return 0; }.EOF
0300: 0a 23 20 6c 6f 6f 6b 20 66 6f 72 20 74 68 65 20 .# look for the
0310: 61 73 73 65 6d 62 6c 79 20 6c 61 6e 67 75 61 67 assembly languag
0320: 65 20 6e 61 6d 65 20 69 6e 20 74 68 65 20 2e 73 e name in the .s
0330: 20 66 69 6c 65 0a 41 43 5f 54 52 59 5f 43 4f 4d file.AC_TRY_COM
0340: 4d 41 4e 44 28 24 7b 43 43 2d 63 63 7d 20 2d 53 MAND(${CC-cc} -S
0350: 20 63 6f 6e 66 74 65 73 74 2e 63 29 20 3e 2f 64 conftest.c) >/d
0360: 65 76 2f 6e 75 6c 6c 20 32 3e 26 31 0a 69 66 20 ev/null 2>&1.if
0370: 67 72 65 70 20 5f 66 6f 6f 20 63 6f 6e 66 74 65 grep _foo confte
0380: 73 74 2e 73 20 3e 2f 64 65 76 2f 6e 75 6c 6c 20 st.s >/dev/null
0390: 3b 20 74 68 65 6e 0a 20 20 63 6c 5f 63 76 5f 70 ; then. cl_cv_p
03a0: 72 6f 67 5f 61 73 5f 75 6e 64 65 72 73 63 6f 72 rog_as_underscor
03b0: 65 3d 79 65 73 0a 65 6c 73 65 0a 20 20 63 6c 5f e=yes.else. cl_
03c0: 63 76 5f 70 72 6f 67 5f 61 73 5f 75 6e 64 65 72 cv_prog_as_under
03d0: 73 63 6f 72 65 3d 6e 6f 0a 66 69 0a 72 6d 20 2d score=no.fi.rm -
03e0: 66 20 63 6f 6e 66 74 65 73 74 2a 0a 5d 29 0a 69 f conftest*.]).i
03f0: 66 20 74 65 73 74 20 24 63 6c 5f 63 76 5f 70 72 f test $cl_cv_pr
0400: 6f 67 5f 61 73 5f 75 6e 64 65 72 73 63 6f 72 65 og_as_underscore
0410: 20 3d 20 79 65 73 3b 20 74 68 65 6e 0a 20 20 41 = yes; then. A
0420: 53 5f 55 4e 44 45 52 53 43 4f 52 45 3d 74 72 75 S_UNDERSCORE=tru
0430: 65 0a 20 20 41 43 5f 44 45 46 49 4e 45 28 5b 41 e. AC_DEFINE([A
0440: 53 4d 5f 55 4e 44 45 52 53 43 4f 52 45 5d 2c 5b SM_UNDERSCORE],[
0450: 5d 2c 5b 73 79 6d 62 6f 6c 73 20 61 72 65 20 70 ],[symbols are p
0460: 72 65 66 69 78 65 64 20 62 79 20 61 6e 20 75 6e refixed by an un
0470: 64 65 72 73 63 6f 72 65 20 69 6e 20 61 73 73 65 derscore in asse
0480: 6d 62 6c 79 20 6c 61 6e 67 75 61 67 65 5d 29 0a mbly language]).
0490: 65 6c 73 65 0a 20 20 41 53 5f 55 4e 44 45 52 53 else. AS_UNDERS
04a0: 43 4f 52 45 3d 66 61 6c 73 65 0a 66 69 0a 41 43 CORE=false.fi.AC
04b0: 5f 53 55 42 53 54 28 41 53 5f 55 4e 44 45 52 53 _SUBST(AS_UNDERS
04c0: 43 4f 52 45 29 64 6e 6c 0a 5d 29 0a CORE)dnl.]).