From: Michael R. Crusoe <michael.crusoe@gmail.com>
Subject: Enable building on more architectures
--- a/ngs-java/setup/konfigure.perl
+++ b/ngs-java/setup/konfigure.perl
@@ -309,17 +309,7 @@ print "checking for supported architectu
 
 my $BITS;
 
-if ($MARCH =~ /x86_64/i) {
-    $BITS = 64;
-} elsif ($MARCH eq 'fat86') {
-    $BITS = '32_64';
-} elsif ($MARCH =~ /i?86/i) {
-    $BITS = 32;
-} elsif ($MARCH =~ /aarch64/) {
-    $BITS = 64;
-} else {
-    die "unrecognized Architecture '$ARCH'";
-}
+$BITS=`dpkg-architecture -qDEB_TARGET_ARCH_BITS`;
 println "$MARCH ($BITS bits) is supported" unless ($AUTORUN);
 
 # determine OS and related norms
--- a/ngs-bam/setup/konfigure.perl
+++ b/ngs-bam/setup/konfigure.perl
@@ -309,17 +309,7 @@ print "checking for supported architectu
 
 my $BITS;
 
-if ($MARCH =~ /x86_64/i) {
-    $BITS = 64;
-} elsif ($MARCH eq 'fat86') {
-    $BITS = '32_64';
-} elsif ($MARCH =~ /i?86/i) {
-    $BITS = 32;
-} elsif ($MARCH =~ /aarch64/) {
-    $BITS = 64;
-} else {
-    die "unrecognized Architecture '$ARCH'";
-}
+$BITS=`dpkg-architecture -qDEB_TARGET_ARCH_BITS`;
 println "$MARCH ($BITS bits) is supported" unless ($AUTORUN);
 
 # determine OS and related norms
--- a/ngs-python/setup/konfigure.perl
+++ b/ngs-python/setup/konfigure.perl
@@ -309,17 +309,7 @@ print "checking for supported architectu
 
 my $BITS;
 
-if ($MARCH =~ /x86_64/i) {
-    $BITS = 64;
-} elsif ($MARCH eq 'fat86') {
-    $BITS = '32_64';
-} elsif ($MARCH =~ /i?86/i) {
-    $BITS = 32;
-} elsif ($MARCH =~ /aarch64/) {
-    $BITS = 64;
-} else {
-    die "unrecognized Architecture '$ARCH'";
-}
+$BITS=`dpkg-architecture -qDEB_TARGET_ARCH_BITS`;
 println "$MARCH ($BITS bits) is supported" unless ($AUTORUN);
 
 # determine OS and related norms
--- a/ngs-sdk/setup/konfigure.perl
+++ b/ngs-sdk/setup/konfigure.perl
@@ -309,17 +309,7 @@ print "checking for supported architectu
 
 my $BITS;
 
-if ($MARCH =~ /x86_64/i) {
-    $BITS = 64;
-} elsif ($MARCH eq 'fat86') {
-    $BITS = '32_64';
-} elsif ($MARCH =~ /i?86/i) {
-    $BITS = 32;
-} elsif ($MARCH =~ /aarch64/) {
-    $BITS = 64;
-} else {
-    die "unrecognized Architecture '$ARCH'";
-}
+$BITS=`dpkg-architecture -qDEB_TARGET_ARCH_BITS`;
 println "$MARCH ($BITS bits) is supported" unless ($AUTORUN);
 
 # determine OS and related norms
