diff -ruN Inline-0.86-orig/lib/Inline.pm Inline-0.86/lib/Inline.pm
--- Inline-0.86-orig/lib/Inline.pm	2020-01-08 23:20:13.000000000 -0600
+++ Inline-0.86/lib/Inline.pm	2020-10-25 20:20:40.000000000 -0500
@@ -840,13 +840,26 @@
     # That way the queried modules don't stay loaded.
     if (defined $o) {
         ($dir) = $dir =~ /(.*)/s if UNTAINT;
-        my $perl = $Config{perlpath};
-        $perl = $^X unless -f $perl;
+        my $perl = $^X;
         ($perl) = $perl =~ /(.*)/s if UNTAINT;
+	my @command;
+	if ($] >= 5.010 && $Config{"byteorder"} =~ /^1/) {
+	    # little-endian means intel (not powerpc), for which fink has
+	    # multiple single-arch distros that are seen by a single (fat)
+	    # perl interp from apple for a perl version supported by fink
+	    # (i.e., starting with 5.10.0). This is the logic taken from
+	    # Fink::PkgVersion as of fink-0.29.13.
+	    push @command, '/usr/bin/arch';
+	    if ( $Config{"longsize"} == 4 ) {
+		push @command, '-i386';   # 32-bit
+	    } else {
+		push @command, '-x86_64'; # 64-bit
+	    }
+	}
         local $ENV{PERL5OPT} if defined $ENV{PERL5OPT};
 
         my @_inc = map "-I$_", $o->derive_minus_I;
-	system $perl, @_inc, "-MInline=_CONFIG_", "-e1", "$dir"
+	system @command, $perl, @_inc, "-MInline=_CONFIG_", "-e1", "$dir"
           and croak M20_config_creation_failed($dir);
         return;
     }