summaryrefslogtreecommitdiff
path: root/lang/ruby19/files/patch-configure.in
blob: f7acf1f7412e391554c0686e63b6a87d447cac3c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
--- configure.in.orig	2014-03-20 05:49:55.847385089 +0000
+++ configure.in	2014-03-20 05:50:09.238383528 +0000
@@ -1139,11 +1139,11 @@
 [superux*], [	ac_cv_func_setitimer=no
 		],
 [	LIBS="-lm $LIBS"])
-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(socket, socketpair)	# SunOS/Solaris
-AC_CHECK_LIB(rt, clock_gettime)	# GNU/Linux
+AC_SEARCH_LIBS(crypt, crypt)
+AC_SEARCH_LIBS(dlopen, dl)	# Dynamic linking for SunOS/Solaris and SYSV
+AC_SEARCH_LIBS(shl_load, dld)	# Dynamic linking for HP-UX
+AC_SEARCH_LIBS(socketpair, socket)	# SunOS/Solaris
+AC_SEARCH_LIBS(clock_gettime, rt) # GNU/Linux
 if test "${enable_win95}" = maybe; then
     AC_HAVE_LIBRARY(unicows, [enable_win95=yes], [enable_win95=no])
 fi
@@ -1789,7 +1789,7 @@
 fi
 
 if test x"$enable_pthread" = xyes; then
-    for pthread_lib in thr pthread pthreads c c_r root; do
+    for pthread_lib in pthread thr pthreads c c_r root; do
 	AC_CHECK_LIB($pthread_lib, pthread_kill,
 		     rb_with_pthread=yes, rb_with_pthread=no)
 	if test "$rb_with_pthread" = "yes"; then break; fi
@@ -1803,6 +1803,7 @@
 	[c],    [],
 	[root], [],
 	[c_r],  [MAINLIBS="-pthread $MAINLIBS"],
+	[pthread],  [MAINLIBS="-pthread $MAINLIBS"],
 	        [AS_CASE(["$target_os"],
 		    [openbsd*], [LIBS="-pthread $LIBS"],
 		    [LIBS="-l$pthread_lib $LIBS"])])
@@ -2041,7 +2042,6 @@
 			: ${LDSHARED='$(CC) -shared'}
 			if test "$rb_cv_binary_elf" = yes; then
 			    LDFLAGS="$LDFLAGS -rdynamic"
-			    DLDFLAGS="$DLDFLAGS "'-Wl,-soname,$(.TARGET)'
 			else
 			  test "$GCC" = yes && test "$rb_cv_prog_gnu_ld" = yes || LDSHARED="ld -Bshareable"
 			fi
@@ -2348,6 +2348,7 @@
     [freebsd*|dragonfly*], [
 	SOLIBS='$(LIBS)'
 	LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR)'
+	LIBRUBY_DLDFLAGS='-Wl,-soname,$(LIBRUBY_SO)'
 	if test "$rb_cv_binary_elf" != "yes" ; then
 	    LIBRUBY_SO="$LIBRUBY_SO.\$(TEENY)"
 	    LIBRUBY_ALIASES=''