Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
108 lines (86 sloc) 2.16 KB
AC_INIT(README)
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE(gtkspell-sharp-2.0, 0.1)
AM_MAINTAINER_MODE
API_VERSION=2.0.0.0
AC_SUBST(API_VERSION)
MONO_REQUIRED_VERSION=1.0
AC_MSG_CHECKING([whether we're compiling from CVS])
if test -f "$srcdir/.cvs_version" ; then
from_cvs=yes
else
if test -f "$srcdir/.svn" ; then
from_cvs=yes
else
from_cvs=no
fi
fi
AC_MSG_RESULT($from_cvs)
AC_SUBST(PATH)
AC_SUBST(LD_LIBRARY_PATH)
dnl Find 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
dnl Find GTK
BUILD_GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
BUILD_GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
AC_SUBST(BUILD_GTK_CFLAGS)
AC_SUBST(BUILD_GTK_LIBS)
GTK_REQUIRED_VERSION=2.0.0
MONO_REQUIRED_VERSION=0.95
PKG_CHECK_MODULES(BASE_DEPENDENCIES, gtk+-2.0 >= $GTK_REQUIRED_VERSION gmodule-2.0 >= $GTK_REQUIRED_VERSION gtkspell-2.0 >= 2.0.1)
PKG_CHECK_MODULES(MONO_DEPENDENCY, mono >= $MONO_REQUIRED_VERSION, has_mono=true, has_mono=false)
if test "x$has_mono" = "xtrue"; then
GENERATED_SOURCES=generated/*.cs
AC_PATH_PROG(RUNTIME, mono, no)
AC_PATH_PROG(CSC, mcs, no)
if test `uname -s` = "Darwin"; then
LIB_PREFIX=
LIB_SUFFIX=.dylib
else
LIB_PREFIX=.so
LIB_SUFFIX=
fi
else
AC_PATH_PROG(CSC, csc.exe, no)
if test x$CSC = "xno"; then
AC_MSG_ERROR([You need to install either mono or .Net])
else
GENERATED_SOURCES=generated\\\\*.cs
RUNTIME=
LIB_PREFIX=
LIB_SUFFIX=.dylib
fi
fi
AC_SUBST(GENERATED_SOURCES)
AC_SUBST(LIB_PREFIX)
AC_SUBST(LIB_SUFFIX)
AC_SUBST(BASE_DEPENDENCIES_CFLAGS)
AC_SUBST(BASE_DEPENDENCIES_LIBS)
dnl Find Gtk#
PKG_CHECK_MODULES(GTK_SHARP, gtk-sharp-2.0 >= 1.9.0)
AC_SUBST(GTK_SHARP_CFLAGS)
AC_SUBST(GTK_SHARP_LIBS)
dnl Find Gtk#
PKG_CHECK_MODULES(GAPI, gapi-2.0 >= 1.9.0)
AC_PATH_PROG(GACUTIL, gacutil, no)
if test "x$GACUTIL" = "xno" ; then
AC_MSG_ERROR([No gacutil tool found])
fi
winbuild=no
case "$host" in
*-*-mingw*|*-*-cygwin*)
winbuild=yes
;;
esac
AM_CONDITIONAL(WINBUILD, test x$winbuild = xyes)
AC_SUBST(GACUTIL)
AC_OUTPUT([
Makefile
gtkspell/gtkspell-sharp.dll.config
gtkspell/Makefile
gtkspell/AssemblyInfo.cs
gtkspell-sharp-2.0.pc
])