freebsd-ports/lang/ruby18/files/patch-configure.in
Stanislav Sedov fd4e416769 - Do not link ruby18 agains librt.
- Bump portrevision.

PR:		ports/149003
Submitted by:	Anonymous <swell.k@gmail.com>
2010-10-11 06:36:41 +00:00

51 lines
1.5 KiB
Text

--- configure.in.orig 2009-12-24 01:10:03.000000000 -0800
+++ configure.in 2010-10-10 23:21:07.000000000 -0700
@@ -502,7 +502,7 @@
AC_CHECK_LIB(crypt, crypt)
AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV
AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX
-AC_CHECK_LIB(rt, clock_gettime) # GNU/Linux
+AC_SEARCH_LIBS(clock_gettime, rt) # GNU/Linux
case "$target_cpu" in
alpha*) case "$target_os"::"$GCC" in
@@ -1021,7 +1021,7 @@
case $pthread_lib in
c)
;;
- c_r)
+ c_r | pthread)
MAINLIBS="-pthread $MAINLIBS"
;;
*)
@@ -1033,11 +1033,19 @@
fi
AC_CHECK_FUNCS(nanosleep)
if test x"$ac_cv_func_nanosleep" = xno; then
- AC_CHECK_LIB(rt, nanosleep)
- if test x"$ac_cv_lib_rt_nanosleep" = xyes; then
+ AC_SEARCH_LIBS(nanosleep, rt)
+ if test x"$ac_cv_search_nanosleep" != xno; then
AC_DEFINE(HAVE_NANOSLEEP)
fi
fi
+ AC_MSG_CHECKING([for pthread_np.h])
+ AC_TRY_COMPILE([
+ #include <pthread.h>
+ #include <pthread_np.h>],
+ [(void)0;],
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_PTHREAD_NP_H),
+ AC_MSG_RESULT(no))
fi
if test x"$ac_cv_header_ucontext_h" = xyes; then
if test x"$rb_with_pthread" = xyes; then
@@ -1446,7 +1454,7 @@
SOLIBS=
case "$target_os" in
- cygwin*|mingw*|beos*|openstep*|nextstep*|rhapsody*|darwin*|os2-emx*)
+ cygwin*|mingw*|beos*|openstep*|nextstep*|rhapsody*|darwin*|os2-emx*|freebsd*)
: ${DLDLIBS=""}
;;
*)