This adds shlib version handling to rubyversion.mk, a fix to configure (include <sys/time.h> when checking for struct timespec) and a workaround for broken code if getgrnam_r is available.
121 lines
3.5 KiB
Text
121 lines
3.5 KiB
Text
$NetBSD: patch-configure,v 1.3 2012/07/25 14:26:57 bsiegert Exp $
|
|
|
|
* Adding Interix and MirBSD support.
|
|
* Ignore doxygen.
|
|
|
|
--- configure.orig Fri Apr 20 01:32:41 2012
|
|
+++ configure
|
|
@@ -10605,6 +10605,9 @@ esac
|
|
superux*) :
|
|
ac_cv_func_setitimer=no
|
|
;; #(
|
|
+ interix*) LIBS="-lm $LIBS"
|
|
+ ac_cv_func_getpgrp_void=yes
|
|
+ ;; #(
|
|
*) :
|
|
LIBS="-lm $LIBS" ;;
|
|
esac
|
|
@@ -11923,6 +11926,9 @@ fi
|
|
ac_fn_c_check_type "$LINENO" "struct timespec" "ac_cv_type_struct_timespec" "#ifdef HAVE_TIME_H
|
|
#include <time.h>
|
|
#endif
|
|
+#ifdef HAVE_SYS_TIME_H
|
|
+# include <sys/time.h>
|
|
+#endif
|
|
"
|
|
if test "x$ac_cv_type_struct_timespec" = xyes; then :
|
|
|
|
@@ -15731,7 +15737,7 @@ done
|
|
MAINLIBS="-pthread $MAINLIBS" ;; #(
|
|
*) :
|
|
case "$target_os" in #(
|
|
- openbsd*) :
|
|
+ openbsd*|mirbsd*) :
|
|
LIBS="-pthread $LIBS" ;; #(
|
|
*) :
|
|
LIBS="-l$pthread_lib $LIBS" ;;
|
|
@@ -16180,8 +16186,12 @@ esac ;; #(
|
|
rb_cv_dlopen=yes ;; #(
|
|
interix*) :
|
|
: ${LDSHARED='$(CC) -shared'}
|
|
+ LDFLAGS="$LDFLAGS -Wl,-E"
|
|
XLDFLAGS="$XLDFLAGS -Wl,-E"
|
|
+ # use special random-slot linkage in 0x[56]XXXXXXX
|
|
LIBPATHFLAG=" -L%1\$-s"
|
|
+ DLDFLAGS="$DLDFLAGS "'-Wl,-h,$(.TARGET) -Wl,--image-base,$$(($$RANDOM %4096/2*262144+1342177280))'
|
|
+ RPATHFLAG=' -Wl,-R%1$-s'
|
|
rb_cv_dlopen=yes ;; #(
|
|
freebsd*|dragonfly*) :
|
|
|
|
@@ -16193,7 +16203,7 @@ esac ;; #(
|
|
test "$GCC" = yes && test "$rb_cv_prog_gnu_ld" = yes || LDSHARED="ld -Bshareable"
|
|
fi
|
|
rb_cv_dlopen=yes ;; #(
|
|
- openbsd*) :
|
|
+ openbsd*|mirbsd*) :
|
|
: ${LDSHARED='$(CC) -shared ${CCDLFLAGS}'}
|
|
if test "$rb_cv_binary_elf" = yes; then
|
|
LDFLAGS="$LDFLAGS -Wl,-E"
|
|
@@ -16707,7 +16717,7 @@ case "$enable_shared" in #(
|
|
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=''
|
|
@@ -16724,7 +16734,7 @@ case "$enable_shared" in #(
|
|
LIBRUBY_ALIASES=""
|
|
fi
|
|
;; #(
|
|
- openbsd*) :
|
|
+ openbsd*|mirbsd*) :
|
|
|
|
SOLIBS='$(LIBS)'
|
|
LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR).'`expr ${MINOR} \* 10 + ${TEENY}`
|
|
@@ -16785,7 +16795,12 @@ esac
|
|
;; #(
|
|
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'
|
|
;; #(
|
|
*) :
|
|
;;
|
|
@@ -16848,11 +16863,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"
|
|
@@ -17752,7 +17763,7 @@ ac_config_files="$ac_config_files $FIRST
|
|
ac_config_files="$ac_config_files Makefile"
|
|
|
|
|
|
-ruby_pc="${RUBY_BASE_NAME}-${MAJOR}.${MINOR}.pc"
|
|
+ruby_pc="${RUBY_BASE_NAME}-${RUBY_PROGRAM_VERSION}.pc"
|
|
|
|
exec=exec
|
|
|
|
@@ -18409,6 +18420,8 @@ do
|
|
case $ac_option in
|
|
# Handling of the options.
|
|
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
|
|
+ : Avoid regenerating within pkgsrc
|
|
+ exit 0
|
|
ac_cs_recheck=: ;;
|
|
--version | --versio | --versi | --vers | --ver | --ve | --v | -V )
|
|
$as_echo "$ac_cs_version"; exit ;;
|