File: inet.m4

package info (click to toggle)
gnu-smalltalk 3.0.3-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 26,460 kB
  • ctags: 13,326
  • sloc: ansic: 82,059; sh: 22,788; asm: 7,846; perl: 4,493; cpp: 3,517; awk: 1,471; yacc: 1,355; makefile: 1,151; xml: 886; lex: 843; sed: 258
file content (29 lines) | stat: -rw-r--r-- 1,046 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
dnl I'd like this to be edited in -*- Autoconf -*- mode...
dnl
AC_DEFUN([GST_INET_SOCKETS], [

AC_SEARCH_LIBS(listen, socket, [], [
    dnl Check for listen on MinGW. We need to include <winsock2.h>
    dnl to get the correct __stdcall name decoration
    AC_MSG_CHECKING([For listen in -lws2_32])
    OLD_LIBS="$LIBS"
    LIBS="-lws2_32 $LIBS"
    AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <winsock2.h>]],[[listen(0,0);]])],
                   [ac_cv_lib_ws2_32_listen=yes
                    AC_MSG_RESULT(yes)],
                   [LIBS="$OLD_LIBS"
                    AC_MSG_RESULT(no)])])
AC_SEARCH_LIBS(gethostbyname, nsl)

gst_cv_inet_sockets=yes
AC_CHECK_FUNC(socket, , gst_cv_inet_sockets=no)
AC_CHECK_HEADER(netinet/in.h, , gst_cv_inet_sockets=no)
AC_CHECK_HEADER(arpa/inet.h, , gst_cv_inet_sockets=no)
if test "$ac_cv_lib_ws2_32_listen" = "yes"; then
    gst_cv_inet_sockets=yes
fi
if test $gst_cv_inet_sockets = yes; then
  AC_DEFINE(HAVE_INET_SOCKETS, 1, [Define if your system's sockets provide access to the Internet.])
fi

])dnl