pkgsrc-ng/lang/ruby193-base/patches/patch-configure.in
2014-08-11 13:27:10 +02:00

114 lines
3.9 KiB
Plaintext

$NetBSD: patch-configure.in,v 1.10 2013/11/24 14:17:19 taca Exp $
* Adding Interix and MirBSD support.
* Ignore doxygen.
--- configure.in.orig 2013-10-31 14:32:59.000000000 +0000
+++ configure.in
@@ -1138,6 +1138,8 @@ main()
],
[superux*], [ ac_cv_func_setitimer=no
],
+[interix*], [ LIBS="-lm $LIBS"
+ ac_cv_func_getpgrp_void=yes],
[ LIBS="-lm $LIBS"])
AC_CHECK_LIB(crypt, crypt)
AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV
@@ -1178,7 +1180,12 @@ AC_CHECK_HEADERS(limits.h sys/file.h sys
syscall.h pwd.h grp.h a.out.h utime.h direct.h sys/resource.h \
sys/mkdev.h sys/utime.h xti.h netinet/in_systm.h float.h ieeefp.h \
ucontext.h intrinsics.h langinfo.h locale.h sys/sendfile.h time.h \
- net/socket.h sys/socket.h process.h atomic.h)
+ net/socket.h sys/socket.h process.h atomic.h,,,[
+@%:@include <sys/types.h>
+@%:@ifdef HAVE_SYS_TIME_H
+@%:@include <sys/time.h>
+@%:@endif
+])
AC_TYPE_SIZE_T
RUBY_CHECK_SIZEOF(size_t, [int long void*], [], [@%:@include <sys/types.h>])
@@ -1211,6 +1218,9 @@ AC_CHECK_TYPES([struct timeval], [], [],
AC_CHECK_TYPES([struct timespec], [], [], [@%:@ifdef HAVE_TIME_H
@%:@include <time.h>
+@%:@endif
+@%:@ifdef HAVE_SYS_TIME_H
+@%:@ include <sys/time.h>
@%:@endif])
AC_CHECK_TYPES([struct timezone], [], [], [@%:@ifdef HAVE_TIME_H
@@ -1804,7 +1814,7 @@ if test x"$enable_pthread" = xyes; then
[root], [],
[c_r], [MAINLIBS="-pthread $MAINLIBS"],
[AS_CASE(["$target_os"],
- [openbsd*], [LIBS="-pthread $LIBS"],
+ [openbsd*|mirbsd*], [LIBS="-pthread $LIBS"],
[LIBS="-l$pthread_lib $LIBS"])])
else
AC_MSG_WARN("Don't know how to find pthread library on your system -- thread support disabled")
@@ -2035,7 +2045,9 @@ if test "$with_dln_a_out" != yes; then
rb_cv_dlopen=yes],
[interix*], [ : ${LDSHARED='$(CC) -shared'}
XLDFLAGS="$XLDFLAGS -Wl,-E"
+ DLDFLAGS="$DLDFLAGS "'-Wl,-h,$(.TARGET) -Wl,--image-base,$$(($$RANDOM %4096/2*262144+1342177280))'
LIBPATHFLAG=" -L%1\$-s"
+ RPATHFLAG=' -Wl,-R%1$-s'
rb_cv_dlopen=yes],
[freebsd*|dragonfly*], [
: ${LDSHARED='$(CC) -shared'}
@@ -2046,7 +2058,7 @@ if test "$with_dln_a_out" != yes; then
test "$GCC" = yes && test "$rb_cv_prog_gnu_ld" = yes || LDSHARED="ld -Bshareable"
fi
rb_cv_dlopen=yes],
- [openbsd*], [ : ${LDSHARED='$(CC) -shared ${CCDLFLAGS}'}
+ [openbsd*|mirbsd*], [ : ${LDSHARED='$(CC) -shared ${CCDLFLAGS}'}
if test "$rb_cv_binary_elf" = yes; then
LDFLAGS="$LDFLAGS -Wl,-E"
fi
@@ -2347,7 +2359,7 @@ AS_CASE("$enable_shared", [yes], [
],
[freebsd*|dragonfly*], [
SOLIBS='$(LIBS)'
- LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR)'
+ LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR)$(TEENY)'
if test "$rb_cv_binary_elf" != "yes" ; then
LIBRUBY_SO="$LIBRUBY_SO.\$(TEENY)"
LIBRUBY_ALIASES=''
@@ -2363,7 +2375,7 @@ AS_CASE("$enable_shared", [yes], [
LIBRUBY_ALIASES=""
fi
],
- [openbsd*], [
+ [openbsd*|mirbsd*], [
SOLIBS='$(LIBS)'
LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR).'`expr ${MINOR} \* 10 + ${TEENY}`
],
@@ -2413,7 +2425,12 @@ AS_CASE("$enable_shared", [yes], [
LIBRUBY_ALIASES='lib$(RUBY_BASE_NAME).$(MAJOR).$(MINOR).dylib lib$(RUBY_INSTALL_NAME).dylib'
],
[interix*], [
- LIBRUBYARG_SHARED='-L. -L${libdir} -l$(RUBY_SO_NAME)'
+ SOLIBS='$(LIBS)'
+ LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR).$(TEENY)'
+ # link explicitly to 0x48000000
+ LIBRUBY_DLDFLAGS='-Wl,-h,lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR) -Wl,--image-base,1207959552'
+ LIBRUBYARG_SHARED='-Wl,-R -Wl,${libdir} -L${libdir} -L. -l$(RUBY_SO_NAME)'
+ LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR) lib$(RUBY_SO_NAME).so'
])
], [
LIBRUBYARG_SHARED=
@@ -2458,11 +2475,7 @@ if test "$install_doc" != no; then
else
RDOCTARGET="nodoc"
fi
- if test "$install_capi" != no -a -n "$DOXYGEN"; then
- CAPITARGET="capi"
- else
- CAPITARGET="nodoc"
- fi
+ CAPITARGET="nodoc"
else
RDOCTARGET="nodoc"
CAPITARGET="nodoc"