~ubuntu-branches/ubuntu/karmic/cyrus-imapd-2.2/karmic

« back to all changes in this revision

Viewing changes to cmulocal/bsd_sockets.m4

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2006-07-11 18:51:39 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060711185139-gl3oe4tppp7g3euf
Tags: 2.2.13-4ubuntu1
Synchronize with Debian unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
dnl bsd_sockets.m4--which socket libraries do we need? 
2
2
dnl Derrick Brashear
3
3
dnl from Zephyr
4
 
dnl $Id: bsd_sockets.m4,v 1.9 2003/10/08 20:35:24 rjs3 Exp $
 
4
dnl $Id: bsd_sockets.m4,v 1.10 2005/04/26 19:14:07 shadow Exp $
5
5
 
6
6
dnl Hacked on by Rob Earhart to not just toss stuff in LIBS
7
7
dnl It now puts everything required for sockets into LIB_SOCKET
17
17
        )
18
18
        LIBS="$LIB_SOCKET $save_LIBS"
19
19
        AC_CHECK_FUNC(res_search, :,
20
 
                AC_CHECK_LIB(resolv, res_search,
21
 
                              LIB_SOCKET="-lresolv $LIB_SOCKET") 
 
20
                LIBS="-lresolv $LIB_SOCKET $save_LIBS"
 
21
                AC_TRY_LINK([[
 
22
#include <sys/types.h>
 
23
#include <netinet/in.h>
 
24
#include <arpa/nameser.h>
 
25
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
 
26
#include <arpa/nameser_compat.h>
 
27
#endif
 
28
#include <resolv.h>]],[[
 
29
const char host[12]="openafs.org";
 
30
u_char ans[1024];
 
31
res_search( host, C_IN, T_MX, (u_char *)&ans, sizeof(ans));
 
32
return 0;
 
33
]], LIB_SOCKET="-lresolv $LIB_SOCKET")
22
34
        )
23
35
        LIBS="$LIB_SOCKET $save_LIBS"
24
36
        AC_CHECK_FUNCS(dn_expand dns_lookup)