Various fixes for f9ac2013
authorThomas Preud'homme <robotux@celest.fr>
Wed, 13 Feb 2013 21:28:41 +0000 (13 22:28 +0100)
committerThomas Preud'homme <robotux@celest.fr>
Wed, 13 Feb 2013 21:28:41 +0000 (13 22:28 +0100)
configure

index 425f719..30b0183 100755 (executable)
--- a/configure
+++ b/configure
@@ -261,7 +261,7 @@ if $cc -o $TMPO $TMPC 2> /dev/null ; then
 fi
 
 if test -z "$cross_prefix" ; then
- libc_dir="$(ldd ./print_env_info | grep libc.so | sed 's|[^/]*/\(.*/\)[^/]*|\1|')"
+ libc_dir="$(ldd $TMPO | grep libc.so | sed 's|[^/]*/\(.*/\)[^/]*|\1|')"
  multiarch_triplet=${libc_dir#*/}
  multiarch_triplet=${multiarch_triplet%/}
  lddir="${libc_dir%%/*}"
@@ -418,6 +418,8 @@ print_var2 CONFIG_TCC_SYSINCLUDEPATHS "$tcc_sysincludepaths"
 print_var2 CONFIG_TCC_LIBPATHS "$tcc_libpaths"
 print_var2 CONFIG_TCC_CRTPREFIX "$tcc_crtprefix"
 print_var2 CONFIG_TCC_ELFINTERP "$tcc_elfinterp"
+print_var2 CONFIG_MULTIARCHDIR "$multiarch_triplet"
+print_var2 CONFIG_LDDIR "$lddir"
 
 echo "#define GCC_MAJOR $gcc_major" >> $TMPH
 
@@ -501,12 +503,6 @@ if test "$have_selinux" = "yes" ; then
   echo "#define HAVE_SELINUX" >> $TMPH
   echo "HAVE_SELINUX=yes" >> config.mak
 fi
-if test -n "$multiarch_triplet" ; then
-  echo "#define CONFIG_MULTIARCHDIR \"$multiarch_triplet\"" >> $TMPH
-fi
-if test -n "$lddir" ; then
-  echo "#define CONFIG_LDDIR \"$lddir\"" >> $TMPH
-fi
 
 version=`head $source_path/VERSION`
 echo "VERSION=$version" >>config.mak