source: npl/mailserver/dspam/dspam-3.10.2/m4/netlibs.m4

Last change on this file was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100644
File size: 1.1 KB
Line 
1# $Id: netlibs.m4,v 1.1 2004/10/24 20:48:37 jonz Exp $
2# m4/netlibs.m4
3# Andrew W. Nosenko <awn@bcs.zp.ua>
4#
5#   DS_NETLIBS([libs_out], [action-if-found], [action-if-not-found])
6#
7#   Search for additional libraries containing inet_ntoa() and socket().
8#
9#   Typically, these are -lnsl and -lsocket for Solaris and none for
10#   Linux.
11#
12AC_DEFUN([DS_NETLIBS],
13[
14    AS_VAR_PUSHDEF([save_LIBS], [ds_netlibs_save_LIBS])
15    AS_VAR_PUSHDEF([netlibs], [ds_netlibs_netlibs])
16    AS_VAR_PUSHDEF([success], [ds_netlibs_success])
17
18    save_LIBS="$LIBS"
19    LIBS=''
20    success=yes
21
22    AC_SEARCH_LIBS([inet_ntoa], [nsl], [success=yes], [success=no])
23    if test x"$success" = xyes
24    then
25        AC_SEARCH_LIBS([socket], [socket], [success=yes], [success=no])
26    fi
27
28    netlibs="$LIBS"
29    LIBS="$save_LIBS"
30
31    AS_VAR_POPDEF([save_LIBS])
32    AS_VAR_POPDEF([netlibs])
33    AS_VAR_POPDEF([success])
34
35    if test x"$ds_netlibs_success" = xyes
36    then
37        ifelse([$1], [], [:], [$1="$ds_netlibs_netlibs"])
38        ifelse([$2], [], [:], [$2])
39    else
40        ifelse([$3], [], [:], [$3])
41    fi
42])
Note: See TracBrowser for help on using the repository browser.