diff options
author | jlam <jlam> | 2004-11-26 08:12:59 +0000 |
---|---|---|
committer | jlam <jlam> | 2004-11-26 08:12:59 +0000 |
commit | bd5167001e1ae473e265a33f2dd17d54c6831c87 (patch) | |
tree | 7acb70816441ade39a4cb5364926d8163d464901 /mk | |
parent | 2263fb0e9e96c2b874a6e22d3808606f391372ad (diff) | |
download | pkgsrc-bd5167001e1ae473e265a33f2dd17d54c6831c87.tar.gz |
More tightly integrate the OSF1 changes into pthread.builtin.mk by using
more feature tests instead of OPSYS tests.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/pthread.builtin.mk | 41 |
1 files changed, 17 insertions, 24 deletions
diff --git a/mk/pthread.builtin.mk b/mk/pthread.builtin.mk index 4fd1a930611..fed1754c551 100644 --- a/mk/pthread.builtin.mk +++ b/mk/pthread.builtin.mk @@ -1,25 +1,19 @@ -# $NetBSD: pthread.builtin.mk,v 1.2 2004/11/20 05:19:12 grant Exp $ +# $NetBSD: pthread.builtin.mk,v 1.3 2004/11/26 08:12:59 jlam Exp $ -.if !defined(_BLNK_LIBPTHREAD_FOUND) -_BLNK_LIBPTHREAD_FOUND!= \ - if ${TEST} "`${ECHO} /usr/lib/libpthread.*`" = "/usr/lib/libpthread.*"; then \ +.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} "no"; \ - elif ${TEST} "`${ECHO} /lib/libpthread.*`" = "/lib/libpthread.*"; then \ + elif ${TEST} "`${ECHO} /lib/lib${_lib_}.*`" = "/lib/lib${_lib_}.*"; then \ ${ECHO} "no"; \ else \ ${ECHO} "yes"; \ fi -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 +BUILDLINK_VARS+= _BLNK_LIB_FOUND.${_lib_} +. endif +.endfor +.undef _lib_ .if !defined(IS_BUILTIN.pthread) IS_BUILTIN.pthread= no @@ -53,24 +47,23 @@ BUILDLINK_LDFLAGS.pthread= # empty . if ${OPSYS} == "FreeBSD" || ${OPSYS} == "Linux" || ${OPSYS} == "NetBSD" BUILDLINK_CFLAGS.pthread+= -pthread BUILDLINK_LDFLAGS.pthread+= -pthread +. elif ${OPSYS} == "OSF1" +BUILDLINK_CFLAGS.pthread+= -pthread . else BUILDLINK_CPPFLAGS.pthread+= -D_REENTRANT . endif -. if ${OPSYS} == "OSF1" -BUILDLINK_CFLAGS.pthread+= -pthread -BUILDLINK_LDFLAGS.pthread+= -lpthread -lrt -BUILDLINK_CPPFLAGS.pthread+= -pthread -. 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(_BLNK_LIBPTHREAD_FOUND:M[yY][eE][sS]) +. elif !empty(_BLNK_LIB_FOUND.pthread:M[yY][eE][sS]) BUILDLINK_LIBS.pthread= -lpthread -. elif !empty(_BLNK_LIBC_R_FOUND:M[yY][eE][sS]) +. 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]) BUILDLINK_LIBS.pthread= -lc_r . else BUILDLINK_LIBS.pthread= # empty |