Skip to content

Commit

Permalink
Fix mono path detection and add --with-gacdir flag for manually setti…
Browse files Browse the repository at this point in the history
…ng it
  • Loading branch information
Andreia Gaita committed Dec 13, 2010
1 parent 602770a commit 5fcaef5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion config.make.in
Expand Up @@ -4,7 +4,7 @@ topdir := @abs_top_srcdir@/
builddir := @abs_top_builddir@/
libdir := ${prefix}/lib/
installdir := ${prefix}/bin/
monodir := `pkg-config --variable=libdir mono`/mono/
monodir := @MONODIR@
libdir2 := $(monodir)2.0/
libdir35 := $(monodir)3.5/
libdir4 := $(monodir)4.0/
Expand Down
21 changes: 21 additions & 0 deletions configure.ac
Expand Up @@ -21,6 +21,27 @@ AC_ARG_WITH([bootstrap],
with_bootstrap=$(cd "$with_bootstrap" && pwd)
AC_SUBST(with_bootstrap)

AC_ARG_WITH([gacdir],
[ --with-gacdir=/path/to/gac Specify the gac directory (ex: /usr/lib/mono/gac)],
[],
[with_gacdir=no]
)

if test "x$with_gacdir" = "xno"; then
MONODIR=`pkg-config --variable=libdir mono`/mono
if ! test -e $MONODIR/2.0/mscorlib.dll; then
MONODIR=`pkg-config --variable=prefix mono`/lib/mono
fi
else
MONODIR=$(cd "$with_gacdir/.." && pwd)
fi

if ! test -e $MONODIR/2.0/mscorlib.dll; then
AC_ERROR(Couldn't find the mono gac directory or mscorlib.dll in the usual places. Set --with-gacdir=<path>)
fi
AC_SUBST(MONODIR)


AC_CONFIG_FILES([
launcher
Makefile
Expand Down

0 comments on commit 5fcaef5

Please sign in to comment.