summaryrefslogblamecommitdiffstats
path: root/cpukit/aclocal/check-networking.m4
blob: fdb5a67e86bc772420c433447da12f9c671c4ab2 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
   
                                  
    
                                           
                                        
                               
 
                                                 

                          
                   
                                                        




                                                                    

                                  
               









                                                            

                                                                                        



                                        
        


        
  
dnl
AC_DEFUN([RTEMS_CHECK_NETWORKING],
[dnl
AC_REQUIRE([RTEMS_CANONICAL_TARGET_CPU])dnl
AC_REQUIRE([RTEMS_ENABLE_NETWORKING])dnl
AC_REQUIRE([RTEMS_INCLUDES])dnl

AC_CACHE_CHECK([whether CPU supports networking],
  rtems_cv_HAS_NETWORKING,
  [dnl
    case "$host" in
    # do not have address space to hold BSD TCP/IP stack
    epiphany* | m32c*)
      rtems_cv_HAS_NETWORKING="no"
      ;;
    # Newer architecture ports that should only use new TCP/IP stack
    x86_64*)
      rtems_cv_HAS_NETWORKING="no"
      ;;
    *-*-rtems*)
      AS_IF([test "${RTEMS_HAS_NETWORKING}" = "yes"],[
# suppress libnetworking if one these types is not available
        AS_IF([test x"$ac_cv_type_int8_t" = xyes \
          && test x"$ac_cv_type_uint8_t" = xyes \
          && test x"$ac_cv_type_int16_t" = xyes \
          && test x"$ac_cv_type_uint16_t" = xyes \
          && test x"$ac_cv_type_int32_t" = xyes \
          && test x"$ac_cv_type_uint32_t" = xyes \
          && test x"$ac_cv_type_int64_t" = xyes \
          && test x"$ac_cv_type_uint64_t" = xyes],
        [rtems_cv_HAS_NETWORKING=yes
        RTEMS_CPPFLAGS="${RTEMS_CPPFLAGS} -I${RTEMS_SOURCE_ROOT}/cpukit/libnetworking"],
        [rtems_cv_HAS_NETWORKING=no])
      ],[
        rtems_cv_HAS_NETWORKING=disabled
      ])
      ;;
    esac
    ])
  ])
])