diff options
author | Thomas Preud'homme <thomas.preudhomme@celest.fr> | 2010-03-13 11:03:40 +0100 |
---|---|---|
committer | Thomas Preud'homme <thomas.preudhomme@celest.fr> | 2010-03-13 11:03:40 +0100 |
commit | 406bee985de85229e0ba54a9efa767c194262d0c (patch) | |
tree | 2dee8785db170e33b235771ebdf7d43985b80c31 /configure | |
parent | fa3f0c7c00c4e5da92e4e4f1a06f193507d56261 (diff) |
Imported Upstream version 0.9.25
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 29 |
1 files changed, 22 insertions, 7 deletions
@@ -19,6 +19,7 @@ TMPH="${TMPDIR1}/tcc-conf-${RANDOM}-$$-${RANDOM}.h" # default parameters build_cross="no" +use_libgcc="no" prefix="" execprefix="" bindir="" @@ -26,17 +27,20 @@ libdir="" tccdir="" includedir="" mandir="" +sysroot="" cross_prefix="" cc="gcc" host_cc="gcc" ar="ar" -make="make" strip="strip" cpu=`uname -m` case "$cpu" in i386|i486|i586|i686|i86pc|BePC) cpu="x86" ;; + x86_64) + cpu="x86-64" + ;; armv4l) cpu="armv4l" ;; @@ -102,14 +106,14 @@ for opt do ;; --mandir=*) mandir=`echo $opt | cut -d '=' -f 2` ;; + --sysroot=*) sysroot=`echo $opt | cut -d '=' -f 2` + ;; --source-path=*) source_path=`echo $opt | cut -d '=' -f 2` ;; --cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2` ;; --cc=*) cc=`echo $opt | cut -d '=' -f 2` ;; - --make=*) make=`echo $opt | cut -d '=' -f 2` - ;; --extra-cflags=*) CFLAGS="${opt#--extra-cflags=}" ;; --extra-ldflags=*) LDFLAGS="${opt#--extra-ldflags=}" @@ -124,6 +128,8 @@ for opt do ;; --enable-cross) build_cross="yes" ;; + --with-libgcc) use_libgcc="yes" + ;; esac done @@ -218,8 +224,9 @@ echo "" echo "Advanced options (experts only):" echo " --source-path=PATH path of source code [$source_path]" echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]" +echo " --sysroot=PREFIX prepend PREFIX to library/include paths []" echo " --cc=CC use C compiler CC [$cc]" -echo " --make=MAKE use specified make [$make]" +echo " --with-libgcc use /lib/libgcc_s.so.1 instead of libtcc1.a" echo "" #echo "NOTE: The object files are build at the place where configure is launched" exit 1 @@ -227,7 +234,7 @@ fi if test "$mingw32" = "yes" ; then if test -z "$prefix" ; then - prefix="/c/Program Files/tcc" + prefix="C:/Program Files/tcc" fi execprefix="$prefix" bindir="$prefix" @@ -267,13 +274,14 @@ echo "Library directory $libdir" echo "Include directory $includedir" echo "Manual directory $mandir" echo "Doc directory $docdir" +echo "Target root prefix $sysroot" echo "Source path $source_path" echo "C compiler $cc" -echo "make $make" echo "CPU $cpu" echo "Big Endian $bigendian" echo "gprof enabled $gprof" echo "cross compilers $build_cross" +echo "use libgcc $use_libgcc" echo "Creating config.mak and config.h" @@ -287,8 +295,8 @@ echo "libdir=$libdir" >> config.mak echo "includedir=$includedir" >> config.mak echo "mandir=$mandir" >> config.mak echo "docdir=$docdir" >> config.mak +echo "#define CONFIG_SYSROOT \"$sysroot\"" >> $TMPH echo "#define CONFIG_TCCDIR \"$tccdir\"" >> $TMPH -echo "MAKE=$make" >> config.mak echo "CC=$cc" >> config.mak echo "GCC_MAJOR=$gcc_major" >> config.mak echo "#define GCC_MAJOR $gcc_major" >> $TMPH @@ -302,6 +310,9 @@ echo "EXESUF=$EXESUF" >> config.mak if test "$cpu" = "x86" ; then echo "ARCH=i386" >> config.mak echo "#define HOST_I386 1" >> $TMPH +elif test "$cpu" = "x86-64" ; then + echo "ARCH=x86-64" >> config.mak + echo "#define HOST_X86_64 1" >> $TMPH elif test "$cpu" = "armv4l" ; then echo "ARCH=arm" >> config.mak echo "#define HOST_ARM 1" >> $TMPH @@ -339,6 +350,10 @@ fi if test "$build_cross" = "yes" ; then echo "CONFIG_CROSS=yes" >> config.mak fi +if test "$use_libgcc" = "yes" ; then + echo "#define CONFIG_USE_LIBGCC" >> $TMPH + echo "CONFIG_USE_LIBGCC=yes" >> config.mak +fi version=`head $source_path/VERSION` echo "VERSION=$version" >>config.mak echo "#define TCC_VERSION \"$version\"" >> $TMPH |