medit/m4/moo-comps.m4

53 lines
1.6 KiB
Plaintext
Raw Normal View History

##############################################################################
# MOO_COMPONENTS(default-yes,default-no)
#
AC_DEFUN([MOO_COMPONENTS],[
2006-12-08 02:11:54 -08:00
m4_foreach([comp], [utils, edit, term, app],
[build_moo[]comp=yes])
m4_foreach([comp], $2,
[build_moo[]comp=no])
m4_foreach([comp], [$1],
[AC_ARG_WITH([moo[]comp],
AC_HELP_STRING([--with-moo[]comp], [enable moo[]comp component (default = YES)]),
[build_moo[]comp=$withval])])
m4_foreach([comp], [$2],
[AC_ARG_WITH([moo[]comp],
AC_HELP_STRING([--with-moo[]comp], [enable moo[]comp component (default = NO)]),
[build_moo[]comp=$withval])])
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
])