ci: expand lib64 workaround to more Linux distros

Refs: #5299
Change-Id: I0b40cd2b463b92d3b97d08e9edabab673fb13e57
diff --git a/.jenkins.d/10-build.sh b/.jenkins.d/10-build.sh
index 5a0f4b1..9616634 100755
--- a/.jenkins.d/10-build.sh
+++ b/.jenkins.d/10-build.sh
@@ -10,9 +10,6 @@
 if [[ $ID == macos && ${VERSION_ID%%.*} -ge 12 ]]; then
     KEYCHAIN="--without-osx-keychain"
 fi
-if [[ -n $DISABLE_PCH ]]; then
-    PCH="--without-pch"
-fi
 
 set -x
 
@@ -25,7 +22,7 @@
     ./waf --color=yes distclean
 
     # Build static and shared library in release mode with examples
-    ./waf --color=yes configure --enable-static --enable-shared --with-examples $PCH
+    ./waf --color=yes configure --enable-static --enable-shared --with-examples
     ./waf --color=yes build
 
     # Cleanup
@@ -33,7 +30,7 @@
 fi
 
 # Build shared library in debug mode with tests
-./waf --color=yes configure --disable-static --enable-shared --debug --with-tests $ASAN $COVERAGE $KEYCHAIN $PCH
+./waf --color=yes configure --disable-static --enable-shared --debug --with-tests $ASAN $COVERAGE $KEYCHAIN
 ./waf --color=yes build
 
 # (tests will be run against the debug version)
@@ -41,9 +38,9 @@
 # Install
 sudo ./waf --color=yes install
 
-if [[ $ID_LIKE == *fedora* ]]; then
-    sudo tee /etc/ld.so.conf.d/ndn.conf >/dev/null <<< /usr/local/lib64
-fi
 if [[ $ID_LIKE == *linux* ]]; then
+    if [[ $(uname -m) == x86_64 && -d /usr/lib64 ]]; then
+        sudo tee /etc/ld.so.conf.d/ndn.conf >/dev/null <<< /usr/local/lib64
+    fi
     sudo ldconfig
 fi
diff --git a/.jenkins.d/40-headers-check.sh b/.jenkins.d/40-headers-check.sh
index 28cc98f..5e543dc 100755
--- a/.jenkins.d/40-headers-check.sh
+++ b/.jenkins.d/40-headers-check.sh
@@ -11,7 +11,7 @@
   exit 0
 fi
 
-if [[ $ID_LIKE == *fedora* ]]; then
+if [[ $ID_LIKE == *linux* && -d /usr/local/lib64/pkgconfig ]]; then
   export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig
 fi