From 7cd78079ae59c8861c75a93712ba7651558233a8 Mon Sep 17 00:00:00 2001 From: Luigi Rizzo Date: Sat, 17 Nov 2007 10:54:52 +0000 Subject: [PATCH] more cygwin/mingw32 compatibility fixes git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89373 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/Makefile | 4 ++++ utils/Makefile | 8 ++++++++ utils/extconf.c | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/main/Makefile b/main/Makefile index a5e278b8f7..d118d3adfd 100644 --- a/main/Makefile +++ b/main/Makefile @@ -85,6 +85,10 @@ ifeq ($(OSARCH),FreeBSD) AST_LIBS+=-lcrypto endif +ifneq ($(findstring $(OSARCH), mingw32 cygwin ),) + AST_LIBS+=-lminires -ldl + ASTLINK+= -shared -Wl,--out-implib,asterisk.dll +endif ifeq ($(OSARCH),NetBSD) AST_LIBS+=-lpthread -lcrypto -lm -L/usr/pkg/lib $(EDITLINE_LIB) endif diff --git a/utils/Makefile b/utils/Makefile index 2edb26a206..95fcee186c 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -30,6 +30,14 @@ ifeq ($(OSARCH),OpenBSD) UTILS:=$(filter-out muted,$(UTILS)) endif +ifeq ($(OSARCH),cygwin) + UTILS:=$(filter-out muted,$(UTILS)) +endif + +ifeq ($(OSARCH),mingw32) + UTILS:= +endif + ifneq ($(findstring darwin,$(OSARCH)),) AUDIO_LIBS=-framework CoreAudio endif diff --git a/utils/extconf.c b/utils/extconf.c index 0028e82aef..0e40718334 100644 --- a/utils/extconf.c +++ b/utils/extconf.c @@ -1146,7 +1146,7 @@ extern int ast_language_is_prefix; /* Asterisk REQUIRES recursive (not error checking) mutexes and will not run without them. */ -#if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP) +#if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP) && defined(PTHREAD_MUTEX_RECURSIVE_NP) #define PTHREAD_MUTEX_INIT_VALUE PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP #define AST_MUTEX_KIND PTHREAD_MUTEX_RECURSIVE_NP #else