annotate m4/csharpcomp.m4 @ 18079:4c948fd76734 default tip master

autoupdate
author Karl Berry <karl@freefriends.org>
date Mon, 24 Aug 2015 06:09:19 -0700
parents ab58d4870664
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11007
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 9457
diff changeset
1 # csharpcomp.m4 serial 8
17848
ab58d4870664 version-etc: new year
Paul Eggert <eggert@cs.ucla.edu>
parents: 17587
diff changeset
2 dnl Copyright (C) 2003-2005, 2007, 2009-2015 Free Software Foundation, Inc.
5913
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3 dnl This file is free software; the Free Software Foundation
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4 dnl gives unlimited permission to copy and/or distribute it,
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 dnl with or without modifications, as long as this notice is preserved.
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 # Prerequisites of csharpcomp.sh.
7011
c91111628d88 Update csharpcomp module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5913
diff changeset
8 # Checks for a C# compiler.
c91111628d88 Update csharpcomp module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5913
diff changeset
9 # Sets at most one of HAVE_CSCC, HAVE_MCS, HAVE_CSC.
5913
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 # Sets HAVE_CSHARPCOMP to nonempty if csharpcomp.sh will work.
7011
c91111628d88 Update csharpcomp module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5913
diff changeset
11 # Also sets CSHARPCOMPFLAGS.
5913
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 AC_DEFUN([gt_CSHARPCOMP],
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13 [
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14 AC_REQUIRE([gt_CSHARP_CHOICE])
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
15 AC_MSG_CHECKING([for C[#] compiler])
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16 HAVE_CSHARPCOMP=1
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17 pushdef([AC_MSG_CHECKING],[:])dnl
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18 pushdef([AC_CHECKING],[:])dnl
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
19 pushdef([AC_MSG_RESULT],[:])dnl
11007
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 9457
diff changeset
20 AC_CHECK_PROG([HAVE_CSCC_IN_PATH], [cscc], [yes])
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 9457
diff changeset
21 AC_CHECK_PROG([HAVE_MCS_IN_PATH], [mcs], [yes])
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 9457
diff changeset
22 AC_CHECK_PROG([HAVE_CSC_IN_PATH], [csc], [yes])
5913
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
23 popdef([AC_MSG_RESULT])dnl
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24 popdef([AC_CHECKING])dnl
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
25 popdef([AC_MSG_CHECKING])dnl
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
26 for impl in "$CSHARP_CHOICE" pnet mono sscli no; do
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
27 case "$impl" in
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
28 pnet)
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
29 if test -n "$HAVE_CSCC_IN_PATH" \
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
30 && cscc --version >/dev/null 2>/dev/null \
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
31 && (
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
32 # See if pnetlib is well installed.
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
33 echo 'class ConfTest { static void Main() { } }' > conftest.cs
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
34 cscc -o conftest.exe conftest.cs 2>/dev/null
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
35 error=$?
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
36 rm -f conftest.cs conftest.exe
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
37 exit $error
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
38 ); then
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
39 HAVE_CSCC=1
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
40 ac_result="cscc"
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
41 break
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
42 fi
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
43 ;;
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
44 mono)
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
45 if test -n "$HAVE_MCS_IN_PATH" \
9173
6d92d3b331ed Fix mis-recognition of 'mcs' on QNX 6.
Bruno Haible <bruno@clisp.org>
parents: 7011
diff changeset
46 && mcs --version >/dev/null 2>/dev/null \
6d92d3b331ed Fix mis-recognition of 'mcs' on QNX 6.
Bruno Haible <bruno@clisp.org>
parents: 7011
diff changeset
47 && mcs --version 2>/dev/null | grep Mono >/dev/null; then
5913
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
48 HAVE_MCS=1
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
49 ac_result="mcs"
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
50 break
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
51 fi
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
52 ;;
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
53 sscli)
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
54 if test -n "$HAVE_CSC_IN_PATH" \
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
55 && csc -help >/dev/null 2>/dev/null \
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
56 && { if csc -help 2>/dev/null | grep -i chicken > /dev/null; then false; else true; fi; }; then
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
57 HAVE_CSC=1
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
58 ac_result="csc"
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
59 break
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
60 fi
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
61 ;;
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
62 no)
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
63 HAVE_CSHARPCOMP=
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
64 ac_result="no"
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
65 break
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
66 ;;
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
67 esac
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
68 done
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
69 AC_MSG_RESULT([$ac_result])
11007
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 9457
diff changeset
70 AC_SUBST([HAVE_CSCC])
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 9457
diff changeset
71 AC_SUBST([HAVE_MCS])
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 9457
diff changeset
72 AC_SUBST([HAVE_CSC])
7011
c91111628d88 Update csharpcomp module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5913
diff changeset
73 dnl Provide a default for CSHARPCOMPFLAGS.
c91111628d88 Update csharpcomp module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5913
diff changeset
74 if test -z "${CSHARPCOMPFLAGS+set}"; then
c91111628d88 Update csharpcomp module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5913
diff changeset
75 CSHARPCOMPFLAGS="-O -g"
c91111628d88 Update csharpcomp module from GNU gettext 0.15.
Bruno Haible <bruno@clisp.org>
parents: 5913
diff changeset
76 fi
11007
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 9457
diff changeset
77 AC_SUBST([CSHARPCOMPFLAGS])
5913
3b9706263c44 New module 'csharpcomp'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
78 ])