$NetBSD: patch-configure,v 1.12 2015/04/03 08:59:08 jperkin Exp $ * Adding Interix and MirBSD support. * Ignore doxygen. --- configure.orig 2014-11-13 13:42:20.000000000 +0000 +++ configure @@ -4666,7 +4666,7 @@ esac else if test x"$target_alias" = x; then case "$target_os" in #( - darwin*) : + notdarwin*) : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for real target cpu" >&5 $as_echo_n "checking for real target cpu... " >&6; } @@ -10900,6 +10900,9 @@ esac superux*) : ac_cv_func_setitimer=no ;; #( + interix*) : + LIBS="-lm $LIBS" + ac_cv_func_getpgrp_void=yes ;; #( *) : LIBS="-lm $LIBS" ;; esac @@ -11503,7 +11506,13 @@ for ac_header in limits.h sys/file.h sys net/socket.h sys/socket.h process.h atomic.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 +#ifdef HAVE_SYS_TIME_H +#include +#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 @@ -12248,6 +12257,9 @@ fi ac_fn_c_check_type "$LINENO" "struct timespec" "ac_cv_type_struct_timespec" "#ifdef HAVE_TIME_H #include #endif +#ifdef HAVE_SYS_TIME_H +# include +#endif " if test "x$ac_cv_type_struct_timespec" = xyes; then : @@ -14039,6 +14051,8 @@ else # ifdef _MSC_VER # include # define alloca _alloca +# elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__OpenBSD__) +# include # else # ifdef HAVE_ALLOCA_H # include @@ -15991,7 +16005,7 @@ done MAINLIBS="-pthread $MAINLIBS" ;; #( *) : case "$target_os" in #( - openbsd*) : + openbsd*|mirbsd*) : LIBS="-pthread $LIBS" ;; #( *) : LIBS="-l$pthread_lib $LIBS" ;; @@ -16441,7 +16455,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*) : @@ -16453,7 +16469,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" @@ -16984,7 +17000,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='' @@ -17001,7 +17017,7 @@ _ACEOF LIBRUBY_ALIASES="" fi ;; #( - openbsd*) : + openbsd*|mirbsd*) : SOLIBS='$(LIBS)' LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR).'`expr ${MINOR} \* 10 + ${TEENY}` @@ -17062,7 +17078,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' ;; #( *) : ;; @@ -17125,11 +17146,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"