149 строки
3.5 KiB
Plaintext
149 строки
3.5 KiB
Plaintext
AC_INIT(README)
|
|
AC_CANONICAL_SYSTEM
|
|
AM_INIT_AUTOMAKE(diacanvas-sharp, 0.5.1)
|
|
AM_MAINTAINER_MODE
|
|
AM_PROG_LIBTOOL
|
|
|
|
API_VERSION=0.5.1.0
|
|
AC_SUBST(API_VERSION)
|
|
|
|
dnl Defines CC to avoid warnings
|
|
AC_PROG_CC
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
|
if test "x$PKG_CONFIG" = "xno"; then
|
|
AC_MSG_ERROR(['pkg-config' is not in your PATH.])
|
|
fi
|
|
|
|
dnl for use on the build system
|
|
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)
|
|
|
|
PKG_PATH=
|
|
AC_ARG_WITH(crosspkgdir, [ --with-crosspkgdir=/path/to/pkg-config/dir],
|
|
if test x$with_crosspkgdir = "x"; then
|
|
if test -s $PKG_CONFIG_PATH; then
|
|
PKG_PATH=$PKG_CONFIG_PATH
|
|
fi
|
|
else
|
|
PKG_PATH=$with_crosspkgdir
|
|
PKG_CONFIG_PATH=$PKG_PATH
|
|
export PKG_CONFIG_PATH
|
|
fi
|
|
)
|
|
|
|
MONO_REQUIRED_VERSION=1.0
|
|
PKG_CHECK_MODULES(MONO_DEPENDENCY, mono >= $MONO_REQUIRED_VERSION, has_mono=true, has_mono=false)
|
|
|
|
if test "x$has_mono" = "xtrue"; then
|
|
GACUTIL_FLAGS='/package $(PACKAGE) /gacdir $(libdir)'
|
|
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)
|
|
GACUTIL_FLAGS=
|
|
GENERATED_SOURCES=generated\\\\*.cs
|
|
|
|
if test x$CSC = "xno"; then
|
|
AC_MSG_ERROR([You need to install either mono or .Net])
|
|
else
|
|
RUNTIME=
|
|
LIB_PREFIX=
|
|
LIB_SUFFIX=.dylib
|
|
fi
|
|
fi
|
|
|
|
CS="C#"
|
|
if test "x$CSC" = "xno" ; then
|
|
AC_MSG_ERROR([No $CS compiler found])
|
|
fi
|
|
|
|
AC_PATH_PROG(GACUTIL, gacutil, no)
|
|
if test "x$GACUTIL" = "xno" ; then
|
|
AC_MSG_ERROR([No gacutil tool found])
|
|
fi
|
|
|
|
AC_SUBST(RUNTIME)
|
|
AC_SUBST(CSC)
|
|
AC_SUBST(GACUTIL)
|
|
AC_SUBST(GACUTIL_FLAGS)
|
|
AC_SUBST(LIB_PREFIX)
|
|
AC_SUBST(LIB_SUFFIX)
|
|
AC_SUBST(GENERATED_SOURCES)
|
|
|
|
PKG_CHECK_MODULES(GTK_SHARP, gtk-sharp >= 1.0)
|
|
AC_SUBST(GTK_SHARP_CFLAGS)
|
|
AC_SUBST(GTK_SHARP_LIBS)
|
|
|
|
PKG_CHECK_MODULES(DIACANVAS2, diacanvas2 >= 0.14.2)
|
|
AC_SUBST(DIACANVAS2_CFLAGS)
|
|
AC_SUBST(DIACANVAS2_LIBS)
|
|
|
|
AC_PATH_PROG(GAPI_FIXUP, gapi-fixup, no)
|
|
if test "x$GAPI_FIXUP" = "xno"; then
|
|
AC_MSG_CHECKING(for gapi-fixup.exe)
|
|
GAPI_FIXUP=`which gapi-fixup.exe 2> /dev/null`
|
|
if test "x$GAPI_FIXUP" = "xno" ; then
|
|
AC_MSG_ERROR(['gapi_fixup'/'gapi-fixup.exe' not found.])
|
|
fi
|
|
AC_MSG_RESULT($GAPI_FIXUP)
|
|
GAPI_FIXUP="$MONO $GAPI_FIXUP"
|
|
fi
|
|
AC_SUBST(GAPI_FIXUP)
|
|
|
|
AC_PATH_PROG(GAPI_CODEGEN, gapi-codegen, no)
|
|
if test "x$GAPI_CODEGEN" = "xno"; then
|
|
AC_MSG_CHECKING(for gapi_codegen.exe)
|
|
GAPI_CODEGEN=`which gapi_codegen.exe 2> /dev/null`
|
|
if test "x$GAPI_CODEGEN" = "xno" ; then
|
|
AC_MSG_ERROR(['gapi_codegen'/'gapi_codegen.exe' not found.])
|
|
fi
|
|
AC_MSG_RESULT([$GAPI_CODEGEN])
|
|
GAPI_CODEGEN="$MONO $GAPI_CODEGEN"
|
|
fi
|
|
AC_SUBST(GAPI_CODEGEN)
|
|
|
|
AC_PATH_PROG(MONODOC, monodoc, no)
|
|
if test "x$MONODOC" = "xno"; then
|
|
if test "x$MONODOC" = "xno" ; then
|
|
AC_MSG_ERROR(['monodoc' not found.])
|
|
fi
|
|
fi
|
|
AC_SUBST(MONODOC)
|
|
MONODOC_SOURCESDIR=`$MONODOC --get-sourcesdir`
|
|
AC_SUBST(MONODOC_SOURCESDIR)
|
|
|
|
AC_OUTPUT([
|
|
makefile
|
|
diacanvas-sharp.pc
|
|
dia/AssemblyInfo.cs
|
|
dia/makefile
|
|
dia/glue/makefile
|
|
doc/makefile
|
|
doc/en/makefile
|
|
doc/en/Dia/makefile
|
|
sample/AssemblyInfo.cs
|
|
sample/diacanvas-sharp-sample
|
|
sample/makefile
|
|
sample/pixmaps/makefile
|
|
sample/glade/makefile
|
|
])
|
|
|
|
echo "---"
|
|
echo "Configuration summary"
|
|
echo ""
|
|
echo " * Installation prefix = $prefix"
|
|
echo " * $CS compiler: $CSC"
|
|
echo ""
|
|
echo "---" |