2006-06-06 10:51:22 +02:00
|
|
|
# -*- Autoconf -*-
|
|
|
|
#
|
|
|
|
# Top-level configure.ac file for libupnp
|
|
|
|
#
|
|
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
#
|
2010-03-27 15:55:57 +01:00
|
|
|
# (C) Copyright 2005-2007 Rémi Turboult <r3mi@users.sourceforge.net>
|
2006-06-06 10:51:22 +02:00
|
|
|
#
|
|
|
|
|
2007-02-02 04:44:55 +01:00
|
|
|
AC_PREREQ(2.60)
|
2006-06-06 10:51:22 +02:00
|
|
|
|
2008-04-26 03:20:09 +02:00
|
|
|
AC_INIT([libupnp], [1.8.0], [mroberto@users.sourceforge.net])
|
2007-12-25 14:43:01 +01:00
|
|
|
dnl ############################################################################
|
|
|
|
dnl # *Independently* of the above libupnp package version, the libtool version
|
|
|
|
dnl # of the 3 libraries need to be updated whenever there is a change released:
|
|
|
|
dnl # "current:revision:age" (this is NOT the same as the package version),
|
|
|
|
dnl # where:
|
|
|
|
dnl # - library code modified: revision++
|
|
|
|
dnl # - interfaces changed/added/removed: current++ and revision=0
|
|
|
|
dnl # - interfaces added: age++
|
|
|
|
dnl # - interfaces removed: age=0
|
|
|
|
dnl # *please update only once, before a formal release, not for each change*
|
|
|
|
dnl #
|
|
|
|
dnl ############################################################################
|
|
|
|
dnl # Release 1.4.1:
|
|
|
|
dnl #AC_SUBST([LT_VERSION_IXML], [2:2:0])
|
|
|
|
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [2:2:0])
|
|
|
|
dnl #AC_SUBST([LT_VERSION_UPNP], [2:2:0])
|
|
|
|
dnl #
|
|
|
|
dnl ############################################################################
|
|
|
|
dnl # Release 1.4.6:
|
|
|
|
dnl # "current:revision:age"
|
|
|
|
dnl #
|
|
|
|
dnl # - Code has changed in ixml
|
|
|
|
dnl # revision: 2 -> 3
|
|
|
|
dnl # - Code has changed in threadutil
|
|
|
|
dnl # revision: 2 -> 3
|
|
|
|
dnl # - Interface added in threadutil
|
|
|
|
dnl # current: 2 -> 3
|
|
|
|
dnl # revisiion: 3 -> 0
|
|
|
|
dnl # age: 0 -> 1
|
|
|
|
dnl # - Code has changed in upnp
|
|
|
|
dnl # revision: 2 -> 3
|
|
|
|
dnl #
|
|
|
|
dnl #AC_SUBST([LT_VERSION_IXML], [2:3:0])
|
|
|
|
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [3:0:1])
|
|
|
|
dnl #AC_SUBST([LT_VERSION_UPNP], [2:3:0])
|
|
|
|
dnl #
|
|
|
|
dnl ############################################################################
|
|
|
|
dnl # Release 1.6.0:
|
|
|
|
dnl # "current:revision:age"
|
|
|
|
dnl #
|
|
|
|
dnl # - Code has changed in ixml
|
|
|
|
dnl # revision: 3 -> 4
|
|
|
|
dnl # - Code has changed in threadutil
|
|
|
|
dnl # revision: 0 -> 1
|
|
|
|
dnl # - Code has changed in upnp
|
|
|
|
dnl # revision: 3 -> 4
|
|
|
|
dnl # - Interface changed in upnp
|
|
|
|
dnl # current: 2 -> 3
|
|
|
|
dnl # revision: 4 -> 0
|
|
|
|
dnl # - Interface removed in upnp
|
|
|
|
dnl # age: 0 -> 0
|
|
|
|
dnl #
|
|
|
|
dnl #AC_SUBST([LT_VERSION_IXML], [2:4:0])
|
|
|
|
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [3:1:1])
|
|
|
|
dnl #AC_SUBST([LT_VERSION_UPNP], [3:0:0])
|
|
|
|
dnl #
|
|
|
|
dnl ############################################################################
|
|
|
|
dnl # Release 1.6.1:
|
|
|
|
dnl # "current:revision:age"
|
|
|
|
dnl #
|
|
|
|
dnl # - Code has changed in threadutil
|
|
|
|
dnl # revision: 1 -> 2
|
|
|
|
dnl # - Interface added in threadutil
|
|
|
|
dnl # current: 3 -> 4
|
|
|
|
dnl # revision: 2 -> 0
|
|
|
|
dnl # - Interface added in threadutil
|
|
|
|
dnl # age: 1 -> 2
|
|
|
|
dnl # - Code has changed in upnp
|
|
|
|
dnl # revision: 0 -> 1
|
|
|
|
dnl #
|
|
|
|
dnl #AC_SUBST([LT_VERSION_IXML], [2:4:0])
|
|
|
|
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [4:0:2])
|
|
|
|
dnl #AC_SUBST([LT_VERSION_UPNP], [3:1:0])
|
|
|
|
dnl #
|
|
|
|
dnl ############################################################################
|
|
|
|
dnl # Release 1.6.2:
|
|
|
|
dnl # "current:revision:age"
|
|
|
|
dnl #
|
|
|
|
dnl # - Code has changed in upnp
|
|
|
|
dnl # revision: 1 -> 2
|
|
|
|
dnl #
|
|
|
|
dnl #AC_SUBST([LT_VERSION_IXML], [2:4:0])
|
|
|
|
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [4:0:2])
|
|
|
|
dnl #AC_SUBST([LT_VERSION_UPNP], [3:2:0])
|
|
|
|
dnl #
|
|
|
|
dnl ############################################################################
|
|
|
|
dnl # Release 1.6.3:
|
|
|
|
dnl # "current:revision:age"
|
|
|
|
dnl #
|
|
|
|
dnl # - Code has changed in threadutil
|
|
|
|
dnl # revision: 0 -> 1
|
|
|
|
dnl #
|
|
|
|
dnl #AC_SUBST([LT_VERSION_IXML], [2:4:0])
|
|
|
|
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [4:1:2])
|
|
|
|
dnl #AC_SUBST([LT_VERSION_UPNP], [3:2:0])
|
|
|
|
dnl #
|
|
|
|
dnl ############################################################################
|
2007-12-27 03:20:24 +01:00
|
|
|
dnl # Release 1.6.4:
|
|
|
|
dnl # "current:revision:age"
|
|
|
|
dnl #
|
2008-01-27 02:29:28 +01:00
|
|
|
dnl # - Code has changed in threadutil
|
|
|
|
dnl # revision: 1 -> 2
|
|
|
|
dnl # - Code has changed in upnp
|
|
|
|
dnl # revision: 2 -> 3
|
|
|
|
dnl #
|
2007-12-27 03:20:24 +01:00
|
|
|
dnl #AC_SUBST([LT_VERSION_IXML], [2:4:0])
|
2008-01-27 02:29:28 +01:00
|
|
|
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [4:2:2])
|
|
|
|
dnl #AC_SUBST([LT_VERSION_UPNP], [3:3:0])
|
2007-12-27 03:20:24 +01:00
|
|
|
dnl #
|
|
|
|
dnl ############################################################################
|
2008-02-03 01:10:27 +01:00
|
|
|
dnl # Release 1.6.5:
|
|
|
|
dnl # "current:revision:age"
|
|
|
|
dnl #
|
|
|
|
dnl # - Code has changed in upnp
|
|
|
|
dnl # revision: 3 -> 4
|
|
|
|
dnl #
|
|
|
|
dnl #AC_SUBST([LT_VERSION_IXML], [2:4:0])
|
|
|
|
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [4:2:2])
|
|
|
|
dnl #AC_SUBST([LT_VERSION_UPNP], [3:4:0])
|
|
|
|
dnl #
|
|
|
|
dnl ############################################################################
|
2008-02-03 03:38:11 +01:00
|
|
|
dnl # Release 1.6.6:
|
|
|
|
dnl # "current:revision:age"
|
|
|
|
dnl #
|
2008-04-25 13:42:51 +02:00
|
|
|
dnl # - Code has changed in threadutil
|
|
|
|
dnl # revision: 2 -> 3
|
2008-02-08 01:05:36 +01:00
|
|
|
dnl # - Code has changed in upnp
|
|
|
|
dnl # revision: 4 -> 5
|
|
|
|
dnl #
|
2008-02-03 03:38:11 +01:00
|
|
|
dnl #AC_SUBST([LT_VERSION_IXML], [2:4:0])
|
2008-04-25 13:42:51 +02:00
|
|
|
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [4:3:2])
|
2008-02-08 01:05:36 +01:00
|
|
|
dnl #AC_SUBST([LT_VERSION_UPNP], [3:5:0])
|
2008-02-03 03:38:11 +01:00
|
|
|
dnl #
|
|
|
|
dnl ############################################################################
|
2010-10-04 16:41:00 +02:00
|
|
|
dnl # Release 1.6.7:
|
|
|
|
dnl # "current:revision:age"
|
|
|
|
dnl #
|
|
|
|
dnl # - Code has changed in threadutil
|
|
|
|
dnl # revision: 3 -> 4
|
2010-11-18 16:21:38 +01:00
|
|
|
dnl # - Code has changed in upnp
|
|
|
|
dnl # revision: 5 -> 6
|
2010-10-04 16:41:00 +02:00
|
|
|
dnl # - Interfaces have been changed, added and removed in upnp
|
2010-11-18 16:21:38 +01:00
|
|
|
dnl # current: 3 -> 4
|
|
|
|
dnl # revision: 6 -> 0
|
|
|
|
dnl # - Interfaces removed in upnp:
|
|
|
|
dnl # age: -> 0
|
2010-10-04 16:41:00 +02:00
|
|
|
dnl #
|
|
|
|
dnl #AC_SUBST([LT_VERSION_IXML], [2:4:0])
|
|
|
|
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [5:0:2])
|
|
|
|
dnl #AC_SUBST([LT_VERSION_UPNP], [3:5:0])
|
|
|
|
dnl #
|
2010-11-18 16:21:38 +01:00
|
|
|
dnl # Obs.: 1.6.7 was released with a version error, the correct nubers should
|
|
|
|
dnl # have been:
|
|
|
|
dnl #AC_SUBST([LT_VERSION_UPNP], [4:0:0])
|
|
|
|
dnl #
|
2010-10-04 16:41:00 +02:00
|
|
|
dnl ############################################################################
|
|
|
|
dnl # Release 1.6.8:
|
|
|
|
dnl # "current:revision:age"
|
|
|
|
dnl #
|
2010-11-18 16:21:38 +01:00
|
|
|
dnl # - Code has changed in ixml
|
|
|
|
dnl # revision: 4 -> 5
|
|
|
|
dnl # - Code has changed in threadutil
|
|
|
|
dnl # revision: 0 -> 1
|
|
|
|
dnl # - Code has changed in upnp
|
|
|
|
dnl # revision: 0 -> 1
|
|
|
|
dnl #
|
|
|
|
dnl #AC_SUBST([LT_VERSION_IXML], [2:5:0])
|
|
|
|
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [5:1:2])
|
|
|
|
dnl #AC_SUBST([LT_VERSION_UPNP], [4:1:0])
|
2010-10-04 16:41:00 +02:00
|
|
|
dnl #
|
|
|
|
dnl ############################################################################
|
2010-11-18 16:21:38 +01:00
|
|
|
dnl # Release 1.6.9:
|
2008-04-26 03:20:09 +02:00
|
|
|
dnl # "current:revision:age"
|
|
|
|
dnl #
|
* Added API to ithread, created the following functions:
- int ithread_initialize_library(void);
- int ithread_cleanup_library(void);
- int ithread_initialize_thread(void);
- int ithread_cleanup_thread(void);
* SF Bug Tracker [ 2876374 ] Access Violation when compiling with Visual Studio 2008
Submitted: Stulle ( stulleamgym ) - 2009-10-10 19:05
Hi,
I am one of the devs of the MorphXT project and I use this lib in some
other of my projects, too. When I tried to upgrade the lib earlier for one
of my projects I had to realise that something did not work at first and
while most of the things were reasonably ease to be fixed. Now, the last
thing I encountered was not so easy to fix and I am uncertain if my fix is
any good so I'll just post it here and wait for some comments.
The problem was that I got an Access Violation when calling "UpnpInit". It
would call "ithread_rwlock_init(&GlobalHndRWLock, NULL)" which eventually
led to calling "pthread_cond_init" and I got the error notice at
"EnterCriticalSection (&ptw32_cond_list_lock);". It appeared that
"ptw32_cond_list_lock" was NULL. Now, I found two ways to fix this. Firstly
moving the whole block after at least one of the "ThreadPoolInit" calls
will fix the issue. Secondly, you could add:
#ifdef WIN32
#ifdef PTW32_STATIC_LIB
// to get the following working we need this... is it a good patch or
not... I do not know!
pthread_win32_process_attach_np();
#endif
#endif
right before "ithread_rwlock_init(&GlobalHndRWLock, NULL)".
Just so you know, I am using libupnp 1.6.6 and libpthreads 2.8.0 and both
are linked static into the binaries. I am currently using Visual Studio
2008 for development with Windows being the target OS. Any comment at your
end?
Regards, Stulle
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@527 119443c7-1b9e-41f8-b6fc-b9c35fce742c
2010-03-27 20:46:16 +01:00
|
|
|
dnl # - Code has changed in threadutil
|
2010-11-18 16:21:38 +01:00
|
|
|
dnl # revision: 1 -> 2
|
|
|
|
dnl # - Code has changed in upnp
|
|
|
|
dnl # revision: 1 -> 2
|
2008-04-26 03:20:09 +02:00
|
|
|
dnl #
|
2010-11-18 16:21:38 +01:00
|
|
|
dnl #AC_SUBST([LT_VERSION_IXML], [2:5:0])
|
|
|
|
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [5:2:2])
|
|
|
|
dnl #AC_SUBST([LT_VERSION_UPNP], [4:2:0])
|
|
|
|
dnl #
|
|
|
|
dnl ############################################################################
|
|
|
|
dnl # Release 1.6.10:
|
|
|
|
dnl # "current:revision:age"
|
|
|
|
dnl #
|
2011-03-17 13:40:28 +01:00
|
|
|
dnl # - Code has changed in ixml
|
|
|
|
dnl # revision: 5 -> 6
|
|
|
|
dnl # - Code has changed in threadutil
|
|
|
|
dnl # revision: 2 -> 3
|
2010-11-18 17:55:39 +01:00
|
|
|
dnl # - Code has changed in upnp
|
|
|
|
dnl # revision: 2 -> 3
|
|
|
|
dnl # - interface has changed in upnp
|
|
|
|
dnl # current: 4 -> 5
|
|
|
|
dnl # revision: 3 -> 0
|
|
|
|
dnl #
|
2011-03-17 13:40:28 +01:00
|
|
|
dnl #AC_SUBST([LT_VERSION_IXML], [2:6:0])
|
2010-11-18 16:21:38 +01:00
|
|
|
dnl ############################################################################
|
2011-02-08 01:50:48 +01:00
|
|
|
dnl # Release 1.6.11:
|
|
|
|
dnl # "current:revision:age"
|
|
|
|
dnl #
|
2011-03-17 13:40:28 +01:00
|
|
|
dnl # - Code has changed in threadutil
|
|
|
|
dnl # revision: 3 -> 4
|
|
|
|
dnl # - Code has changed in upnp
|
|
|
|
dnl # revision: 3 -> 4
|
|
|
|
dnl # - interface has changed in upnp
|
|
|
|
dnl # current: 5 -> 6
|
|
|
|
dnl # revision: 4 -> 0
|
2011-02-08 01:50:48 +01:00
|
|
|
dnl #
|
|
|
|
dnl #AC_SUBST([LT_VERSION_IXML], [2:6:0])
|
2011-03-17 13:40:28 +01:00
|
|
|
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [5:4:2])
|
|
|
|
dnl #AC_SUBST([LT_VERSION_UPNP], [6:0:0])
|
|
|
|
dnl #
|
|
|
|
dnl ############################################################################
|
|
|
|
dnl # Release 1.6.12:
|
|
|
|
dnl # "current:revision:age"
|
|
|
|
dnl #
|
|
|
|
dnl # - interface added in threadutil
|
|
|
|
dnl # current: 5 -> 6
|
|
|
|
dnl # revision: 4 - > 0
|
|
|
|
dnl # age: 2 -> 3
|
|
|
|
dnl # - interfaces removed in threadutil
|
|
|
|
dnl # age: 3 -> 0
|
|
|
|
dnl #
|
|
|
|
dnl #AC_SUBST([LT_VERSION_IXML], [2:6:0])
|
|
|
|
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [6:0:0])
|
|
|
|
dnl #AC_SUBST([LT_VERSION_UPNP], [6:0:0])
|
|
|
|
dnl #
|
|
|
|
dnl ############################################################################
|
|
|
|
dnl # Release 1.6.13:
|
|
|
|
dnl # "current:revision:age"
|
|
|
|
dnl #
|
|
|
|
dnl # - Code has changed in upnp
|
|
|
|
dnl # revision: 0 -> 1
|
|
|
|
dnl # - interface added in upnp
|
|
|
|
dnl # current: 6 -> 7
|
|
|
|
dnl # revision: 1 - > 0
|
|
|
|
dnl # age: 0 -> 1
|
|
|
|
dnl #
|
|
|
|
dnl #AC_SUBST([LT_VERSION_IXML], [2:6:0])
|
|
|
|
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [6:0:0])
|
|
|
|
dnl #AC_SUBST([LT_VERSION_UPNP], [7:0:1])
|
2010-11-18 16:21:38 +01:00
|
|
|
dnl #
|
|
|
|
dnl ############################################################################
|
2011-11-14 16:05:51 +01:00
|
|
|
dnl # Release 1.6.14:
|
|
|
|
dnl # "current:revision:age"
|
|
|
|
dnl #
|
|
|
|
dnl # - Code has changed in upnp
|
|
|
|
dnl # revision: 0 -> 1
|
|
|
|
dnl # - interface added in upnp
|
|
|
|
dnl # current: 7 -> 8
|
|
|
|
dnl # revision: 1 - > 0
|
|
|
|
dnl # age: 1 -> 2
|
|
|
|
dnl #
|
|
|
|
dnl #AC_SUBST([LT_VERSION_IXML], [2:6:0])
|
|
|
|
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [6:0:0])
|
|
|
|
dnl #AC_SUBST([LT_VERSION_UPNP], [8:0:2])
|
|
|
|
dnl #
|
|
|
|
dnl ############################################################################
|
|
|
|
dnl # Release 1.6.15:
|
|
|
|
dnl # "current:revision:age"
|
|
|
|
dnl #
|
2012-01-25 13:46:41 +01:00
|
|
|
dnl # - Code has changed in upnp
|
|
|
|
dnl # revision: 0 -> 1
|
|
|
|
dnl #
|
|
|
|
dnl #AC_SUBST([LT_VERSION_IXML], [2:6:0])
|
|
|
|
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [6:0:0])
|
|
|
|
dnl #AC_SUBST([LT_VERSION_UPNP], [8:1:2])
|
|
|
|
dnl #
|
|
|
|
dnl ############################################################################
|
|
|
|
dnl # Release 1.6.16:
|
|
|
|
dnl # "current:revision:age"
|
|
|
|
dnl #
|
2011-10-22 17:00:00 +02:00
|
|
|
dnl # - Code has changed in ixml
|
|
|
|
dnl # revision: 6 -> 7
|
2012-03-22 00:12:08 +01:00
|
|
|
dnl # - Code has changed in threadutil
|
|
|
|
dnl # revision: 0 -> 1
|
2011-10-22 17:00:00 +02:00
|
|
|
dnl # - Code has changed in upnp
|
|
|
|
dnl # revision: 1 -> 2
|
|
|
|
dnl # - interface changed/added/removed in upnp
|
|
|
|
dnl # current++(9); revision = 0
|
|
|
|
dnl # - interface added in upnp
|
|
|
|
dnl # age++(3)
|
2011-11-14 16:05:51 +01:00
|
|
|
dnl #
|
2011-10-22 17:00:00 +02:00
|
|
|
dnl #AC_SUBST([LT_VERSION_IXML], [2:7:0])
|
2012-03-22 00:12:08 +01:00
|
|
|
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [6:1:0])
|
2011-10-22 17:00:00 +02:00
|
|
|
dnl #AC_SUBST([LT_VERSION_UPNP], [9:0:3])
|
2011-11-14 16:05:51 +01:00
|
|
|
dnl #
|
|
|
|
dnl ############################################################################
|
2012-03-22 00:12:08 +01:00
|
|
|
dnl # Release 1.6.17:
|
|
|
|
dnl # "current:revision:age"
|
|
|
|
dnl #
|
2012-04-03 14:50:39 +02:00
|
|
|
dnl # - Code has changed in threadutil
|
|
|
|
dnl # revision: 1 -> 2
|
|
|
|
dnl # - Code has changed in upnp
|
|
|
|
dnl # revision: 0 -> 1
|
|
|
|
dnl #
|
|
|
|
dnl #AC_SUBST([LT_VERSION_IXML], [2:7:0])
|
|
|
|
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [6:2:0])
|
|
|
|
dnl #AC_SUBST([LT_VERSION_UPNP], [9:1:3])
|
|
|
|
dnl #
|
|
|
|
dnl ############################################################################
|
|
|
|
dnl # Release 1.6.18:
|
|
|
|
dnl # "current:revision:age"
|
|
|
|
dnl #
|
2012-03-22 00:12:08 +01:00
|
|
|
dnl # -
|
|
|
|
dnl #
|
|
|
|
dnl #AC_SUBST([LT_VERSION_IXML], [::])
|
|
|
|
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [::])
|
|
|
|
dnl #AC_SUBST([LT_VERSION_UPNP], [::])
|
|
|
|
dnl #
|
|
|
|
dnl ############################################################################
|
2010-11-18 16:21:38 +01:00
|
|
|
dnl # Release 1.8.0:
|
|
|
|
dnl # "current:revision:age"
|
|
|
|
dnl #
|
|
|
|
dnl # - Start from a new ground.
|
|
|
|
dnl #
|
2012-03-22 00:12:08 +01:00
|
|
|
dnl #AC_SUBST([LT_VERSION_IXML], [10:0:0])
|
|
|
|
dnl #AC_SUBST([LT_VERSION_THREADUTIL], [10:0:0])
|
|
|
|
dnl #AC_SUBST([LT_VERSION_UPNP], [10:0:0])
|
2008-04-26 03:20:09 +02:00
|
|
|
dnl #
|
|
|
|
dnl ############################################################################
|
2012-03-22 00:12:08 +01:00
|
|
|
AC_SUBST([LT_VERSION_IXML], [10:0:0])
|
|
|
|
AC_SUBST([LT_VERSION_THREADUTIL], [10:0:0])
|
|
|
|
AC_SUBST([LT_VERSION_UPNP], [10:0:0])
|
2007-12-25 14:43:01 +01:00
|
|
|
dnl ############################################################################
|
|
|
|
dnl # Repeating the algorithm to place it closer to the modificatin place:
|
|
|
|
dnl # - library code modified: revision++
|
|
|
|
dnl # - interfaces changed/added/removed: current++ and revision=0
|
|
|
|
dnl # - interfaces added: age++
|
|
|
|
dnl # - interfaces removed: age=0
|
|
|
|
dnl # *please update only once, before a formal release, not for each change*
|
|
|
|
dnl ############################################################################
|
2006-06-06 10:51:22 +02:00
|
|
|
|
|
|
|
|
2008-01-22 14:16:38 +01:00
|
|
|
AC_CONFIG_AUX_DIR([build-aux])
|
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
|
|
|
AC_CONFIG_SRCDIR([upnp/inc/upnp.h])
|
2006-06-06 10:51:22 +02:00
|
|
|
|
2007-06-23 16:38:32 +02:00
|
|
|
|
2007-02-02 05:21:21 +01:00
|
|
|
AM_INIT_AUTOMAKE([1.8 -Wall foreign subdir-objects dist-bzip2])
|
2006-06-06 10:51:22 +02:00
|
|
|
|
2007-06-23 16:38:32 +02:00
|
|
|
|
2007-04-28 19:45:34 +02:00
|
|
|
#
|
|
|
|
# Get canonical host names in host and host_os
|
|
|
|
#
|
|
|
|
AC_CANONICAL_HOST
|
|
|
|
|
2006-06-06 10:51:22 +02:00
|
|
|
#
|
|
|
|
# There are 3 configuration files :
|
|
|
|
# 1) "./autoconfig.h" is auto-generated and used only internally during build
|
|
|
|
# (usually named "config.h" but conflicts with the file below)
|
|
|
|
# 2) "./upnp/src/inc/config.h" is static and contains some compile-time
|
|
|
|
# parameters. This file was previously in "./upnp/inc" but is no longer
|
|
|
|
# installed (contains internal definitions only).
|
|
|
|
# 3) "./upnp/inc/upnpconfig.h" is auto-generated and installed with the
|
|
|
|
# libraries : it contains information on the configuration of the
|
|
|
|
# installed libraries.
|
|
|
|
#
|
|
|
|
AC_CONFIG_HEADERS([autoconfig.h upnp/inc/upnpconfig.h])
|
2006-08-17 07:16:23 +02:00
|
|
|
#AC_SYS_LARGEFILE_SENSITIVE
|
2006-06-06 10:51:22 +02:00
|
|
|
|
|
|
|
AC_REVISION([$Revision: 1.11 $])
|
|
|
|
|
|
|
|
upnpmaj=`echo "$PACKAGE_VERSION" | sed 's/\..*//' `
|
|
|
|
upnpmin=[`echo "$PACKAGE_VERSION" | sed 's/^[^.]\.// ; s/[^0-9].*$//' `]
|
|
|
|
upnppatch=[`echo "$PACKAGE_VERSION" | sed 's/^[^.]\.[^.]\.// ; s/[^0-9].*$//' `]
|
2007-12-25 14:43:01 +01:00
|
|
|
AC_DEFINE_UNQUOTED([UPNP_VERSION_STRING], "$PACKAGE_VERSION", [see upnpconfig.h])
|
2006-06-06 10:51:22 +02:00
|
|
|
AC_DEFINE_UNQUOTED([UPNP_VERSION_MAJOR], $upnpmaj, [see upnpconfig.h])
|
|
|
|
AC_DEFINE_UNQUOTED([UPNP_VERSION_MINOR], $upnpmin, [see upnpconfig.h])
|
|
|
|
AC_DEFINE_UNQUOTED([UPNP_VERSION_PATCH], $upnppatch, [see upnpconfig.h])
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Check for DEBUG flag
|
|
|
|
#
|
|
|
|
RT_BOOL_ARG_ENABLE([debug], [no], [extra debugging code])
|
|
|
|
if test "x$enable_debug" = xyes ; then
|
|
|
|
AC_DEFINE(UPNP_HAVE_DEBUG, 1, [see upnpconfig.h])
|
|
|
|
AC_DEFINE(DEBUG, 1, [Define to 1 to compile debug code])
|
|
|
|
else
|
|
|
|
AC_DEFINE(NO_DEBUG, 1, [Define to 1 to prevent some debug code])
|
|
|
|
AC_DEFINE(NDEBUG, 1, [Define to 1 to prevent compilation of assert()])
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Check for libupnp subsets
|
|
|
|
#
|
|
|
|
RT_BOOL_ARG_ENABLE([client], [yes], [control point code (client)])
|
|
|
|
if test "x$enable_client" = xyes ; then
|
|
|
|
AC_DEFINE(UPNP_HAVE_CLIENT, 1, [see upnpconfig.h])
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
RT_BOOL_ARG_ENABLE([device], [yes],
|
|
|
|
[device specific code (implies --disable-webserver if disabled)])
|
|
|
|
if test "x$enable_device" = xyes ; then
|
|
|
|
AC_DEFINE(UPNP_HAVE_DEVICE, 1, [see upnpconfig.h])
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if test "x$enable_device" = xno ; then
|
|
|
|
enable_webserver=no
|
|
|
|
else
|
|
|
|
RT_BOOL_ARG_ENABLE([webserver], [yes], [integrated web server])
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(ENABLE_WEBSERVER, test x"$enable_webserver" = xyes)
|
|
|
|
if test "x$enable_webserver" = xyes ; then
|
|
|
|
AC_DEFINE(UPNP_HAVE_WEBSERVER, 1, [see upnpconfig.h])
|
|
|
|
fi
|
|
|
|
|
2012-03-09 16:18:10 +01:00
|
|
|
RT_BOOL_ARG_ENABLE([ssdp], [yes], [SSDP part])
|
|
|
|
if test "x$enable_ssdp" = xyes ; then
|
|
|
|
AC_DEFINE(UPNP_HAVE_SSDP, 1, [see upnpconfig.h])
|
|
|
|
fi
|
|
|
|
|
2012-03-15 13:43:04 +01:00
|
|
|
RT_BOOL_ARG_ENABLE([optssdp], [yes], [optionnal SSDP headers support)])
|
|
|
|
if test "x$enable_optssdp" = xyes ; then
|
|
|
|
AC_DEFINE(UPNP_HAVE_OPTSSDP, 1, [see upnpconfig.h])
|
|
|
|
enable_uuid=yes
|
|
|
|
fi
|
|
|
|
|
2012-03-09 16:18:10 +01:00
|
|
|
RT_BOOL_ARG_ENABLE([soap], [yes], [SOAP part])
|
|
|
|
if test "x$enable_soap" = xyes ; then
|
|
|
|
AC_DEFINE(UPNP_HAVE_SOAP, 1, [see upnpconfig.h])
|
|
|
|
fi
|
|
|
|
|
|
|
|
RT_BOOL_ARG_ENABLE([gena], [yes], [GENA part])
|
|
|
|
if test "x$enable_gena" = xyes ; then
|
|
|
|
AC_DEFINE(UPNP_HAVE_GENA, 1, [see upnpconfig.h])
|
2012-03-15 13:43:04 +01:00
|
|
|
enable_uuid=yes
|
2012-03-09 16:18:10 +01:00
|
|
|
fi
|
2006-06-06 10:51:22 +02:00
|
|
|
|
2012-03-15 13:43:04 +01:00
|
|
|
AM_CONDITIONAL(ENABLE_UUID, test x"$enable_uuid" = xyes)
|
|
|
|
|
2006-06-06 10:51:22 +02:00
|
|
|
RT_BOOL_ARG_ENABLE([tools], [yes], [helper APIs in upnptools.h])
|
|
|
|
if test "x$enable_tools" = xyes ; then
|
|
|
|
AC_DEFINE(UPNP_HAVE_TOOLS, 1, [see upnpconfig.h])
|
|
|
|
fi
|
|
|
|
|
2010-09-10 02:36:25 +02:00
|
|
|
RT_BOOL_ARG_ENABLE([ipv6], [no], [ipv6 support])
|
|
|
|
if test "x$enable_ipv6" = xyes ; then
|
|
|
|
AC_DEFINE(UPNP_ENABLE_IPV6, 1, [see upnpconfig.h])
|
|
|
|
fi
|
|
|
|
|
2012-03-30 21:52:37 +02:00
|
|
|
RT_BOOL_ARG_ENABLE([unspecified_server], [no], [unspecified SERVER header])
|
|
|
|
if test "x$enable_unspecified_server" = xyes ; then
|
|
|
|
AC_DEFINE(UPNP_ENABLE_UNSPECIFIED_SERVER, 1, [see upnpconfig.h])
|
|
|
|
fi
|
|
|
|
|
2011-02-07 18:48:58 +01:00
|
|
|
RT_BOOL_ARG_ENABLE([open_ssl], [no], [open-ssl support])
|
|
|
|
if test "x$enable_open_ssl" = xyes ; then
|
|
|
|
AC_DEFINE(UPNP_ENABLE_OPEN_SSL, 1, [see upnpconfig.h])
|
|
|
|
fi
|
|
|
|
|
2010-10-01 19:00:02 +02:00
|
|
|
RT_BOOL_ARG_ENABLE([notification_reordering], [yes], [GENA notification reordering in gena_device.c])
|
|
|
|
if test "x$enable_notification_reordering" = xyes ; then
|
|
|
|
AC_DEFINE(UPNP_ENABLE_NOTIFICATION_REORDERING, 1, [see upnpconfig.h])
|
|
|
|
fi
|
|
|
|
|
2010-11-12 00:40:22 +01:00
|
|
|
RT_BOOL_ARG_ENABLE([blocking_tcp_connections], [yes], [blocking TCP connections])
|
|
|
|
if test "x$enable_blocking_tcp_connections" = xyes ; then
|
|
|
|
AC_DEFINE(UPNP_ENABLE_BLOCKING_TCP_CONNECTIONS, 1, [see upnpconfig.h])
|
|
|
|
fi
|
|
|
|
|
2013-04-27 14:58:32 +02:00
|
|
|
RT_BOOL_ARG_ENABLE([scriptsupport], [yes], [script support for IXML document tree, see ixml.h])
|
2013-04-26 13:37:08 +02:00
|
|
|
if test "x$enable_scriptsupport" = xyes ; then
|
2013-04-27 14:58:32 +02:00
|
|
|
AC_DEFINE(IXML_HAVE_SCRIPTSUPPORT, 1, [see upnpconfig.h])
|
2013-04-26 13:37:08 +02:00
|
|
|
fi
|
|
|
|
|
2006-06-06 10:51:22 +02:00
|
|
|
|
|
|
|
RT_BOOL_ARG_ENABLE([samples], [yes], [compilation of upnp/sample/ code])
|
|
|
|
|
|
|
|
|
2007-12-25 14:43:01 +01:00
|
|
|
#
|
2006-06-06 10:51:22 +02:00
|
|
|
# doc installation
|
2007-02-03 14:52:42 +01:00
|
|
|
# autoconf >= 2.60 already defines ${docdir}, but we will not use its
|
|
|
|
# default value, which is ${datarootdir}/doc/${PACKAGE_TARNAME}.
|
|
|
|
# That would give us ${datarootdir}/doc/libupnp, and we want the package
|
|
|
|
# version on that.
|
2007-12-25 14:43:01 +01:00
|
|
|
#
|
2007-02-03 14:52:42 +01:00
|
|
|
docdir="${datadir}/doc/${PACKAGE_NAME}-${PACKAGE_VERSION}"
|
2007-02-02 04:44:55 +01:00
|
|
|
AC_MSG_CHECKING([for documentation directory])
|
2007-04-28 19:45:34 +02:00
|
|
|
AC_ARG_WITH(
|
|
|
|
[documentation],
|
|
|
|
AS_HELP_STRING(
|
|
|
|
[--with-documentation=directory_name],
|
2007-02-02 04:44:55 +01:00
|
|
|
[where documentation is installed
|
|
|
|
@<:@[DATADIR/doc/]AC_PACKAGE_NAME[-]AC_PACKAGE_VERSION@:>@])
|
2007-04-28 19:45:34 +02:00
|
|
|
AS_HELP_STRING(
|
|
|
|
[--without-documentation],
|
2007-02-02 04:44:55 +01:00
|
|
|
[do not install the documentation]),
|
|
|
|
[],
|
|
|
|
[with_documentation=no])
|
|
|
|
|
2007-12-25 14:43:01 +01:00
|
|
|
#
|
2007-02-02 04:44:55 +01:00
|
|
|
# If something has been entered after an equal sign, assume it is the directory
|
2007-12-25 14:43:01 +01:00
|
|
|
#
|
2007-02-02 04:44:55 +01:00
|
|
|
if test x"$with_documentation" != xyes -a x"$with_documentation" != xno; then
|
|
|
|
docdir="$with_documentation"
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(WITH_DOCUMENTATION, test x"$with_documentation" != xno)
|
|
|
|
AC_SUBST(docdir)
|
|
|
|
AC_MSG_RESULT($docdir)
|
2006-06-06 10:51:22 +02:00
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Checks for programs
|
|
|
|
#
|
|
|
|
AC_PROG_CC
|
|
|
|
AM_PROG_CC_C_O
|
Fix for warning issue in libtool
Reference:
http://lists.gnu.org/archive/html/automake/2012-05/msg00014.html
Re: automake 1.12 and AM_PROG_AR
From: Nick Bowler
Subject: Re: automake 1.12 and AM_PROG_AR
Date: Thu, 10 May 2012 17:16:04 -0400
User-agent: Mutt/1.5.21 (2010-09-15)
On 2012-05-10 12:52 +0200, Simon Josefsson wrote:
> Hi,
>
> I have received patches similar to the one below for several of my
> projects already, and I'm beginning to think there may be something that
> could be improved in automake. Why does automake 1.12 need something
> that 1.11 doesn't even recognize? Perhaps a smoother way to introduce
> this behaviour is to let 1.12 automatically enable it?
>
> Alternatively, is there some other way to address the warnings that is
> better? Does it indicate a real problem in my projects?
>
> http://lists.gnu.org/archive/html/help-libidn/2012-05/msg00000.html
> http://lists.gnu.org/archive/html/help-libidn/2012-05/txtqAGOGgtPqj.txt
FYI, since the patch is so short it would have been helpful to include
it inline in your email. I've taken the liberty of reproducing it
below:
> --- libidn-1.24.orig/configure.ac
> +++ libidn-1.24/configure.ac
> @@ -34,6 +34,10 @@ AC_SUBST(LT_CURRENT, 17)
> AC_SUBST(LT_REVISION, 7)
> AC_SUBST(LT_AGE, 6)
>
> +# automake 1.12 seems to require this, but automake 1.11 doesn't recognize it
> +m4_pattern_allow([AM_PROG_AR])
> +AM_PROG_AR
> +
> AC_PROG_CC
> gl_EARLY
> lgl_EARLY
First off, this patch seems wrong at a first glance by its use of
m4_pattern_allow: this is saying that "It's ok for AM_PROG_AR to appear
verbatim in the configure script". This suggests to me that the patch
didn't actually get tested (well) on Automake 1.11, since there will
almost certainly be an error about AM_PROG_AR at configure time.
This one should actually work properly on both old and new Automake
(untested):
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
That being said, the new warning is enabled by the -Wextra-portability
option that was added to Automake-1.12. I'm by no means an export on
this issue, but I think it relates to new support for building with the
Microsoft compiler: in other words, I think that ignoring this warning
will not cause regressions in your package but, instead, your package
will simply not be able to make use of the new feature.
Regardless, I believe that for most packages the new warning is actually
caused by Libtool, and therefore the correct place to add the call to
AM_PROG_AR is in libtool itself, rather than ad-hoc patching of each
package individually. You can silence the warnings (but not fix them)
by adding -Wno-extra-portability to AM_INIT_AUTOMAKE.
Cheers,
--
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)
(cherry picked from commit 350999187285300b1b7dec574cc745617e239bec)
2013-07-30 15:39:30 +02:00
|
|
|
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
|
2006-06-06 10:51:22 +02:00
|
|
|
AC_PROG_LIBTOOL
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_MAKE_SET
|
2006-07-05 04:56:34 +02:00
|
|
|
AC_PROG_EGREP
|
2006-06-06 10:51:22 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# Default compilation flags
|
|
|
|
#
|
2007-04-28 19:45:34 +02:00
|
|
|
echo "--------------------- Default compilation flags -------------------------------"
|
|
|
|
echo host is $host
|
|
|
|
echo host_os is $host_os
|
|
|
|
case $host_os in
|
2007-04-30 03:09:21 +02:00
|
|
|
freebsd*)
|
2007-04-28 19:45:34 +02:00
|
|
|
echo "Using FreeBSD specific compiler settings"
|
|
|
|
# Put FreeBSD specific compiler flags here
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Using non-specific system compiler settings"
|
|
|
|
if test x"$enable_debug" = xyes; then
|
2010-12-22 12:58:48 +01:00
|
|
|
# AC_PROG_CC already sets CFLAGS to "-g -O2" by default,
|
|
|
|
# but only if CFLAGS was not previously set.
|
2008-04-23 21:33:03 +02:00
|
|
|
#:
|
|
|
|
# Use -O0 in debug so that variables do not get optimized out
|
2010-12-22 12:58:48 +01:00
|
|
|
AX_CFLAGS_GCC_OPTION([-O0, -g])
|
2007-04-28 19:45:34 +02:00
|
|
|
else
|
|
|
|
# add optimise for size
|
|
|
|
AX_CFLAGS_GCC_OPTION([-Os])
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2006-06-06 10:51:22 +02:00
|
|
|
AX_CFLAGS_WARN_ALL
|
2007-04-28 19:45:34 +02:00
|
|
|
echo "-------------------------------------------------------------------------------"
|
|
|
|
|
2006-06-06 10:51:22 +02:00
|
|
|
|
2006-08-17 07:16:23 +02:00
|
|
|
#
|
|
|
|
# Lot's of stuff to ensure large file support
|
|
|
|
#
|
2007-04-28 19:45:34 +02:00
|
|
|
AC_TYPE_SIZE_T
|
2006-08-17 07:16:23 +02:00
|
|
|
AC_TYPE_OFF_T
|
2007-04-28 19:45:34 +02:00
|
|
|
AC_DEFINE([_LARGE_FILE_SOURCE], [], [Large files support])
|
|
|
|
AC_DEFINE([_FILE_OFFSET_BITS], [64], [File Offset size])
|
2006-06-06 10:51:22 +02:00
|
|
|
|
|
|
|
|
|
|
|
#
|
2008-05-25 02:49:43 +02:00
|
|
|
# Are we targetting Win32?
|
|
|
|
#
|
|
|
|
AC_MSG_CHECKING([for Win32])
|
|
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
|
|
|
|
#ifdef WIN32
|
|
|
|
#error Yup
|
|
|
|
#endif
|
|
|
|
],[])], [ac_cv_win32="no"], [ac_cv_win32="yes"])
|
|
|
|
if test "$ac_cv_win32" = "yes"; then
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Checks for header files (which aren't needed on Win32)
|
2006-06-06 10:51:22 +02:00
|
|
|
#
|
|
|
|
AC_HEADER_STDC
|
2008-05-25 02:49:43 +02:00
|
|
|
if test "$ac_cv_win32" = "no"; then
|
2006-06-06 10:51:22 +02:00
|
|
|
# libupnp code doesn't use autoconf variables yet,
|
|
|
|
# so just abort if a header file is not found.
|
2007-04-28 19:45:34 +02:00
|
|
|
AC_CHECK_HEADERS(
|
|
|
|
[ \
|
|
|
|
arpa/inet.h \
|
|
|
|
fcntl.h \
|
2007-05-09 01:45:21 +02:00
|
|
|
inttypes.h \
|
2007-04-28 19:45:34 +02:00
|
|
|
limits.h \
|
|
|
|
netdb.h \
|
|
|
|
netinet/in.h \
|
|
|
|
stdlib.h \
|
|
|
|
string.h \
|
|
|
|
sys/ioctl.h \
|
|
|
|
sys/socket.h \
|
|
|
|
sys/time.h \
|
|
|
|
syslog.h \
|
|
|
|
unistd.h \
|
|
|
|
],
|
|
|
|
[],
|
|
|
|
[AC_MSG_ERROR([required header file missing])])
|
2008-05-25 02:49:43 +02:00
|
|
|
fi
|
2006-06-06 10:51:22 +02:00
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Checks for typedefs, structures, and compiler characteristics
|
|
|
|
#
|
|
|
|
AC_C_CONST
|
2008-05-25 02:49:43 +02:00
|
|
|
|
|
|
|
# The test for socklen_t was getting it wrong when it exists but is in ws2tcpip.h,
|
|
|
|
# so we use a new test.
|
|
|
|
#TYPE_SOCKLEN_T
|
|
|
|
|
|
|
|
AC_CHECK_HEADERS([sys/types.h sys/socket.h ws2tcpip.h])
|
|
|
|
AC_MSG_CHECKING(for socklen_t)
|
|
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
|
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_SYS_SOCKET_H
|
|
|
|
#include <sys/socket.h>
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_WS2TCPIP_H
|
|
|
|
#include <ws2tcpip.h>
|
|
|
|
#endif
|
|
|
|
],[ socklen_t t = 0; return t; ])
|
|
|
|
],[ac_cv_socklen_t="yes"],[ac_cv_socklen_t="no"])
|
|
|
|
if test "$ac_cv_socklen_t" = "yes"; then
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT([no, using int])
|
|
|
|
AC_DEFINE(socklen_t, int, [Type for storing the length of struct sockaddr])
|
|
|
|
fi
|
2006-06-06 10:51:22 +02:00
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Checks for library functions
|
|
|
|
#
|
|
|
|
AC_FUNC_VPRINTF
|
|
|
|
AC_FUNC_FSEEKO
|
2011-01-17 00:05:07 +01:00
|
|
|
AC_CHECK_FUNC(strnlen,
|
|
|
|
AC_DEFINE(HAVE_STRNLEN, 1, [Defines if strnlen is available on your system]))
|
|
|
|
AC_CHECK_FUNC(strndup,
|
|
|
|
AC_DEFINE(HAVE_STRNDUP, 1, [Defines if strndup is available on your system]))
|
2010-03-27 15:55:57 +01:00
|
|
|
#
|
|
|
|
# Solaris needs -lsocket -lnsl -lrt
|
|
|
|
AC_SEARCH_LIBS([bind], [socket])
|
|
|
|
AC_SEARCH_LIBS([gethostbyname], [nsl])
|
|
|
|
AC_SEARCH_LIBS([sched_getparam], [rt])
|
2006-06-06 10:51:22 +02:00
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Checks for POSIX Threads
|
|
|
|
#
|
2007-12-24 04:39:50 +01:00
|
|
|
echo "--------------------------- pthread stuff -------------------------------------"
|
2007-04-28 19:45:34 +02:00
|
|
|
ACX_PTHREAD(
|
|
|
|
[],
|
|
|
|
[AC_MSG_ERROR([POSIX threads are required to build this program])])
|
2007-12-25 14:43:01 +01:00
|
|
|
#
|
2007-12-25 19:29:52 +01:00
|
|
|
# Update environment variables for pthreads
|
|
|
|
#
|
|
|
|
CC="$PTHREAD_CC"
|
|
|
|
CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
|
|
|
|
LIBS="$PTHREAD_LIBS $LIBS"
|
|
|
|
#
|
2007-12-25 14:43:01 +01:00
|
|
|
# Determine if pthread_rwlock_t is available
|
|
|
|
#
|
2007-12-24 04:39:50 +01:00
|
|
|
echo "----------------------- pthread_rwlock_t stuff --------------------------------"
|
|
|
|
AC_MSG_CHECKING([if pthread_rwlock_t is available])
|
2007-12-25 14:47:57 +01:00
|
|
|
AC_LANG([C])
|
2007-12-24 04:39:50 +01:00
|
|
|
AC_COMPILE_IFELSE(
|
|
|
|
[AC_LANG_PROGRAM(
|
|
|
|
[#include <pthread.h>],
|
|
|
|
[pthread_rwlock_t *x;])],
|
|
|
|
[AC_DEFINE([UPNP_USE_RWLOCK], [1], [Use pthread_rwlock_t])
|
|
|
|
AC_MSG_RESULT([yes, supported without any options])],
|
|
|
|
[AC_COMPILE_IFELSE(
|
|
|
|
[AC_LANG_PROGRAM(
|
2007-12-25 14:14:48 +01:00
|
|
|
[#define _GNU_SOURCE
|
|
|
|
#include <pthread.h>],
|
2007-12-24 04:39:50 +01:00
|
|
|
[pthread_rwlock_t *x;])],
|
|
|
|
[AC_DEFINE([UPNP_USE_RWLOCK], [1], [Use pthread_rwlock_t])
|
2007-12-25 14:50:47 +01:00
|
|
|
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
|
2007-12-24 04:39:50 +01:00
|
|
|
AC_MSG_RESULT([yes, definition of _GNU_SOURCE required])],
|
|
|
|
[AC_DEFINE([UPNP_USE_RWLOCK], [0], [Do not use pthread_rwlock_t])
|
|
|
|
AC_MSG_RESULT([no, needs to fallback to pthread_mutex])
|
|
|
|
AC_MSG_ERROR([pthread_rwlock_t not available])])])
|
|
|
|
echo "-------------------------------------------------------------------------------"
|
2006-06-06 10:51:22 +02:00
|
|
|
|
|
|
|
|
2007-04-28 19:45:34 +02:00
|
|
|
AC_CONFIG_FILES([
|
|
|
|
Makefile
|
|
|
|
ixml/Makefile
|
|
|
|
ixml/doc/Makefile
|
|
|
|
threadutil/Makefile
|
|
|
|
upnp/Makefile
|
|
|
|
upnp/doc/Makefile
|
2007-05-11 07:00:43 +02:00
|
|
|
upnp/sample/Makefile
|
2010-10-21 04:43:33 +02:00
|
|
|
upnp/unittest/Makefile
|
2007-04-28 19:45:34 +02:00
|
|
|
docs/dist/Makefile
|
|
|
|
libupnp.pc
|
|
|
|
])
|
2006-06-06 10:51:22 +02:00
|
|
|
|
|
|
|
|
|
|
|
AC_OUTPUT
|
|
|
|
|
2010-10-04 15:47:39 +02:00
|
|
|
#
|
|
|
|
# Files copied for windows compilation.
|
|
|
|
#
|
2010-10-04 16:01:28 +02:00
|
|
|
echo "configure: copying \"autoconfig.h\" to \"build/inc/autoconfig.h\""
|
2015-02-02 01:27:39 +01:00
|
|
|
test -d build/inc || mkdir -p build/inc
|
2010-10-04 15:47:39 +02:00
|
|
|
cp autoconfig.h build/inc/autoconfig.h
|
2010-10-04 16:01:28 +02:00
|
|
|
echo "configure: copying \"upnp/inc/upnpconfig.h\" to \"build/inc/upnpconfig.h\""
|
2010-10-04 15:47:39 +02:00
|
|
|
cp upnp/inc/upnpconfig.h build/inc/upnpconfig.h
|
|
|
|
|