PageRenderTime 33ms CodeModel.GetById 26ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/aclocal/enable-networking.m4

http://rtems-atapi.googlecode.com/
m4 | 41 lines | 34 code | 6 blank | 1 comment | 0 complexity | f91d20aa3910fe23763eee0129926280 MD5 | raw file
 1## $Id: enable-rtems-debug.m4,v 1.2 2003/11/26 05:32:03 ralf Exp $
 2
 3AC_DEFUN([RTEMS_ENABLE_NETWORKING],
 4[
 5AC_ARG_ENABLE(networking,
 6AC_HELP_STRING([--enable-networking],[enable networking]),
 7[networking_mode="DHCP"
 8 case "${enable_networking}" in
 9  static)
10    enable_networking=yes
11    networking_mode="static" ;;
12  dhcp)
13    enable_networking=yes
14    networking_mode="DHCP" ;;
15  yes) enable_networking=yes ;;
16  no)  enable_networking=no ;;
17  *) AC_MSG_ERROR([bad value ${enable_networking} for networking]) ;;
18esac],[enable_networking=yes])
19
20AS_IF([test x"${enable_networking}" = x"yes"],
21      [RTEMS_APP_NETWORKING=1
22       AS_IF([test x"${networking_mode}" = x"static"],
23             [RTEMS_APP_NETWORKINS_STATIC=1
24              RTEMS_CPPFLAGS="${RTEMS_CPPFLAGS} -DRTEMS_APP_NETWORKING_STATIC=1"])
25       AS_IF([test x"${networking_mode}" = x"DHCP"],
26             [RTEMS_APP_NETWORKINS_DHCP=1
27              RTEMS_CPPFLAGS="${RTEMS_CPPFLAGS} -DRTEMS_APP_NETWORKING_DHCP=1"])
28      ],[RTEMS_APP_NETWORKING=0
29         networking_mode="none"])
30
31AC_MSG_CHECKING([for networking])
32AC_MSG_RESULT([${enable_networking} (${networking_mode})])
33
34AC_SUBST(RTEMS_APP_NETWORKING)
35AM_CONDITIONAL(RTEMS_APP_NETWORKING, test x"${enable_networking}" = x"yes")
36AM_CONDITIONAL(RTEMS_APP_NETWORKING_STATIC, test x"${networking_mode}" = x"static")
37AM_CONDITIONAL(RTEMS_APP_NETWORKING_DHCP, test x"${networking_mode}" = x"DHCP")
38
39RTEMS_CPPFLAGS="${RTEMS_CPPFLAGS} -DRTEMS_APP_NETWORKING=${RTEMS_APP_NETWORKING}"
40
41])