1 --- libupnp/configure.ac 2008-04-25 13:41:16.000000000 +0200
2 +++ libupnp_new/configure.ac 2010-08-13 23:21:00.000000000 +0200
8 # Default compilation flags
10 echo "--------------------- Default compilation flags -------------------------------"
12 # so just abort if a header file is not found.
32 # Checks for typedefs, structures, and compiler characteristics
41 # Checks for POSIX Threads
43 echo "--------------------------- pthread stuff -------------------------------------"
46 - [AC_MSG_ERROR([POSIX threads are required to build this program])])
49 +# [AC_MSG_ERROR([POSIX threads are required to build this program])])
51 +PTHREAD_LIBS=" -lpthreadGC2 -lws2_32"
52 +PTHREAD_CFLAGS=" -DPTW32_STATIC_LIB -DUPNP_STATIC_LIB"
53 # Update environment variables for pthreads
57 CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
58 LIBS="$PTHREAD_LIBS $LIBS"
60 +AC_SUBST(PTHREAD_LIBS)
61 +AC_SUBST(PTHREAD_CFLAGS)
65 # Determine if pthread_rwlock_t is available
67 -echo "----------------------- pthread_rwlock_t stuff --------------------------------"
68 -AC_MSG_CHECKING([if pthread_rwlock_t is available])
72 - [#include <pthread.h>],
73 - [pthread_rwlock_t *x;])],
74 - [AC_DEFINE([UPNP_USE_RWLOCK], [1], [Use pthread_rwlock_t])
75 - AC_MSG_RESULT([yes, supported without any options])],
78 - [#define _GNU_SOURCE
79 - #include <pthread.h>],
80 - [pthread_rwlock_t *x;])],
81 - [AC_DEFINE([UPNP_USE_RWLOCK], [1], [Use pthread_rwlock_t])
82 - CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
83 - AC_MSG_RESULT([yes, definition of _GNU_SOURCE required])],
84 - [AC_DEFINE([UPNP_USE_RWLOCK], [0], [Do not use pthread_rwlock_t])
85 - AC_MSG_RESULT([no, needs to fallback to pthread_mutex])
86 - AC_MSG_ERROR([pthread_rwlock_t not available])])])
87 -echo "-------------------------------------------------------------------------------"
88 +#echo "----------------------- pthread_rwlock_t stuff --------------------------------"
89 +#AC_MSG_CHECKING([if pthread_rwlock_t is available])
93 +# [#include <pthread.h>],
94 +# [pthread_rwlock_t *x;])],
95 +# [AC_DEFINE([UPNP_USE_RWLOCK], [1], [Use pthread_rwlock_t])
96 +# AC_MSG_RESULT([yes, supported without any options])],
97 +# [AC_COMPILE_IFELSE(
99 +# [#define _GNU_SOURCE
100 +# #include <pthread.h>],
101 +# [pthread_rwlock_t *x;])],
102 +# [AC_DEFINE([UPNP_USE_RWLOCK], [1], [Use pthread_rwlock_t])
103 +# CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
104 +# AC_MSG_RESULT([yes, definition of _GNU_SOURCE required])],
105 +# [AC_DEFINE([UPNP_USE_RWLOCK], [0], [Do not use pthread_rwlock_t])
106 +# AC_MSG_RESULT([no, needs to fallback to pthread_mutex])
107 +# AC_MSG_ERROR([pthread_rwlock_t not available])])])
108 +#echo "-------------------------------------------------------------------------------"
112 --- libupnp/libupnp.pc.in 2008-02-10 02:55:39.000000000 +0100
113 +++ libupnp.new/libupnp.pc.in 2010-08-24 18:08:41.000000000 +0200
116 Description: Linux SDK for UPnP Devices
118 -Libs: @PTHREAD_LIBS@ -L${libdir} -lupnp -lthreadutil -lixml
119 +Libs: -L${libdir} -lupnp -lthreadutil -lixml @PTHREAD_LIBS@
120 Cflags: @PTHREAD_CFLAGS@ -I${includedir}/upnp