1
--- libupnp/configure.ac.orig 2011-02-09 00:55:44.000000000 +0100
2
+++ libupnp/configure.ac 2011-02-10 23:39:44.154929678 +0100
8
# Default compilation flags
10
echo "--------------------- Default compilation flags -------------------------------"
12
# Checks for POSIX Threads
14
echo "--------------------------- pthread stuff -------------------------------------"
17
- [AC_MSG_ERROR([POSIX threads are required to build this program])])
20
+# [AC_MSG_ERROR([POSIX threads are required to build this program])])
22
+PTHREAD_LIBS=" -lpthreadGC2 -lws2_32"
23
+PTHREAD_CFLAGS=" -DPTW32_STATIC_LIB -DUPNP_STATIC_LIB"
24
# Update environment variables for pthreads
28
CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
29
LIBS="$PTHREAD_LIBS $LIBS"
31
+AC_SUBST(PTHREAD_LIBS)
32
+AC_SUBST(PTHREAD_CFLAGS)
36
# Determine if pthread_rwlock_t is available
38
-echo "----------------------- pthread_rwlock_t stuff --------------------------------"
39
-AC_MSG_CHECKING([if pthread_rwlock_t is available])
43
- [#include <pthread.h>],
44
- [pthread_rwlock_t *x;])],
45
- [AC_DEFINE([UPNP_USE_RWLOCK], [1], [Use pthread_rwlock_t])
46
- AC_MSG_RESULT([yes, supported without any options])],
49
- [#define _GNU_SOURCE
50
- #include <pthread.h>],
51
- [pthread_rwlock_t *x;])],
52
- [AC_DEFINE([UPNP_USE_RWLOCK], [1], [Use pthread_rwlock_t])
53
- CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
54
- AC_MSG_RESULT([yes, definition of _GNU_SOURCE required])],
55
- [AC_DEFINE([UPNP_USE_RWLOCK], [0], [Do not use pthread_rwlock_t])
56
- AC_MSG_RESULT([no, needs to fallback to pthread_mutex])
57
- AC_MSG_ERROR([pthread_rwlock_t not available])])])
58
-echo "-------------------------------------------------------------------------------"
59
+#echo "----------------------- pthread_rwlock_t stuff --------------------------------"
60
+#AC_MSG_CHECKING([if pthread_rwlock_t is available])
64
+# [#include <pthread.h>],
65
+# [pthread_rwlock_t *x;])],
66
+# [AC_DEFINE([UPNP_USE_RWLOCK], [1], [Use pthread_rwlock_t])
67
+# AC_MSG_RESULT([yes, supported without any options])],
68
+# [AC_COMPILE_IFELSE(
70
+# [#define _GNU_SOURCE
71
+# #include <pthread.h>],
72
+# [pthread_rwlock_t *x;])],
73
+# [AC_DEFINE([UPNP_USE_RWLOCK], [1], [Use pthread_rwlock_t])
74
+# CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
75
+# AC_MSG_RESULT([yes, definition of _GNU_SOURCE required])],
76
+# [AC_DEFINE([UPNP_USE_RWLOCK], [0], [Do not use pthread_rwlock_t])
77
+# AC_MSG_RESULT([no, needs to fallback to pthread_mutex])
78
+# AC_MSG_ERROR([pthread_rwlock_t not available])])])
79
+#echo "-------------------------------------------------------------------------------"