-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathacinclude.m4
2239 lines (2141 loc) · 62.8 KB
/
acinclude.m4
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
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
AC_DEFUN([IT_SET_ARCH_SETTINGS],
[
case "${host_cpu}" in
x86_64)
BUILD_ARCH_DIR=amd64
INSTALL_ARCH_DIR=amd64
JRE_ARCH_DIR=amd64
ARCHFLAG="-m64"
;;
i?86)
BUILD_ARCH_DIR=i586
INSTALL_ARCH_DIR=i386
JRE_ARCH_DIR=i386
ARCH_PREFIX=${LINUX32}
ARCHFLAG="-m32"
;;
alpha*)
BUILD_ARCH_DIR=alpha
INSTALL_ARCH_DIR=alpha
JRE_ARCH_DIR=alpha
;;
arm*)
BUILD_ARCH_DIR=arm
INSTALL_ARCH_DIR=arm
JRE_ARCH_DIR=arm
ARCHFLAG="-D_LITTLE_ENDIAN"
;;
arm64|aarch64)
BUILD_ARCH_DIR=aarch64
INSTALL_ARCH_DIR=aarch64
JRE_ARCH_DIR=aarch64
ARCHFLAG="-D_LITTLE_ENDIAN"
;;
mips)
BUILD_ARCH_DIR=mips
INSTALL_ARCH_DIR=mips
JRE_ARCH_DIR=mips
;;
mipsel)
BUILD_ARCH_DIR=mipsel
INSTALL_ARCH_DIR=mipsel
JRE_ARCH_DIR=mipsel
;;
powerpc)
BUILD_ARCH_DIR=ppc
INSTALL_ARCH_DIR=ppc
JRE_ARCH_DIR=ppc
ARCH_PREFIX=${LINUX32}
ARCHFLAG="-m32"
;;
powerpc64)
BUILD_ARCH_DIR=ppc64
INSTALL_ARCH_DIR=ppc64
JRE_ARCH_DIR=ppc64
ARCHFLAG="-m64"
;;
powerpc64le)
BUILD_ARCH_DIR=ppc64le
INSTALL_ARCH_DIR=ppc64le
JRE_ARCH_DIR=ppc64le
ARCHFLAG="-m64"
;;
sparc)
BUILD_ARCH_DIR=sparc
INSTALL_ARCH_DIR=sparc
JRE_ARCH_DIR=sparc
CROSS_TARGET_ARCH=sparc
ARCH_PREFIX=${LINUX32}
ARCHFLAG="-m32"
;;
sparc64)
BUILD_ARCH_DIR=sparcv9
INSTALL_ARCH_DIR=sparcv9
JRE_ARCH_DIR=sparc64
ARCHFLAG="-m64"
;;
s390)
BUILD_ARCH_DIR=s390
INSTALL_ARCH_DIR=s390
JRE_ARCH_DIR=s390
ARCH_PREFIX=${LINUX32}
ARCHFLAG="-m31"
;;
s390x)
BUILD_ARCH_DIR=s390x
INSTALL_ARCH_DIR=s390x
JRE_ARCH_DIR=s390x
CROSS_TARGET_ARCH=s390x
ARCHFLAG="-m64"
;;
sh*)
BUILD_ARCH_DIR=sh
INSTALL_ARCH_DIR=sh
JRE_ARCH_DIR=sh
CROSS_TARGET_ARCH=sh
;;
*)
BUILD_ARCH_DIR=`uname -m`
INSTALL_ARCH_DIR=$BUILD_ARCH_DIR
JRE_ARCH_DIR=$INSTALL_ARCH_DIR
;;
esac
AC_SUBST(BUILD_ARCH_DIR)
AC_SUBST(INSTALL_ARCH_DIR)
AC_SUBST(JRE_ARCH_DIR)
AC_SUBST(ARCH_PREFIX)
AC_SUBST(ARCHFLAG)
])
AC_DEFUN([IT_SET_OS_DIRS],
[
case "${host_os}" in
*linux*)
BUILD_OS_DIR=linux
OS_PATH=
;;
*solaris*)
BUILD_OS_DIR=solaris
OS_PATH=/opt/SunStudioExpress/bin:/opt/SUNWpro/bin:/usr/gnu/bin
;;
*darwin*|*bsd*)
BUILD_OS_DIR=bsd
OS_PATH=
;;
*)
AC_MSG_ERROR([unsupported operating system ${host_os}])
;;
esac
AC_SUBST(BUILD_OS_DIR)
AC_SUBST(OS_PATH)
])
AC_DEFUN([IT_FIND_COMPILER],
[
IT_FIND_JAVAC
IT_FIND_ECJ
IT_USING_ECJ
AC_SUBST(ECJ)
AC_SUBST(JAVAC)
])
AC_DEFUN_ONCE([IT_FIND_ECJ],
[
ECJ_DEFAULT=/usr/bin/ecj
AC_MSG_CHECKING([if an ecj binary was specified])
AC_ARG_WITH([ecj],
[AS_HELP_STRING(--with-ecj,bytecode compilation with ecj)],
[
if test "x${withval}" = "xyes"; then
ECJ=no
else
ECJ="${withval}"
fi
],
[
ECJ=no
])
AC_MSG_RESULT(${ECJ})
if test "x${ECJ}" = "xno"; then
ECJ=${ECJ_DEFAULT}
fi
AC_MSG_CHECKING([if $ECJ is a valid executable file])
if test -x "${ECJ}" && test -f "${ECJ}"; then
AC_MSG_RESULT([yes])
else
ECJ=""
AC_PATH_PROG(ECJ, "ecj")
if test -z "${ECJ}"; then
AC_PATH_PROG(ECJ, "ecj-3.1")
fi
if test -z "${ECJ}"; then
AC_PATH_PROG(ECJ, "ecj-3.2")
fi
if test -z "${ECJ}"; then
AC_PATH_PROG(ECJ, "ecj-3.3")
fi
if test -z "${ECJ}"; then
AC_PATH_PROG(ECJ, "ecj-3.4")
fi
fi
])
AC_DEFUN_ONCE([IT_FIND_JAVAC],
[
JAVAC_DEFAULT=${SYSTEM_JDK_DIR}/bin/javac
AC_MSG_CHECKING([if a javac binary was specified])
AC_ARG_WITH([javac],
[AS_HELP_STRING([--with-javac[[=PATH]]],the path to a javac binary)],
[
if test "x${withval}" = "xyes"; then
JAVAC=no
else
JAVAC="${withval}"
fi
],
[
JAVAC=no
])
AC_MSG_RESULT(${JAVAC})
if test "x${JAVAC}" = "xno"; then
JAVAC=${JAVAC_DEFAULT}
fi
AC_MSG_CHECKING([if $JAVAC is a valid executable file])
if test -x "${JAVAC}" && test -f "${JAVAC}"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
JAVAC=""
AC_PATH_PROG(JAVAC, "javac")
fi
AC_SUBST(JAVAC)
])
])
AC_DEFUN_ONCE([IT_FIND_JAVA],
[
JAVA_DEFAULT=${SYSTEM_JDK_DIR}/bin/java
AC_MSG_CHECKING([if a java binary was specified])
AC_ARG_WITH([java],
[AS_HELP_STRING([--with-java[[=PATH]]],specify location of a 1.5 Java VM)],
[
if test "x${withval}" = "xyes"; then
JAVA=no
else
JAVA="${withval}"
fi
],
[
JAVA=no
])
AC_MSG_RESULT(${JAVA})
if test "x${JAVA}" = "xno"; then
JAVA=${JAVA_DEFAULT}
fi
AC_MSG_CHECKING([if $JAVA is a valid executable file])
if test -x "${JAVA}" && test -f "${JAVA}"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
JAVA=""
AC_PATH_PROG(JAVA, "java")
if test -z "${JAVA}"; then
AC_PATH_PROG(JAVA, "gij")
fi
if test -z "${JAVA}"; then
AC_PATH_PROG(JAVA, "cacao")
fi
if test -z "${JAVA}"; then
AC_MSG_ERROR("A 1.5-compatible Java VM is required.")
fi
fi
AC_SUBST(JAVA)
])
AC_DEFUN_ONCE([IT_CP_SUPPORTS_REFLINK],
[
AC_CACHE_CHECK([if cp supports --reflink], it_cv_reflink, [
touch tmp.$$
if cp --reflink=auto tmp.$$ tmp2.$$ >&AS_MESSAGE_LOG_FD 2>&1; then
it_cv_reflink=yes;
else
it_cv_reflink=no;
fi
rm -f tmp.$$ tmp2.$$
])
AM_CONDITIONAL([CP_SUPPORTS_REFLINK], test x"${it_cv_reflink}" = "xyes")
])
AC_DEFUN_ONCE([IT_WITH_OPENJDK_SRC_DIR],
[
DEFAULT_SRC_DIR=${abs_top_builddir}/openjdk
AC_MSG_CHECKING([for an OpenJDK source directory])
AC_ARG_WITH([openjdk-src-dir],
[AS_HELP_STRING([--with-openjdk-src-dir=DIR],specify the location of the OpenJDK source tree)],
[
OPENJDK_SRC_DIR=${withval}
with_external_src_dir=true
],
[
OPENJDK_SRC_DIR=${DEFAULT_SRC_DIR}
with_external_src_dir=false
])
AC_MSG_RESULT(${OPENJDK_SRC_DIR})
AC_SUBST(OPENJDK_SRC_DIR)
if test "x${with_external_src_dir}" = "xtrue"; then
AC_MSG_CHECKING([if ${OPENJDK_SRC_DIR}/README exists])
if test -f ${OPENJDK_SRC_DIR}/README; then
openjdk_src_dir_valid=yes;
else
openjdk_src_dir_valid="no, resetting to ${DEFAULT_SRC_DIR}";
OPENJDK_SRC_DIR=${DEFAULT_SRC_DIR}
with_external_src_dir=false
fi
AC_MSG_RESULT(${openjdk_src_dir_valid})
if test "x${openjdk_src_dir_valid}" = "xyes"; then
AC_MSG_CHECKING([if we can hard link rather than copy the OpenJDK source directory])
if cp -l ${OPENJDK_SRC_DIR}/README tmp.$$ >&AS_MESSAGE_LOG_FD 2>&1; then
openjdk_src_dir_hardlinkable=yes;
else
openjdk_src_dir_hardlinkable=no;
fi
AC_MSG_RESULT(${openjdk_src_dir_hardlinkable})
rm -f tmp.$$
fi
fi
AM_CONDITIONAL(OPENJDK_SRC_DIR_FOUND, test "x${with_external_src_dir}" = "xtrue")
AM_CONDITIONAL(OPENJDK_SRC_DIR_HARDLINKABLE, test "x${openjdk_src_dir_hardlinkable}" = "xyes")
])
AC_DEFUN_ONCE([IT_CAN_HARDLINK_TO_SOURCE_TREE],
[
AC_CACHE_CHECK([if we can hard link rather than copy from ${abs_top_srcdir}], it_cv_hardlink_src, [
if cp -l ${abs_top_srcdir}/README tmp.$$ >&AS_MESSAGE_LOG_FD 2>&1; then
it_cv_hardlink_src=yes;
else
it_cv_hardlink_src=no;
fi
rm -f tmp.$$
])
AM_CONDITIONAL([SRC_DIR_HARDLINKABLE], test x"${it_cv_hardlink_src}" = "xyes")
])
AC_DEFUN([IT_FIND_ECJ_JAR],
[
AC_MSG_CHECKING([for an ecj JAR file])
AC_ARG_WITH([ecj-jar],
[AS_HELP_STRING([--with-ecj-jar[[=PATH]]],specify location of an ECJ JAR file)],
[
if test -f "${withval}"; then
ECJ_JAR="${withval}"
fi
],
[
ECJ_JAR=
])
if test -z "${ECJ_JAR}"; then
for jar in /usr/share/java/eclipse-ecj.jar \
/usr/share/java/ecj.jar \
/usr/share/eclipse-ecj-3.{2,3,4,5}/lib/ecj.jar; do
if test -e $jar; then
ECJ_JAR=$jar
break
fi
done
if test -z "${ECJ_JAR}"; then
ECJ_JAR=no
fi
fi
AC_MSG_RESULT(${ECJ_JAR})
if test "x${ECJ_JAR}" = "xno"; then
if test "x${JAVAC}" = "x"; then
AC_MSG_ERROR("No compiler or ecj JAR file was found.")
fi
fi
AC_SUBST(ECJ_JAR)
])
AC_DEFUN([IT_CHECK_GCC_VERSION],
[
AC_MSG_CHECKING([version of GCC])
gcc_ver=`${CC} -dumpversion`
gcc_major_ver=`echo ${gcc_ver}|cut -d'.' -f1`
gcc_minor_ver=`echo ${gcc_ver}|cut -d'.' -f2`
AM_CONDITIONAL(GCC_OLD, test ! ${gcc_major_ver} -ge 4 -a ${gcc_minor_ver} -ge 3)
AC_MSG_RESULT([${gcc_ver} (major version ${gcc_major_ver}, minor version ${gcc_minor_ver})])
])
AC_DEFUN([IT_FIND_JAVAH],
[
JAVAH_DEFAULT=${SYSTEM_JDK_DIR}/bin/javah
AC_MSG_CHECKING([if a javah executable is specified])
AC_ARG_WITH([javah],
[AS_HELP_STRING([--with-javah[[=PATH]]],specify location of javah)],
[
if test "x${withval}" = "xyes"; then
JAVAH=no
else
JAVAH="${withval}"
fi
],
[
JAVAH=no
])
AC_MSG_RESULT(${JAVAH})
if test "x${JAVAH}" == "xno"; then
JAVAH=${JAVAH_DEFAULT}
fi
AC_MSG_CHECKING([if $JAVAH is a valid executable file])
if test -x "${JAVAH}" && test -f "${JAVAH}"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
JAVAH=""
AC_PATH_PROG(JAVAH, "javah")
if test -z "${JAVAH}"; then
AC_PATH_PROG(JAVAH, "gjavah")
fi
if test -z "${JAVAH}"; then
AC_MSG_ERROR("A Java header generator was not found.")
fi
fi
AC_SUBST(JAVAH)
])
AC_DEFUN([IT_FIND_JAR],
[
JAR_DEFAULT=${SYSTEM_JDK_DIR}/bin/jar
AC_MSG_CHECKING([if a jar executable is specified])
AC_ARG_WITH([jar],
[AS_HELP_STRING([--with-jar[[=PATH]]],specify location of jar)],
[
if test "x${withval}" = "xyes"; then
JAR=no
else
JAR="${withval}"
fi
],
[
JAR=no
])
AC_MSG_RESULT(${JAR})
if test "x${JAR}" == "xno"; then
JAR=${JAR_DEFAULT}
fi
AC_MSG_CHECKING([if $JAR is a valid executable file])
if test -x "${JAR}" && test -f "${JAR}"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
JAR=""
AC_PATH_PROG(JAR, "jar")
if test -z "${JAR}"; then
AC_PATH_PROG(JAR, "gjar")
fi
if test -z "${JAR}"; then
AC_MSG_ERROR("No Java archive tool was found.")
fi
fi
AC_MSG_CHECKING([whether jar supports @<file> argument])
touch _config.txt
cat >_config.list <<EOF
_config.txt
EOF
if $JAR cf _config.jar @_config.list >&AS_MESSAGE_LOG_FD 2>&1; then
JAR_KNOWS_ATFILE=1
AC_MSG_RESULT(yes)
else
JAR_KNOWS_ATFILE=
AC_MSG_RESULT(no)
fi
AC_MSG_CHECKING([whether jar supports stdin file arguments])
if cat _config.list | $JAR cf@ _config.jar >&AS_MESSAGE_LOG_FD 2>&1; then
JAR_ACCEPTS_STDIN_LIST=1
AC_MSG_RESULT(yes)
else
JAR_ACCEPTS_STDIN_LIST=
AC_MSG_RESULT(no)
fi
rm -f _config.list _config.jar
AC_MSG_CHECKING([whether jar supports -J options at the end])
if $JAR cf _config.jar _config.txt -J-Xmx896m >&AS_MESSAGE_LOG_FD 2>&1; then
JAR_KNOWS_J_OPTIONS=1
AC_MSG_RESULT(yes)
else
JAR_KNOWS_J_OPTIONS=
AC_MSG_RESULT(no)
fi
rm -f _config.txt _config.jar
AC_SUBST(JAR)
AC_SUBST(JAR_KNOWS_ATFILE)
AC_SUBST(JAR_ACCEPTS_STDIN_LIST)
AC_SUBST(JAR_KNOWS_J_OPTIONS)
])
AC_DEFUN([IT_FIND_RMIC],
[
RMIC_DEFAULT=${SYSTEM_JDK_DIR}/bin/rmic
AC_MSG_CHECKING(if an rmic executable is specified)
AC_ARG_WITH([rmic],
[AS_HELP_STRING([--with-rmic[[=PATH]]],specify location of rmic)],
[
if test "x${withval}" = "xyes"; then
RMIC=no
else
RMIC="${withval}"
fi
],
[
RMIC=no
])
AC_MSG_RESULT(${RMIC})
if test "x${RMIC}" = "xno"; then
RMIC=${RMIC_DEFAULT}
fi
AC_MSG_CHECKING([if $RMIC is a valid executable file])
if test -x "${RMIC}" && test -f "${RMIC}"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
RMIC=""
AC_PATH_PROG(RMIC, "rmic")
if test -z "${RMIC}"; then
AC_PATH_PROG(RMIC, "grmic")
fi
if test -z "${RMIC}"; then
AC_MSG_ERROR("An RMI compiler was not found.")
fi
fi
AC_SUBST(RMIC)
])
AC_DEFUN([IT_FIND_NATIVE2ASCII],
[
NATIVE2ASCII_DEFAULT=${SYSTEM_JDK_DIR}/bin/native2ascii
AC_MSG_CHECKING([if a native2ascii binary was specified])
AC_ARG_WITH([native2ascii],
[AS_HELP_STRING(--with-native2ascii,specify location of the native2ascii converter)],
[
if test "x${withval}" = "xyes"; then
NATIVE2ASCII=no
else
NATIVE2ASCII="${withval}"
fi
],
[
NATIVE2ASCII=no
])
AC_MSG_RESULT(${NATIVE2ASCII})
if test "x${NATIVE2ASCII}" = "xno"; then
NATIVE2ASCII=${NATIVE2ASCII_DEFAULT}
fi
AC_MSG_CHECKING([if $NATIVE2ASCII is a valid executable file])
if test -x "${NATIVE2ASCII}" && test -f "${NATIVE2ASCII}"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
NATIVE2ASCII=""
AC_PATH_PROG(NATIVE2ASCII, "native2ascii")
if test -z "${NATIVE2ASCII}"; then
AC_PATH_PROG(NATIVE2ASCII, "gnative2ascii")
fi
if test -z "${NATIVE2ASCII}"; then
AC_MSG_ERROR("A native2ascii converter was not found.")
fi
fi
AC_SUBST([NATIVE2ASCII])
])
AC_DEFUN_ONCE([IT_WITH_OPENJDK_SRC_ZIP],
[
AC_MSG_CHECKING([for an OpenJDK source zip])
AC_ARG_WITH([openjdk-src-zip],
[AS_HELP_STRING([--with-openjdk-src-zip[[=PATH]]],specify the location of the OpenJDK source zip)],
[
ALT_OPENJDK_SRC_ZIP=${withval}
if test "x${ALT_OPENJDK_SRC_ZIP}" = "xno"; then
ALT_OPENJDK_SRC_ZIP="not specified"
elif ! test -f ${ALT_OPENJDK_SRC_ZIP} ; then
AC_MSG_ERROR([Invalid OpenJDK source zip specified: ${ALT_OPENJDK_SRC_ZIP}])
fi
],
[
ALT_OPENJDK_SRC_ZIP="not specified"
])
AM_CONDITIONAL(USE_ALT_OPENJDK_SRC_ZIP, test "x${ALT_OPENJDK_SRC_ZIP}" != "xnot specified")
AC_MSG_RESULT(${ALT_OPENJDK_SRC_ZIP})
AC_SUBST(ALT_OPENJDK_SRC_ZIP)
])
AC_DEFUN([IT_WITH_ALT_JAR_BINARY],
[
AC_MSG_CHECKING([for an alternate jar command])
AC_ARG_WITH([alt-jar],
[AS_HELP_STRING(--with-alt-jar=PATH, specify the location of an alternate jar binary to use for building)],
[
ALT_JAR_CMD=${withval}
AM_CONDITIONAL(USE_ALT_JAR, test x = x)
],
[
ALT_JAR_CMD="not specified"
AM_CONDITIONAL(USE_ALT_JAR, test x != x)
])
AC_MSG_RESULT(${ALT_JAR_CMD})
AC_SUBST(ALT_JAR_CMD)
])
AC_DEFUN([IT_DISABLE_OPTIMIZATIONS],
[
AC_MSG_CHECKING([whether to disable optimizations and build with -O0 -g])
AC_ARG_ENABLE([optimizations],
[AS_HELP_STRING(--disable-optimizations,build with -O0 -g [[default=no]])],
[
case "${enableval}" in
no)
disable_optimizations=yes
;;
*)
disable_optimizations=no
;;
esac
],
[
disable_optimizations=no
])
AC_MSG_RESULT([$disable_optimizations])
AM_CONDITIONAL([DISABLE_OPTIMIZATIONS], test x"${disable_optimizations}" = "xyes")
])
AC_DEFUN([IT_FIND_TOOL],
[AC_PATH_TOOL([$1],[$2])
if test x"$$1" = x ; then
AC_MSG_ERROR([The following program was not found on the PATH: $2])
fi
AC_SUBST([$1])
])
AC_DEFUN([IT_FIND_TOOLS],
[AC_PATH_PROGS([$1],[$2])
if test x"$$1" = x ; then
AC_MSG_ERROR([None of the following programs could be found on the PATH: $2])
fi
AC_SUBST([$1])
])
AC_DEFUN_ONCE([IT_ENABLE_ZERO_BUILD],
[
AC_REQUIRE([IT_SET_ARCH_SETTINGS])
AC_REQUIRE([IT_ENABLE_CACAO])
AC_REQUIRE([IT_ENABLE_JAMVM])
AC_REQUIRE([IT_ENABLE_SHARK])
AC_REQUIRE([IT_HAS_NATIVE_HOTSPOT_PORT])
AC_MSG_CHECKING([whether to use the zero-assembler port])
use_zero=no
AC_ARG_ENABLE([zero],
[AS_HELP_STRING(--enable-zero,
use zero-assembler port on non-zero platforms)],
[
case "${enableval}" in
no)
use_zero=no
;;
*)
use_zero=yes
;;
esac
],
[
if test "x${use_shark}" = "xyes"; then
use_zero=yes;
else if test "x$has_native_hotspot_port" = "xno"; then
if test "x${ENABLE_CACAO}" = xyes || \
test "x${ENABLE_JAMVM}" = xyes; then
use_zero=no
else
use_zero=yes
fi
fi; fi
])
AC_MSG_RESULT($use_zero)
AM_CONDITIONAL(ZERO_BUILD, test "x${use_zero}" = xyes)
ZERO_LIBARCH="${INSTALL_ARCH_DIR}"
dnl can't use AC_CHECK_SIZEOF on multilib
case "${ZERO_LIBARCH}" in
arm|i386|ppc|s390|sh|sparc)
ZERO_BITSPERWORD=32
;;
aarch64|alpha|amd64|ia64|ppc64|ppc64le|s390x|sparcv9)
ZERO_BITSPERWORD=64
;;
*)
AC_CHECK_SIZEOF(void *)
ZERO_BITSPERWORD=`expr "${ac_cv_sizeof_void_p}" "*" 8`
esac
AC_C_BIGENDIAN([ZERO_ENDIANNESS="big"], [ZERO_ENDIANNESS="little"])
case "${ZERO_LIBARCH}" in
i386)
ZERO_ARCHDEF="IA32"
;;
ppc*)
ZERO_ARCHDEF="PPC"
;;
s390*)
ZERO_ARCHDEF="S390"
;;
sparc*)
ZERO_ARCHDEF="SPARC"
;;
*)
ZERO_ARCHDEF=`echo ${ZERO_LIBARCH} | tr a-z A-Z`
esac
AC_SUBST(ZERO_LIBARCH)
AC_SUBST(ZERO_BITSPERWORD)
AC_SUBST(ZERO_ENDIANNESS)
AC_SUBST(ZERO_ARCHDEF)
])
AC_DEFUN_ONCE([IT_ENABLE_SHARK],
[
AC_MSG_CHECKING([whether to use the Shark JIT])
AC_ARG_ENABLE([shark], [AS_HELP_STRING(--enable-shark, use Shark JIT)],
[
use_shark="${enableval}"
],
[
use_shark=no
])
AC_MSG_RESULT($use_shark)
AM_CONDITIONAL(SHARK_BUILD, test "x${use_shark}" = xyes)
AC_SUBST(ENABLE_SHARK)
])
AC_DEFUN([IT_ENABLE_CACAO],
[
AC_MSG_CHECKING(whether to use CACAO as VM)
AC_ARG_ENABLE([cacao],
[AS_HELP_STRING(--enable-cacao,use CACAO as VM [[default=no]])],
[
case "${enableval}" in
yes)
ENABLE_CACAO=yes
;;
*)
ENABLE_CACAO=no
;;
esac
],
[
ENABLE_CACAO=no
])
AC_MSG_RESULT(${ENABLE_CACAO})
AM_CONDITIONAL(ENABLE_CACAO, test x"${ENABLE_CACAO}" = "xyes")
AC_SUBST(ENABLE_CACAO)
])
AC_DEFUN([IT_WITH_CACAO_HOME],
[
AC_MSG_CHECKING([for a CACAO home directory])
AC_ARG_WITH([cacao-home],
[AS_HELP_STRING([--with-cacao-home[[=PATH]]],
[CACAO home directory [[PATH=/usr/local/cacao]]])],
[
case "${withval}" in
yes)
CACAO_IMPORT_PATH=/usr/local/cacao
;;
*)
CACAO_IMPORT_PATH=${withval}
;;
esac
AM_CONDITIONAL(USE_SYSTEM_CACAO, true)
],
[
CACAO_IMPORT_PATH="\$(abs_top_builddir)/cacao/install/hotspot"
AM_CONDITIONAL(USE_SYSTEM_CACAO, false)
])
AC_MSG_RESULT(${CACAO_IMPORT_PATH})
AC_SUBST(CACAO_IMPORT_PATH)
])
AC_DEFUN_ONCE([IT_WITH_CACAO_SRC_ZIP],
[
AC_MSG_CHECKING([for a CACAO source zip])
AC_ARG_WITH([cacao-src-zip],
[AS_HELP_STRING(--with-cacao-src-zip=PATH,specify the location of the CACAO source zip)],
[
ALT_CACAO_SRC_ZIP=${withval}
if test "x${ALT_CACAO_SRC_ZIP}" = "xno"; then
ALT_CACAO_SRC_ZIP="not specified"
elif ! test -f ${ALT_CACAO_SRC_ZIP} ; then
AC_MSG_ERROR([Invalid CACAO source zip specified: ${ALT_CACAO_SRC_ZIP}])
fi
],
[
ALT_CACAO_SRC_ZIP="not specified"
])
AM_CONDITIONAL(USE_ALT_CACAO_SRC_ZIP, test "x${ALT_CACAO_SRC_ZIP}" != "xnot specified")
AC_MSG_RESULT(${ALT_CACAO_SRC_ZIP})
AC_SUBST(ALT_CACAO_SRC_ZIP)
])
AC_DEFUN([IT_WITH_CACAO_SRC_DIR],
[
AC_MSG_CHECKING([for a CACAO source directory])
AC_ARG_WITH([cacao-src-dir],
[AS_HELP_STRING(--with-cacao-src-dir,specify the location of the Cacao sources)],
[
ALT_CACAO_SRC_DIR=${withval}
AM_CONDITIONAL(USE_ALT_CACAO_SRC_DIR, test x = x)
],
[
ALT_CACAO_SRC_DIR="not specified"
AM_CONDITIONAL(USE_ALT_CACAO_SRC_DIR, test x != x)
])
AC_MSG_RESULT(${ALT_CACAO_SRC_DIR})
AC_SUBST(ALT_CACAO_SRC_DIR)
])
AC_DEFUN([IT_ENABLE_HG],
[
AC_MSG_CHECKING(whether to retrieve the source code from Mercurial)
AC_ARG_ENABLE([hg],
[AS_HELP_STRING(--enable-hg,download source code from Mercurial [[default=no]])],
[
case "${enableval}" in
no)
enable_hg=no
;;
*)
enable_hg=yes
;;
esac
],
[
enable_hg=no
])
AC_MSG_RESULT([${enable_hg}])
AM_CONDITIONAL([USE_HG], test x"${enable_hg}" = "xyes")
])
AC_DEFUN([IT_WITH_VERSION_SUFFIX],
[
AC_MSG_CHECKING(if a version suffix has been specified)
AC_ARG_WITH([version-suffix],
[AS_HELP_STRING(--with-version-suffix=TEXT,appends the given text to the JDK version)],
[
case "${withval}" in
yes)
version_suffix=
AC_MSG_RESULT([no])
;;
no)
version_suffix=
AC_MSG_RESULT([no])
;;
*)
version_suffix=${withval}
AC_MSG_RESULT([${version_suffix}])
;;
esac
],
[
version_suffix=
AC_MSG_RESULT([no])
])
AC_SUBST(VERSION_SUFFIX, $version_suffix)
])
AC_DEFUN([IT_WITH_HOTSPOT_BUILD],
[
DEFAULT_BUILD="default"
AC_MSG_CHECKING([which HotSpot build to use])
AC_ARG_WITH([hotspot-build],
[AS_HELP_STRING(--with-hotspot-build=BUILD,the HotSpot build to use [[BUILD=default]])],
[
HSBUILD="${withval}"
],
[
HSBUILD="${DEFAULT_BUILD}"
])
if test "x${HSBUILD}" = xyes; then
HSBUILD="${DEFAULT_BUILD}"
elif test "x${HSBUILD}" = xno; then
HSBUILD="default"
fi
AC_MSG_RESULT([${HSBUILD}])
AC_SUBST([HSBUILD])
AM_CONDITIONAL(WITH_ALT_HSBUILD, test "x${HSBUILD}" != "xdefault")
])
AC_DEFUN_ONCE([IT_WITH_HOTSPOT_SRC_ZIP],
[
AC_MSG_CHECKING([for a HotSpot source zip])
AC_ARG_WITH([hotspot-src-zip],
[AS_HELP_STRING(--with-hotspot-src-zip=PATH,specify the location of the HotSpot source zip)],
[
ALT_HOTSPOT_SRC_ZIP=${withval}
if test "x${ALT_HOTSPOT_SRC_ZIP}" = "xno"; then
ALT_HOTSPOT_SRC_ZIP="not specified"
elif ! test -f ${ALT_HOTSPOT_SRC_ZIP} ; then
AC_MSG_ERROR([Invalid HotSpot source zip specified: ${ALT_HOTSPOT_SRC_ZIP}])
fi
],
[
ALT_HOTSPOT_SRC_ZIP="not specified"
])
AM_CONDITIONAL(USE_ALT_HOTSPOT_SRC_ZIP, test "x${ALT_HOTSPOT_SRC_ZIP}" != "xnot specified")
AC_MSG_RESULT(${ALT_HOTSPOT_SRC_ZIP})
AC_SUBST(ALT_HOTSPOT_SRC_ZIP)
])
AC_DEFUN_ONCE([IT_WITH_CORBA_SRC_ZIP],
[
AC_MSG_CHECKING([for a CORBA source zip])
AC_ARG_WITH([corba-src-zip],
[AS_HELP_STRING(--with-corba-src-zip=PATH,specify the location of the CORBA source zip)],
[
ALT_CORBA_SRC_ZIP=${withval}
if test "x${ALT_CORBA_SRC_ZIP}" = "xno"; then
ALT_CORBA_SRC_ZIP="not specified"
elif ! test -f ${ALT_CORBA_SRC_ZIP} ; then
AC_MSG_ERROR([Invalid CORBA source zip specified: ${ALT_CORBA_SRC_ZIP}])
fi
],
[
ALT_CORBA_SRC_ZIP="not specified"
])
AM_CONDITIONAL(USE_ALT_CORBA_SRC_ZIP, test "x${ALT_CORBA_SRC_ZIP}" != "xnot specified")
AC_MSG_RESULT(${ALT_CORBA_SRC_ZIP})
AC_SUBST(ALT_CORBA_SRC_ZIP)
])
AC_DEFUN_ONCE([IT_WITH_JAXP_SRC_ZIP],
[
AC_MSG_CHECKING([for a JAXP source zip])
AC_ARG_WITH([jaxp-src-zip],
[AS_HELP_STRING(--with-jaxp-src-zip=PATH,specify the location of the JAXP source zip)],
[
ALT_JAXP_SRC_ZIP=${withval}
if test "x${ALT_JAXP_SRC_ZIP}" = "xno"; then
ALT_JAXP_SRC_ZIP="not specified"
elif ! test -f ${ALT_JAXP_SRC_ZIP} ; then
AC_MSG_ERROR([Invalid JAXP source zip specified: ${ALT_JAXP_SRC_ZIP}])
fi
],
[
ALT_JAXP_SRC_ZIP="not specified"
])
AM_CONDITIONAL(USE_ALT_JAXP_SRC_ZIP, test "x${ALT_JAXP_SRC_ZIP}" != "xnot specified")
AC_MSG_RESULT(${ALT_JAXP_SRC_ZIP})
AC_SUBST(ALT_JAXP_SRC_ZIP)
])
AC_DEFUN_ONCE([IT_WITH_JAXWS_SRC_ZIP],
[
AC_MSG_CHECKING([for a JAXWS source zip])
AC_ARG_WITH([jaxws-src-zip],
[AS_HELP_STRING(--with-jaxws-src-zip=PATH,specify the location of the JAXWS source zip)],
[
ALT_JAXWS_SRC_ZIP=${withval}
if test "x${ALT_JAXWS_SRC_ZIP}" = "xno"; then
ALT_JAXWS_SRC_ZIP="not specified"
elif ! test -f ${ALT_JAXWS_SRC_ZIP} ; then
AC_MSG_ERROR([Invalid JAXWS source zip specified: ${ALT_JAXWS_SRC_ZIP}])
fi
],
[
ALT_JAXWS_SRC_ZIP="not specified"
])
AM_CONDITIONAL(USE_ALT_JAXWS_SRC_ZIP, test "x${ALT_JAXWS_SRC_ZIP}" != "xnot specified")
AC_MSG_RESULT(${ALT_JAXWS_SRC_ZIP})
AC_SUBST(ALT_JAXWS_SRC_ZIP)
])
AC_DEFUN_ONCE([IT_WITH_JDK_SRC_ZIP],
[
AC_MSG_CHECKING([for a JDK source zip])
AC_ARG_WITH([jdk-src-zip],
[AS_HELP_STRING(--with-jdk-src-zip=PATH,specify the location of the JDK source zip)],
[
ALT_JDK_SRC_ZIP=${withval}
if test "x${ALT_JDK_SRC_ZIP}" = "xno"; then
ALT_JDK_SRC_ZIP="not specified"
elif ! test -f ${ALT_JDK_SRC_ZIP} ; then
AC_MSG_ERROR([Invalid JDK source zip specified: ${ALT_JDK_SRC_ZIP}])
fi
],
[
ALT_JDK_SRC_ZIP="not specified"
])
AM_CONDITIONAL(USE_ALT_JDK_SRC_ZIP, test "x${ALT_JDK_SRC_ZIP}" != "xnot specified")
AC_MSG_RESULT(${ALT_JDK_SRC_ZIP})
AC_SUBST(ALT_JDK_SRC_ZIP)
])
AC_DEFUN_ONCE([IT_WITH_LANGTOOLS_SRC_ZIP],
[
AC_MSG_CHECKING([for a langtools source zip])
AC_ARG_WITH([langtools-src-zip],
[AS_HELP_STRING(--with-langtools-src-zip=PATH,specify the location of the langtools source zip)],
[
ALT_LANGTOOLS_SRC_ZIP=${withval}
if test "x${ALT_LANGTOOLS_SRC_ZIP}" = "xno"; then
ALT_LANGTOOLS_SRC_ZIP="not specified"
elif ! test -f ${ALT_LANGTOOLS_SRC_ZIP} ; then
AC_MSG_ERROR([Invalid langtools source zip specified: ${ALT_LANGTOOLS_SRC_ZIP}])
fi
],
[
ALT_LANGTOOLS_SRC_ZIP="not specified"
])
AM_CONDITIONAL(USE_ALT_LANGTOOLS_SRC_ZIP, test "x${ALT_LANGTOOLS_SRC_ZIP}" != "xnot specified")
AC_MSG_RESULT(${ALT_LANGTOOLS_SRC_ZIP})
AC_SUBST(ALT_LANGTOOLS_SRC_ZIP)
])
AC_DEFUN([IT_WITH_HG_REVISION],