1 1.1 christos # csharpexec.m4 serial 3 (gettext-0.15) 2 1.1 christos dnl Copyright (C) 2003-2005 Free Software Foundation, Inc. 3 1.1 christos dnl This file is free software; the Free Software Foundation 4 1.1 christos dnl gives unlimited permission to copy and/or distribute it, 5 1.1 christos dnl with or without modifications, as long as this notice is preserved. 6 1.1 christos 7 1.1 christos # Prerequisites of csharpexec.sh. 8 1.1 christos # Checks for a C# execution engine. 9 1.1 christos # gt_CSHARPEXEC or gt_CSHARPEXEC(testexecutable, its-directory) 10 1.1 christos # Sets at most one of HAVE_ILRUN, HAVE_MONO, HAVE_CLIX. 11 1.1 christos # Sets HAVE_CSHARPEXEC to nonempty if csharpexec.sh will work. 12 1.1 christos AC_DEFUN([gt_CSHARPEXEC], 13 1.1 christos [ 14 1.1 christos AC_REQUIRE([gt_CSHARP_CHOICE]) 15 1.1 christos AC_MSG_CHECKING([for C[#] program execution engine]) 16 1.1 christos AC_EGREP_CPP(yes, [ 17 1.1 christos #if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__ 18 1.1 christos yes 19 1.1 christos #endif 20 1.1 christos ], MONO_PATH_SEPARATOR=';', MONO_PATH_SEPARATOR=':') 21 1.1 christos HAVE_CSHARPEXEC=1 22 1.1 christos pushdef([AC_MSG_CHECKING],[:])dnl 23 1.1 christos pushdef([AC_CHECKING],[:])dnl 24 1.1 christos pushdef([AC_MSG_RESULT],[:])dnl 25 1.1 christos AC_CHECK_PROG(HAVE_ILRUN_IN_PATH, ilrun, yes) 26 1.1 christos AC_CHECK_PROG(HAVE_MONO_IN_PATH, mono, yes) 27 1.1 christos AC_CHECK_PROG(HAVE_CLIX_IN_PATH, clix, yes) 28 1.1 christos popdef([AC_MSG_RESULT])dnl 29 1.1 christos popdef([AC_CHECKING])dnl 30 1.1 christos popdef([AC_MSG_CHECKING])dnl 31 1.1 christos for impl in "$CSHARP_CHOICE" pnet mono no; do 32 1.1 christos case "$impl" in 33 1.1 christos pnet) 34 1.1 christos if test -n "$HAVE_ILRUN_IN_PATH" \ 35 1.1 christos && ilrun --version >/dev/null 2>/dev/null \ 36 1.1 christos ifelse([$1], , , [&& ilrun $2/$1 >/dev/null 2>/dev/null]); then 37 1.1 christos HAVE_ILRUN=1 38 1.1 christos ac_result="ilrun" 39 1.1 christos break 40 1.1 christos fi 41 1.1 christos ;; 42 1.1 christos mono) 43 1.1 christos if test -n "$HAVE_MONO_IN_PATH" \ 44 1.1 christos && mono --version >/dev/null 2>/dev/null \ 45 1.1 christos ifelse([$1], , , [&& mono $2/$1 >/dev/null 2>/dev/null]); then 46 1.1 christos HAVE_MONO=1 47 1.1 christos ac_result="mono" 48 1.1 christos break 49 1.1 christos fi 50 1.1 christos ;; 51 1.1 christos sscli) 52 1.1 christos if test -n "$HAVE_CLIX_IN_PATH" \ 53 1.1 christos ifelse([$1], , , [&& clix $2/$1 >/dev/null 2>/dev/null]); then 54 1.1 christos HAVE_CLIX=1 55 1.1 christos case $host_os in 56 1.1 christos cygwin* | mingw* | pw32*) 57 1.1 christos CLIX_PATH_VAR=PATH 58 1.1 christos ;; 59 1.1 christos darwin* | rhapsody*) 60 1.1 christos CLIX_PATH_VAR=DYLD_LIBRARY_PATH 61 1.1 christos ;; 62 1.1 christos *) 63 1.1 christos CLIX_PATH_VAR=LD_LIBRARY_PATH 64 1.1 christos ;; 65 1.1 christos esac 66 1.1 christos eval CLIX_PATH=\"\$CLIX_PATH_VAR\" 67 1.1 christos ac_result="clix" 68 1.1 christos break 69 1.1 christos fi 70 1.1 christos ;; 71 1.1 christos no) 72 1.1 christos HAVE_CSHARPEXEC= 73 1.1 christos ac_result="no" 74 1.1 christos break 75 1.1 christos ;; 76 1.1 christos esac 77 1.1 christos done 78 1.1 christos AC_MSG_RESULT([$ac_result]) 79 1.1 christos AC_SUBST(MONO_PATH) 80 1.1 christos AC_SUBST(MONO_PATH_SEPARATOR) 81 1.1 christos AC_SUBST(CLIX_PATH_VAR) 82 1.1 christos AC_SUBST(CLIX_PATH) 83 1.1 christos AC_SUBST(HAVE_ILRUN) 84 1.1 christos AC_SUBST(HAVE_MONO) 85 1.1 christos AC_SUBST(HAVE_CLIX) 86 1.1 christos ]) 87