From e67ec0f4f055ad6b41fb17024cb4496b66054ada Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Thu, 29 Aug 2013 15:35:18 -0700 Subject: [PATCH] Add hard-coded library directory paths for systems without --print-multiarch Apparently, the very convenient "gcc --print-multiarch" option is something that Debian and Ubuntu have patched into gcc. For other systems, we hard-code either "i386-linux-gnu" or "x86_64-linux-gnu" and warn the user to fix things up if those are wrong. --- configure | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 4df846b..d535229 100755 --- a/configure +++ b/configure @@ -180,7 +180,16 @@ then printf " Target directory for 32-bit targets... " lib32_dir=$(gcc -m32 --print-multiarch) - printf "${lib32_dir}\n" + + if [ "$lib32_dir" = "" ]; then + lib32_dir="i386-linux-gnu" + printf "\n\n" + printf "\t\t*** Warning: Failed to query target directory.\n" + printf "\t\tHard-coding to $lib32_dir\n" + printf "\t\tFix LIB32_DIR in Makefile.config as needed.\n\n" + else + printf "${lib32_dir}\n" + fi else printf "No.\n" @@ -196,7 +205,16 @@ then printf " Target directory for 64-bit targets... " lib64_dir=$(gcc -m64 --print-multiarch) - printf "${lib64_dir}\n" + + if [ "$lib64_dir" = "" ]; then + lib64_dir="x86_64-linux-gnu" + printf "\n\n" + printf "\t\t*** Warning: Failed to query target directory.\n" + printf "\t\tHard-coding to $lib64_dir\n" + printf "\t\tFix LIB64_DIR in Makefile.config as needed.\n\n" + else + printf "${lib64_dir}\n" + fi else printf "No.\n" -- 2.43.0