Commit ccf450e0 authored by Martti Mela's avatar Martti Mela

mingw support

darcs-hash:20060302153228-1b897-ba6bbb0e23a6a80d0c96b0d5307a981471d343db.gz
parent 2098b6ff
......@@ -29,6 +29,8 @@ AC_GNU_SOURCE
dnl checks for programs
dnl -------------------
AC_CHECK_COMPILATION_ENVIRONMENT
AX_TOOL_CC
AC_PROG_INSTALL
AC_PROG_CPP
......@@ -105,9 +107,9 @@ AC_DEFINE([LLX], ["%llx"], [Define as format (%llx) for long long hex])dnl
### checks for structures
### ---------------------
AC_HEADER_STDC
AC_CHECK_HEADERS(pthread.h)
AC_CHECK_HEADERS(stdint.h)
AC_CHECK_HEADERS(inttypes.h)
dnl AC_CHECK_HEADERS(pthread.h)
dnl AC_CHECK_HEADERS(stdint.h)
dnl AC_CHECK_HEADERS(inttypes.h)
### checks for typedefs, structures, and compiler characteristics.
### --------------------------------------------------------------
......
......@@ -18,10 +18,10 @@ INCLUDES = -I$(srcdir)/../su -I../su
# if HAVE_TLS
stun_lib_sources = stun.c stun_common.c
stun_prog_targets = stunc torture_stun
else
stun_lib_targets =
stun_prog_targets =
endif
#else
#stun_lib_targets =
#stun_prog_targets =
#endif
noinst_LTLIBRARIES = libstun.la
......
......@@ -106,6 +106,17 @@ struct addrinfo {
};
#endif /* SU_WITH_GETADDRINFO */
#ifndef EAI_BADHINTS
#define EAI_BADHINTS 10012
#endif
#ifndef EAI_PROTOCOL
#define EAI_PROTOCOL 10013
#endif
#ifndef AI_MASK
#define AI_MASK (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST)
#endif
/** RFC 1576 address info structure. */
typedef struct addrinfo su_addrinfo_t;
......
......@@ -32,6 +32,14 @@
#include <sofia-sip/su_addrinfo.h>
#include <sofia-sip/su.h>
#ifndef IN_LOOPBACKNET
#define IN_LOOPBACKNET 127
#endif
#ifndef IN_EXPERIMENTAL
#define IN_EXPERIMENTAL(a) ((((long int) (a)) & 0xf0000000) == 0xf0000000)
#endif
#if !HAVE_GETADDRINFO
#include <string.h>
......@@ -867,6 +875,7 @@ gai_strerror(ecode)
#endif
default:
return "unknown error.";
}
}
#endif
......
......@@ -454,6 +454,7 @@ CFLAGS="$CFLAGS -I\$(top_srcdir)/win32/pthread -DWINVER=0x0501 \
LDFLAGS="$LDFLAGS -Wl,--enable-auto-image-base"
LIBS="-L\$(top_srcdir)/win32/pthread -lpthread -lws2_32 \
-lwsock32"
MINGW_ENVIRONMENT=1
AC_SUBST(MINGW_ENVIRONMENT)
AC_DEFINE([HAVE_MINGW], [1], [Define this as 1 if you are compiling in MinGW environment])
AC_DEFINE([HAVE_WIN32], [1], [Define this as 1 if you have WIN32])
......
......@@ -60,7 +60,7 @@ if $ax_inttypes; then : ; else
fi
if test "x$MINGW_ENVIRONMENT" != x1 ; then
AC_CHECK_HEADER(pthread.h,
AC_CHECK_HEADER(pthread.h,
HAVE_PTHREADS=1;
SAC_SU_DEFINE([SU_HAVE_PTHREADS], 1, [Sofia SU uses pthreads]))
else
......@@ -123,6 +123,14 @@ AC_CHECK_HEADERS([winsock2.h ws2tcpip.h], [
SAC_SU_DEFINE([SU_HAVE_WINSOCK2], 1, [Define as 1 you have WinSock2])
SAC_SU_DEFINE(SU_HAVE_SOCKADDR_STORAGE, 1,
[Define this as 1 if you have struct sockaddr_storage])
AC_DEFINE([HAVE_ADDRINFO], 1,
[Define this as 1 if you have addrinfo structure.])
AC_DEFINE([HAVE_GETADDRINFO], 1,
[Define this as 1 if you have addrinfo structure.])
AC_DEFINE([HAVE_FREEADDRINFO], 1,
[Define this as 1 if you have addrinfo structure.])
SAC_SU_DEFINE([SU_HAVE_ADDRINFO], 1,
[Define this as 1 if you have addrinfo structure.])
SAC_SU_DEFINE([SU_HAVE_GETADDRINFO], 1,
[Define this as 1 if you have getaddrinfo() function.])
AC_CHECK_HEADERS([windef.h])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment