2005-11-04 15:49:23 +03:00
|
|
|
AC_INIT(README)
|
|
|
|
AC_CANONICAL_SYSTEM
|
2006-01-10 21:30:03 +03:00
|
|
|
AM_CONFIG_HEADER(config.h)
|
2005-11-04 15:49:23 +03:00
|
|
|
AM_INIT_AUTOMAKE(gladeui-sharp, 0.10)
|
|
|
|
AM_MAINTAINER_MODE
|
|
|
|
|
|
|
|
API_VERSION=2.0.0.0
|
|
|
|
AC_SUBST(API_VERSION)
|
|
|
|
|
2006-01-10 21:30:03 +03:00
|
|
|
case "$host" in
|
|
|
|
*-*-mingw*|*-*-cygwin*)
|
|
|
|
platform_win32=yes
|
|
|
|
AC_DEFINE(PLATFORM_WIN32,1,[Platform is Win32])
|
|
|
|
CC="gcc -mno-cygwin -g"
|
|
|
|
HOST_CC="gcc"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
platform_win32=no
|
|
|
|
;;
|
|
|
|
esac
|
2005-11-04 15:49:23 +03:00
|
|
|
|
2006-01-10 21:30:03 +03:00
|
|
|
AM_CONDITIONAL(PLATFORM_WIN32, test x$platform_win32 = xyes)
|
|
|
|
|
|
|
|
AC_CHECK_TOOL(CC, gcc, gcc)
|
|
|
|
AC_PROG_CC
|
|
|
|
AM_PROG_CC_STDC
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
|
|
|
|
dnl may require a specific autoconf version
|
|
|
|
dnl AC_PROG_CC_FOR_BUILD
|
|
|
|
dnl CC_FOR_BUILD not automatically detected
|
|
|
|
CC_FOR_BUILD=$CC
|
|
|
|
BUILD_EXEEXT=
|
|
|
|
if test "x$cross_compiling" = "xyes"; then
|
|
|
|
CC_FOR_BUILD=cc
|
|
|
|
BUILD_EXEEXT=""
|
2005-11-04 15:49:23 +03:00
|
|
|
fi
|
2006-01-10 21:30:03 +03:00
|
|
|
AC_SUBST(CC_FOR_BUILD)
|
|
|
|
AC_SUBST(HOST_CC)
|
|
|
|
AC_SUBST(BUILD_EXEEXT)
|
|
|
|
|
|
|
|
# Set STDC_HEADERS
|
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_LIBTOOL_WIN32_DLL
|
|
|
|
AM_PROG_LIBTOOL
|
|
|
|
|
|
|
|
if test x$platform_win32 = xyes; then
|
|
|
|
# Get rid of 'cyg' prefixes in library names
|
|
|
|
sed -e "s/\/cyg\//\/\//" libtool > libtool.new; mv libtool.new libtool; chmod 755 libtool
|
2005-11-04 15:49:23 +03:00
|
|
|
fi
|
|
|
|
|
2006-01-10 21:30:03 +03:00
|
|
|
# not 64 bit clean in cross-compile
|
|
|
|
AC_CHECK_SIZEOF(void *, 4)
|
|
|
|
|
|
|
|
CFLAGS='-g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wshadow -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings'
|
|
|
|
|
|
|
|
MONO_REQUIRED_VERSION=1.0
|
2005-11-04 15:49:23 +03:00
|
|
|
|
|
|
|
AC_PATH_PROG(MONO, mono)
|
|
|
|
AC_PATH_PROG(MCS, mcs)
|
|
|
|
if test "x$MONO" = "x" ; then
|
|
|
|
AC_MSG_ERROR([Can't find "mono" in your PATH])
|
|
|
|
fi
|
|
|
|
if test "x$MCS" = "x" ; then
|
|
|
|
AC_MSG_ERROR([Can't find "mcs" in your PATH])
|
|
|
|
fi
|
|
|
|
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)
|
|
|
|
PKG_CHECK_MODULES(MONO_DEPENDENCY, mono >= $MONO_REQUIRED_VERSION, has_mono=true, has_mono=false)
|
|
|
|
|
|
|
|
if test "x$has_mono" = "xtrue"; then
|
|
|
|
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
|
|
|
|
RUNTIME=
|
|
|
|
LIB_PREFIX=
|
|
|
|
LIB_SUFFIX=.dylib
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
|
|
|
PKG_CHECK_MODULES(GLADEUI, libgladeui-1.0 >= 2.90.0)
|
|
|
|
AC_SUBST(GLADEUI_LIBS)
|
|
|
|
gladeui_prefix=`pkg-config --variable=prefix gladeui`
|
|
|
|
AC_SUBST(gladeui_prefix)
|
|
|
|
|
|
|
|
dnl Find monodoc
|
|
|
|
MONODOC_REQUIRED_VERSION=1.0
|
|
|
|
AC_SUBST(MONODOC_REQUIRED_VERSION)
|
|
|
|
PKG_CHECK_MODULES(MONODOC_DEPENDENCY, monodoc >= $MONODOC_REQUIRED_VERSION, enable_monodoc=yes, enable_monodoc=no)
|
|
|
|
|
|
|
|
if test "x$enable_monodoc" = "xyes"; then
|
|
|
|
AC_PATH_PROG(MONODOC, monodoc, no)
|
|
|
|
if test x$MONODOC = xno; then
|
|
|
|
enable_monodoc=no
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
MONODOC=
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST(MONODOC)
|
|
|
|
AM_CONDITIONAL(ENABLE_MONODOC, test "x$enable_monodoc" = "xyes")
|
|
|
|
|
|
|
|
|
|
|
|
AC_PATH_PROG(GACUTIL, gacutil, no)
|
|
|
|
if test "x$GACUTIL" = "xno" ; then
|
|
|
|
AC_MSG_ERROR([No gacutil tool found])
|
|
|
|
fi
|
|
|
|
|
|
|
|
GACUTIL_FLAGS='/package gladeui-sharp /gacdir $(DESTDIR)$(prefix)/lib'
|
|
|
|
AC_SUBST(GACUTIL_FLAGS)
|
|
|
|
|
|
|
|
winbuild=no
|
|
|
|
case "$host" in
|
|
|
|
*-*-mingw*|*-*-cygwin*)
|
|
|
|
winbuild=yes
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
AM_CONDITIONAL(WINBUILD, test x$winbuild = xyes)
|
|
|
|
|
|
|
|
AC_SUBST(GACUTIL)
|
|
|
|
|
|
|
|
AC_OUTPUT([
|
|
|
|
Makefile
|
|
|
|
gladeui/gladeui-sharp.dll.config
|
|
|
|
gladeui/Makefile
|
|
|
|
gladeui/AssemblyInfo.cs
|
2006-01-10 21:30:03 +03:00
|
|
|
glue/Makefile
|
2005-11-04 15:49:23 +03:00
|
|
|
doc/Makefile
|
|
|
|
sources/Makefile
|
|
|
|
gladeui-sharp.pc
|
|
|
|
])
|
|
|
|
|
|
|
|
echo "---"
|
|
|
|
echo "Configuration summary"
|
|
|
|
echo ""
|
|
|
|
echo " * Installation prefix: $prefix"
|
|
|
|
echo " * compiler: $CSC"
|
|
|
|
echo " * Documentation: $enable_monodoc ($MONODOC)"
|
|
|
|
echo ""
|
|
|
|
echo "---"
|
|
|
|
|