medit/configure.ac

264 lines
6.7 KiB
Plaintext
Raw Normal View History

2005-06-22 11:20:32 -07:00
#
# moo/configure.ac
#
m4_define([moo_major_version], [0])
m4_define([moo_minor_version], [6])
m4_define([moo_micro_version], [0])
m4_define([moo_api_version], [1.0])
2005-06-22 11:20:32 -07:00
m4_define([moo_version], [moo_major_version.moo_minor_version.moo_micro_version])
AC_INIT(libmoo, [moo_version], [muntyan@math.tamu.edu], libmoo)
AM_INIT_AUTOMAKE(libmoo, [moo_version])
AC_CONFIG_HEADERS(config.h)
MOO_VERSION=\"moo_version\"
MOO_VERSION_UNQUOTED=moo_version
MOO_API_VERSION=moo_api_version
2005-06-22 11:20:32 -07:00
MOO_VERSION_MAJOR=moo_major_version
MOO_VERSION_MINOR=moo_minor_version
MOO_VERSION_MICRO=moo_micro_version
AC_SUBST(MOO_VERSION)
AC_SUBST(MOO_VERSION_UNQUOTED)
AC_SUBST(MOO_API_VERSION)
2005-06-22 11:20:32 -07:00
AC_SUBST(MOO_VERSION_MAJOR)
AC_SUBST(MOO_VERSION_MINOR)
AC_SUBST(MOO_VERSION_MICRO)
AC_DEFINE(MOO_VERSION, ["moo_version"], "libmoo version")
AC_DEFINE(MOO_API_VERSION, ["moo_api_version"], "libmoo api version")
AC_DEFINE(MOO_VERSION_MAJOR, [moo_major_version], "libmoo major version")
AC_DEFINE(MOO_VERSION_MINOR, [moo_minor_version], "libmoo minor version")
AC_DEFINE(MOO_VERSION_MICRO, [moo_micro_version], "libmoo micro version")
2005-06-22 11:20:32 -07:00
AC_PROG_CC
AC_PROG_CC_STDC
AC_HEADER_STDC
AC_LIBTOOL_WIN32_DLL
AC_PROG_LIBTOOL
AC_PROG_INSTALL
2005-10-30 13:16:22 -08:00
MOO_AC_PROG_WINDRES
2005-06-22 11:20:32 -07:00
2005-10-31 14:58:01 -08:00
# Misc stuff
MOO_AC_FUNCS
2005-06-22 11:20:32 -07:00
# Check debug options
2005-11-05 05:12:50 -08:00
MOO_AC_DEBUG
2005-06-22 11:20:32 -07:00
# Check operating system
2005-10-30 13:16:22 -08:00
MOO_AC_CHECK_OS
2005-06-22 11:20:32 -07:00
# GTK libraries
2005-10-30 13:16:22 -08:00
MOO_PKG_CHECK_GTK_VERSIONS
2005-06-22 11:20:32 -07:00
# File monitoring
2005-10-30 13:16:22 -08:00
MOO_AC_FAM
2005-10-30 13:16:22 -08:00
# libxml2
MOO_AC_XML
2005-10-30 13:16:22 -08:00
# xdgmime
MOO_AC_XDGMIME
2005-06-22 11:20:32 -07:00
# Python stuff
2005-10-30 13:16:22 -08:00
MOO_AC_PYGTK
2005-06-22 11:20:32 -07:00
2005-10-30 13:16:22 -08:00
################################################################################
# Python module
#
2005-06-22 11:20:32 -07:00
AC_ARG_ENABLE([moo-module],
AC_HELP_STRING([--enable-moo-module], [create standalone python module 'moo' (default = YES)]),
[
if test x$enable_moo_module = "xno"; then
build_pymoo="no"
else
build_pymoo="yes"
fi
], [
build_pymoo="yes"
])
2005-10-30 13:16:22 -08:00
if test x$MOO_USE_PYGTK = "xyes"; then
2005-06-22 11:20:32 -07:00
if test x$build_pymoo != "xno"; then
build_pymoo="yes"
fi
else
build_pymoo="no"
fi
AM_CONDITIONAL(BUILD_PYMOO, test x$build_pymoo = "xyes")
################################################################################
# Components
#
AC_ARG_WITH([mooapp],
AC_HELP_STRING([--without-mooapp], [disable building mooapp]),
[build_mooapp=$withval],
[build_mooapp=yes]
)
AC_ARG_WITH([mooedit],
AC_HELP_STRING([--without-mooedit], [disable building mooedit]),
[build_mooedit=$withval],
[build_mooedit=yes]
)
AC_ARG_WITH([mooutils],
AC_HELP_STRING([--without-mooutils], [disable building mooutils]),
[build_mooutils=$withval],
[build_mooutils=yes]
)
AC_ARG_WITH([mooterm],
AC_HELP_STRING([--without-mooterm], [disable building mooterm]),
[build_mooterm=$withval],
[build_mooterm=yes]
)
2005-10-30 13:16:22 -08:00
if test x$MOO_OS_CYGWIN = "xyes"; then
2005-06-22 11:20:32 -07:00
build_mooutils="no"
build_mooedit="no"
build_mooapp="no"
fi
if test "x$build_mooapp" != "xno"; then
build_mooedit="yes"
fi
if test "x$build_mooedit" != "xno"; then
build_mooutils="yes"
fi
2005-10-30 13:16:22 -08:00
if test "x$build_mooterm" != "xno" -a x$MOO_OS_CYGWIN != "xyes"; then
2005-06-22 11:20:32 -07:00
build_mooutils="yes"
fi
AM_CONDITIONAL(MOO_BUILD_UTILS, test "x$build_mooutils" != "xno")
AM_CONDITIONAL(MOO_BUILD_EDIT, test "x$build_mooedit" != "xno")
AM_CONDITIONAL(MOO_BUILD_TERM, test "x$build_mooterm" != "xno")
AM_CONDITIONAL(MOO_BUILD_APP, test "x$build_mooapp" != "xno")
AM_CONDITIONAL(MOO_BUILD_PLUGINS, true)
if test "x$build_mooutils" != "xno"; then
AC_DEFINE(MOO_BUILD_UTILS,, [build mooutils])
fi
if test "x$build_mooedit" != "xno"; then
AC_DEFINE(MOO_BUILD_EDIT,, [build mooedit])
fi
if test "x$build_mooterm" != "xno"; then
AC_DEFINE(MOO_BUILD_TERM,, [build mooterm])
fi
if test "x$build_mooapp" != "xno"; then
AC_DEFINE(MOO_BUILD_APP,, [build mooapp])
fi
2005-06-22 11:20:32 -07:00
moo_top_src_dir=`cd $srcdir && pwd`
moo_top_build_dir=`cd ./$ac_top_builddir && pwd`
MOO_CFLAGS="-I$moo_top_src_dir/moo $GTK_CFLAGS -DXDG_PREFIX=_moo_edit_xdg -DG_LOG_DOMAIN=\\\"Moo\\\" -D__MOO__ -DMOO_MARSHALS_H=\\\"mooutils/moomarshals.h\\\""
MOO_LIBS="$GTK_LIBS"
2005-08-25 02:29:01 -07:00
2005-10-30 13:16:22 -08:00
if test x$MOO_USE_FAM = xyes; then
2005-08-25 02:29:01 -07:00
MOO_LIBS="$MOO_LIBS $FAM_LIBS"
fi
2005-06-22 11:20:32 -07:00
AC_SUBST(MOO_CFLAGS)
AC_SUBST(MOO_LIBS)
################################################################################
# MooEdit stuff
#
if test "x$build_mooedit" != "xno"; then
MOO_CFLAGS="$MOO_CFLAGS $XML_CFLAGS"
2005-06-22 11:20:32 -07:00
MOO_LIBS="$MOO_LIBS $XML_LIBS"
fi
################################################################################
# Installation directories, etc.
#
MOO_SRC_PREFIX="moo"
AC_SUBST(MOO_SRC_PREFIX)
if test "x${prefix}" = "xNONE"; then
mooprefix=${ac_default_prefix}
else
mooprefix=${prefix}
fi
moodatadir=share
moorootdir=${moodatadir}/moo-1.0
2005-06-22 11:20:32 -07:00
NO_PREFIX_MOO_ROOT_DIR="${moorootdir}"
AC_SUBST(NO_PREFIX_MOO_ROOT_DIR)
MOO_ROOT_DIR="${mooprefix}/${moorootdir}"
AC_SUBST(MOO_ROOT_DIR)
AC_DEFINE_UNQUOTED(MOO_ROOT_DIR, "${mooprefix}/${moorootdir}", [data files go to MOO_ROOT_DIR])
MOO_TEXT_LANG_FILES_DIR="${mooprefix}/${moorootdir}/syntax"
AC_SUBST(MOO_TEXT_LANG_FILES_DIR)
AC_DEFINE_UNQUOTED(MOO_TEXT_LANG_FILES_DIR, "${mooprefix}/${moorootdir}/syntax", [lang files dir])
2005-06-22 11:20:32 -07:00
moolibdir=lib/moo-1.0
2005-09-06 18:46:36 -07:00
NO_PREFIX_MOO_LIB_DIR="${moolibdir}"
AC_SUBST(NO_PREFIX_MOO_LIB_DIR)
MOO_LIB_DIR="${mooprefix}/${moolibdir}"
AC_SUBST(MOO_LIB_DIR)
AC_DEFINE_UNQUOTED(MOO_LIB_DIR, "${mooprefix}/${moolibdir}", [plugins and stuff go to MOO_LIB_DIR])
MOO_PLUGINS_DIR="${mooprefix}/${moolibdir}/plugins"
AC_SUBST(MOO_PLUGINS_DIR)
AC_DEFINE_UNQUOTED(MOO_PLUGINS_DIR, "${mooprefix}/${moolibdir}/plugins", [plugins dir])
2005-09-06 18:46:36 -07:00
2005-10-30 15:24:16 -08:00
AM_CONDITIONAL(MOO_STANDALONE, true)
2005-06-22 11:20:32 -07:00
################################################################################
# Created files
#
AC_OUTPUT([
Makefile
moo/moo-config.h
2005-07-31 07:53:10 -07:00
moo/mooterm/termhelper_res.rc
2005-06-22 11:20:32 -07:00
tests/Makefile
tests/pyapp.py
2005-10-30 13:16:22 -08:00
m4/Makefile
moo.pc
2005-06-22 11:20:32 -07:00
])
################################################################################
# Configuration info
#
2005-10-30 13:16:22 -08:00
if test x$MOO_OS_CYGWIN != "xyes"; then
if test "x$MOO_OS_MINGW" = "xyes"; then
2005-06-22 11:20:32 -07:00
system="MINGW"
2005-10-30 13:16:22 -08:00
elif test "x$MOO_OS_DARWIN" = "xyes"; then
2005-06-22 11:20:32 -07:00
system="DARWIN"
else
system="UNIX"
fi
if test x$use_xml != "xyes"; then
use_xml="no"
fi
echo
echo " OS = $system"
echo " prefix = $mooprefix"
2005-11-05 05:12:50 -08:00
echo " python support = $MOO_USE_PYTHON"
echo " pygtk support = $MOO_USE_PYGTK"
2005-06-22 11:20:32 -07:00
echo " standalone 'moo' python module = $build_pymoo"
2005-11-05 05:12:50 -08:00
echo " xml support = $MOO_USE_XML"
2005-06-22 11:20:32 -07:00
echo
echo " editor lang files go to = $MOO_TEXT_LANG_FILES_DIR"
2005-06-22 11:20:32 -07:00
echo
else
echo
echo " Building termhelper.exe on CYGWIN"
echo
fi