-
Notifications
You must be signed in to change notification settings - Fork 28
/
configure.ac
749 lines (671 loc) · 20.4 KB
/
configure.ac
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
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
Copyright (C) 2021 Xcalibyte (Shenzhen) Limited.
Copyright 2010 Hewlett Packard Company
Copyright (C) 2012 Advanced Micro Devices, Inc. All Rights Reserved.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this file; ; see the file osprey/COPYING. If not, see
<http://www.gnu.org/licenses/>.
# When modifying this file, configure.ac, the person making the changes
# should use autoconf 2.59 to regenerate the configure script. Both
# configure.ac and configure should be checked in to subversion. This is
# so that developers or users can build open64 without needing autoconf on
# their systems.
# It may be necessary from time to time to also update some of the files
# used by autoconf. These are config.guess, config.sub, install-sh.
# The official versions of these three files are actually part of automake
# (which open64 does not use). If any of these files need updating, the
# required change should be made to the latest automake sources first
# (if they are not already there) and then the files should be copied
# from the automake sources to our source tree. Our versions of these
# files should always match some version of the automake sources and
# not diverge by having local changes in them.
AC_PREREQ([2.59])
AC_INIT([opencc],[4.2])
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
#AC_PROG_CC
#AC_PROG_CXX
#AC_PROG_RANLIB
# There are known bugs when building the compiler in 64 bit mode on x86 so,
# unless the user specifies otherwise, we default to 32 bit mode as the
# default on x86 64 bit platforms.
if test "$build_alias" = "" && test "$host_alias" = "" && test "$host_cpu" = "x86_64"; then
host_cpu=i686
host=$host_cpu-$host_vendor-$host_os
fi
if test "$build_alias" = "" && test "$target_alias" = "" && test "$target_cpu" = "x86_64"; then
target_cpu=i686
target=$target_cpu-$target_vendor-$target_os
fi
AC_ARG_WITH(build-compiler,
[ --with-build-compiler=GNU|OSP Use GNU or OSP compilers in build],
BUILD_COMPILER="$with_build_compiler",
BUILD_COMPILER=GNU)
case "$BUILD_COMPILER" in
GNU|gnu|gcc)
BUILD_COMPILER=GNU
GCC_CONFIGURE_COMPILER=gcc
CYGNUS_CONFIGURE_COMPILER=gcc
;;
OSP|osp|opencc|open64)
BUILD_COMPILER=OSP
GCC_CONFIGURE_COMPILER=opencc
CYGNUS_CONFIGURE_COMPILER=opencc
;;
*)
AC_MSG_ERROR(["BUILD_COMPILER=$BUILD_COMPILER is not supported"])
;;
esac
AC_ARG_WITH(build-optimize,
[ --with-build-optimize=DEFAULT|DEBUG Use DEFAULT or DEBUG flags in compiler build],
BUILD_OPTIMIZE="$with_build_optimize",
BUILD_OPTIMIZE=DEFAULT)
case "$BUILD_OPTIMIZE" in
DEFAULT|default)
BUILD_OPTIMIZE=DEFAULT
GCC_CONFIGURE_CFLAGS="-O2"
;;
DEBUG|debug)
BUILD_OPTIMIZE=DEBUG
GCC_CONFIGURE_CFLAGS="-O0 -g -DIs_True_On"
;;
*)
AC_MSG_ERROR(["BUILD_OPTIMIZE=$BUILD_OPTIMIZE is not supported"])
;;
esac
AC_ARG_WITH(build-product,
[ --with-build-product=OPEN64|MASTIFF To build OPEN64 or MASTIFF compiler],
BUILD_PRODUCT="$with_build_product",
BUILD_PRODUCT=OPEN64)
case "$BUILD_PRODUCT" in
OPEN64|open64)
BUILD_PRODUCT=OPEN64
;;
MASTIFF|mastiff)
BUILD_PRODUCT=MASTIFF
;;
*)
AC_MSG_ERROR(["BUILD_PRODUCT=$BUILD_PRODUCT is not supported"])
;;
esac
# TODO cleanup Fortran Front-End (FFE) so that extra debugging checks
# can be enabled when BUILD_OPTIMIZE is set to DEBUG.
AC_ARG_WITH(build-ffe-optimize,
[ --with-build-ffe-optimize=DEFAULT|DEBUG Use DEFAULT or DEBUG flags in FFE build],
BUILD_FFE_OPTIMIZE="$with_build_ffe_optimize",
BUILD_FFE_OPTIMIZE=DEFAULT)
AC_ARG_WITH(build-lib-optimize,
[ --with-build-lib-optimize=DEFAULT|DEBUG Use DEFAULT or DEBUG flags in library build.
Note that --with-build-lib-optimize=DEBUG is currently not well tested.],
BUILD_LIB_OPTIMIZE="$with_build_lib_optimize",
BUILD_LIB_OPTIMIZE=DEFAULT)
case "$BUILD_LIB_OPTIMIZE" in
DEFAULT|default)
BUILD_LIB_OPTIMIZE=DEFAULT
;;
DEBUG|debug)
BUILD_LIB_OPTIMIZE=DEBUG
;;
*)
AC_MSG_ERROR(["BUILD_LIB_OPTIMIZE=$BUILD_LIB_OPTIMIZE is not supported"])
;;
esac
# BUILD_MULTILIB supports building libraries twice, this is used on x86
# targets to have 32 and 64 bit libraries available.
BUILD_MULTILIB=NO
# BUILD_BOTH is (only) used in osprey/Makefile.gsetup.in for setting -fPIC.
BUILD_BOTH=
# Set whether to build the GCC 3.3 C/C++ front-end.
AC_ARG_ENABLE([gnu3],
AS_HELP_STRING([--enable-gnu3], [Enable GNU3-based C/C++ frontend]))
AS_IF([test "x$enable_gnu3" = "xyes"], [
BUILD_GNU3=YES
])
# Set whether Fortran driver and libraries will be built.
AC_ARG_ENABLE([fortran],
AS_HELP_STRING([--disable-fortran], [Disable Fortran language support]))
AS_IF([test "x$enable_fortran" != "xno"], [
BUILD_FORTRAN=YES
])
# Set whether WHIRL a node contains a debugging ID
AC_ARG_ENABLE([whirl_id],
AS_HELP_STRING([--enable-whirl-id], [Enable debugging ID in WHIRL node]))
AS_IF([test "x$enable_whirl_id" = "xyes"], [
WHIRL_HAS_ID_FIELD=YES
], [
WHIRL_HAS_ID_FIELD=NO
])
# Set whether to skip IPA support (default NO).
AC_ARG_ENABLE([ipa],
AS_HELP_STRING([--disable-ipa], [Disable IPA compilation support (EXPERIMENTAL)]))
AS_IF([test "x$enable_ipa" = "xno"], [
BUILD_SKIP_IPA=YES
])
# Set whether to support multilib for IA32/x86-64
AC_ARG_ENABLE([multilib],
AS_HELP_STRING([--disable-multilib], [Disable multilib support for IA32/x86-64]))
AS_IF([test "x$enable_multilib" != "xno"], [
BUILD_MULTILIB=YES
])
# Set whether shared libraries will be built. Implies --disable-ipa.
BUILD_TYPE=NONSHARED
AC_ARG_ENABLE([shared],
AS_HELP_STRING([--disable-shared], [Disable shared libraries (EXPERIMENTAL)]))
AS_IF([test "x$enable_shared" != "xno"], [
BUILD_TYPE=SHARED
])
if test "${BUILD_TYPE}" = "NONSHARED"; then
BUILD_SKIP_IPA=YES
fi
# Specify the targ_info directory under osprey/common to use. IA64 uses
# ipfec_targ_info instead of targ_info.
TARG_INFO_NAME=targ_info
# Specify the GCC src directory.
GCC_DIR=osprey-gcc-4.2.0
# Specify the binutils src directory
BINUTILS_DIR=binutils
# LIB_* and LIB2_* variables will default to the BUILD_* variables if not
# overridden in one of the case statements below so most platforms will
# not have to set these.
LIB_MACHINE_TYPE=
LIB_BUILD_TARGET=
LIB_BUILD_ABI=
LIB_BUILD_ARCH=
LIB_BUILD_HOST=
LIB2_MACHINE_TYPE=
LIB2_BUILD_TARGET=
LIB2_BUILD_ABI=
LIB2_BUILD_ARCH=
LIB2_BUILD_HOST=
CYGNUS_CONFIGURE_CFLAGS=
# Set variables based on the host machine that the compiler will run on.
case "$host" in
x86_64*-*-linux*)
BUILD_ABI=I64BIT
BUILD_ARCH=X8664
BUILD_HOST=X8664
CYGNUS_CONFIGURE_HOST=i686-linux-gnu
GCC_CONFIGURE_HOST=x86_64-linux-gnu
GCC_CONFIGURE_COMPILER+=" -m64"
;;
i*86*-*-linux*)
BUILD_ABI=I32BIT
BUILD_ARCH=IA32
BUILD_HOST=IA32
CYGNUS_CONFIGURE_HOST=i686-linux-gnu
GCC_CONFIGURE_HOST=x86_64-linux-gnu
GCC_CONFIGURE_COMPILER+=" -m32"
CYGNUS_CONFIGURE_CFLAGS="-m32"
;;
ia64*-*-linux*)
BUILD_ABI=I64BIT
BUILD_ARCH=IA64
BUILD_HOST=IA64
CYGNUS_CONFIGURE_HOST=ia64-linux-gnu
GCC_CONFIGURE_HOST=ia64-linux-gnu
;;
powerpc-*-linux*)
;;
riscv64*-*-linux*)
BUILD_ABI=I64BIT
BUILD_ARCH=RISCV64
BUILD_HOST=X8664
CYGNUS_CONFIGURE_HOST=i686-linux-gnu
GCC_CONFIGURE_HOST=x86_64-linux-gnu
GCC_CONFIGURE_COMPILER="riscv64-linux-gnu-gcc -mabi=lp64d"
GCC_CONFIGURE_CFLAGS+=" -DHOST_RISCV"
CYGNUS_CONFIGURE_COMPILER="riscv64-linux-gnu-gcc -mabi=lp64d"
;;
*)
AC_MSG_ERROR(["open64 is not supported on $target"])
;;
esac
BUILD_VENDOR=
# Set variables based on the target machine that the compiler will generate
# code for.
case "$target" in
x86_64*-*-linux*)
MACHINE_TYPE=x86_64
BUILD_TARGET=X8664
LIB_MACHINE_TYPE=X86_64
LIB_BUILD_TARGET=X8664
LIB_BUILD_ABI=I64BIT
LIB_BUILD_ARCH=X8664
LIB2_MACHINE_TYPE=IA32
LIB2_BUILD_TARGET=IA32
LIB2_BUILD_ABI=I32BIT
LIB2_BUILD_ARCH=IA32
CYGNUS_CONFIGURE_TARG=x86_64-linux-gnu
GCC_CONFIGURE_TARG=x86_64-linux-gnu
GCC_CONFIGURE_CFLAGS+=" -DTARG_X8664"
;;
uwasm*-*-linux*)
MACHINE_TYPE=x86_64
BUILD_TARGET=UWASM
LIB_MACHINE_TYPE=X86_64
LIB_BUILD_TARGET=X8664
LIB_BUILD_ABI=I64BIT
LIB_BUILD_ARCH=X8664
LIB2_MACHINE_TYPE=IA32
LIB2_BUILD_TARGET=IA32
LIB2_BUILD_ABI=I32BIT
LIB2_BUILD_ARCH=IA32
CYGNUS_CONFIGURE_TARG=x86_64-linux-gnu
GCC_CONFIGURE_TARG=x86_64-linux-gnu
GCC_CONFIGURE_CFLAGS+=" -DTARG_UWASM"
;;
i*86*-*-linux*)
MACHINE_TYPE=i386
BUILD_TARGET=X8664
LIB_MACHINE_TYPE=IA32
LIB_BUILD_TARGET=IA32
LIB_BUILD_ABI=I32BIT
LIB_BUILD_ARCH=IA32
LIB2_MACHINE_TYPE=X86_64
LIB2_BUILD_TARGET=X8664
LIB2_BUILD_ABI=I64BIT
LIB2_BUILD_ARCH=X8664
CYGNUS_CONFIGURE_TARG=x86_64-linux-gnu
GCC_CONFIGURE_TARG=x86_64-linux-gnu
GCC_CONFIGURE_CFLAGS+=" -DTARG_X8664"
;;
ia64*-*-linux*)
MACHINE_TYPE=ia64
BUILD_TARGET=IA64
CYGNUS_CONFIGURE_TARG=ia64-linux-gnu
GCC_CONFIGURE_TARG=ia64-linux-gnu
GCC_CONFIGURE_CFLAGS+=" -DTARG_IA64"
TARG_INFO_NAME=ipfec_targ_info
;;
powerpc-*-linux*)
MACHINE_TYPE=PPC32
BUILD_ABI=I32BIT
BUILD_TARGET=PPC32
BUILD_MULTILIB=NO
BUILD_VENDOR=OSP
GCC_CONFIGURE_TARG=powerpc-redhat-linux
GCC_CONFIGURE_HOST=powerpc-redhat-linux
GCC_CONFIGURE_BUILD=powerpc-redhat-linux
CYGNUS_CONFIGURE_TARG=mipsel-elf-linux
GCC_CONFIGURE_COMPILER+=" -m32"
GCC_CONFIGURE_CFLAGS+=" -DTARG_PPC32"
case "$host" in
powerpc-*-linux*)
BUILD_ARCH=PPC32
BUILD_HOST=PPC32
BUILD_SKIP_IPA=YES
GCC_CONFIGURE_CFLAGS+=" -DTARG_PPC"
;;
*)
BUILD_SKIP_IPA=NO
BUILD_ARCH=IA32
BUILD_HOST=IA32
CROSS_TARGET="$target"
;;
esac ;;
sl*-*-linux*)
MACHINE_TYPE=SL
BUILD_TARGET=SL
BUILD_ABI=N32BIT
BUILD_ARCH=MIPS4
BUILD_VENDOR=SL
CYGNUS_CONFIGURE_HOST=i686-gnu-linux
GCC_CONFIGURE_HOST=mips-redhat-linux
CYGNUS_CONFIGURE_TARG=mipsel-elf-linux
GCC_CONFIGURE_TARG=mips-redhat-linux
GCC_CONFIGURE_CFLAGS+=" -m32 -DTARG_SL"
CYGNUS_CONFIGURE_CFLAGS=" -m32"
BUILD_MULTILIB=NO
;;
*)
AC_MSG_ERROR(["open64 is not supported on $target"])
;;
esac
if test "${BUILD_TARGET}" = "SL"; then
BUILD_GNU3="YES"
BUILD_FORTRAN="NO"
fi
if test "${BUILD_TARGET}" = "PPC32"; then
BUILD_GNU3="NO"
BUILD_FORTRAN="NO"
fi
#UNAME_MACHINE=`uname -m`
#if test "$UNAME_MACHINE" = "x86_64"; then
# BUILD_MULTILIB=YES
#fi
# Set default values for LIB_* and LIB2_* variables that were not set above.
if test "$LIB_MACHINE_TYPE" = ""; then
LIB_MACHINE_TYPE=$MACHINE_TYPE
fi
if test "$LIB_BUILD_TARGET" = ""; then
LIB_BUILD_TARGET=$BUILD_TARGET
fi
if test "$LIB_BUILD_ABI" = ""; then
LIB_BUILD_ABI=$BUILD_ABI
fi
if test "$LIB_BUILD_ARCH" = ""; then
LIB_BUILD_ARCH=$BUILD_ARCH
fi
if test "$LIB_BUILD_HOST" = ""; then
LIB_BUILD_HOST=$BUILD_HOST
fi
if test "$LIB2_MACHINE_TYPE" = ""; then
LIB2_MACHINE_TYPE=$MACHINE_TYPE
fi
if test "$LIB2_BUILD_TARGET" = ""; then
LIB2_BUILD_TARGET=$BUILD_TARGET
fi
if test "$LIB2_BUILD_ABI" = ""; then
LIB2_BUILD_ABI=$BUILD_ABI
fi
if test "$LIB2_BUILD_ARCH" = ""; then
LIB2_BUILD_ARCH=$BUILD_ARCH
fi
if test "$LIB2_BUILD_HOST" = ""; then
LIB2_BUILD_HOST=$BUILD_HOST
fi
# Export these variables so they can be used in the 'subconfigures run in
# osprey/cygnus and osprey-gcc-4.2.0.
export CYGNUS_CONFIGURE_COMPILER
export CYGNUS_CONFIGURE_HOST
export CYGNUS_CONFIGURE_TARG
export CYGNUS_CONFIGURE_CFLAGS
export GCC_CONFIGURE_COMPILER
export GCC_CONFIGURE_HOST
export GCC_CONFIGURE_TARG
export GCC_CONFIGURE_CFLAGS
export BUILD_PRODUCT
# Variables to replace in the configurable files.
AC_SUBST([MACHINE_TYPE])
AC_SUBST([CROSS_TARGET])
AC_SUBST([BUILD_ABI])
AC_SUBST([BUILD_ARCH])
AC_SUBST([BUILD_HOST])
AC_SUBST([BUILD_TARGET])
AC_SUBST([BUILD_VENDOR])
AC_SUBST([BUILD_OPTIMIZE])
AC_SUBST([BUILD_FFE_OPTIMIZE])
AC_SUBST([BUILD_LIB_OPTIMIZE])
AC_SUBST([BUILD_COMPILER])
AC_SUBST([BUILD_BOTH])
AC_SUBST([LIB_MACHINE_TYPE])
AC_SUBST([LIB_BUILD_TARGET])
AC_SUBST([LIB_BUILD_ABI])
AC_SUBST([LIB_BUILD_ARCH])
AC_SUBST([LIB_BUILD_HOST])
AC_SUBST([LIB2_MACHINE_TYPE])
AC_SUBST([LIB2_BUILD_TARGET])
AC_SUBST([LIB2_BUILD_ABI])
AC_SUBST([LIB2_BUILD_ARCH])
AC_SUBST([LIB2_BUILD_HOST])
AC_SUBST([BUILD_MULTILIB])
AC_SUBST([COMPILER_TARG_DIR])
AC_SUBST([TARG_INFO_NAME])
AC_SUBST([BUILD_GNU3])
AC_SUBST([BUILD_FORTRAN])
AC_SUBST([WHIRL_HAS_ID_FIELD])
AC_SUBST([BUILD_SKIP_IPA])
AC_SUBST([BUILD_TYPE])
AC_SUBST([BUILD_PRODUCT])
AC_SUBST([GCC_CONFIGURE_TARG])
AC_SUBST([GCC_DIR])
AC_SUBST([BINUTILS_DIR])
# List of configurable files to create in object directory.
AC_CONFIG_FILES([
Makefile
osprey/Makefile.gsetup
osprey/targdir/libspin/Makefile
osprey/targdir/libspin_4_2_0/Makefile
osprey/targdir/include/Makefile
osprey/targdir/driver/Makefile
osprey/targdir/libiberty/Makefile
osprey/targdir/libjson/Makefile
osprey/targdir/targ_info/Makefile
osprey/targdir/be/Makefile
osprey/targdir/libelf/Makefile
osprey/targdir/libelfutil/Makefile
osprey/targdir/libdwarf/Makefile
osprey/targdir/libunwindP/Makefile
osprey/targdir/cg/Makefile
osprey/targdir/vsa/Makefile
osprey/targdir/wopt/Makefile
osprey/targdir/ipl/Makefile
osprey/targdir/lno/Makefile
osprey/targdir/lw_inline/Makefile
osprey/targdir/ipa/Makefile
osprey/targdir/whirl2c/Makefile
osprey/targdir/libcomutil/Makefile
osprey/targdir/ir_tools/Makefile
osprey/targdir/libcmplrs/Makefile
osprey/targdir/clang2whirl/Makefile
osprey/targdir/wgen/Makefile
osprey/targdir/jfe/Makefile
osprey/targdir/js2mplref/Makefile
osprey/targdir/libcif/Makefile
osprey/targdir/arith/Makefile
osprey/targdir/orc_ict/Makefile
osprey/targdir/orc_intel/Makefile
osprey/targdir/libkapi/Makefile
])
if test "${BUILD_FORTRAN}" = "YES"; then
AC_CONFIG_FILES([
osprey/targdir/whirl2f/Makefile
osprey/targdir/crayf90/Makefile
osprey/targdir/crayf90/fe90/Makefile
osprey/targdir/crayf90/libf90sgi/Makefile
osprey/targdir/crayf90/sgi/Makefile
])
fi
if test "${BUILD_GNU3}" = "YES"; then
AC_CONFIG_FILES([
osprey/targdir/gccfe/Makefile
osprey/targdir/gccfe/gnu/Makefile
osprey/targdir/g++fe/Makefile
osprey/targdir/g++fe/gnu/Makefile
])
fi
# The directories created under targdir_lib (and targdir_lib2) also
# need to be listed in LIBLIST. This list is used in targdir_lib/Makefile.in
# to control the order of the library builds. When adding a directory
# under targdir_lib you need to add it to AC_CONFIG_FILES and add it to
# LIBLIST.
if test "${BUILD_TARGET}" = "SL"; then
LIBLIST="include"
elif test "${BUILD_TARGET}" = "IA64"; then
LIBLIST="include libopenmp libmv"
if test "${BUILD_FORTRAN}" = "YES"; then
LIBLIST="$LIBLIST libfortran libu"
fi
else
LIBLIST="include libopenmp libhugetlbfs libmv"
if test "${BUILD_FORTRAN}" = "YES"; then
LIBLIST="$LIBLIST libfortran libu"
fi
fi
AC_CONFIG_FILES([
osprey/targdir_lib/Makefile
osprey/targdir_lib/include/Makefile
])
if test "${BUILD_TARGET}" = "SL"; then
AC_CONFIG_FILES([
osprey/targdir_lib/libinstr/Makefile:osprey/targdir_lib/libinstr2/Makefile.in
])
else
AC_CONFIG_FILES([
osprey/targdir_lib/libopenmp/Makefile
osprey/targdir_lib/libhugetlbfs/Makefile
osprey/targdir_lib/libmv/Makefile
])
fi
if test "${BUILD_FORTRAN}" = "YES"; then
AC_CONFIG_FILES([
osprey/targdir_lib/libfortran/Makefile
osprey/targdir_lib/libu/Makefile
])
fi
if test "${BUILD_TARGET}" = "X8664" || test "${BUILD_TARGET}" = "IA32"; then
#LIBLIST="libopen64rt libacml_mv $LIBLIST libinstr2"
# remove libacml_mv as not compilable any more
LIBLIST="libopen64rt $LIBLIST"
AC_CONFIG_FILES([
osprey/targdir_lib/libopen64rt/Makefile
osprey/targdir_lib/libinstr2/Makefile
])
fi
if test "${BUILD_TARGET}" = "IA64" ; then
LIBLIST="$LIBLIST init"
AC_CONFIG_FILES([
osprey/targdir_lib/init/Makefile:osprey/targdir_lib/init/Makefile.in
])
fi
if test $BUILD_MULTILIB = "YES"; then
AC_CONFIG_FILES([
osprey/targdir_lib2/Makefile:osprey/targdir_lib/Makefile.in
osprey/targdir_lib2/include/Makefile:osprey/targdir_lib/include/Makefile.in
osprey/targdir_lib2/libopenmp/Makefile:osprey/targdir_lib/libopenmp/Makefile.in
osprey/targdir_lib2/libhugetlbfs/Makefile:osprey/targdir_lib/libhugetlbfs/Makefile.in
osprey/targdir_lib2/libmv/Makefile:osprey/targdir_lib/libmv/Makefile.in
])
if test "${BUILD_FORTRAN}" = "YES"; then
AC_CONFIG_FILES([
osprey/targdir_lib2/libfortran/Makefile:osprey/targdir_lib/libfortran/Makefile.in
osprey/targdir_lib2/libu/Makefile:osprey/targdir_lib/libu/Makefile.in
])
fi
if test "${BUILD_TARGET}" = "X8664" || test "${BUILD_TARGET}" = "IA32"; then
AC_CONFIG_FILES([
osprey/targdir_lib2/libopen64rt/Makefile:osprey/targdir_lib/libopen64rt/Makefile.in
osprey/targdir_lib2/libinstr2/Makefile:osprey/targdir_lib/libinstr2/Makefile.in
osprey/targdir_lib2/libacml_mv/Makefile:osprey/targdir_lib/libacml_mv/Makefile.in
])
fi
fi
# build librbc for mastiff
if test $BUILD_PRODUCT = "MASTIFF"; then
AC_CONFIG_FILES([
osprey/targdir_lib/librbc/Makefile:osprey/targdir_lib/librbc/Makefile.in
osprey/targdir_lib/libwffi/Makefile:osprey/targdir_lib/libwffi/Makefile.in
])
fi
AC_SUBST([LIBLIST])
# Configure cygnus and GCC subdirectories.
AC_CONFIG_SUBDIRS(osprey/cygnus)
# We do not use $GCC_DIR because using AC_CONFIG_SUBDIRS with variables
# breaks "configure --help=recursive". See autoconf documentation.
AC_CONFIG_SUBDIRS(osprey-gcc-4.2.0)
# Configure binutils directory
AC_CONFIG_SUBDIRS(binutils)
AC_OUTPUT
#
# Starting JFE Checks
#
ISRUNNABLE_JFE=1
printf "checking whether gradle works "
if @<:@ $(which gradle) @:>@
then
echo "... yes "
else
echo "... no"
echo "=============================="
echo "please run :"
echo "sudo apt install -y gradle "
echo "=============================="
ISRUNNABLE_JFE=0
fi
printf "checking whether java works"
if @<:@ $(which java) @:>@
then
echo "... yes "
else
echo "... no"
echo "=============================="
echo "please run :"
echo "sudo apt install -y openjdk-8-jdk "
echo "=============================="
ISRUNNABLE_JFE=0
fi
printf "checking for cmake "
if @<:@ $(which java) @:>@
then
echo "... yes "
else
echo "... no"
echo "=============================="
echo "please run :"
echo "sudo apt install -y cmake "
echo "=============================="
ISRUNNABLE_JFE=0
fi
printf "checking whether java -version == 1.8.0 "
JAVA_VERSION=$(java -version 2>&1|awk -F '"' '/version/ {print $2}')
if @<:@@<:@ $JAVA_VERSION =~ "1.8.0" @:>@@:>@
then
echo "... $JAVA_VERSION "
else
echo "... no"
echo "=============================="
echo "please reinstall jdk to version 1.8.0, now:$JAVA_VERSION"
echo "=============================="
ISRUNNABLE_JFE=0
fi
printf "checking whether java_home is set correctly and jni.h presents ..."
if @<:@ -f $JAVA_HOME/include/jni.h @:>@
then
echo "yes"
else
echo "no"
echo "========================================================"
echo "please double check if JAVA_HOME is set correctly, and exported"
echo " if not, please edit the ~/.bash_profile or ~/.bashrc accordingly"
echo "========================================================"
ISRUNNABLE_JFE=0
fi
echo " JAVA_HOME = $JAVA_HOME"
if @<:@ $ISRUNNABLE_JFE = 0 @:>@
then
exit 1
fi
printf "checking CLANG_HOME is set ..."
if @<:@ -z $CLANG_HOME @:>@
then
echo "no"
echo "=========================================================="
echo "please set CLANG_HOME which include the clang prebuild libs"
echo "=========================================================="
exit 1
else
echo "yes"
echo " CLANG_HOME = $CLANG_HOME"
fi
printf "checking MAPLE_HOME is set ..."
if @<:@ -z $MAPLE_HOME @:>@
then
echo "no"
echo "=========================================================="
echo "please set MAPLE_HOME which include the maple prebuilt libs"
echo "**** js2mpl and mpl2whirl won't be built ****"
echo "=========================================================="
else
echo "yes"
echo " MAPLE_HOME = $MAPLE_HOME"
fi
printf "checking MOZJS_HOME is set ..."
if @<:@ -z $MOZJS_HOME @:>@
then
echo "no"
echo "=========================================================="
echo "please set MOZJS_HOME which include the mozjs prebuilt libs"
echo "**** js2mpl won't be built ****"
echo "=========================================================="
else
echo "yes"
echo " MOZJS_HOME = $MOZJS_HOME"
fi