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
1818 TMPH="${TMPDIR1}/tcc-conf-${RANDOM}-$$-${RANDOM}.h"
1919
2020 # default parameters
21+build_cross="no"
2122 prefix=""
2223 execprefix=""
2324 bindir=""
2425 libdir=""
26+tccdir=""
2527 includedir=""
2628 mandir=""
2729 cross_prefix=""
@@ -114,6 +116,8 @@ for opt do · 86 unmodified lines
114116 ;;
115117 --enable-mingw32) mingw32="yes" ; cross_prefix="i386-mingw32-"
116118 ;;
119+ --enable-cross) build_cross="yes"
120+ ;;
117121 esac
118122 done
119123
@@ -190,6 +194,7 @@ echo " --bindir=DIR user executables in DIR [EPREFIX/bin]" · 70 unmodified lines
190194 echo " --libdir=DIR object code libraries in DIR [EPREFIX/lib]"
191195 echo " --includedir=DIR C header files in DIR [PREFIX/include]"
192196 echo " --mandir=DIR man documentation in DIR [PREFIX/man]"
197+echo " --build-cross build cross compilers"
193198 echo ""
194199 echo "Advanced options (experts only):"
195200 echo " --source-path=PATH path of source code [$source_path]"
@@ -207,6 +212,7 @@ if test "$mingw32" = "yes" ; then · 11 unmodified lines
207212 fi
208213 execprefix="$prefix"
209214 bindir="$prefix"
215+ tccdir="$prefix"
210216 docdir="$prefix/doc"
211217 else
212218 if test -z "$prefix" ; then
@@ -226,6 +232,9 @@ fi # mingw32 · 13 unmodified lines
226232 if test x"$libdir" = x""; then
227233 libdir="${execprefix}/lib"
228234 fi
235+if test x"$tccdir" = x""; then
236+tccdir="${execprefix}/lib/tcc"
237+fi
229238 if test x"$mandir" = x""; then
230239 mandir="${prefix}/man"
231240 fi
@@ -234,6 +243,7 @@ includedir="${prefix}/include" · 2 unmodified lines
234243 fi
235244
236245 echo "Binary directory $bindir"
246+echo "TinyCC directory $tccdir"
237247 echo "Library directory $libdir"
238248 echo "Include directory $includedir"
239249 echo "Manual directory $mandir"
@@ -244,6 +254,7 @@ echo "make $make" · 4 unmodified lines
244254 echo "CPU $cpu"
245255 echo "Big Endian $bigendian"
246256 echo "gprof enabled $gprof"
257+echo "cross compilers $build_cross"
247258
248259 echo "Creating config.mak and config.h"
249260
@@ -252,11 +263,12 @@ echo "/* Automatically generated by configure - do not modify */" > $TMPH · 2 unmodified lines
252263
253264 echo "prefix=$prefix" >> config.mak
254265 echo "bindir=$bindir" >> config.mak
266+echo "tccdir=$tccdir" >> config.mak
255267 echo "libdir=$libdir" >> config.mak
256268 echo "includedir=$includedir" >> config.mak
257269 echo "mandir=$mandir" >> config.mak
258270 echo "docdir=$docdir" >> config.mak
259−echo "#define CONFIG_TCC_LIBDIR \"$libdir\"" >> $TMPH
271+echo "#define CONFIG_TCCDIR \"$tccdir\"" >> $TMPH
260272 echo "MAKE=$make" >> config.mak
261273 echo "CC=$cc" >> config.mak
262274 echo "GCC_MAJOR=$gcc_major" >> config.mak
@@ -302,6 +314,9 @@ if test "$gprof" = "yes" ; then · 39 unmodified lines
302314 echo "TARGET_GPROF=yes" >> config.mak
303315 echo "#define HAVE_GPROF 1" >> $TMPH
304316 fi
317+if test "$build_cross" = "yes" ; then
318+ echo "CONFIG_CROSS=yes" >> config.mak
319+fi
305320 version=`head $source_path/VERSION`
306321 echo "VERSION=$version" >>config.mak
307322 echo "#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