pkgsrc/lang/ruby193-base/patches/patch-configure
bsiegert dbde881868 Unbreak build on MirBSD by pre-including sys/types.h and sys/time.h in
header checks.
This will be submitted upstream.
2013-04-30 21:30:59 +00:00

124 lines
3.6 KiB
Text

$NetBSD: patch-configure,v 1.7 2013/04/30 21:30:59 bsiegert Exp $
* Adding Interix and MirBSD support.
* Ignore doxygen.
--- configure.orig Fri Feb 22 09:44:18 2013
+++ configure
@@ -10722,6 +10722,9 @@ esac
superux*) :
ac_cv_func_setitimer=no
;; #(
+ interix*) :
+ LIBS="-lm $LIBS"
+ ac_cv_func_getpgrp_void=yes ;; #(
*) :
LIBS="-lm $LIBS" ;;
esac
@@ -11325,7 +11328,13 @@ for ac_header in limits.h sys/file.h sys
net/socket.h sys/socket.h process.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
+#include <sys/types.h>
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
+"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
@@ -12053,6 +12062,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 :
@@ -13844,6 +13856,8 @@ else
# ifdef _MSC_VER
# include <malloc.h>
# define alloca _alloca
+# elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__OpenBSD__)
+# include <stdlib.h>
# else
# ifdef HAVE_ALLOCA_H
# include <alloca.h>
@@ -15784,7 +15798,7 @@ done
MAINLIBS="-pthread $MAINLIBS" ;; #(
*) :
case "$target_os" in #(
- openbsd*) :
+ openbsd*|mirbsd*) :
LIBS="-pthread $LIBS" ;; #(
*) :
LIBS="-l$pthread_lib $LIBS" ;;
@@ -16234,7 +16248,9 @@ esac ;; #(
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*) :
@@ -16246,7 +16262,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"
@@ -16775,7 +16791,7 @@ _ACEOF
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=''
@@ -16792,7 +16808,7 @@ _ACEOF
LIBRUBY_ALIASES=""
fi
;; #(
- openbsd*) :
+ openbsd*|mirbsd*) :
SOLIBS='$(LIBS)'
LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR).'`expr ${MINOR} \* 10 + ${TEENY}`
@@ -16853,7 +16869,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'
;; #(
*) :
;;
@@ -16916,11 +16937,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"