This repository has been archived by the owner on Nov 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.ac
84 lines (73 loc) · 2.15 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT([net6], [1.3.14], [gobby@0x539.de])
AM_INIT_AUTOMAKE(1.9 check-news)
AM_MAINTAINER_MODE
AC_CONFIG_SRCDIR([inc/main.hpp])
AC_CONFIG_HEADER([inc/config.hpp])
AC_CONFIG_MACRO_DIR([m4])
# Extract host information.
AC_CANONICAL_HOST
# Checks for programs.
AC_LANG([C++])
AC_PROG_CXX
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_LIBTOOL_WIN32_DLL
AC_PROG_LIBTOOL
AC_CACHE_SAVE
# Use C++ compiler for the tests.
AC_LANG([C++])
# Check for headers.
AC_CHECK_HEADERS([sys/select.h])
# Check for MSG_NOSIGNAL
AC_MSG_CHECKING(for MSG_NOSIGNAL)
AC_TRY_COMPILE([#include <sys/socket.h>],
[ int f = MSG_NOSIGNAL; ],
[ AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_MSG_NOSIGNAL, 1,
[Define this symbol if you have MSG_NOSIGNAL]) ],
[ AC_MSG_RESULT(no) ])
AC_MSG_CHECKING(for SO_NOSIGPIPE)
AC_TRY_COMPILE([#include <sys/socket.h>],
[ int f = SO_NOSIGNAL; ],
[ AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_SO_NOSIGNAL, 1,
[Define this symbol if you have SO_NOSIGNAL]) ],
[ AC_MSG_RESULT(no) ])
AC_MSG_CHECKING(for AI_ADDRCONFIG)
AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>],
[ struct addrinfo hint;
hint.ai_flags = AI_ADDRCONFIG; ],
[ AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_AI_ADDRCONFIG, 1,
[Define this symbol if you have AI_ADDRCONFIG]) ],
[ AC_MSG_RESULT(no) ])
AC_MSG_CHECKING([whether to enable WIN32 specific flags])
case "$host_os" in
*mingw*)
win32=true
addlibs="-lws2_32"
AC_MSG_RESULT([yes])
;;
*)
win32=false
addlibs=""
AC_MSG_RESULT([no])
;;
esac
AC_SUBST(addlibs)
AM_CONDITIONAL(WIN32, test x$win32 = xtrue)
# Checks for libraries.
PKG_CHECK_MODULES([libnet6], [sigc++-2.0 gnutls])
# gettext / i18n
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.15])
AC_CONFIG_FILES([po/Makefile.in Makefile])
AC_OUTPUT([net6-1.3.pc])