aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure28
1 files changed, 21 insertions, 7 deletions
diff --git a/configure b/configure
index 318b788..9b0c34a 100755
--- a/configure
+++ b/configure
@@ -237,15 +237,25 @@ else
if test x"$execprefix" = x""; then
execprefix="${prefix}"
fi
+ if test x"$tccdir" = x""; then
+ tccdir="tcc"
+ fi
if test x"$libdir" = x""; then
- libdir="${execprefix}/lib"
+ libdir="${execprefix}/lib"
+ if test -n "${tccdir}"; then
+ tccdir="${libdir}/${tccdir}"
+ else
+ tccdir="${libdir}"
+ fi
+ if test "$cpu" = "x86-64"; then
+ libdir="${execprefix}/lib64"
+ fi
+ else
+ tccdir="${libdir}/${tccdir}"
fi
if test x"$bindir" = x""; then
bindir="${execprefix}/bin"
fi
- if test x"$tccdir" = x""; then
- tccdir="tcc"
- fi
if test x"$docdir" = x""; then
docdir="${sharedir}/doc/${tccdir}"
fi
@@ -255,7 +265,6 @@ else
if test x"$infodir" = x""; then
infodir="${sharedir}/info"
fi
- tccdir="${libdir}/${tccdir}"
fi # mingw32
if test x"$includedir" = x""; then
@@ -325,7 +334,7 @@ if test -z "$cross_prefix" ; then
if test -f "/usr/lib/$triplet/crti.o" ; then
tcc_lddir="lib"
multiarch_triplet="$triplet"
- elif test -f "/usr/lib64/crti.o" ; then
+ elif test "$cpu" != "x86" -a -f "/usr/lib64/crti.o" ; then
tcc_lddir="lib64"
fi
@@ -363,6 +372,11 @@ else
esac
fi
+# a final configuration tuning
+W_PRESENT="$($cc -v --help 2>&1 | grep deprecated-declarations)"
+if test -n "$W_PRESENT"; then cc="$cc -Wno-deprecated-declarations"; fi
+if test -z "$tcc_lddir" -a "$cpu" = "x86-64"; then tcc_lddir="lib64"; fi
+
echo "Binary directory $bindir"
echo "TinyCC directory $tccdir"
echo "Library directory $libdir"
@@ -424,11 +438,11 @@ echo "/* Automatically generated by configure - do not modify */" > $TMPH
print_inc CONFIG_SYSROOT "$sysroot"
print_inc CONFIG_TCCDIR "$tccdir"
+print_inc CONFIG_LDDIR "$tcc_lddir"
print_mak CONFIG_TCC_SYSINCLUDEPATHS "$tcc_sysincludepaths"
print_mak CONFIG_TCC_LIBPATHS "$tcc_libpaths"
print_mak CONFIG_TCC_CRTPREFIX "$tcc_crtprefix"
print_mak CONFIG_TCC_ELFINTERP "$tcc_elfinterp"
-print_mak CONFIG_LDDIR "$tcc_lddir"
print_mak CONFIG_MULTIARCHDIR "$multiarch_triplet"
echo "#define GCC_MAJOR $gcc_major" >> $TMPH