aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorThomas Preud'homme <robotux@celest.fr>2013-02-13 17:01:53 +0100
committerThomas Preud'homme <robotux@celest.fr>2013-02-13 17:03:30 +0100
commitf6cfaa6d2591b8931f8fde9aebf7822202b78810 (patch)
treed3d9f62c359ddd3443f8fdd9bbe85dcc75b092ed /configure
parent05108a3b0a8eff70739b253b8995999b1861f9f2 (diff)
downloadtinycc-f6cfaa6d2591b8931f8fde9aebf7822202b78810.tar.gz
tinycc-f6cfaa6d2591b8931f8fde9aebf7822202b78810.tar.bz2
Improve multiarch detection
* Detect multiarch at configure time * Detect based on the place where crti.o is * Define multiarch triplet in tcc.h
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure16
1 files changed, 16 insertions, 0 deletions
diff --git a/configure b/configure
index f8619a3..db991ca 100755
--- a/configure
+++ b/configure
@@ -260,6 +260,16 @@ if $cc -o $TMPO $TMPC 2> /dev/null ; then
gcc_major="4"
fi
+if test -z "$cross_prefix" ; then
+ if test -f "/usr/lib64" ; then
+ lddir="lib64"
+ elif test -z "$tcc_crtprefix" ; then # check if system is multiarch
+ if ! test -f $sysroot/usr/lib/crti.o -o test -L $sysroot/usr/lib/crti.o ; then
+ use_multiarch="yes"
+ fi
+ fi
+fi
+
if test x"$show_help" = "xyes" ; then
cat << EOF
Usage: configure [options]
@@ -491,6 +501,12 @@ if test "$have_selinux" = "yes" ; then
echo "#define HAVE_SELINUX" >> $TMPH
echo "HAVE_SELINUX=yes" >> config.mak
fi
+if test "$use_multiarch" = "yes" ; then
+ echo "#define CONFIG_TCC_MULTIARCH" >> $TMPH
+fi
+if test -n "$lddir" ; then
+ echo "#define CONFIG_LDDIR \"$lddir\"" >> $TMPH
+fi
version=`head $source_path/VERSION`
echo "VERSION=$version" >>config.mak