1# -*- Autoconf -*- 2# Process this file with autoconf to produce a configure script. 3 4AC_PREREQ(2.59) 5AC_INIT([net6], [1.3.14], [gobby@0x539.de]) 6AM_INIT_AUTOMAKE(1.9 check-news) 7AM_MAINTAINER_MODE 8AC_CONFIG_SRCDIR([inc/main.hpp]) 9AC_CONFIG_HEADER([inc/config.hpp]) 10AC_CONFIG_MACRO_DIR([m4]) 11 12# Extract host information. 13AC_CANONICAL_HOST 14 15# Checks for programs. 16AC_LANG([C++]) 17AC_PROG_CXX 18AC_PROG_CC 19AC_PROG_CPP 20AC_PROG_INSTALL 21AC_PROG_LN_S 22AC_PROG_MAKE_SET 23AC_LIBTOOL_WIN32_DLL 24AC_PROG_LIBTOOL 25AC_CACHE_SAVE 26 27# Use C++ compiler for the tests. 28AC_LANG([C++]) 29 30# Check for headers. 31AC_CHECK_HEADERS([sys/select.h]) 32 33# Check for MSG_NOSIGNAL 34AC_MSG_CHECKING(for MSG_NOSIGNAL) 35AC_TRY_COMPILE([#include <sys/socket.h>], 36 [ int f = MSG_NOSIGNAL; ], 37 [ AC_MSG_RESULT(yes) 38 AC_DEFINE(HAVE_MSG_NOSIGNAL, 1, 39 [Define this symbol if you have MSG_NOSIGNAL]) ], 40 [ AC_MSG_RESULT(no) ]) 41AC_MSG_CHECKING(for SO_NOSIGPIPE) 42AC_TRY_COMPILE([#include <sys/socket.h>], 43 [ int f = SO_NOSIGNAL; ], 44 [ AC_MSG_RESULT(yes) 45 AC_DEFINE(HAVE_SO_NOSIGNAL, 1, 46 [Define this symbol if you have SO_NOSIGNAL]) ], 47 [ AC_MSG_RESULT(no) ]) 48AC_MSG_CHECKING(for AI_ADDRCONFIG) 49AC_TRY_COMPILE([#include <sys/types.h> 50 #include <sys/socket.h> 51 #include <netdb.h>], 52 [ struct addrinfo hint; 53 hint.ai_flags = AI_ADDRCONFIG; ], 54 [ AC_MSG_RESULT(yes) 55 AC_DEFINE(HAVE_AI_ADDRCONFIG, 1, 56 [Define this symbol if you have AI_ADDRCONFIG]) ], 57 [ AC_MSG_RESULT(no) ]) 58 59AC_MSG_CHECKING([whether to enable WIN32 specific flags]) 60case "$host_os" in 61*mingw*) 62 win32=true 63 addlibs="-lws2_32" 64 AC_MSG_RESULT([yes]) 65 ;; 66*) 67 win32=false 68 addlibs="" 69 AC_MSG_RESULT([no]) 70 ;; 71esac 72AC_SUBST(addlibs) 73AM_CONDITIONAL(WIN32, test x$win32 = xtrue) 74 75# Checks for libraries. 76PKG_CHECK_MODULES([libnet6], [sigc++-2.0 gnutls]) 77 78# gettext / i18n 79AM_GNU_GETTEXT([external]) 80AM_GNU_GETTEXT_VERSION([0.15]) 81 82AC_CONFIG_FILES([po/Makefile.in Makefile]) 83AC_OUTPUT([net6-1.3.pc]) 84 85