medit/m4/moo-comps.m4

50 lines
1.3 KiB
Plaintext
Raw Normal View History

##############################################################################
2006-12-08 02:11:54 -08:00
# MOO_COMPONENTS(optional-components)
#
AC_DEFUN([MOO_COMPONENTS],[
2006-12-08 02:11:54 -08:00
m4_foreach([comp], [utils, edit, term, app],
[build_moo[]comp=yes
])
2006-12-08 02:11:54 -08:00
m4_foreach([name], $1,
[AC_ARG_WITH([moo[]name],
2006-12-08 02:11:54 -08:00
AC_HELP_STRING([--with-moo[]name], [enable moo[]name component (default = NO)]),
[build_moo[]name=$withval],
[build_moo[]name=no]
)])
if test "x$MOO_OS_CYGWIN" = "xyes"; then
2006-12-08 02:11:54 -08:00
build_mooutils="no"
build_mooedit="no"
build_mooapp="no"
build_mooterm="yes"
2006-12-08 02:11:54 -08:00
fi
2006-12-08 02:11:54 -08:00
if test "x$build_mooapp" != "xno"; then
build_mooedit="yes"
fi
if test "x$build_mooedit" != "xno"; then
build_mooutils="yes"
fi
if test "x$build_mooterm" != "xno" -a x$MOO_OS_CYGWIN != "xyes"; then
build_mooutils="yes"
fi
2006-12-08 02:11:54 -08:00
MOO_BUILD_COMPS=
2006-12-08 02:11:54 -08:00
m4_foreach([comp], [utils, edit, term, app],[
AM_CONDITIONAL(MOO_BUILD_[]m4_toupper(comp), test "x$build_moo[]comp" != "xno")
MOO_BUILD_[]m4_toupper(comp)=0
if test "x$build_moo[]comp" != "xno"; then
AC_DEFINE(MOO_BUILD_[]m4_toupper(comp), [1], [build moo]comp)
MOO_BUILD_[]m4_toupper(comp)=1
MOO_BUILD_COMPS="moo[]comp $MOO_BUILD_COMPS"
fi
AC_SUBST(MOO_BUILD_[]m4_toupper(comp))
])
2006-12-08 02:11:54 -08:00
if test "x$build_mooterm" != "xno" -a "x$MOO_OS_BSD" = "xyes"; then
MOO_LIBS="-lutil $MOO_LIBS"
fi
])