]> git.sesse.net Git - vlc/blob - contrib/src/upnp/libupnp-configure.patch
Contribs: add upnp.
[vlc] / contrib / src / upnp / libupnp-configure.patch
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
3 @@ -397,7 +397,6 @@
4  AC_PROG_MAKE_SET
5  AC_PROG_EGREP
6  
7 -#
8  # Default compilation flags
9  #
10  echo "--------------------- Default compilation flags -------------------------------"
11 @@ -531,39 +530,46 @@
12  # Checks for POSIX Threads
13  #
14  echo "--------------------------- pthread stuff -------------------------------------"
15 -ACX_PTHREAD(
16 -       [],
17 -       [AC_MSG_ERROR([POSIX threads are required to build this program])])
18 +#ACX_PTHREAD(
19 +#      [],
20 +#      [AC_MSG_ERROR([POSIX threads are required to build this program])])
21  #
22 +PTHREAD_LIBS=" -lpthreadGC2 -lws2_32"
23 +PTHREAD_CFLAGS=" -DPTW32_STATIC_LIB -DUPNP_STATIC_LIB"
24  # Update environment variables for pthreads
25  #
26 -CC="$PTHREAD_CC"
27 +#CC="$PTHREAD_CC"
28  CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
29  LIBS="$PTHREAD_LIBS $LIBS"
30 +
31 +AC_SUBST(PTHREAD_LIBS)
32 +AC_SUBST(PTHREAD_CFLAGS)
33 +AC_SUBST(PTHREAD_CC)
34 +
35  #
36  # Determine if pthread_rwlock_t is available
37  #
38 -echo "----------------------- pthread_rwlock_t stuff --------------------------------"
39 -AC_MSG_CHECKING([if pthread_rwlock_t is available])
40 -AC_LANG([C])
41 -AC_COMPILE_IFELSE(
42 -       [AC_LANG_PROGRAM(
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])],
47 -       [AC_COMPILE_IFELSE(
48 -               [AC_LANG_PROGRAM(
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])
61 +#AC_LANG([C])
62 +#AC_COMPILE_IFELSE(
63 +#      [AC_LANG_PROGRAM(
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(
69 +#              [AC_LANG_PROGRAM(
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 "-------------------------------------------------------------------------------"
80  
81  
82  AC_CONFIG_FILES([