head 1.17; access; symbols pkgsrc-2023Q4:1.16.0.36 pkgsrc-2023Q4-base:1.16 pkgsrc-2023Q3:1.16.0.34 pkgsrc-2023Q3-base:1.16 pkgsrc-2023Q2:1.16.0.32 pkgsrc-2023Q2-base:1.16 pkgsrc-2023Q1:1.16.0.30 pkgsrc-2023Q1-base:1.16 pkgsrc-2022Q4:1.16.0.28 pkgsrc-2022Q4-base:1.16 pkgsrc-2022Q3:1.16.0.26 pkgsrc-2022Q3-base:1.16 pkgsrc-2022Q2:1.16.0.24 pkgsrc-2022Q2-base:1.16 pkgsrc-2022Q1:1.16.0.22 pkgsrc-2022Q1-base:1.16 pkgsrc-2021Q4:1.16.0.20 pkgsrc-2021Q4-base:1.16 pkgsrc-2021Q3:1.16.0.18 pkgsrc-2021Q3-base:1.16 pkgsrc-2021Q2:1.16.0.16 pkgsrc-2021Q2-base:1.16 pkgsrc-2021Q1:1.16.0.14 pkgsrc-2021Q1-base:1.16 pkgsrc-2020Q4:1.16.0.12 pkgsrc-2020Q4-base:1.16 pkgsrc-2020Q3:1.16.0.10 pkgsrc-2020Q3-base:1.16 pkgsrc-2020Q2:1.16.0.8 pkgsrc-2020Q2-base:1.16 pkgsrc-2020Q1:1.16.0.4 pkgsrc-2020Q1-base:1.16 pkgsrc-2019Q4:1.16.0.6 pkgsrc-2019Q4-base:1.16 pkgsrc-2019Q3:1.16.0.2 pkgsrc-2019Q3-base:1.16 pkgsrc-2019Q2:1.15.0.48 pkgsrc-2019Q2-base:1.15 pkgsrc-2019Q1:1.15.0.46 pkgsrc-2019Q1-base:1.15 pkgsrc-2018Q4:1.15.0.44 pkgsrc-2018Q4-base:1.15 pkgsrc-2018Q3:1.15.0.42 pkgsrc-2018Q3-base:1.15 pkgsrc-2018Q2:1.15.0.40 pkgsrc-2018Q2-base:1.15 pkgsrc-2018Q1:1.15.0.38 pkgsrc-2018Q1-base:1.15 pkgsrc-2017Q4:1.15.0.36 pkgsrc-2017Q4-base:1.15 pkgsrc-2017Q3:1.15.0.34 pkgsrc-2017Q3-base:1.15 pkgsrc-2017Q2:1.15.0.30 pkgsrc-2017Q2-base:1.15 pkgsrc-2017Q1:1.15.0.28 pkgsrc-2017Q1-base:1.15 pkgsrc-2016Q4:1.15.0.26 pkgsrc-2016Q4-base:1.15 pkgsrc-2016Q3:1.15.0.24 pkgsrc-2016Q3-base:1.15 pkgsrc-2016Q2:1.15.0.22 pkgsrc-2016Q2-base:1.15 pkgsrc-2016Q1:1.15.0.20 pkgsrc-2016Q1-base:1.15 pkgsrc-2015Q4:1.15.0.18 pkgsrc-2015Q4-base:1.15 pkgsrc-2015Q3:1.15.0.16 pkgsrc-2015Q3-base:1.15 pkgsrc-2015Q2:1.15.0.14 pkgsrc-2015Q2-base:1.15 pkgsrc-2015Q1:1.15.0.12 pkgsrc-2015Q1-base:1.15 pkgsrc-2014Q4:1.15.0.10 pkgsrc-2014Q4-base:1.15 pkgsrc-2014Q3:1.15.0.8 pkgsrc-2014Q3-base:1.15 pkgsrc-2014Q2:1.15.0.6 pkgsrc-2014Q2-base:1.15 pkgsrc-2014Q1:1.15.0.4 pkgsrc-2014Q1-base:1.15 pkgsrc-2013Q4:1.15.0.2 pkgsrc-2013Q4-base:1.15 pkgsrc-2013Q3:1.13.0.4 pkgsrc-2013Q3-base:1.13 pkgsrc-2013Q2:1.13.0.2 pkgsrc-2013Q2-base:1.13 pkgsrc-2013Q1:1.12.0.8 pkgsrc-2013Q1-base:1.12 pkgsrc-2012Q4:1.12.0.6 pkgsrc-2012Q4-base:1.12 pkgsrc-2012Q3:1.12.0.4 pkgsrc-2012Q3-base:1.12 pkgsrc-2012Q2:1.12.0.2 pkgsrc-2012Q2-base:1.12 pkgsrc-2012Q1:1.11.0.10 pkgsrc-2012Q1-base:1.11 pkgsrc-2011Q4:1.11.0.8 pkgsrc-2011Q4-base:1.11 pkgsrc-2011Q3:1.11.0.6 pkgsrc-2011Q3-base:1.11 pkgsrc-2011Q2:1.11.0.4 pkgsrc-2011Q2-base:1.11 pkgsrc-2011Q1:1.11.0.2 pkgsrc-2011Q1-base:1.11 pkgsrc-2010Q4:1.10.0.34 pkgsrc-2010Q4-base:1.10 pkgsrc-2010Q3:1.10.0.32 pkgsrc-2010Q3-base:1.10 pkgsrc-2010Q2:1.10.0.30 pkgsrc-2010Q2-base:1.10 pkgsrc-2010Q1:1.10.0.28 pkgsrc-2010Q1-base:1.10 pkgsrc-2009Q4:1.10.0.26 pkgsrc-2009Q4-base:1.10 pkgsrc-2009Q3:1.10.0.24 pkgsrc-2009Q3-base:1.10 pkgsrc-2009Q2:1.10.0.22 pkgsrc-2009Q2-base:1.10 pkgsrc-2009Q1:1.10.0.20 pkgsrc-2009Q1-base:1.10 pkgsrc-2008Q4:1.10.0.18 pkgsrc-2008Q4-base:1.10 pkgsrc-2008Q3:1.10.0.16 pkgsrc-2008Q3-base:1.10 cube-native-xorg:1.10.0.14 cube-native-xorg-base:1.10 pkgsrc-2008Q2:1.10.0.12 pkgsrc-2008Q2-base:1.10 cwrapper:1.10.0.10 pkgsrc-2008Q1:1.10.0.8 pkgsrc-2008Q1-base:1.10 pkgsrc-2007Q4:1.10.0.6 pkgsrc-2007Q4-base:1.10 pkgsrc-2007Q3:1.10.0.4 pkgsrc-2007Q3-base:1.10 pkgsrc-2007Q2:1.10.0.2 pkgsrc-2007Q2-base:1.10 pkgsrc-2007Q1:1.9.0.18 pkgsrc-2007Q1-base:1.9 jlam-pkgviews:1.9.0.16 jlam-pkgviews-base:1.9 pkgsrc-2006Q4:1.9.0.14 pkgsrc-2006Q4-base:1.9 pkgsrc-2006Q3:1.9.0.12 pkgsrc-2006Q3-base:1.9 pkgsrc-2006Q2:1.9.0.10 pkgsrc-2006Q2-base:1.9 tv-derecurse-eol:1.2.2.3 pkgsrc-2006Q1:1.9.0.8 pkgsrc-2006Q1-base:1.9 pkgsrc-2005Q4:1.9.0.6 pkgsrc-2005Q4-base:1.9 pkgsrc-2005Q3:1.9.0.4 pkgsrc-2005Q3-base:1.9 pkgsrc-2005Q2:1.9.0.2 pkgsrc-2005Q2-base:1.9 tv-derecurse-merge:1.7 pkgsrc-2005Q1:1.7.0.2 pkgsrc-2005Q1-base:1.7 pkgsrc-2004Q4:1.6.0.2 pkgsrc-2004Q4-base:1.6 tv-derecurse:1.2.0.2 tv-derecurse-base:1.7; locks; strict; comment @# @; 1.17 date 2024.01.13.20.26.47; author riastradh; state Exp; branches; next 1.16; commitid my8xlviqHLVXqkUE; 1.16 date 2019.06.30.21.28.28; author rillig; state Exp; branches; next 1.15; commitid dUQBAGLTmFJ54gtB; 1.15 date 2013.11.23.09.10.14; author obache; state Exp; branches; next 1.14; commitid A2FzxLO4eB58Inex; 1.14 date 2013.10.12.06.24.49; author richard; state Exp; branches; next 1.13; commitid iRurQoKUlDgy9Y8x; 1.13 date 2013.04.28.13.40.17; author obache; state Exp; branches; next 1.12; 1.12 date 2012.05.04.07.24.50; author obache; state Exp; branches; next 1.11; 1.11 date 2011.01.23.19.07.25; author agc; state Exp; branches; next 1.10; 1.10 date 2007.04.12.18.42.02; author tnn; state Exp; branches; next 1.9; 1.9 date 2005.06.09.06.03.40; author jlam; state Exp; branches; next 1.8; 1.8 date 2005.06.01.18.03.06; author jlam; state Exp; branches; next 1.7; 1.7 date 2005.01.17.08.29.30; author jlam; state Exp; branches; next 1.6; 1.6 date 2004.12.09.15.27.13; author jlam; state Exp; branches; next 1.5; 1.5 date 2004.11.28.05.44.34; author jlam; state Exp; branches; next 1.4; 1.4 date 2004.11.26.08.18.30; author jlam; state Exp; branches; next 1.3; 1.3 date 2004.11.26.08.12.59; author jlam; state Exp; branches; next 1.2; 1.2 date 2004.11.20.05.19.12; author grant; state Exp; branches 1.2.2.1; next 1.1; 1.1 date 2004.11.12.05.20.02; author jlam; state Exp; branches; next ; 1.2.2.1 date 2004.11.28.20.11.32; author tv; state Exp; branches; next 1.2.2.2; 1.2.2.2 date 2004.12.09.17.15.01; author tv; state Exp; branches; next 1.2.2.3; 1.2.2.3 date 2005.01.24.18.40.01; author tv; state Exp; branches; next 1.2.2.4; 1.2.2.4 date 2006.06.07.15.25.39; author tv; state dead; branches; next ; desc @@ 1.17 log @buildlink3, mk/*.builtin.mk: Use TOOLS_CROSS_DESTDIR for file checks. These are always about the target system, which during cross builds, or native builds of cross-libtool-base, is relative to TOOLS_CROSS_DESTDIR. This is necessary for cross-libtool-base -- the one special package that is built as a native package as if it were cross-compiled, so _CROSS_DESTDIR is empty but TOOLS_CROSS_DESTDIR is the cross destdir -- because cross-libtool-base uses buildlink3 and dlopen.builtin.mk. No change to native builds because _CROSS_DESTDIR and TOOLS_CROSS_DESTDIR are both empty in native builds. XXX Perhaps almost every use of _CROSS_DESTDIR outside mk/pkgformat should be replaced by TOOLS_CROSS_DESTDIR. @ text @# $NetBSD: pthread.builtin.mk,v 1.16 2019/06/30 21:28:28 rillig Exp $ BUILTIN_PKG:= pthread BUILTIN_FIND_LIBS:= pthread c_r rt BUILTIN_FIND_HEADERS_VAR= H_PTHREAD BUILTIN_FIND_HEADERS.H_PTHREAD= pthread.h .include "buildlink3/bsd.builtin.mk" ### ### Determine if there is a built-in implementation of the package and ### set IS_BUILTIN. appropriately ("yes" or "no"). ### .if !defined(IS_BUILTIN.pthread) IS_BUILTIN.pthread= no . if empty(H_PTHREAD:M${LOCALBASE}/*) && \ exists(${TOOLS_CROSS_DESTDIR}${H_PTHREAD}) IS_BUILTIN.pthread= yes . endif .endif MAKEVARS+= IS_BUILTIN.pthread ### ### Determine whether we should use the built-in implementation if it ### exists, and set USE_BUILTIN. appropriate ("yes" or "no"). ### # # We ignore the value of PREFER_PKGSRC and PREFER_NATIVE. Whether we # prefer one or the other is dependent on the value of # PREFER_NATIVE_PTHREADS, which is yes/no. # .if !defined(USE_BUILTIN.pthread) USE_BUILTIN.pthread= ${IS_BUILTIN.pthread} . if !empty(PREFER_NATIVE_PTHREADS:M[nN][oO]) USE_BUILTIN.pthread= no . endif .endif MAKEVARS+= USE_BUILTIN.pthread ### ### The section below only applies if we are not including this file ### solely to determine whether a built-in implementation exists. ### CHECK_BUILTIN.pthread?= no .if !empty(CHECK_BUILTIN.pthread:M[nN][oO]) . if !empty(USE_BUILTIN.pthread:M[yY][eE][sS]) BUILDLINK_PREFIX.pthread= /usr . if empty(H_PTHREAD:M__nonexistent__) . if!empty(H_PTHREAD:M/usr/*) BUILDLINK_PREFIX.pthread= /usr . else BUILDLINK_PREFIX.pthread= # empty . endif . endif BUILDLINK_CFLAGS.pthread= # empty BUILDLINK_LDFLAGS.pthread= # empty # only pass -pthread on platforms known to support it. # XXX # XXX This should really be a check for GCC! # XXX BUILDLINK_OPSYS_SUPPORT_PTHREAD= \ DragonFly FreeBSD Linux MirBSD NetBSD OpenBSD SunOS . if !empty(BUILDLINK_OPSYS_SUPPORT_PTHREAD:M${OPSYS}) BUILDLINK_CFLAGS.pthread+= -pthread BUILDLINK_LDFLAGS.pthread+= -pthread . elif ${OPSYS} == "OSF1" BUILDLINK_CFLAGS.pthread+= -pthread CFLAGS+= -D_REENTRANT . else BUILDLINK_CPPFLAGS.pthread+= -D_REENTRANT . endif . if ${OPSYS} == "FreeBSD" BUILDLINK_CPPFLAGS.pthread+= -D_THREAD_SAFE . endif # Handle systems which have pthreads functions in libc_r such as # FreeBSD 5.x, or fall back to libc if we don't find libc_r. # . if ${OPSYS} == "NetBSD" BUILDLINK_LIBS.pthread= # empty . elif !empty(BUILTIN_LIB_FOUND.pthread:M[yY][eE][sS]) BUILDLINK_LIBS.pthread= -lpthread . if !empty(BUILTIN_LIB_FOUND.rt:M[yY][eE][sS]) BUILDLINK_LIBS.pthread+= -lrt . endif . elif !empty(BUILTIN_LIB_FOUND.c_r:M[yY][eE][sS]) BUILDLINK_LIBS.pthread= -lc_r . else BUILDLINK_LIBS.pthread= # empty . endif . endif .endif # CHECK_BUILTIN.pthread @ 1.16 log @mk: use direct include paths This saves a few system calls since the included files are searched first in .PARSEDIR and only then in .CURDIR. @ text @d1 1 a1 1 # $NetBSD: pthread.builtin.mk,v 1.15 2013/11/23 09:10:14 obache Exp $ d17 2 a18 1 . if empty(H_PTHREAD:M${LOCALBASE}/*) && exists(${H_PTHREAD}) @ 1.15 log @Use find-headers instead of find-files to detect builtin header files. @ text @d1 1 a1 1 # $NetBSD: pthread.builtin.mk,v 1.14 2013/10/12 06:24:49 richard Exp $ d9 1 a9 1 .include "../../mk/buildlink3/bsd.builtin.mk" @ 1.14 log @add SunOS to OPSYS_SUPPORT_PTHREAD @ text @d1 1 a1 1 # $NetBSD: pthread.builtin.mk,v 1.13 2013/04/28 13:40:17 obache Exp $ d6 2 a7 3 BUILTIN_FIND_FILES_VAR= H_PTHREAD BUILTIN_FIND_FILES.H_PTHREAD= /usr/include/pthread.h \ /boot/develop/headers/posix/pthread.h @ 1.13 log @tell pthread of Haiku. @ text @d1 1 a1 1 # $NetBSD: pthread.builtin.mk,v 1.12 2012/05/04 07:24:50 obache Exp $ d64 2 a65 1 BUILDLINK_OPSYS_SUPPORT_PTHREAD= DragonFly FreeBSD Linux MirBSD NetBSD OpenBSD @ 1.12 log @OpenBSD also knows -pthread CFLAGS/LDFLAGS. @ text @d1 1 a1 1 # $NetBSD: pthread.builtin.mk,v 1.11 2011/01/23 19:07:25 agc Exp $ d7 2 a8 1 BUILTIN_FIND_FILES.H_PTHREAD= /usr/include/pthread.h d50 7 @ 1.11 log @Add support for MirBSD to pkgsrc. Patches from Benny Siegert and Thorsten Glaser. @ text @d1 1 a1 1 # $NetBSD: pthread.builtin.mk,v 1.10 2007/04/12 18:42:02 tnn Exp $ d56 1 a56 1 BUILDLINK_OPSYS_SUPPORT_PTHREAD= DragonFly FreeBSD Linux MirBSD NetBSD @ 1.10 log @OSF1 always needs _REENTRANT to be defined when including pthread.h, or it will bail out with an #error preprocessing directive, regardless of whether we actually link to libpthread or not. NB: We can't just sprinkle PTHREAD_AUTO_VARS=YES on the affected packages, because that would introduce a libpthread.so dependency where such isn't wanted. (MesaLib, glitz, ...) For this reason -D_REENTRANT is added directly to CFLAGS. @ text @d1 1 a1 1 # $NetBSD: pthread.builtin.mk,v 1.9 2005/06/09 06:03:40 jlam Exp $ d56 1 a56 1 BUILDLINK_OPSYS_SUPPORT_PTHREAD= DragonFly FreeBSD Linux NetBSD @ 1.9 log @Rewrite the USE_BUILTIN.pthread section a bit so that it more closely matches the template in bsd.builtin.mk. This causes USE_BUILTIN.pthread to be cached, which is useful at least for debugging purposes. @ text @d1 1 a1 1 # $NetBSD: pthread.builtin.mk,v 1.8 2005/06/01 18:03:06 jlam Exp $ d62 1 @ 1.8 log @Massive cleanup of buildlink3.mk and builtin.mk files in pkgsrc. Several changes are involved since they are all interrelated. These changes affect about 1000 files. The first major change is rewriting bsd.builtin.mk as well as all of the builtin.mk files to follow the new example in bsd.builtin.mk. The loop to include all of the builtin.mk files needed by the package is moved from bsd.builtin.mk and into bsd.buildlink3.mk. bsd.builtin.mk is now included by each of the individual builtin.mk files and provides some common logic for all of the builtin.mk files. Currently, this includes the computation for whether the native or pkgsrc version of the package is preferred. This causes USE_BUILTIN.* to be correctly set when one builtin.mk file includes another. The second major change is teach the builtin.mk files to consider files under ${LOCALBASE} to be from pkgsrc-controlled packages. Most of the builtin.mk files test for the presence of built-in software by checking for the existence of certain files, e.g. , and we now assume that if that file is under ${LOCALBASE}, then it must be from pkgsrc. This modification is a nod toward LOCALBASE=/usr. The exceptions to this new check are the X11 distribution packages, which are handled specially as noted below. The third major change is providing builtin.mk and version.mk files for each of the X11 distribution packages in pkgsrc. The builtin.mk file can detect whether the native X11 distribution is the same as the one provided by pkgsrc, and the version.mk file computes the version of the X11 distribution package, whether it's built-in or not. The fourth major change is that the buildlink3.mk files for X11 packages that install parts which are part of X11 distribution packages, e.g. Xpm, Xcursor, etc., now use imake to query the X11 distribution for whether the software is already provided by the X11 distribution. This is more accurate than grepping for a symbol name in the imake config files. Using imake required sprinkling various builtin-imake.mk helper files into pkgsrc directories. These files are used as input to imake since imake can't use stdin for that purpose. The fifth major change is in how packages note that they use X11. Instead of setting USE_X11, package Makefiles should now include x11.buildlink3.mk instead. This causes the X11 package buildlink3 and builtin logic to be executed at the correct place for buildlink3.mk and builtin.mk files that previously set USE_X11, and fixes packages that relied on buildlink3.mk files to implicitly note that X11 is needed. Package buildlink3.mk should also include x11.buildlink3.mk when linking against the package libraries requires also linking against the X11 libraries. Where it was obvious, redundant inclusions of x11.buildlink3.mk have been removed. @ text @d1 1 a1 1 # $NetBSD: pthread.builtin.mk,v 1.7 2005/01/17 08:29:30 jlam Exp $ d32 1 a32 1 .if !empty(PREFER_NATIVE_PTHREADS:M[yY][eE][sS]) d34 1 a34 1 .else d36 1 d38 1 @ 1.7 log @Rework code to more easily allow listing other platform that, like NetBSD, use GCC and can accept -pthread. Add DragonFly(BSD) to this list (from PR pkg/28964). @ text @d1 1 a1 1 # $NetBSD: pthread.builtin.mk,v 1.6 2004/12/09 15:27:13 jlam Exp $ d3 7 a9 14 .for _lib_ in pthread c_r rt . if !defined(_BLNK_LIB_FOUND.${_lib_}) _BLNK_LIB_FOUND.${_lib_}!= \ if ${TEST} "`${ECHO} /usr/lib/lib${_lib_}.*`" != "/usr/lib/lib${_lib_}.*"; then \ ${ECHO} "yes"; \ elif ${TEST} "`${ECHO} /lib/lib${_lib_}.*`" != "/lib/lib${_lib_}.*"; then \ ${ECHO} "yes"; \ else \ ${ECHO} "no"; \ fi BUILDLINK_VARS+= _BLNK_LIB_FOUND.${_lib_} . endif .endfor .undef _lib_ d11 4 d17 1 a17 1 . if exists(/usr/include/pthread.h) d20 2 a21 2 BUILDLINK_VARS+= IS_BUILTIN.pthread .endif # IS_BUILTIN.pthread d23 5 d38 4 d45 1 a45 1 .if !empty(USE_BUILTIN.pthread:M[yY][eE][sS]) d55 1 a55 1 . if !empty(BUILDLINK_OPSYS_SUPPORT_PTHREAD:M${OPSYS}) d58 1 a58 1 . elif ${OPSYS} == "OSF1" d60 1 a60 1 . else d62 2 a63 2 . endif . if ${OPSYS} == "FreeBSD" d65 1 a65 1 . endif d70 1 a70 1 . if ${OPSYS} == "NetBSD" d72 1 a72 1 . elif !empty(_BLNK_LIB_FOUND.pthread:M[yY][eE][sS]) d74 1 a74 1 . if !empty(_BLNK_LIB_FOUND.rt:M[yY][eE][sS]) d76 2 a77 2 . endif . elif !empty(_BLNK_LIB_FOUND.c_r:M[yY][eE][sS]) d79 1 a79 1 . else d81 1 a82 1 .endif # USE_BUILTIN.pthread @ 1.6 log @From inspecting configure scripts, it seems FreeBSD wants "-D_THREAD_SAFE" as part of the CPPFLAGS when building threaded apps. @ text @d1 1 a1 1 # $NetBSD: pthread.builtin.mk,v 1.5 2004/11/28 05:44:34 jlam Exp $ d48 2 a49 1 . if ${OPSYS} == "FreeBSD" || ${OPSYS} == "Linux" || ${OPSYS} == "NetBSD" @ 1.5 log @Reverse the tests so that we actually check for the existence and not the non-existence of the library -- this more accurately reflects what we want to say. @ text @d1 1 a1 1 # $NetBSD: pthread.builtin.mk,v 1.4 2004/11/26 08:18:30 jlam Exp $ d56 3 @ 1.4 log @Don't append BUILDLINK_CFLAGS.pthread to itself if pthread.builtin.mk gets included multiple times. @ text @d1 1 a1 1 # $NetBSD: pthread.builtin.mk,v 1.3 2004/11/26 08:12:59 jlam Exp $ d6 5 a10 1 if ${TEST} "`${ECHO} /usr/lib/lib${_lib_}.*`" = "/usr/lib/lib${_lib_}.*"; then \ a11 4 elif ${TEST} "`${ECHO} /lib/lib${_lib_}.*`" = "/lib/lib${_lib_}.*"; then \ ${ECHO} "no"; \ else \ ${ECHO} "yes"; \ @ 1.3 log @More tightly integrate the OSF1 changes into pthread.builtin.mk by using more feature tests instead of OPSYS tests. @ text @d1 1 a1 1 # $NetBSD: pthread.builtin.mk,v 1.2 2004/11/20 05:19:12 grant Exp $ d41 1 @ 1.2 log @add pthread glue for OSF1, patch from Tobias Nygren. @ text @d1 1 a1 1 # $NetBSD: pthread.builtin.mk,v 1.1 2004/11/12 05:20:02 jlam Exp $ d3 4 a6 3 .if !defined(_BLNK_LIBPTHREAD_FOUND) _BLNK_LIBPTHREAD_FOUND!= \ if ${TEST} "`${ECHO} /usr/lib/libpthread.*`" = "/usr/lib/libpthread.*"; then \ d8 1 a8 1 elif ${TEST} "`${ECHO} /lib/libpthread.*`" = "/lib/libpthread.*"; then \ d13 4 a16 11 BUILDLINK_VARS+= _BLNK_LIBPTHREAD_FOUND .endif .if !defined(_BLNK_LIBC_R_FOUND) _BLNK_LIBC_R_FOUND!= \ if ${TEST} "`${ECHO} /usr/lib/libc_r.*`" = "/usr/lib/libc_r.*"; then \ ${ECHO} "no"; \ else \ ${ECHO} "yes"; \ fi BUILDLINK_VARS+= _BLNK_LIBC_R_FOUND .endif d50 2 a55 6 . if ${OPSYS} == "OSF1" BUILDLINK_CFLAGS.pthread+= -pthread BUILDLINK_LDFLAGS.pthread+= -lpthread -lrt BUILDLINK_CPPFLAGS.pthread+= -pthread . endif d61 1 a61 1 . elif !empty(_BLNK_LIBPTHREAD_FOUND:M[yY][eE][sS]) d63 4 a66 1 . elif !empty(_BLNK_LIBC_R_FOUND:M[yY][eE][sS]) @ 1.2.2.1 log @Merge from HEAD. @ text @d1 1 a1 1 # $NetBSD$ d3 7 a9 4 .for _lib_ in pthread c_r rt . if !defined(_BLNK_LIB_FOUND.${_lib_}) _BLNK_LIB_FOUND.${_lib_}!= \ if ${TEST} "`${ECHO} /usr/lib/lib${_lib_}.*`" != "/usr/lib/lib${_lib_}.*"; then \ d11 8 a18 1 elif ${TEST} "`${ECHO} /lib/lib${_lib_}.*`" != "/lib/lib${_lib_}.*"; then \ a19 2 else \ ${ECHO} "no"; \ d21 2 a22 4 BUILDLINK_VARS+= _BLNK_LIB_FOUND.${_lib_} . endif .endfor .undef _lib_ a46 1 BUILDLINK_CFLAGS.pthread= # empty a55 2 . elif ${OPSYS} == "OSF1" BUILDLINK_CFLAGS.pthread+= -pthread d60 6 d71 1 a71 1 . elif !empty(_BLNK_LIB_FOUND.pthread:M[yY][eE][sS]) d73 1 a73 4 . if !empty(_BLNK_LIB_FOUND.rt:M[yY][eE][sS]) BUILDLINK_LIBS.pthread+= -lrt . endif . elif !empty(_BLNK_LIB_FOUND.c_r:M[yY][eE][sS]) @ 1.2.2.2 log @Merge from HEAD. @ text @d1 1 a1 1 # $NetBSD: pthread.builtin.mk,v 1.2.2.1 2004/11/28 20:11:32 tv Exp $ a55 3 . if ${OPSYS} == "FreeBSD" BUILDLINK_CPPFLAGS.pthread+= -D_THREAD_SAFE . endif @ 1.2.2.3 log @sync with HEAD @ text @d1 1 a1 1 # $NetBSD$ d48 1 a48 2 BUILDLINK_OPSYS_SUPPORT_PTHREAD= DragonFly FreeBSD Linux NetBSD . if !empty(BUILDLINK_OPSYS_SUPPORT_PTHREAD:M${OPSYS}) @ 1.2.2.4 log @EOL the tv-derecurse branch; it has become too outdated. The last live revision can be fetched at the tv-derecurse-eol tag. @ text @d1 1 a1 1 # $NetBSD: pthread.builtin.mk,v 1.2.2.3 2005/01/24 18:40:01 tv Exp $ @ 1.1 log @(1) Split out the native (built-in) pthread detection in pthread.buildlink3.mk into a separate file, pthread.builtin.mk, that is handled using the usual builtin.mk logic. (2) If pthread.buildlink3.mk is included by a package Makefile, then automatically add the necessary compiler and linker flags to compile and link pthread-enabled/reentrant code. For native pthreads, this means passing -pthread to the compiler and linker. For the userland pthread replacement, we pass -D_REENTRANT and -lpthread instead. (3) Add PTHREAD_{CFLAGS,LDFLAGS,LIBS} in both CONFIGURE_ENV and MAKE_ENV when pthread.buildlink3.mk is included so that the configure and build processes can use these values. Remove these definitions from bsd.pkg.mk since PTHREAD_* variables are all declared within pthread.buildlink3.mk. XXX For now, PTHREAD_LDFLAGS is a superset of PTHREAD_LIBS until XXX packages that use use PTHREAD_LDFLAGS can be fixed. @ text @d1 1 a1 1 # $NetBSD$ d60 6 @