$NetBSD: patch-configure,v 1.1 2024/01/21 08:22:03 taca Exp $ * Avoid bash specific variable substitution. * Adding Interix support. * Ignore doxygen. * Ignore VCS. * Handle SSP in pkgsrc. * Retain _XOPEN_SOURCE, fixes eventmachine. * Fix argument for pthread_self() on NetBSD. * Explictly stop display with color. * Remove bogus MJIT disabling on SunOS. --- configure.orig 2023-12-11 07:06:05.000000000 +0000 +++ configure @@ -8639,7 +8639,7 @@ else $as_nop then : case "$target_os" in #( - darwin*) : + nodarwin*) : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for real target cpu" >&5 printf %s "checking for real target cpu... " >&6; } @@ -10705,6 +10705,7 @@ fi stack_protector=no ;; #( *) : + stack_protector=no ;; esac if test -z "${stack_protector+set}" @@ -12604,18 +12605,6 @@ then : CPPFLAGS="$CPPFLAGS ${rb_opt}" ;; esac done - # _XOPEN_SOURCE should not be defined for C++ on Solaris. - # RUBY_APPEND_OPTIONS(CXXFLAGS) - for rb_opt in -U_XOPEN_SOURCE; do - case " ${CXXFLAGS-} " in #( - *" ${rb_opt} "*) : - ;; #( - ' ') : - CXXFLAGS="${rb_opt}" ;; #( - *) : - CXXFLAGS="$CXXFLAGS ${rb_opt}" ;; -esac - done fi @@ -12844,6 +12833,10 @@ esac ac_cv_func___builtin_setjmp=no ;; #( + interix*) : + LIBS="-lm $LIBS" + ac_cv_func_getpgrp_void=yes + ;; #( *) : ;; esac @@ -25357,7 +25350,9 @@ else #include #include #ifndef alloca -# ifdef __GNUC__ +# if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__OpenBSD__) +# include +# elif defined __GNUC__ # define alloca __builtin_alloca # elif defined _MSC_VER # include @@ -30602,6 +30597,8 @@ fi interix*) : : ${LDSHARED='$(CC) -shared'} XLDFLAGS="$XLDFLAGS -Wl,-E" + DLDFLAGS="$DLDFLAGS "'-Wl,-h,$(.TARGET) -Wl,--image-base,$$(($$RANDOM %4096/2*262144+1342177280))' + RPATHFLAG=' -Wl,-R%1$-s' rb_cv_dlopen=yes ;; #( freebsd*|dragonfly*) : @@ -31805,8 +31802,10 @@ fi ;; #( freebsd*|dragonfly*) : + RUBY_SO_NAME="${RUBY_SO_NAME}"'.$(RUBY_PROGRAM_VERSION)' LIBRUBY_SO='lib$(RUBY_SO_NAME).$(SOEXT).$(MAJOR)$(MINOR)' - LIBRUBY_SONAME='$(LIBRUBY_SO)' + LIBRUBY_SONAME='lib$(RUBY_BASE_NAME).$(RUBY_API_VERSION).$(SOEXT)' + LIBRUBY_ALIASES='$(LIBRUBY_SONAME) lib$(RUBY_INSTALL_NAME).$(SOEXT)' if test "$rb_cv_binary_elf" != "yes" then : @@ -31899,9 +31898,10 @@ esac ;; #( darwin*) : + RUBY_SO_NAME="${RUBY_SO_NAME}"'.$(RUBY_PROGRAM_VERSION)' LIBRUBY_SO='lib$(RUBY_SO_NAME).$(SOEXT)' - LIBRUBY_SONAME='$(LIBRUBY_SO)' - LIBRUBY_ALIASES='lib$(RUBY_INSTALL_NAME).$(SOEXT)' + LIBRUBY_SONAME='lib$(RUBY_BASE_NAME).$(RUBY_API_VERSION).$(SOEXT)' + LIBRUBY_ALIASES='$(LIBRUBY_SONAME) lib$(RUBY_INSTALL_NAME).$(SOEXT)' if test "$load_relative" = yes then : @@ -31924,7 +31924,12 @@ fi ;; #( 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,${PREFIX}/lib} -L${libdir} -L. -l$(RUBY_SO_NAME)' + LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR) lib$(RUBY_SO_NAME).so' ;; #( cygwin*|msys*|mingw*|mswin*) : @@ -32117,7 +32122,7 @@ then : esac rpathflag=`IFS="$PATH_SEPARATOR" echo x "$rpathflag" | - sed "s/^x *//;s${IFS}"'%1\\$-s'"${IFS}${libprefix}${IFS}g;s${IFS}%s${IFS}${libprefix}${IFS}g" + sed "s/^x *//;s${IFS}"'%1\\$-s'"${IFS}${libprefix}${IFS}g;s${IFS}%s${IFS}${PREFIX}/lib${IFS}g" ` LIBRUBY_RPATHFLAGS="$LIBRUBY_RPATHFLAGS${rpathflag}" LIBRUBYARG_SHARED="$LIBRUBY_RPATHFLAGS $LIBRUBYARG_SHARED" @@ -34246,7 +34251,7 @@ guard=INCLUDE_RUBY_CONFIG_H ( if test "x$CONFIGURE_TTY" = xyes then : - color=--color + color=--color=never else $as_nop color= fi @@ -35485,21 +35490,7 @@ which seems to be undefined. Please mak "Makefile":F) tmpmk=confmk$$.tmp { - if test ${VCS+set} -then : - - : - -elif git_dir=`$GIT --work-tree="$srcdir" --git-dir="$srcdir/.git" rev-parse --git-dir 2>/dev/null` -then : - - VCS='$(GIT)' - -else $as_nop - VCS='echo cannot' - -fi case "$VCS" in #( '$(GIT)'|git) : VCSUP='$(VCS) pull --rebase $(GITPULLOPTIONS)' ;; #(