| 1 |
jmc |
1.1 |
dnl agentx.m4--detect agentx libraries |
| 2 |
|
|
dnl copied from x-unixrc |
| 3 |
|
|
dnl Tim Martin |
| 4 |
|
|
dnl $Id: agentx.m4,v 1.4 2002/05/25 19:57:41 leg Exp $ |
| 5 |
|
|
|
| 6 |
|
|
AC_DEFUN(CMU_AGENTX, [ |
| 7 |
|
|
|
| 8 |
|
|
dnl |
| 9 |
|
|
dnl CMU AgentX |
| 10 |
|
|
dnl |
| 11 |
|
|
AC_MSG_CHECKING([for AgentX]) |
| 12 |
|
|
AC_ARG_WITH(agentx, [ --with-agentx CMU AgentX libraries located in (val)], AGENTX_DIR="$withval", AGENTX_DIR=no) |
| 13 |
|
|
|
| 14 |
|
|
found_agentx="no" |
| 15 |
|
|
|
| 16 |
|
|
if test "${AGENTX_DIR}" != "no" && |
| 17 |
|
|
test -f $AGENTX_DIR/lib${ABILIBDIR}/libagentx.a && |
| 18 |
|
|
test -f $AGENTX_DIR/include/agentx.h; then |
| 19 |
|
|
AGENTX_DIR="$AGENTX_DIR" |
| 20 |
|
|
found_agentx="yes" |
| 21 |
|
|
elif test -d /usr/local && |
| 22 |
|
|
test -f /usr/local/lib${ABILIBDIR}/libagentx.a && |
| 23 |
|
|
test -f /usr/local/include/agentx.h; then |
| 24 |
|
|
AGENTX_DIR="/usr/local" |
| 25 |
|
|
found_agentx="yes" |
| 26 |
|
|
|
| 27 |
|
|
elif test -d /usr/ng && |
| 28 |
|
|
test -f /usr/ng/lib${ABILIBDIR}/libagentx.a && |
| 29 |
|
|
test -f /usr/ng/include/agentx.h; then |
| 30 |
|
|
AGENTX_DIR="/usr/ng" |
| 31 |
|
|
found_agentx="yes" |
| 32 |
|
|
fi |
| 33 |
|
|
|
| 34 |
|
|
if test "$found_agentx" = "no"; then |
| 35 |
|
|
AC_MSG_WARN([Could not locate AgentX Libraries! http://www.net.cmu.edu/groups/netdev/agentx/]) |
| 36 |
|
|
else |
| 37 |
|
|
LIB_AGENTX="-L$AGENTX_DIR/lib${ABILIBDIR} -lagentx" |
| 38 |
|
|
AC_SUBST(LIB_AGENTX) |
| 39 |
|
|
AGENTXFLAGS="-I$AGENTX_DIR/include" |
| 40 |
|
|
AC_SUBST(AGENTXFLAGS) |
| 41 |
|
|
AC_MSG_RESULT([found $AGENTX_DIR/lib${ABILIBDIR}/libagentx.a]) |
| 42 |
|
|
fi |
| 43 |
|
|
|
| 44 |
|
|
|
| 45 |
|
|
|
| 46 |
|
|
]) |