History

build of cross compilers is optional - added tccdir path

bellard committed 21 years ago

Commit acc4f881 parent 48217021 file · +16 −1Browse files

Unified · Split

configure+16−1
@@ -18,10 +18,12 @@ TMPS="${TMPDIR1}/tcc-conf-${RANDOM}-$$-${RANDOM}.S" · 17 unmodified lines
18TMPH="${TMPDIR1}/tcc-conf-${RANDOM}-$$-${RANDOM}.h"18TMPH="${TMPDIR1}/tcc-conf-${RANDOM}-$$-${RANDOM}.h"
19 19
20# default parameters20# default parameters
21build_cross="no"
21prefix=""22prefix=""
22execprefix=""23execprefix=""
23bindir=""24bindir=""
24libdir=""25libdir=""
26tccdir=""
25includedir=""27includedir=""
26mandir=""28mandir=""
27cross_prefix=""29cross_prefix=""
@@ -114,6 +116,8 @@ for opt do · 86 unmodified lines
114 ;;116 ;;
115 --enable-mingw32) mingw32="yes" ; cross_prefix="i386-mingw32-"117 --enable-mingw32) mingw32="yes" ; cross_prefix="i386-mingw32-"
116 ;; 118 ;;
119 --enable-cross) build_cross="yes"
120 ;;
117 esac121 esac
118done122done
119 123
@@ -190,6 +194,7 @@ echo " --bindir=DIR user executables in DIR [EPREFIX/bin]" · 70 unmodified lines
190echo " --libdir=DIR object code libraries in DIR [EPREFIX/lib]"194echo " --libdir=DIR object code libraries in DIR [EPREFIX/lib]"
191echo " --includedir=DIR C header files in DIR [PREFIX/include]"195echo " --includedir=DIR C header files in DIR [PREFIX/include]"
192echo " --mandir=DIR man documentation in DIR [PREFIX/man]"196echo " --mandir=DIR man documentation in DIR [PREFIX/man]"
197echo " --build-cross build cross compilers"
193echo ""198echo ""
194echo "Advanced options (experts only):"199echo "Advanced options (experts only):"
195echo " --source-path=PATH path of source code [$source_path]"200echo " --source-path=PATH path of source code [$source_path]"
@@ -207,6 +212,7 @@ if test "$mingw32" = "yes" ; then · 11 unmodified lines
207 fi212 fi
208 execprefix="$prefix"213 execprefix="$prefix"
209 bindir="$prefix"214 bindir="$prefix"
215 tccdir="$prefix"
210 docdir="$prefix/doc"216 docdir="$prefix/doc"
211else217else
212 if test -z "$prefix" ; then218 if test -z "$prefix" ; then
@@ -226,6 +232,9 @@ fi # mingw32 · 13 unmodified lines
226if test x"$libdir" = x""; then232if test x"$libdir" = x""; then
227libdir="${execprefix}/lib"233libdir="${execprefix}/lib"
228fi234fi
235if test x"$tccdir" = x""; then
236tccdir="${execprefix}/lib/tcc"
237fi
229if test x"$mandir" = x""; then238if test x"$mandir" = x""; then
230mandir="${prefix}/man"239mandir="${prefix}/man"
231fi240fi
@@ -234,6 +243,7 @@ includedir="${prefix}/include" · 2 unmodified lines
234fi243fi
235 244
236echo "Binary directory $bindir"245echo "Binary directory $bindir"
246echo "TinyCC directory $tccdir"
237echo "Library directory $libdir"247echo "Library directory $libdir"
238echo "Include directory $includedir"248echo "Include directory $includedir"
239echo "Manual directory $mandir"249echo "Manual directory $mandir"
@@ -244,6 +254,7 @@ echo "make $make" · 4 unmodified lines
244echo "CPU $cpu"254echo "CPU $cpu"
245echo "Big Endian $bigendian"255echo "Big Endian $bigendian"
246echo "gprof enabled $gprof"256echo "gprof enabled $gprof"
257echo "cross compilers $build_cross"
247 258
248echo "Creating config.mak and config.h"259echo "Creating config.mak and config.h"
249 260
@@ -252,11 +263,12 @@ echo "/* Automatically generated by configure - do not modify */" > $TMPH · 2 unmodified lines
252 263
253echo "prefix=$prefix" >> config.mak264echo "prefix=$prefix" >> config.mak
254echo "bindir=$bindir" >> config.mak265echo "bindir=$bindir" >> config.mak
266echo "tccdir=$tccdir" >> config.mak
255echo "libdir=$libdir" >> config.mak267echo "libdir=$libdir" >> config.mak
256echo "includedir=$includedir" >> config.mak268echo "includedir=$includedir" >> config.mak
257echo "mandir=$mandir" >> config.mak269echo "mandir=$mandir" >> config.mak
258echo "docdir=$docdir" >> config.mak270echo "docdir=$docdir" >> config.mak
259echo "#define CONFIG_TCC_LIBDIR \"$libdir\"" >> $TMPH271echo "#define CONFIG_TCCDIR \"$tccdir\"" >> $TMPH
260echo "MAKE=$make" >> config.mak272echo "MAKE=$make" >> config.mak
261echo "CC=$cc" >> config.mak273echo "CC=$cc" >> config.mak
262echo "GCC_MAJOR=$gcc_major" >> config.mak274echo "GCC_MAJOR=$gcc_major" >> config.mak
@@ -302,6 +314,9 @@ if test "$gprof" = "yes" ; then · 39 unmodified lines
302 echo "TARGET_GPROF=yes" >> config.mak314 echo "TARGET_GPROF=yes" >> config.mak
303 echo "#define HAVE_GPROF 1" >> $TMPH315 echo "#define HAVE_GPROF 1" >> $TMPH
304fi316fi
317if test "$build_cross" = "yes" ; then
318 echo "CONFIG_CROSS=yes" >> config.mak
319fi
305version=`head $source_path/VERSION`320version=`head $source_path/VERSION`
306echo "VERSION=$version" >>config.mak321echo "VERSION=$version" >>config.mak
307echo "#define TCC_VERSION \"$version\"" >> $TMPH322echo "#define TCC_VERSION \"$version\"" >> $TMPH

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t