berkeleydb: accommodate threads presence/absence
authorAlexey Brodkin <Alexey.Brodkin@synopsys.com>
Mon, 6 Jul 2015 14:48:04 +0000 (17:48 +0300)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 6 Jul 2015 15:28:48 +0000 (17:28 +0200)
In BerkeleyDB the most convenient implementation of mutexes on Linux is
via POSIX mutex, and that requires pthread library.

Still it is possible to build (and hopefully use) BerkeleyDB without
mutexes. For this we pass "--disable-mutexsupport" during configuration
of the package.

Fixes:
http://autobuild.buildroot.net/results/717f3b37600a56262badc6f7cb64d7949fdacb67/
http://autobuild.buildroot.net/results/80ebf0382992b277fd94743815bbf0c7426a3654/

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/berkeleydb/berkeleydb.mk

index 30fc5182ec09099295212a9a2793542c026fdfc6..e5c11bddcf1e5969e14f2c9b06a5851b47bea0c7 100644 (file)
@@ -40,6 +40,7 @@ define BERKELEYDB_CONFIGURE_CMDS
                $(SHARED_STATIC_LIBS_OPTS) \
                --with-pic \
                --enable-o_direct \
+               $(if $(BR2_TOOLCHAIN_HAS_THREADS),--enable-mutexsupport,--disable-mutexsupport) \
        )
 endef