xref: /OK3568_Linux_fs/buildroot/package/libpthsem/libpthsem.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun################################################################################
2*4882a593Smuzhiyun#
3*4882a593Smuzhiyun# libpthsem
4*4882a593Smuzhiyun#
5*4882a593Smuzhiyun################################################################################
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunLIBPTHSEM_VERSION = 2.0.8
8*4882a593SmuzhiyunLIBPTHSEM_SOURCE = pthsem_$(LIBPTHSEM_VERSION).tar.gz
9*4882a593SmuzhiyunLIBPTHSEM_SITE = http://www.auto.tuwien.ac.at/~mkoegler/pth
10*4882a593SmuzhiyunLIBPTHSEM_LICENSE = LGPL-2.1+
11*4882a593SmuzhiyunLIBPTHSEM_LICENSE_FILES = COPYING
12*4882a593SmuzhiyunLIBPTHSEM_AUTORECONF = YES
13*4882a593SmuzhiyunLIBPTHSEM_INSTALL_STAGING = YES
14*4882a593SmuzhiyunLIBPTHSEM_CONFIG_SCRIPTS = pthsem-config
15*4882a593Smuzhiyun
16*4882a593Smuzhiyun# Force the setjmp/longjmp detection, because the test being done in
17*4882a593Smuzhiyun# the AC_CHECK_SJLJ macro is not cross-compilation safe: it checks the
18*4882a593Smuzhiyun# running kernel with 'uname -r', and checks the C library version by
19*4882a593Smuzhiyun# looking at /usr/include/features.h. In terms of kernel version, it
20*4882a593Smuzhiyun# assumes any version later than 2.2.x is fine, except that it doesn't
21*4882a593Smuzhiyun# recognize 4.x as a valid kernel version, recognizing such systems as
22*4882a593Smuzhiyun# "braindead" and therefore falling back to the 'sjljlx' value for
23*4882a593Smuzhiyun# ac_cv_check_sjlj. In terms of C library version, it wants
24*4882a593Smuzhiyun# __GLIBC_MINOR to be at least 1. Since both conditions are true for
25*4882a593Smuzhiyun# all Buildroot systems, we can simply force the setjmp/longjmp
26*4882a593Smuzhiyun# detection to ssjlj.
27*4882a593SmuzhiyunLIBPTHSEM_CONF_ENV += \
28*4882a593Smuzhiyun	ac_cv_check_sjlj=ssjlj
29*4882a593Smuzhiyun
30*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_LIBPTHSEM_COMPAT),y)
31*4882a593SmuzhiyunLIBPTHSEM_CONF_OPTS += --enable-compat
32*4882a593SmuzhiyunLIBPTHSEM_CONFIG_SCRIPTS += pth-config
33*4882a593Smuzhiyunelse
34*4882a593SmuzhiyunLIBPTHSEM_CONF_OPTS += --disable-compat
35*4882a593Smuzhiyunendif
36*4882a593Smuzhiyun
37*4882a593Smuzhiyun$(eval $(autotools-package))
38