-
-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathconfigure
executable file
·654 lines (554 loc) · 16.7 KB
/
configure
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
#!/bin/sh
CONFIG_FILE=config.gnu
PLAT="default_platform"
ARCH="default_arch"
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
UNAME_REL=`(uname -r) 2>/dev/null` || UNAME_REL=unknown
# If under Cygwin or Mingw, we have 2 sets of paths: the normal TRUNKDIR/BUILDDIR/INCDIR defined by
# the Cygwin path (/cygdrive/c/dir/file) or under Mingw the Mingw path (/c/dir/file); as well as the
# CYP- versions (c:/dir/file). The normal variables are used by make itself, which can't handle the
# mixed-mode path and can only deal with pure Cygwin or Mingw ones. (These are also used by the
# various utilities ike cp, gcc, etc, even though they can handle either format). The CYP- versions
# are used whenever we call eui, euc, or an euphoria program, as these can only handle mixed-mode
# paths.
USECYPPATH="false"
# argument sent to the pwd command. Most platforms no arguments.
PWDARG=
if echo "$UNAME_SYSTEM" | grep CYGWIN > /dev/null; then
# for now, we build with -mno-cygwin under cygwin, so this is treated
# identically to MinGW
# A true exu.exe should probably set UNAME_SYSTEM="CYGWIN"
UNAME_SYSTEM=WINDOWS
# However, since we use absolute paths and Cygwin's make can't deal with
# mixed-mode paths (C:/dir/file) the way MSYS's make can, we turn
# CYPPATH on
USECYPPATH="true"
PWDARG=
EXE=.exe
elif echo "$UNAME_SYSTEM" | grep MINGW > /dev/null; then
UNAME_SYSTEM=WINDOWS
USEMINGPATH="true"
PWDARG=
EXE=.exe
else
PWDARG=
fi
if [ -e source/global.e ]; then
PREFIX=source/
else
PREFIX=./
fi
SOURCEDIR="`dirname \"$0\"`" # relative
SOURCEDIR="`( cd \"$SOURCEDIR\" && pwd $PWDARG )`" # absolutized and normalized
if [ -z "SOURCEDIR" ] ; then
# error; for some reason, the path is not accessible
# to the script (e.g. permissions re-evaled after suid)
exit 1 # fail
fi
TRUNKDIR="`(cd \"$SOURCEDIR\" && cd .. && pwd $PWDARG)`"
MIN_VER=`egrep "define +MIN_VER" version.h | awk ' { print $3; }'`
# gcc doesn't seem to like -m32 on 32-bit machines when there are
# no 64-bit machines
# with an instruction super set of the 32-bit machine. This means,
# -m32 is fine for ix86 32bit machines but bad for ARM and Motorola based
# machines.
MFLAG=-m32
if echo "$UNAME_MACHINE" | grep "i[1-7]86" > /dev/null; then
HOST_ARCH=ix86
MFLAG=-m32
elif echo "$UNAME_MACHINE" | egrep "x86_64|amd64" > /dev/null; then
HOST_ARCH=ix86_64
MFLAG=-m64
elif echo "$UNAME_MACHINE" | grep -i ARM > /dev/null; then
HOST_ARCH=ARM
MFLAG=
elif echo "$UNAME_MACHINE" | grep -i aarch64 > /dev/null; then
HOST_ARCH=ARM64
MFLAG=
fi
ARCH=$HOST_ARCH
if test $UNAME_SYSTEM = "Linux"; then
EHOST=ELINUX
TARGET=ELINUX
elif test $UNAME_SYSTEM = "WINDOWS"; then
EHOST=EWINDOWS
TARGET=EWINDOWS
elif test $UNAME_SYSTEM = "OpenBSD"; then
EHOST=OPENBSD
TARGET=EOPENBSD
EBSD=1
elif test $UNAME_SYSTEM = "NetBSD"; then
EHOST=NETBSD
TARGET=EBSD
EBSD=1
elif test $UNAME_SYSTEM = "FreeBSD"; then
EHOST=FREEBSD
TARGET=EFREEBSD
EBSD=1
# OS X > 10.4 (Darwin version 8 and up) supports 64-bit applications.
elif test $UNAME_SYSTEM = "Darwin"; then
EHOST=EOSX
TARGET=EOSX
EBSD=1
VAL=`echo "$UNAME_REL" | cut -d \. -f 1`
if test $VAL -gt 8; then
ARCH=ix86_64
MFLAG=-m64
# PPC will have to be supported manually; Euphoria doesn't currently support PPC.
else
ARCH=x86
MFLAG=-m32
fi
else
EHOST=EBSD
TARGET=EBSD
fi
# default use source
if [ "$SOURCEDIR" = `pwd $PWDARG` ] ; then
BUILDDIR=`pwd $PWDARG`/build
else
BUILDDIR=`pwd $PWDARG`
fi
if [ -x "$BUILDDIR"/euc ]; then
EC="${BUILDDIR}/euc"
else
EC="eui ${SOURCEDIR}/euc.ex"
fi
XLTTARGETCC=gcc
CC=gcc
AR=ar
EDEBUG=
SCP="scp -C"
SSH="ssh -C"
INSTALL_PREFIX="/usr/local"
EREL_TYPE="development"
ROOTDIR="$TRUNKDIR"
HG="git"
CONFIGURE_PARAMS="$@"
OPT=-O3
# parameters
while [ "$1" != "" ]; do
case $1 in
--build-quickly)
OPT=-O0
;;
--plat*|--target)
VAL=`echo $1 | cut -d = -f 2`
if [ "$VAL" = "$1" ]; then
shift ; VAL=$1
fi
TARGET=E$VAL
PLAT=$VAL
;;
--watcom )
XLTTARGETCC=wat
;;
--cc-prefix*)
VAL=`echo $1 | cut -d = -f 2`
if [ "$VAL" = "$1" ]; then
shift ; VAL=$1
fi
CC_PREFIX=$VAL
;;
--cc*)
VAL=`echo $1 | cut -d = -f 2`
if [ "$VAL" = "$1" ]; then
shift ; VAL=$1
fi
CC=$VAL
;;
--rc*)
VAL=`echo $1 | cut -d = -f 2`
if [ "$VAL" = "$1" ]; then
shift ; VAL=$1
fi
RC=$VAL
;;
--no-managed-mem )
MANAGED_MEM=0
;;
--managed-mem)
MANAGED_MEM=1
;;
--align4 )
ALIGN4=1
;;
--without-euphoria )
EUPHORIA=0
;;
--eubin*)
VAL=`echo $1 | cut -d = -f 2`
if [ "$VAL" = "$1" ]; then
shift ; VAL=$1
fi
LEN=`echo $VAL/eucd.exe | wc -c`
if test $LEN -gt 85; then
if test $UNAME_SYSTEM = "MS-DOS"; then
echo "Cannot configure with such a long path for DJGPP."
rm "$PREFIX"${CONFIG_FILE}
exit
fi
fi
EUBIN=$VAL
if [ -x "${EUBIN}/eui" ]; then
EC="${EUBIN}/eui ${SOURCEDIR}/euc.ex"
fi
;;
--build*)
VAL=`echo $1 | cut -d = -f 2`
if [ "$VAL" = "$1" ]; then
shift ; VAL=$1
fi
BUILDDIR=$VAL
;;
--debug )
EDEBUG=1
OPT=-ggdb
;;
--prefix*)
VAL=`echo $1 | cut -d = -f 2`
if [ "$VAL" = "$1" ]; then
shift ; VAL=$1
fi
INSTALL_PREFIX=$VAL
;;
--use-binary-translator )
if [ -x "$BUILDDIR"/euc ]; then
EC="${BUILDDIR}/euc"
elif [ -x "$EUBIN/euc" ]; then
EC="${EUBIN}/euc"
else
EC="euc"
fi
;;
--use-source-translator )
if [ -x "${BUILDDIR}"/eui ]; then
EC="${BUILDDIR}/eui ${SOURCEDIR}/euc.ex"
elif [ -x "${EUBIN}"/eui ]; then
EC="${EUBIN}/eui ${SOURCEDIR}/euc.ex"
else
EC="eui ${SOURCEDIR}/euc.ex"
fi
;;
--release*)
VAL=`echo $1 | cut -d = -f 2`
if [ "$VAL" = "$1" ]; then
shift ; VAL=$1
fi
EREL_TYPE=$VAL
#" comment to help display in some editors
;;
--verbose-tests )
VERBOSE_TESTS="-verbose"
;;
--rootdir*)
VAL=`echo $1 | cut -d = -f 2`
if [ "$VAL" = "$1" ]; then
shift ; VAL=$1
fi
ROOTDIR=$VAL
;;
--oe-username*)
VAL=`echo $1 | cut -d = -f 2`
if [ "$VAL" = "$1" ]; then
shift ; VAL=$1
fi
OE_USERNAME=$VAL
;;
--scp-client*)
VAL=`echo $1 | cut -d = -f 2`
if [ "$VAL" = "$1" ]; then
shift ; VAL=$1
fi
SCP=$VAL
;;
--ssh-client*)
VAL=`echo $1 | cut -d = -f 2`
if [ "$VAL" = "$1" ]; then
shift ; VAL = $1
fi
SSH=$VAL
;;
--hg*)
VAL=`echo $1 | cut -d = -f 2`
if [ "$VAL" = "$1" ]; then
shift ; VAL = $1
fi
HG=$VAL
;;
--arch*)
VAL=`echo $1 | cut -d = -f 2`
if [ "$VAL" = "$1" ]; then
shift ; VAL=$1
fi
if [ $MIN_VER = 0 ]; then
echo "Option --arch not available for 4.0 installs."
exit
fi
ARCH=$VAL
case $ARCH in
x86[_\-\.]64)
ARCH=ix86_64
MFLAG=-m64
;;
x86|ix86)
ARCH=ix86
MFLAG=-m32
;;
ARM64)
ARCH=ARM64
MFLAG=
;;
ARM)
ARCH=ARM
MFLAG=
;;
*)
echo "Unknown Architecture '$VAL'"
echo "Supported Architectures:"
echo " x86"
echo " x86_64"
echo " ARM"
echo " ARM64"
exit
esac
;;
--ar*)
VAL=`echo $1 | cut -d = -f 2`
if [ "$VAL" = "$1" ]; then
shift ; VAL=$1
fi
AR=$VAL
;;
--wine*)
VAL=`echo $1 | cut -d = -f 2`
if [ "$VAL" = "$1" ]; then
shift ; VAL=$1
fi
WINE=$VAL
;;
--no-cygwin )
NO_CYGWIN=-mno-cygwin
;;
* )
echo "Unknown option '$1'"
echo "Configures and prepares the euphoria source for building"
echo
echo "configure [options]"
echo
echo "Options:"
echo " --target value or --plat value"
echo " Set the OS that we will translate to."
echo " Values can be: WINDOWS, OSX, LINUX,"
echo " FREEBSD, OPENBSD or NETBSD."
echo " --build-quickly The targets will be built with no C optimization."
echo " --watcom The translator will create C code"
echo " for the Watcom compiler."
echo " --cc-prefix Prefix to use with the compiler and"
echo " other build binaries. This is"
echo " generally used from cross compilers,"
echo " or Windows MinGW installations that"
echo " use a prefix."
echo " --cc value The name of your GNU C compiler file name if its "
echo " name is not 'gcc'."
echo " --rc value Name of the windows resource compiler."
echo " This is used with MinGW builds."
echo " --no-managed-mem Disable managed memory. Used on Windows."
echo " --managed-mem Enable managed memory. Used on Windows."
echo " --align4 Malloc allocates addresses that are"
echo " always 4 byte aligned. Used on Windows."
echo " --without-euphoria Don't use a precompiled version of Euphoria to build."
echo " --eubin value Set the path of the precompiled"
echo " binaries used to intrepret and translate the sources."
echo " --build value Set the build directory. The default is"
echo " 'build' off of the source directory."
echo " --debug Turn debugging on."
# echo " --full"
echo " --prefix value Set the install directory (default /usr/local)."
echo " --use-binary-translator"
echo " Use the already built translator rather"
echo " than interpreting its source. "
echo " --use-source-translator "
echo " Interpret the translator's source rather"
#'" (comment to help display in some editors)
echo " than using the already built translator"
echo " (default)."
echo " --release value Set the release type for the version string."
echo " --verbose-tests Cause the 'test' target to use the -verbose flag"
echo " with eutest."
echo " --rootdir value The root dir to use for checking the svn revision."
echo " The default is the parent directory."
echo " --oe-username value Developer user name on openeuphoria.org for various scp"
echo " operations such as manual upload."
echo " --scp-client value SCP program to use for scp uploads (default scp -C)."
echo " --ssh-client value SSH program to use for ssh commands (default ssh -C)."
echo " --hg value Git binary command (default 'which git')."
if [ $MIN_VER -gt 0 ]; then
echo " --arch value Set architecture to ARM, ARM64, x86, or x86-64."
fi
# Is --wine still needed?
echo " --wine value Path to wine (useful for cross compilation to windows)."
echo " --no-cygwin Use the -mno-cygwin flag with MinGW."
echo " This flag is obsoltete, and may cause errors"
echo " on newer versions of MinGW."
exit
;;
esac
shift
done
if [ "$TARGET" = "EBSD" ]; then
EBSD=1
elif [ "$TARGET" = "EOPENBSD" ]; then
EOPENBSD=1
elif [ "$TARGET" = "EFREEBSD" ]; then
EFREEBSD=1
elif [ "$TARGET" = "EOSX" ]; then
EOSX=1
elif [ "$TARGET" = "ELINUX" ]; then
ELINUX=1
elif [ "$TARGET" = "EWINDOWS" ]; then
EMINGW=1
fi
echo Writing configuration to "$PREFIX"${CONFIG_FILE}...
echo > "$PREFIX"${CONFIG_FILE}
echo "# File generated from configure" >> ${CONFIG_FILE}
echo "CONFIGURE_PARAMS=$CONFIGURE_PARAMS" >> "$PREFIX"${CONFIG_FILE}
echo >> "$PREFIX"${CONFIG_FILE}
[ -n "$EHOST" ] && echo "EHOST=$EHOST" >> "$PREFIX"${CONFIG_FILE}
[ -n "$EUBIN" ] && echo "EUBIN=$EUBIN" >> "$PREFIX"${CONFIG_FILE}
[ -n "$INSTALL_PREFIX" ] && echo "PREFIX=$INSTALL_PREFIX" >> ${CONFIG_FILE}
[ -n "$EREL_TYPE" ] && echo "EREL_TYPE=-DEREL_TYPE=\"$EREL_TYPE\"" >> ${CONFIG_FILE}
#" comment to help display in some editors
[ -n "$VERBOSE_TESTS" ] && echo "VERBOSE_TESTS=$VERBOSE_TESTS" >> ${CONFIG_FILE}
[ -n "$ROOTDIR" ] && echo ROOTDIR="$ROOTDIR" >> ${CONFIG_FILE}
[ -n "$OE_USERNAME" ] && echo OE_USERNAME="$OE_USERNAME" >> ${CONFIG_FILE}
[ -n "$WINE" ] && echo WINE="$WINE" >> "$PREFIX"${CONFIG_FILE}
if [ "x$EDEBUG" = "x1" ]; then
echo EDEBUG=1 >> "$PREFIX"${CONFIG_FILE}
fi
[ -n "$EBSD" ] && echo EBSD="$EBSD" >> "$PREFIX"${CONFIG_FILE}
[ -n "$EOPENBSD" ] && echo EOPENBSD="$EOPENBSD" >> "$PREFIX"${CONFIG_FILE}
[ -n "$ENETBSD" ] && echo ENETBSD="$ENETBSD" >> "$PREFIX"${CONFIG_FILE}
[ -n "$EOSX" ] && echo EOSX="$EOSX" >> "$PREFIX"${CONFIG_FILE}
[ -n "$ELINUX" ] && echo ELINUX="$ELINUX" >> "$PREFIX"${CONFIG_FILE}
[ -n "$EMINGW" ] && echo EMINGW="$EMINGW" >> "$PREFIX"${CONFIG_FILE}
# if eui doesn't exist the error message goes into
# the device file /dev/null. [works on Mingw too.]
if [ "x$EUPHORIA" = "x" ]; then
if [ "x$EUBIN" = "x" ]; then
if eui -? 1> /dev/null 2> /dev/null; then
EUPHORIA=1
else
EUPHORIA=0
fi
else
EUPHORIA=1
fi
fi
if [ "$EUPHORIA" = "1" ]; then
echo EUPHORIA=1 >> "$PREFIX"${CONFIG_FILE}
else
echo EUPHORIA=0 >> "$PREFIX"${CONFIG_FILE}
fi
if [ "$TARGET" = "EWINDOWS" ]; then
# MANAGED_MEM and ALIGN4 are on by default for Windows
# and only Windows
if [ "x$MANAGED_MEM" = "x" ]; then
echo MANAGED_MEM=1 >> "$PREFIX"${CONFIG_FILE}
else
echo MANAGED_MEM=0 >> "$PREFIX"${CONFIG_FILE}
fi
if [ "x$ALIGN4" = "x" ]; then
echo ALIGN4=0 >> "$PREFIX"${CONFIG_FILE}
else
echo ALIGN4=1 >> "$PREFIX"${CONFIG_FILE}
fi
fi
if [ "$TARGET" = "EWINDOWS" ]; then
if [ "x$RC" = "x" ]; then
RC=windres
fi
fi
echo >> "$PREFIX"${CONFIG_FILE}
echo "TRANSLATE=$EC" >> "$PREFIX"${CONFIG_FILE}
[ -n "$TARGET" ] && echo "ETARGET=$TARGET" >> "$PREFIX"${CONFIG_FILE}
[ -n "$ARCH" ] && echo "ARCH=$ARCH" >> "$PREFIX"${CONFIG_FILE}
[ -n "$MFLAG" ] && echo "MSIZE=$MFLAG" >> "$PREFIX"${CONFIG_FILE}
[ -n "$AR" ] && echo "AR_SUFFIX=$AR" >> "$PREFIX"${CONFIG_FILE}
[ -n "$CC" ] && echo "CC_SUFFIX=$CC" >> "$PREFIX"${CONFIG_FILE}
[ -n "$CC_PREFIX" ] && echo "CC_PREFIX=$CC_PREFIX" >> "$PREFIX"${CONFIG_FILE}
[ -n "$RC" ] && echo "RC_SUFFIX=$RC" >> "$PREFIX"${CONFIG_FILE}
[ -n "$SCP" ] && echo "SCP=$SCP" >> "$PREFIX"${CONFIG_FILE}
[ -n "$SSH" ] && echo "SSH=$SSH" >> "$PREFIX"${CONFIG_FILE}
[ -n "$HG" ] && echo "HG=$HG" >> "$PREFIX"${CONFIG_FILE}
PWD=`pwd $PWDARG`
PPWD=`cd .. && pwd $PWDARG`
# The following works around a bug in djgpp's pwd
# that at times returns the parent of the current
# directory instead of the current directory.
if [ ! -e "$PPWD"/source ] && [ -e "$PWD"/source ]; then
# bug is present
echo "Information: Working around djgpp's PWD bug"
PPWD=$PWD
fi
# TRUNKDIR=$PPWD
mkdir -p $BUILDDIR
BUILDDIR=`cd "$BUILDDIR" && pwd $PWDARG`
[ -n "$TRUNKDIR" ] && echo TRUNKDIR=$TRUNKDIR >> "$PREFIX"${CONFIG_FILE}
[ -n "$SOURCEDIR" ] && echo SOURCEDIR=$SOURCEDIR >> "$PREFIX"${CONFIG_FILE}
[ -n "$BUILDDIR" ] && echo BUILDDIR=$BUILDDIR >> "$PREFIX"${CONFIG_FILE}
if [ "$USECYPPATH" = "true" ]; then
CYPTRUNKDIR=`cygpath -a -m $TRUNKDIR`
CYPBUILDDIR=`cygpath -a -m $BUILDDIR`
elif [ "$USEMINGPATH" = "true" ]; then
CYPTRUNKDIR=`(cd $TRUNKDIR;pwd -W)`
CYPBUILDDIR=`(cd $BUILDDIR;pwd -W)`
else
# MinGW and others
CYPTRUNKDIR=$TRUNKDIR
CYPBUILDDIR=$BUILDDIR
fi
[ -n "$CYPTRUNKDIR" ] && echo CYPTRUNKDIR=$CYPTRUNKDIR >> "$PREFIX"${CONFIG_FILE}
[ -n "$CYPBUILDDIR" ] && echo CYPBUILDDIR=$CYPBUILDDIR >> "$PREFIX"${CONFIG_FILE}
[ -n "$XLTTARGETCC" ] && echo XLTTARGETCC=$XLTTARGETCC >> "$PREFIX"${CONFIG_FILE}
[ -n "$NO_CYGWIN" ] && echo NO_CYGWIN=$NO_CYGWIN >> "$PREFIX"${CONFIG_FILE}
echo Getting version string...
$CC -o $BUILDDIR/echoversion$EXE $SOURCEDIR/echoversion.c
echo VERSION=`$BUILDDIR/echoversion$EXE` | tee -a "$PREFIX"${CONFIG_FILE}
# Make a generic Makefile that simply includes Makefile.gnu
echo Writing Makefile...
echo include $SOURCEDIR/Makefile.gnu > Makefile
echo Writing eu.cfg to $BUILDDIR/eu.cfg...
echo "[all]" > $BUILDDIR/eu.cfg
echo -eudir $CYPTRUNKDIR >> $BUILDDIR/eu.cfg
echo -i $CYPTRUNKDIR/include >> $BUILDDIR/eu.cfg
echo "[translate]" >> $BUILDDIR/eu.cfg
if [ "x$PLAT" != "xdefault_platform" ]; then
echo "-plat" $PLAT >> $BUILDDIR/eu.cfg
echo PLAT=$PLAT >> "$PREFIX"${CONFIG_FILE}
fi
if [ "x$ARCH" != "x$HOST_ARCH" ]; then
echo "-arch" $ARCH >> $BUILDDIR/eu.cfg
fi
echo "-$XLTTARGETCC " >> $BUILDDIR/eu.cfg
echo "-con " >> $BUILDDIR/eu.cfg
echo "-com" $CYPTRUNKDIR >> $BUILDDIR/eu.cfg
if [ $MIN_VER -gt 0 ]; then
echo "-lib-pic" $CYPBUILDDIR/euso.a >> $BUILDDIR/eu.cfg
fi
if [ "x$CC_PREFIX" != "x" ]; then
echo "-cc-prefix" $CC_PREFIX >> $BUILDDIR/eu.cfg
fi
if [ "x$EDEBUG" = "x1" ]; then
echo "-lib" $CYPBUILDDIR/eudbg.a >> $BUILDDIR/eu.cfg
else
echo "-lib" $CYPBUILDDIR/eu.a >> $BUILDDIR/eu.cfg
fi
echo "[bind]" >> $BUILDDIR/eu.cfg
echo "-eub" $CYPBUILDDIR/eub >> $BUILDDIR/eu.cfg
if [ -f "$TRUNKDIR/source/eu.cfg" ] ; then
rm "$TRUNKDIR/source/eu.cfg"
fi
[ -n "$OPT" ] && echo OPT=$OPT >> "$PREFIX"${CONFIG_FILE}
echo >> ${CONFIG_FILE}