-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.ac
56 lines (39 loc) · 1.13 KB
/
configure.ac
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Process this file with autoconf to produce a configure script.
# init
AC_PREREQ(2.57)
AC_REVISION([$NiH: configure.ac,v 1.30 2005/07/19 11:04:10 wiz Exp $])
AC_INIT([dccserver],[0.5],[[email protected]])
AC_CONFIG_SRCDIR([dccserver.c])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([dist-bzip2 foreign])
AC_CANONICAL_HOST
AC_PROG_CC
AC_PROG_RANLIB
AM_PROG_AR
# header files
AC_CHECK_HEADERS(err.h)
# libraries
AC_CONFIG_LIBOBJ_DIR(lib)
AC_CHECK_LIB(socket, main)
AC_CHECK_LIB(nsl, main)
# library functions
AC_MSG_CHECKING([checking for getaddrinfo])
AC_TRY_LINK([#include <netdb.h>], [getaddrinfo(0,0,0,0);],
[AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_GETADDRINFO], [1], [Define to 1 if you have the `getaddrinfo' function.])],
[AC_MSG_RESULT([no]); AC_LIBOBJ(getaddrinfo)])
case $host_os
in
darwin8*) AC_CACHE_VAL([ac_cv_func_poll],[ac_cv_func_poll=no]);;
esac
AC_REPLACE_FUNCS([err errx poll strlcpy warn warnx])
# types
AC_CHECK_TYPES(socklen_t, , , [#include <sys/types.h>
#include <sys/socket.h>])
case $host_os
in
*bsd*) MANFMT=mdoc;;
*) MANFMT=man;;
esac
AC_SUBST(MANFMT, [${MANFMT}])
AC_CONFIG_FILES([Makefile lib/Makefile])
AC_OUTPUT