Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / lang / ruby193-base / patches / patch-configure
blob9cd92ec4647839c17fa1d1110564420bc029ea80
1 $NetBSD: patch-configure,v 1.6 2013/02/06 15:48:31 taca Exp $
3 * Adding Interix and MirBSD support.
4 * Ignore doxygen.
6 --- configure.orig      Fri Feb 22 09:44:18 2013
7 +++ configure
8 @@ -10722,6 +10722,9 @@ esac
9    superux*) :
10         ac_cv_func_setitimer=no
11                  ;; #(
12 +  interix*) :
13 +       LIBS="-lm $LIBS"
14 +               ac_cv_func_getpgrp_void=yes ;; #(
15    *) :
16         LIBS="-lm $LIBS" ;;
17  esac
18 @@ -11325,7 +11328,13 @@ for ac_header in limits.h sys/file.h sys
19                  net/socket.h sys/socket.h process.h
20  do :
21    as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
22 -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23 +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
24 +#include <sys/types.h>
25 +#ifdef HAVE_SYS_TIME_H
26 +#include <sys/time.h>
27 +#endif
30  if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31    cat >>confdefs.h <<_ACEOF
32  #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
33 @@ -12053,6 +12062,9 @@ fi
34  ac_fn_c_check_type "$LINENO" "struct timespec" "ac_cv_type_struct_timespec" "#ifdef HAVE_TIME_H
35  #include <time.h>
36  #endif
37 +#ifdef HAVE_SYS_TIME_H
38 +# include <sys/time.h>
39 +#endif
40  "
41  if test "x$ac_cv_type_struct_timespec" = xyes; then :
43 @@ -13844,6 +13856,8 @@ else
44  # ifdef _MSC_VER
45  #  include <malloc.h>
46  #  define alloca _alloca
47 +# elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__OpenBSD__)
48 +#   include <stdlib.h>
49  # else
50  #  ifdef HAVE_ALLOCA_H
51  #   include <alloca.h>
52 @@ -15784,7 +15798,7 @@ done
53      MAINLIBS="-pthread $MAINLIBS" ;; #(
54    *) :
55      case "$target_os" in #(
56 -  openbsd*) :
57 +  openbsd*|mirbsd*) :
58      LIBS="-pthread $LIBS" ;; #(
59    *) :
60      LIBS="-l$pthread_lib $LIBS" ;;
61 @@ -16234,7 +16248,9 @@ esac ;; #(
62    interix*) :
63         : ${LDSHARED='$(CC) -shared'}
64                         XLDFLAGS="$XLDFLAGS -Wl,-E"
65 +                       DLDFLAGS="$DLDFLAGS "'-Wl,-h,$(.TARGET) -Wl,--image-base,$$(($$RANDOM %4096/2*262144+1342177280))'
66                         LIBPATHFLAG=" -L%1\$-s"
67 +                       RPATHFLAG=' -Wl,-R%1$-s'
68                         rb_cv_dlopen=yes ;; #(
69    freebsd*|dragonfly*) :
71 @@ -16246,7 +16262,7 @@ esac ;; #(
72                           test "$GCC" = yes && test "$rb_cv_prog_gnu_ld" = yes || LDSHARED="ld -Bshareable"
73                         fi
74                         rb_cv_dlopen=yes ;; #(
75 -  openbsd*) :
76 +  openbsd*|mirbsd*) :
77         : ${LDSHARED='$(CC) -shared ${CCDLFLAGS}'}
78                         if test "$rb_cv_binary_elf" = yes; then
79                             LDFLAGS="$LDFLAGS -Wl,-E"
80 @@ -16775,7 +16791,7 @@ _ACEOF
81    freebsd*|dragonfly*) :
83         SOLIBS='$(LIBS)'
84 -       LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR)'
85 +       LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR)\$(TEENY)'
86         if test "$rb_cv_binary_elf" != "yes" ; then
87             LIBRUBY_SO="$LIBRUBY_SO.\$(TEENY)"
88             LIBRUBY_ALIASES=''
89 @@ -16792,7 +16808,7 @@ _ACEOF
90            LIBRUBY_ALIASES=""
91         fi
92          ;; #(
93 -  openbsd*) :
94 +  openbsd*|mirbsd*) :
96         SOLIBS='$(LIBS)'
97         LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR).'`expr ${MINOR} \* 10 + ${TEENY}`
98 @@ -16853,7 +16869,12 @@ esac
99          ;; #(
100    interix*) :
102 -       LIBRUBYARG_SHARED='-L. -L${libdir} -l$(RUBY_SO_NAME)'
103 +       SOLIBS='$(LIBS)'
104 +       LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR).$(TEENY)'
105 +       # link explicitly to 0x48000000
106 +       LIBRUBY_DLDFLAGS='-Wl,-h,lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR) -Wl,--image-base,1207959552'
107 +       LIBRUBYARG_SHARED='-Wl,-R -Wl,${libdir} -L${libdir} -L. -l$(RUBY_SO_NAME)'
108 +       LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR) lib$(RUBY_SO_NAME).so'
109          ;; #(
110    *) :
111       ;;
112 @@ -16916,11 +16937,7 @@ if test "$install_doc" != no; then
113      else
114         RDOCTARGET="nodoc"
115      fi
116 -    if test "$install_capi" != no -a -n "$DOXYGEN"; then
117 -       CAPITARGET="capi"
118 -    else
119 -       CAPITARGET="nodoc"
120 -    fi
121 +    CAPITARGET="nodoc"
122  else
123      RDOCTARGET="nodoc"
124      CAPITARGET="nodoc"