medit/m4/moo-flags.m4

84 lines
2.8 KiB
Plaintext
Raw Normal View History

AC_DEFUN_ONCE([_MOO_AC_CONFIGARGS_H],[
2006-11-25 11:46:37 -06:00
moo_ac_configure_args=`echo "$ac_configure_args" | sed 's/^ //; s/\\""\`\$/\\\\&/g'`
cat >configargs.h.tmp <<EOF
static const char configure_args@<:@@:>@ = "$moo_ac_configure_args";
EOF
cmp -s configargs.h configargs.h.tmp || mv configargs.h.tmp configargs.h
AC_DEFINE(HAVE_CONFIGARGS_H, 1, [configargs.h is created])
])
2006-03-13 02:13:47 -06:00
##############################################################################
# MOO_AC_FLAGS(moo_top_dir)
2006-03-13 02:13:47 -06:00
#
AC_DEFUN_ONCE([MOO_AC_FLAGS],[
AC_REQUIRE([MOO_AC_CHECK_OS])
AC_REQUIRE([MOO_AC_SET_DIRS])
2007-05-08 15:57:04 -05:00
AC_PATH_XTRA
MOO_AC_FUNCS
MOO_PKG_CHECK_GTK_VERSIONS
MOO_AC_DEBUG
MOO_AC_FAM
MOO_AC_XML
MOO_AC_XDGMIME
MOO_AC_PCRE
MOO_AC_PYTHON
dnl must be called after MOO_AC_PYTHON
MOO_AC_LIB
2006-12-21 01:18:43 -06:00
2007-05-15 23:11:26 -05:00
AC_CHECK_LIB(Xrender, XRenderFindFormat,[
AC_SUBST(RENDER_LIBS, "-lXrender -lXext")
AC_DEFINE(HAVE_RENDER, 1, [Define if libXrender is available.])
],[
AC_SUBST(RENDER_LIBS, "")
],[-lXext])
2007-04-12 10:24:21 -05:00
AC_DEFINE(MOO_COMPILATION, 1, [must be 1])
moo_top_src_dir=`cd $srcdir && pwd`
MOO_CFLAGS="$MOO_CFLAGS -I"$moo_top_src_dir/$1" $GTK_CFLAGS $MOO_PCRE_CFLAGS -DXDG_PREFIX=_moo_edit_xdg -DG_LOG_DOMAIN=\\\"Moo\\\""
2007-06-10 01:06:18 -05:00
MOO_LIBS="$MOO_LIBS $GTK_LIBS $GTHREAD_LIBS $MOO_PCRE_LIBS -lm"
if test "x$GLIB_2_14" != xyes; then
MOO_CFLAGS="-I$moo_top_src_dir/$1/mooutils/newgtk/glib-2.14 $MOO_CFLAGS"
fi
if test "x$GLIB_2_12" != xyes; then
MOO_CFLAGS="-I$moo_top_src_dir/$1/mooutils/newgtk/glib-2.12 $MOO_CFLAGS"
fi
if test "x$GLIB_2_8" != xyes; then
MOO_CFLAGS="-I$moo_top_src_dir/$1/mooutils/newgtk/glib-2.8 $MOO_CFLAGS"
fi
if test x$MOO_USE_FAM = xyes; then
MOO_CFLAGS="$MOO_CFLAGS $MOO_FAM_CFLAGS"
MOO_LIBS="$MOO_LIBS $MOO_FAM_LIBS"
fi
2006-03-13 02:13:47 -06:00
MOO_CFLAGS="$MOO_CFLAGS -DMOO_DATA_DIR=\\\"${MOO_DATA_DIR}\\\" -DMOO_LIB_DIR=\\\"${MOO_LIB_DIR}\\\""
2006-03-13 02:13:47 -06:00
if test x$MOO_USE_GTKHTML = xyes; then
MOO_CFLAGS="$MOO_CFLAGS $GTKHTML_CFLAGS"
MOO_LIBS="$MOO_LIBS $GTKHTML_LIBS"
fi
2006-04-06 12:10:21 -05:00
################################################################################
# MooEdit stuff
#
if test "x$build_mooedit" != "xno"; then
MOO_CFLAGS="$MOO_CFLAGS $XML_CFLAGS"
MOO_LIBS="$MOO_LIBS $XML_LIBS"
fi
2006-03-21 01:49:42 -06:00
AC_SUBST(MOO_CFLAGS)
AC_SUBST(MOO_LIBS)
2006-11-25 11:46:37 -06:00
_MOO_AC_CONFIGARGS_H
MOO_INI_IN_IN_RULE='%.ini.desktop.in: %.ini.desktop.in.in $(top_builddir)/config.status ; cd $(top_builddir) && $(SHELL) ./config.status --file=$(subdir)/[$]@'
MOO_INI_IN_RULE='%.ini: %.ini.in $(top_builddir)/config.status ; cd $(top_builddir) && $(SHELL) ./config.status --file=$(subdir)/[$]@'
MOO_WIN32_RC_RULE='%.res: %.rc.in $(top_builddir)/config.status ; cd $(top_builddir) && $(SHELL) ./config.status --file=$(subdir)/[$]*.rc && cd $(subdir) && $(WINDRES) -i [$]*.rc --input-format=rc -o [$]@ -O coff && rm [$]*.rc'
AC_SUBST(MOO_INI_IN_IN_RULE)
AC_SUBST(MOO_INI_IN_RULE)
AC_SUBST(MOO_WIN32_RC_RULE)
2006-03-13 02:13:47 -06:00
])