aspeditor/configure.in

167 строки
4.9 KiB
Plaintext

AC_INIT(README)
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE(aspnetedit, 0.0.1.0)
AM_MAINTAINER_MODE
AC_PROG_INSTALL
### Dependency version numbers
MONO_REQUIRED_VERSION=1.1.9
GTKSHARP_REQUIRED_VERSION=2.5.5.99
GECKOSHARP_REQUIRED_VERSION=0.10
JSCALL_REQUIRED_VERSION=0.0.2
m4_define(mozilla_required_version, 1.6)
m4_define(firefox_required_version, 1.0)
### Check for pkg-config
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test "x$PKG_CONFIG" = "xno"; then
AC_MSG_ERROR([You need to install pkg-config])
fi
### Check mono version
PKG_CHECK_MODULES(MONO, mono >= $MONO_REQUIRED_VERSION)
#Check for C# compiler
AC_PATH_PROG(CSC, csc, no)
AC_PATH_PROG(MCS, mcs, no)
AC_PATH_PROG(MONO, mono, no)
### Find a c# compiler
CS="C#"
if test "x$CSC" = "xno" -a "x$MCS" = "xno" ; then
dnl AC_MSG_ERROR([You need to install a C# compiler])
AC_MSG_ERROR([No $CS compiler found])
fi
if test "x$MCS" = "xno" ; then
MCS=$CSC
fi
if test "x$MONO" = "xno"; then
AC_MSG_ERROR([No mono runtime found])
fi
AC_SUBST(MCS)
MCS_OPTIONS="-d:TRACE"
AC_SUBST(MCS_OPTIONS)
### Check c# dependencies
PKG_CHECK_MODULES(GTKSHARP, gtk-sharp-2.0 >= $GTKSHARP_REQUIRED_VERSION)
PKG_CHECK_MODULES(GECKOSHARP, gecko-sharp-2.0 >= $GECKOSHARP_REQUIRED_VERSION)
PKG_CHECK_MODULES(JSCALL, jscall-sharp >= $JSCALL_REQUIRED_VERSION)
### Get javascript file supplied by JSCall
JSCALL_SCRIPT="`$PKG_CONFIG --variable=Script jscall-sharp`"
AC_SUBST(JSCALL_SCRIPT)
### find assembly paths for unstable installed assemblies that will be
### copied into the installation directory for local usage with the app
UNSTABLE_INSTALL_ASSEMBLIES="jscall-sharp"
INSTALLED_ASSEMBLIES="`$PKG_CONFIG --variable=Libraries $UNSTABLE_INSTALL_ASSEMBLIES`"
AC_SUBST(INSTALLED_ASSEMBLIES)
### Check for C++/Mozilla dependencies (inspired by gnome-python-extras)
AC_ARG_WITH(gtkmozembed, AS_HELP_STRING(
[--with-gtkmozembed=mozilla|firefox],
[package that provides libgtkmozembed]),
[mozpackage=$withval], [mozpackage=any])
if test $mozpackage = any ; then
AC_MSG_CHECKING(for Gecko development files)
if $PKG_CONFIG --exists mozilla-gtkmozembed; then
AC_MSG_RESULT([Mozilla detected])
mozpackage=mozilla
else
if $PKG_CONFIG --exists firefox-gtkmozembed; then
AC_MSG_RESULT([Firefox detected])
mozpackage=firefox
else
AC_MSG_ERROR([Neither Firefox nor Mozilla development packages were detected])
fi
fi
fi
case $mozpackage in
firefox) mozpackage_required_version=firefox_required_version ;;
mozilla) mozpackage_required_version=mozilla_required_version ;;
*) AC_MSG_ERROR([--with-gtkmozembed argument must be either 'mozilla' or 'firefox'])
esac
### Find the Mozilla directory to install chrome, and how we need to install the
### chrome -- the installation mechanism changed from FF 1.0 to FF 1.5
MOZILLA_HOME="`$PKG_CONFIG --variable=libdir $mozpackage-gtkmozembed`"
AC_MSG_CHECKING([method of Mozilla extension installation])
if test -f "$CHROME_FOLDER/installed-chrome.txt"; then
EXTENSION_DIR="$MOZILLA_HOME/chrome"
AC_MSG_RESULT([installed-chrome.txt])
else
EXTENSION_DIR="$MOZILLA_HOME/extensions"
AC_MSG_RESULT([manifest file])
fi
###FIXME: we should be able to install this as an extension, not into the chrome,
### but gtkmozembed does not appear to load extensions at all.
### This probably needs some permissions-elevating C++ glue, so that the XUL
### document can be stored elsewhere on the disc, rather than the profile...
EXTENSION_DIR="$MOZILLA_HOME/chrome"
AC_SUBST(MOZILLA_HOME)
AC_SUBST(EXTENSION_DIR)
# get zip to create jar/xpi for chrome
AC_PATH_PROG(ZIP, zip)
### Create build directories, as tarballs seem to ignore them despite being in svn
AC_MSG_CHECKING(for build directory)
if test -d build ; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
echo "Creating build directories..."
mkdir build
mkdir build/lib
fi
AC_OUTPUT([
Makefile
src/Makefile
src/propertygrid/Makefile
src/propertygrid/AssemblyInfo.cs
src/editor/Makefile
src/editor/AssemblyInfo.cs
src/aspnetedit/Makefile
src/aspnetedit/AssemblyInfo.cs
src/chrome/Makefile
])
echo ""
echo "Configuration summary"
echo ""
echo " * Installation prefix = $prefix"
echo " * C# compiler = $MCS"
echo " * C# compiler options = $MCS_OPTIONS"
echo " * Gecko libraries from: $mozpackage"
echo " * $mozpackage home: $MOZILLA_HOME"
echo ""
echo "*************************** PLEASE NOTE *********************************"
echo "* AspNetEdit has now been merged into the MonoDevelop IDE *"
echo "* (http://www.monodevelop.com) and this standalone version has not *"
echo "* been maintained since July 2006. If you would like to resurrect the *"
echo "* standalone editor please contact Michael Hutchinson at *"
echo "* <m.j.hutchinson@gmail.com>. *"
echo "*************************************************************************"
echo ""