1 # csharpexec.m4 serial 6
2 dnl Copyright (C) 2003-2005, 2009-2018 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.
7 # Prerequisites of csharpexec.sh.
8 # Checks for a C# execution engine.
9 # gt_CSHARPEXEC or gt_CSHARPEXEC(testexecutable, its-directory)
10 # Sets at most one of HAVE_ILRUN, HAVE_MONO, HAVE_CLIX.
11 # Sets HAVE_CSHARPEXEC to nonempty if csharpexec.sh will work.
12 AC_DEFUN([gt_CSHARPEXEC],
14 AC_REQUIRE([gt_CSHARP_CHOICE])
15 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
16 AC_MSG_CHECKING([for C[#] program execution engine])
18 #if defined _WIN32 || defined __EMX__ || defined __DJGPP__
21 ], MONO_PATH_SEPARATOR=';', MONO_PATH_SEPARATOR=':')
23 pushdef([AC_MSG_CHECKING],[:])dnl
24 pushdef([AC_CHECKING],[:])dnl
25 pushdef([AC_MSG_RESULT],[:])dnl
26 AC_CHECK_PROG([HAVE_ILRUN_IN_PATH], [ilrun], [yes])
27 AC_CHECK_PROG([HAVE_MONO_IN_PATH], [mono], [yes])
28 AC_CHECK_PROG([HAVE_CLIX_IN_PATH], [clix], [yes])
29 popdef([AC_MSG_RESULT])dnl
30 popdef([AC_CHECKING])dnl
31 popdef([AC_MSG_CHECKING])dnl
32 for impl in "$CSHARP_CHOICE" pnet mono no; do
35 if test -n "$HAVE_ILRUN_IN_PATH" \
36 && ilrun --version >/dev/null 2>/dev/null \
37 ifelse([$1], , , [&& ilrun $2/$1 >/dev/null 2>/dev/null]); then
44 if test -n "$HAVE_MONO_IN_PATH" \
45 && mono --version >/dev/null 2>/dev/null \
46 ifelse([$1], , , [&& mono $2/$1 >/dev/null 2>/dev/null]); then
53 if test -n "$HAVE_CLIX_IN_PATH" \
54 ifelse([$1], , , [&& clix $2/$1 >/dev/null 2>/dev/null]); then
57 cygwin* | mingw* | pw32*)
61 CLIX_PATH_VAR=DYLD_LIBRARY_PATH
64 CLIX_PATH_VAR=LD_LIBRARY_PATH
67 eval CLIX_PATH=\"\$CLIX_PATH_VAR\"
79 AC_MSG_RESULT([$ac_result])
81 AC_SUBST([MONO_PATH_SEPARATOR])
82 AC_SUBST([CLIX_PATH_VAR])
84 AC_SUBST([HAVE_ILRUN])