summaryrefslogtreecommitdiffstats
path: root/gettext-tools/m4/csharpexec.m4
blob: 33c94a47b76815783261ccddac720ca94b440d64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# csharpexec.m4 serial 1 (gettext-0.13.2)
dnl Copyright (C) 2003 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License.  As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
dnl that contains a configuration script generated by Autoconf, under
dnl the same distribution terms as the rest of that program.

# Prerequisites of csharpexec.sh.
# Sets HAVE_CSHARPEXEC to nonempty if csharpexec.sh will work.

AC_DEFUN([gt_CSHARPEXEC],
[
  AC_MSG_CHECKING([for C[#] program execution engine])
  AC_EGREP_CPP(yes, [
#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
  yes
#endif
], MONO_PATH_SEPARATOR=';', MONO_PATH_SEPARATOR=':')
  HAVE_CSHARPEXEC=1
  pushdef([AC_MSG_CHECKING],[:])dnl
  pushdef([AC_CHECKING],[:])dnl
  pushdef([AC_MSG_RESULT],[:])dnl
  AC_CHECK_PROG(HAVE_ILRUN_IN_PATH, ilrun, yes)
  AC_CHECK_PROG(HAVE_MONO_IN_PATH, mono, yes)
  popdef([AC_MSG_RESULT])dnl
  popdef([AC_CHECKING])dnl
  popdef([AC_MSG_CHECKING])dnl
  if test -n "$HAVE_ILRUN_IN_PATH" \
     && ilrun --version >/dev/null 2>/dev/null; then
    HAVE_ILRUN=1
    ac_result="ilrun"
  else
    if test -n "$HAVE_MONO_IN_PATH" \
       && mono --version >/dev/null 2>/dev/null; then
      HAVE_MONO=1
      ac_result="mono"
    else
      HAVE_CSHARPEXEC=
      ac_result="no"
    fi
  fi
  AC_MSG_RESULT([$ac_result])
  AC_SUBST(MONO_PATH)
  AC_SUBST(MONO_PATH_SEPARATOR)
  AC_SUBST(HAVE_ILRUN)
  AC_SUBST(HAVE_MONO)
])