1 # csharpexec.m4 serial 8
2 dnl Copyright (C) 2003-2005, 2009-2020 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_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_MONO_IN_PATH], [mono], [yes])
27 AC_CHECK_PROG([HAVE_CLIX_IN_PATH], [clix], [yes])
28 popdef([AC_MSG_RESULT])dnl
29 popdef([AC_CHECKING])dnl
30 popdef([AC_MSG_CHECKING])dnl
31 for impl in "$CSHARP_CHOICE" mono no; do
34 if test -n "$HAVE_MONO_IN_PATH" \
35 && mono --version >/dev/null 2>/dev/null \
36 m4_if([$1], , , [&& mono $2/$1 >/dev/null 2>/dev/null]); then
43 if test -n "$HAVE_CLIX_IN_PATH" \
44 m4_if([$1], , , [&& clix $2/$1 >/dev/null 2>/dev/null]); then
47 cygwin* | mingw* | pw32*)
51 CLIX_PATH_VAR=DYLD_LIBRARY_PATH
54 CLIX_PATH_VAR=LD_LIBRARY_PATH
57 eval CLIX_PATH=\"\$CLIX_PATH_VAR\"
69 AC_MSG_RESULT([$ac_result])
71 AC_SUBST([MONO_PATH_SEPARATOR])
72 AC_SUBST([CLIX_PATH_VAR])