diff --git a/config.make.in b/config.make.in index eb34cd1d34..dd705ae56f 100644 --- a/config.make.in +++ b/config.make.in @@ -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/ diff --git a/configure.ac b/configure.ac index 2c820d6bba..a25f02e9ac 100644 --- a/configure.ac +++ b/configure.ac @@ -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=) +fi +AC_SUBST(MONODIR) + + AC_CONFIG_FILES([ launcher Makefile