## m4/dgc_enable_debug.m4 AC_DEFUN([DGC_ENABLE_DEBUG], [ AC_ARG_ENABLE(debug, [ --enable-debug Enable debugging output], [ CPPFLAGS="$CPPFLAGS -DDEBUG -g" LDFLAGS="$LDFLAGS -g" ]) ]) ## m4/dgc_with_embed.m4 AC_DEFUN([DGC_WITH_EMBED], [ activate_embed () { EMBED_SH=${1} AC_MSG_RESULT([${2-${1}}]) AC_DEFINE_UNQUOTED(EMBED_SH, ["$EMBED_SH"], [Define as the quoted path of embed.sh]) #q='"' #CPPFLAGS="$CPPFLAGS -I`pwd` -D'EMBED_SH=$q$EMBED_SH$q'" CPPFLAGS="$CPPFLAGS -I`pwd`" EMBED_H=embed_code.h } AC_ARG_WITH(embed, [ --with-embed[=PATH] Include embed using named embed.sh script], [ if test "$withval" = "yes"; then AC_MSG_CHECKING([for embed.sh]) if withval=`which embed.sh`; then activate_embed "$withval" else AC_MSG_RESULT([not found]) fi withval=done fi if test "$withval" = "no"; then : nada elif test "$withval" != "done"; then AC_MSG_CHECKING([for embed.sh as $withval]) if test ! -f "$withval"; then AC_MSG_RESULT([not found]) elif test -x "$withval"; then activate_embed $withval yes else AC_MSG_RESULT([not executable]) fi fi ]) AC_SUBST([EMBED_SH]) AC_SUBST([EMBED_H]) ]) ## m4/dgc_with_libdrac.m4 AC_DEFUN([DGC_WITH_LIBDRAC], [ AC_ARG_WITH(libdrac, [ --with-libdrac[=PATH] Include DRAC using PATH/include/libdrac.h and PATH/lib/libdrac.*], [ oCPPFLAGS="$CPPFLAGS" oLDFLAGS="$LDFLAGS" oLIBS="$LIBS" if test -x "$withval" -a "$withval" != "no"; then CPPFLAGS="$CPPFLAGS -I$withval/include" LDFLAGS="$LDFLAGS -L$withval/lib" fi LIBS="-ldrac $oLIBS" AC_MSG_CHECKING([whether libdrac is usable]) AC_TRY_LINK( [ /* dracctx_t *ctx; */ ], [ drac_init(); ], [ AC_MSG_RESULT([yes]) AC_DEFINE(HAVE_LIBDRAC) ], [ AC_MSG_RESULT([no]) CPPFLAGS="$oCPPFLAGS" LDFLAGS="$oLDFLAGS" LIBS="$oLIBS" ]) ]) ]) ## m4/dgc_with_libwrap.m4 AC_DEFUN([DGC_WITH_LIBWRAP], [ AC_ARG_WITH(libwrap, [ --with-libwrap[=PATH] Include libwrap using PATH/include/tcpd.h and PATH/lib/libwrap.*], [ oCPPFLAGS="$CPPFLAGS" oLDFLAGS="$LDFLAGS" oLIBS="$LIBS" if test -x "$withval" -a "$withval" != "no"; then CPPFLAGS="$CPPFLAGS -I$withval/include" LDFLAGS="$LDFLAGS -L$withval/lib" fi LIBS="-lwrap $oLIBS" AC_MSG_CHECKING([whether libwrap is usable]) AC_TRY_LINK( [ int deny_severity; int allow_severity; ], [ hosts_access(); ], [ AC_MSG_RESULT([yes]) AC_DEFINE(HAVE_LIBWRAP) ], [ AC_MSG_RESULT([no]) CPPFLAGS="$oCPPFLAGS" LDFLAGS="$oLDFLAGS" LIBS="$oLIBS" ]) ]) ])