-
-
Notifications
You must be signed in to change notification settings - Fork 60
/
configure.ac
executable file
·5961 lines (5279 loc) · 185 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
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
##------------------------------------------------------------##
#
# The multiple-architecture stuff in this file is pretty
# cryptic. Read docs/internals/multiple-architectures.txt
# for at least a partial explanation of what is going on.
#
##------------------------------------------------------------##
# Process this file with autoconf to produce a configure script.
#
# Define major, minor, micro and suffix here once, then reuse them
# for version number in valgrind.h and vg-entities (documentation).
# suffix must be empty for a release, otherwise it is GIT or RC1, etc.
# Also set the (expected/last) release date here.
# Do not forget to rerun ./autogen.sh
m4_define([v_major_ver], [3])
m4_define([v_minor_ver], [24])
m4_define([v_micro_ver], [0])
m4_define([v_suffix_ver], [GIT-lbmacos])
m4_define([v_rel_date], ["?? Oct 2024"])
m4_define([v_version],
m4_if(v_suffix_ver, [],
[v_major_ver.v_minor_ver.v_micro_ver],
[v_major_ver.v_minor_ver.v_micro_ver.v_suffix_ver]))
AC_INIT([Valgrind],[v_version],[[email protected]])
# For valgrind.h
AC_SUBST(VG_VER_MAJOR, v_major_ver)
AC_SUBST(VG_VER_MINOR, v_minor_ver)
# For docs/xml/vg-entities.xml
AC_SUBST(VG_DATE, v_rel_date)
AC_CONFIG_SRCDIR(coregrind/m_main.c)
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([foreign dist-bzip2 subdir-objects])
AM_MAINTAINER_MODE
#----------------------------------------------------------------------------
# Do NOT modify these flags here. Except in feature tests in which case
# the original values must be properly restored.
#----------------------------------------------------------------------------
CFLAGS="$CFLAGS"
CXXFLAGS="$CXXFLAGS"
#----------------------------------------------------------------------------
# Checks for various programs.
#----------------------------------------------------------------------------
AC_PROG_LN_S
m4_version_prereq([2.70], [AC_PROG_CC], [AC_PROG_CC_C99])
# Make sure we can compile in C99 mode.
if test "$ac_prog_cc_stdc" = "c99"; then
AC_MSG_ERROR([Valgrind relies on a C compiler supporting C99])
fi
AC_PROG_CPP
AC_PROG_CXX
# AC_PROG_OBJC apparently causes problems on older Linux distros (eg. with
# autoconf 2.59). If we ever have any Objective-C code in the Valgrind code
# base (eg. most likely as Darwin-specific tests) we'll need one of the
# following:
# - put AC_PROG_OBJC in a Darwin-specific part of this file
# - Use AC_PROG_OBJC here and up the minimum autoconf version
# - Use the following, which is apparently equivalent:
# m4_ifdef([AC_PROG_OBJC],
# [AC_PROG_OBJC],
# [AC_CHECK_TOOL([OBJC], [gcc])
# AC_SUBST([OBJC])
# AC_SUBST([OBJCFLAGS])
# ])
AC_PROG_RANLIB
# Set LTO_RANLIB variable to an lto enabled ranlib
if test "x$LTO_RANLIB" = "x"; then
AC_PATH_PROGS([LTO_RANLIB], [gcc-ranlib])
fi
AC_ARG_VAR([LTO_RANLIB],[Library indexer command for link time optimisation])
# provide a very basic definition for AC_PROG_SED if it's not provided by
# autoconf (as e.g. in autoconf 2.59).
m4_ifndef([AC_PROG_SED],
[AC_DEFUN([AC_PROG_SED],
[AC_ARG_VAR([SED])
AC_CHECK_PROGS([SED],[gsed sed])])])
AC_PROG_SED
AC_DEFUN([AC_PROG_SHA256SUM],
[AC_ARG_VAR([SHA256SUM])
AC_CHECK_PROGS([SHA256SUM],[gsha256sum sha256sum])])
AC_PROG_SHA256SUM
# If no AR variable was specified, look up the name of the archiver. Otherwise
# do not touch the AR variable.
if test "x$AR" = "x"; then
AC_PATH_PROGS([AR], [`echo $LD | $SED 's/ld$/ar/'` "ar"], [ar])
fi
AC_ARG_VAR([AR],[Archiver command])
# same for LTO_AR variable for lto enabled archiver
if test "x$LTO_AR" = "x"; then
AC_PATH_PROGS([LTO_AR], [gcc-ar])
fi
AC_ARG_VAR([LTO_AR],[Archiver command for link time optimisation])
# figure out where perl lives
AC_PATH_PROG(PERL, perl)
# figure out where gdb lives
AC_PATH_PROG(GDB, gdb, "/no/gdb/was/found/at/configure/time")
AC_DEFINE_UNQUOTED(GDB_PATH, "$GDB", [path to GDB])
# some older automake's don't have it so try something on our own
ifdef([AM_PROG_AS],[AM_PROG_AS],
[
AS="${CC}"
AC_SUBST(AS)
ASFLAGS=""
AC_SUBST(ASFLAGS)
])
dnl automake-1.10 does not have AM_COND_IF (added in 1.11), so we supply a
dnl fallback definition
dnl The macro is courtesy of Dave Hart:
dnl https://lists.gnu.org/archive/html/automake/2010-12/msg00045.html
m4_ifndef([AM_COND_IF], [AC_DEFUN([AM_COND_IF], [
if test -z "$$1_TRUE"; then :
m4_n([$2])[]dnl
m4_ifval([$3],
[else
$3
])dnl
fi[]dnl
])])
# Check if 'diff' supports -u (universal diffs) and use it if possible.
AC_MSG_CHECKING([for diff -u])
AC_SUBST(DIFF)
# Comparing two identical files results in 0.
tmpfile="tmp-xxx-yyy-zzz"
touch $tmpfile;
if diff -u $tmpfile $tmpfile ; then
AC_MSG_RESULT([yes])
DIFF="diff -u"
else
AC_MSG_RESULT([no])
DIFF="diff"
fi
rm $tmpfile
# Make sure we can compile in C99 mode.
AC_PROG_CC
if test "$ac_prog_cc_stdc" = "c99"; then
AC_MSG_ERROR([Valgrind relies on a C compiler supporting C99])
fi
# macOS: Detect the Xcode SDK path and inject it in different tools
AM_COND_IF([VGCONF_OS_IS_DARWIN],
[
AC_ARG_VAR([DEVELOPER_DIR],[Overrides the active developer directory (used in gcc, xcrun, etc)])
AC_CHECK_PROG([XCRUN], [xcrun], [yes], [no])
AC_MSG_CHECKING([for Xcode SDK and includes])
AC_ARG_WITH([xcode-path],
[ --with-xcode-path=PATH Specify path for Xcode SDK],
[
# Set defaults in case `xcrun` fails
xcodedir="$withval"
xcodedir_inc="$xcodedir/usr/include"
# Defining DEVELOPER_DIR will override which version of gcc, xcrun, etc is being used
export DEVELOPER_DIR="$xcodedir"
],
[
# Use system defaults, in case `xcrun` fails
xcodedir="active developer directory"
xcodedir_inc="/usr/include"
])
if test "x$XCRUN" != "xno"; then
xcrundir=`xcrun --sdk macosx --show-sdk-path`
if test ! -z "$xcrundir"; then
xcodedir="$xcrundir"
xcodedir_inc="$xcodedir/usr/include"
fi
else
AC_MSG_WARN([Couldn't find xcrun, most Xcode-related autodetection will be disabled and the build might fail])
fi
AC_MSG_RESULT([$xcodedir (includes: $xcodedir_inc)])
])
# We don't want gcc < 3.0
AC_MSG_CHECKING([for a supported version of gcc])
# Obtain the compiler version.
#
# A few examples of how the ${CC} --version output looks like:
#
# ######## gcc variants ########
# Arch Linux: i686-pc-linux-gnu-gcc (GCC) 4.6.2
# Debian Linux: gcc (Debian 4.3.2-1.1) 4.3.2
# openSUSE: gcc (SUSE Linux) 4.5.1 20101208 [gcc-4_5-branch revision 167585]
# Exherbo Linux: x86_64-pc-linux-gnu-gcc (Exherbo gcc-4.6.2) 4.6.2
# MontaVista Linux for ARM: arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2009q1-203) 4.3.3
# OS/X 10.6: i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
# OS/X 10.7: i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)
#
# ######## clang variants ########
# Clang: clang version 2.9 (tags/RELEASE_29/final)
# Apple clang: Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn)
# FreeBSD clang: FreeBSD clang version 3.1 (branches/release_31 156863) 20120523
#
# ######## Apple LLVM variants ########
# Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
# Apple LLVM version 6.0 (clang-600.0.51) (based on LLVM 3.5svn)
# Apple clang version 11.0.0 (clang-1100.0.33.17) (since macOS 10.15)
#
[
if test "x`${CC} --version | $SED -n -e 's/.*\Apple \(LLVM\) version.*clang.*/\1/p'`" = "xLLVM" ;
then
is_clang="applellvm"
gcc_version=`${CC} --version | $SED -n -e 's/.*LLVM version \([0-9.]*\).*$/\1/p'`
elif test "x`${CC} --version | $SED -n -e 's/.*\Apple \(clang\) version.*clang.*/\1/p'`" = "xclang" ;
then
is_clang="applellvm"
gcc_version=`${CC} --version | $SED -n -e 's/.*clang version \([0-9.]*\).*$/\1/p'`
elif test "x`${CC} --version | $SED -n -e 's/.*\(clang\) version.*/\1/p'`" = "xclang" ;
then
is_clang="clang"
# Don't use -dumpversion with clang: it will always produce "4.2.1".
gcc_version=`${CC} --version | $SED -n -e 's/.*clang version \([0-9.]*\).*$/\1/p'`
elif test "x`${CC} --version | $SED -n -e 's/icc.*\(ICC\).*/\1/p'`" = "xICC" ;
then
is_clang="icc"
gcc_version=`${CC} -dumpversion 2>/dev/null`
else
is_clang="notclang"
gcc_version=`${CC} -dumpversion 2>/dev/null`
if test "x$gcc_version" = x; then
gcc_version=`${CC} --version | $SED -n -e 's/[^ ]*gcc[^ ]* ([^)]*) \([0-9.]*\).*$/\1/p'`
fi
fi
]
AM_CONDITIONAL(COMPILER_IS_CLANG, test $is_clang = clang -o $is_clang = applellvm)
AM_CONDITIONAL(COMPILER_IS_ICC, test $is_clang = icc)
# Note: m4 arguments are quoted with [ and ] so square brackets in shell
# statements have to be quoted.
case "${is_clang}-${gcc_version}" in
applellvm-5.1|applellvm-[[6-9]].*|applellvm-[[1-9][0-9]]*)
AC_MSG_RESULT([ok (Apple LLVM version ${gcc_version})])
;;
icc-1[[3-9]].*|icc-202[[0-9]].*)
AC_MSG_RESULT([ok (ICC version ${gcc_version})])
;;
notclang-[[3-9]]|notclang-[[3-9]].*|notclang-[[1-9][0-9]]*)
AC_MSG_RESULT([ok (${gcc_version})])
;;
clang-2.9|clang-[[3-9]].*|clang-[[1-9][0-9]]*)
AC_MSG_RESULT([ok (clang-${gcc_version})])
;;
*)
AC_MSG_RESULT([no (${is_clang}-${gcc_version})])
AC_MSG_ERROR([please use gcc >= 3.0 or clang >= 2.9 or icc >= 13.0 or Apple LLVM >= 5.1])
;;
esac
#----------------------------------------------------------------------------
# Arch/OS/platform tests.
#----------------------------------------------------------------------------
# We create a number of arch/OS/platform-related variables. We prefix them
# all with "VGCONF_" which indicates that they are defined at
# configure-time, and distinguishes them from the VGA_*/VGO_*/VGP_*
# variables used when compiling C files.
AC_CANONICAL_HOST
AC_MSG_CHECKING([for a supported CPU])
# ARCH_MAX reflects the most that this CPU can do: for example if it
# is a 64-bit capable PowerPC, then it must be set to ppc64 and not ppc32.
# Ditto for amd64. It is used for more configuration below, but is not used
# outside this file.
#
# Power PC returns powerpc for Big Endian. This was not changed when Little
# Endian support was added to the 64-bit architecture. The 64-bit Little
# Endian systems explicitly state le in the host_cpu. For clarity in the
# Valgrind code, the ARCH_MAX name will state LE or BE for the endianness of
# the 64-bit system. Big Endian is the only mode supported on 32-bit Power PC.
# The abreviation PPC or ppc refers to 32-bit and 64-bit systems with either
# Endianness. The name PPC64 or ppc64 to 64-bit systems of either Endianness.
# The names ppc64be or PPC64BE refer to only 64-bit systems that are Big
# Endian. Similarly, ppc64le or PPC64LE refer to only 64-bit systems that are
# Little Endian.
VGCONF_PLATFORM_ARM_ARCH=
case "${host_cpu}" in
i?86)
AC_MSG_RESULT([ok (${host_cpu})])
ARCH_MAX="x86"
;;
x86_64|amd64)
AC_MSG_RESULT([ok (${host_cpu})])
ARCH_MAX="amd64"
;;
powerpc64)
# this only referrs to 64-bit Big Endian
AC_MSG_RESULT([ok (${host_cpu})])
ARCH_MAX="ppc64be"
;;
powerpc64le)
# this only referrs to 64-bit Little Endian
AC_MSG_RESULT([ok (${host_cpu})])
ARCH_MAX="ppc64le"
;;
powerpc)
# On Linux this means only a 32-bit capable CPU.
AC_MSG_RESULT([ok (${host_cpu})])
ARCH_MAX="ppc32"
;;
s390x)
AC_MSG_RESULT([ok (${host_cpu})])
ARCH_MAX="s390x"
;;
armv8*)
AC_MSG_RESULT([ok (${host_cpu})])
VGCONF_PLATFORM_ARM_ARCH="-marm -mcpu=cortex-a8"
ARCH_MAX="arm"
;;
armv7*)
AC_MSG_RESULT([ok (${host_cpu})])
VGCONF_PLATFORM_ARM_ARCH="-marm -mcpu=cortex-a8"
ARCH_MAX="arm"
;;
arm*)
AC_MSG_RESULT([ok (${host_cpu})])
VGCONF_PLATFORM_ARM_ARCH="-march=armv6"
ARCH_MAX="arm"
;;
aarch64*)
AC_MSG_RESULT([ok (${host_cpu})])
ARCH_MAX="arm64"
;;
mips)
AC_MSG_RESULT([ok (${host_cpu})])
ARCH_MAX="mips32"
;;
mipsel)
AC_MSG_RESULT([ok (${host_cpu})])
ARCH_MAX="mips32"
;;
mipsisa32r2)
AC_MSG_RESULT([ok (${host_cpu})])
ARCH_MAX="mips32"
;;
mips64*)
AC_MSG_RESULT([ok (${host_cpu})])
ARCH_MAX="mips64"
;;
mipsisa64*)
AC_MSG_RESULT([ok (${host_cpu})])
ARCH_MAX="mips64"
;;
nanomips)
AC_MSG_RESULT([ok (${host_cpu})])
ARCH_MAX="nanomips"
;;
*)
AC_MSG_RESULT([no (${host_cpu})])
AC_MSG_ERROR([Unsupported host architecture. Sorry])
;;
esac
AC_SUBST(VGCONF_PLATFORM_ARM_ARCH)
#----------------------------------------------------------------------------
# Sometimes it's convenient to subvert the bi-arch build system and
# just have a single build even though the underlying platform is
# capable of both. Hence handle --enable-only64bit and
# --enable-only32bit. Complain if both are issued :-)
# [Actually, if either of these options are used, I think both get built,
# but only one gets installed. So if you use an in-place build, both can be
# used. --njn]
# Check if a 64-bit only build has been requested
AC_CACHE_CHECK([for a 64-bit only build], vg_cv_only64bit,
[AC_ARG_ENABLE(only64bit,
[ --enable-only64bit do a 64-bit only build],
[vg_cv_only64bit=$enableval],
[vg_cv_only64bit=no])])
# Check if a 32-bit only build has been requested
AC_CACHE_CHECK([for a 32-bit only build], vg_cv_only32bit,
[AC_ARG_ENABLE(only32bit,
[ --enable-only32bit do a 32-bit only build],
[vg_cv_only32bit=$enableval],
[vg_cv_only32bit=no])])
# Stay sane
if test x$vg_cv_only64bit = xyes -a x$vg_cv_only32bit = xyes; then
AC_MSG_ERROR(
[Nonsensical: both --enable-only64bit and --enable-only32bit.])
fi
#----------------------------------------------------------------------------
# VGCONF_OS is the primary build OS, eg. "linux". It is passed in to
# compilation of many C files via -VGO_$(VGCONF_OS) and
# -VGP_$(VGCONF_ARCH_PRI)_$(VGCONF_OS).
AC_MSG_CHECKING([for a supported OS])
AC_SUBST(VGCONF_OS)
DEFAULT_SUPP=""
case "${host_os}" in
*linux*)
AC_MSG_RESULT([ok (${host_os})])
VGCONF_OS="linux"
# Ok, this is linux. Check the kernel version
AC_MSG_CHECKING([for the kernel version])
kernel=`uname -r`
case "${kernel}" in
0.*|1.*|2.0.*|2.1.*|2.2.*|2.3.*|2.4.*|2.5.*)
AC_MSG_RESULT([unsupported (${kernel})])
AC_MSG_ERROR([Valgrind needs a Linux kernel >= 2.6])
;;
*)
AC_MSG_RESULT([2.6 or later (${kernel})])
;;
esac
;;
*freebsd*)
AC_MSG_RESULT([ok (${host_os})])
VGCONF_OS="freebsd"
AC_DEFINE([FREEBSD_11], 1100, [FREEBSD_VERS value for FreeBSD 11.x])
freebsd_11=1100
AC_DEFINE([FREEBSD_12], 1200, [FREEBSD_VERS value for FreeBSD 12.0 to 12.1])
freebsd_12=1200
AC_DEFINE([FREEBSD_12_2], 1220, [FREEBSD_VERS value for FreeBSD 12.2])
freebsd_12_2=1220
AC_DEFINE([FREEBSD_13_0], 1300, [FREEBSD_VERS value for FreeBSD 13.0])
freebsd_13_0=1300
AC_DEFINE([FREEBSD_13_1], 1310, [FREEBSD_VERS value for FreeBSD 13.1])
freebsd_13_1=1310
AC_DEFINE([FREEBSD_13_2], 1320, [FREEBSD_VERS value for FreeBSD 13.2])
freebsd_13_2=1320
AC_DEFINE([FREEBSD_13_3], 1330, [FREEBSD_VERS value for FreeBSD 13.3])
freebsd_13_3=1330
AC_DEFINE([FREEBSD_13_4], 1340, [FREEBSD_VERS value for FreeBSD 13.4])
freebsd_13_4=1340
AC_DEFINE([FREEBSD_14_0], 1400, [FREEBSD_VERS value for FreeBSD 14.0])
freebsd_14_0=1400
AC_DEFINE([FREEBSD_14_1], 1410, [FREEBSD_VERS value for FreeBSD 14.1])
freebsd_14_1=1410
AC_DEFINE([FREEBSD_15], 1500, [FREEBSD_VERS value for FreeBSD 15.x])
freebsd_15=1500
AC_MSG_CHECKING([for the kernel version])
kernel=`uname -r`
case "${kernel}" in
11.*)
AC_MSG_RESULT([FreeBSD 11.x (${kernel})])
AC_DEFINE([FREEBSD_VERS], FREEBSD_11, [FreeBSD version])
freebsd_vers=$freebsd_11
;;
12.*)
case "${kernel}" in
12.[[0-1]]-*)
AC_MSG_RESULT([FreeBSD 12.x (${kernel})])
AC_DEFINE([FREEBSD_VERS], FREEBSD_12, [FreeBSD version])
freebsd_vers=$freebsd_12
;;
*)
AC_MSG_RESULT([FreeBSD 12.x (${kernel})])
AC_DEFINE([FREEBSD_VERS], FREEBSD_12_2, [FreeBSD version])
freebsd_vers=$freebsd_12_2
;;
esac
;;
13.*)
case "${kernel}" in
13.0-*)
AC_MSG_RESULT([FreeBSD 13.0 (${kernel})])
AC_DEFINE([FREEBSD_VERS], FREEBSD_13_0, [FreeBSD version])
freebsd_vers=$freebsd_13_0
;;
13.1-*)
AC_MSG_RESULT([FreeBSD 13.1 (${kernel})])
AC_DEFINE([FREEBSD_VERS], FREEBSD_13_1, [FreeBSD version])
freebsd_vers=$freebsd_13_1
;;
13.2-*)
AC_MSG_RESULT([FreeBSD 13.2 (${kernel})])
AC_DEFINE([FREEBSD_VERS], FREEBSD_13_2, [FreeBSD version])
freebsd_vers=$freebsd_13_2
;;
13.3-*)
AC_MSG_RESULT([FreeBSD 13.3 (${kernel})])
AC_DEFINE([FREEBSD_VERS], FREEBSD_13_3, [FreeBSD version])
freebsd_vers=$freebsd_13_3
;;
13.4-*)
AC_MSG_RESULT([FreeBSD 13.4 (${kernel})])
AC_DEFINE([FREEBSD_VERS], FREEBSD_13_4, [FreeBSD version])
freebsd_vers=$freebsd_13_4
;;
*)
AC_MSG_RESULT([unsupported (${kernel})])
AC_MSG_ERROR([Valgrind works on FreeBSD 11.x to 15.x])
;;
esac
;;
14.*)
case "${kernel}" in
14.0-*)
AC_MSG_RESULT([FreeBSD 14.0 (${kernel})])
AC_DEFINE([FREEBSD_VERS], FREEBSD_14_0, [FreeBSD version])
freebsd_vers=$freebsd_14_0
;;
14.1-*)
AC_MSG_RESULT([FreeBSD 14.1 (${kernel})])
AC_DEFINE([FREEBSD_VERS], FREEBSD_14_1, [FreeBSD version])
freebsd_vers=$freebsd_14_1
;;
*)
AC_MSG_RESULT([unsupported (${kernel})])
AC_MSG_ERROR([Valgrind works on FreeBSD 11.x to 15.x])
;;
esac
;;
15.*)
AC_MSG_RESULT([FreeBSD 15.x (${kernel})])
AC_DEFINE([FREEBSD_VERS], FREEBSD_15, [FreeBSD version])
freebsd_vers=$freebsd_15
;;
*)
AC_MSG_RESULT([unsupported (${kernel})])
AC_MSG_ERROR([Valgrind works on FreeBSD 11.x to 15.x])
;;
esac
DEFAULT_SUPP="$srcdir/freebsd.supp $srcdir/freebsd-helgrind.supp $srcdir/freebsd-drd.supp ${DEFAULT_SUPP}"
;;
*darwin*)
AC_MSG_RESULT([ok (${host_os})])
VGCONF_OS="darwin"
AC_DEFUN([AC_ADD_DARWIN_VERS],[
$1=$2
AC_DEFINE_UNQUOTED([$1], [$$1], [DARWIN_VERS value for $3])
AC_SUBST($1)
])
AC_ADD_DARWIN_VERS(DARWIN_10_5, 100500, [Mac OS X 10.5])
AC_ADD_DARWIN_VERS(DARWIN_10_6, 100600, [Mac OS X 10.6])
AC_ADD_DARWIN_VERS(DARWIN_10_7, 100700, [Mac OS X 10.7])
AC_ADD_DARWIN_VERS(DARWIN_10_8, 100800, [Mac OS X 10.8])
AC_ADD_DARWIN_VERS(DARWIN_10_9, 100900, [Mac OS X 10.9])
AC_ADD_DARWIN_VERS(DARWIN_10_10, 101000, [Mac OS X 10.10])
AC_ADD_DARWIN_VERS(DARWIN_10_11, 101100, [Mac OS X 10.11])
AC_ADD_DARWIN_VERS(DARWIN_10_12, 101200, [macOS 10.12])
AC_ADD_DARWIN_VERS(DARWIN_10_13, 101300, [macOS 10.13])
AC_ADD_DARWIN_VERS(DARWIN_10_14, 101400, [macOS 10.14])
AC_ADD_DARWIN_VERS(DARWIN_10_15, 101500, [macOS 10.15])
AC_ADD_DARWIN_VERS(DARWIN_11_00, 110000, [macOS 11.0])
AC_ADD_DARWIN_VERS(DARWIN_12_00, 120000, [macOS 12.0])
AC_ADD_DARWIN_VERS(DARWIN_13_00, 130000, [macOS 13.0])
AC_ADD_DARWIN_VERS(DARWIN_14_00, 140000, [macOS 14.0])
AC_ADD_DARWIN_VERS(DARWIN_15_00, 150000, [macOS 15.0])
AC_DEFINE([XCODE_10_XX], 101400, [XCODE_VERS value for Xcode earlier than 10.15])
AC_DEFINE([XCODE_10_14_6], 101406, [XCODE_VERS value for Xcode 10.14.6])
AC_DEFINE([XCODE_10_15], 101500, [XCODE_VERS value for Xcode 10.15])
AC_DEFINE([XCODE_11_0], 110000, [XCODE_VERS value for Xcode 11.0])
AC_DEFINE([XCODE_12_0], 120000, [XCODE_VERS value for Xcode 12.0])
AC_DEFINE([XCODE_13_0], 130000, [XCODE_VERS value for Xcode 13.0])
AC_DEFINE([XCODE_14_0], 140000, [XCODE_VERS value for Xcode 14.0])
AC_DEFINE([XCODE_15_0], 150000, [XCODE_VERS value for Xcode 15.0])
# Substitute the Xcode include path detected earlier
AC_SUBST(XCODE_INC_DIR, [$xcodedir_inc])
AC_MSG_CHECKING([for the kernel version])
kernel=`uname -r`
# Nb: for Darwin we set DEFAULT_SUPP here. That's because Darwin
# has only one relevant version, the OS version. The `uname` check
# is a good way to get that version (i.e. "Darwin 9.6.0" is Mac OS
# X 10.5.6, and "Darwin 10.x" is Mac OS X 10.6.x Snow Leopard,
# and possibly "Darwin 11.x" is Mac OS X 10.7.x Lion),
# and we don't know of an macros similar to __GLIBC__ to get that info.
#
# XXX: `uname -r` won't do the right thing for cross-compiles, but
# that's not a problem yet.
#
# jseward 21 Sept 2011: I seriously doubt whether V 3.7.0 will work
# on OS X 10.5.x; I haven't tested yet, and only plan to test 3.7.0
# on 10.6.8 and 10.7.1. Although tempted to delete the configure
# time support for 10.5 (the 9.* pattern just below), I'll leave it
# in for now, just in case anybody wants to give it a try. But I'm
# assuming that 3.7.0 is a Snow Leopard and Lion-only release.
DARWIN_DRD_SUPP="darwin10-drd.supp"
case "${kernel}" in
9.*)
AC_MSG_RESULT([Darwin 9.x (${kernel}) / Mac OS X 10.5 Leopard])
DARWIN_VERS=$DARWIN_10_5
DEFAULT_SUPP="$srcdir/darwin9.supp ${DEFAULT_SUPP}"
DARWIN_DRD_SUPP="darwin9-drd.supp"
;;
10.*)
AC_MSG_RESULT([Darwin 10.x (${kernel}) / Mac OS X 10.6 Snow Leopard])
DARWIN_VERS=$DARWIN_10_6
DEFAULT_SUPP="$srcdir/darwin10.supp ${DEFAULT_SUPP}"
;;
11.*)
AC_MSG_RESULT([Darwin 11.x (${kernel}) / Mac OS X 10.7 Lion])
DARWIN_VERS=$DARWIN_10_7
DEFAULT_SUPP="$srcdir/darwin11.supp ${DEFAULT_SUPP}"
;;
12.*)
AC_MSG_RESULT([Darwin 12.x (${kernel}) / Mac OS X 10.8 Mountain Lion])
DARWIN_VERS=$DARWIN_10_8
DEFAULT_SUPP="$srcdir/darwin12.supp ${DEFAULT_SUPP}"
;;
13.*)
AC_MSG_RESULT([Darwin 13.x (${kernel}) / Mac OS X 10.9 Mavericks])
DARWIN_VERS=$DARWIN_10_9
DEFAULT_SUPP="$srcdir/darwin13.supp ${DEFAULT_SUPP}"
;;
14.*)
AC_MSG_RESULT([Darwin 14.x (${kernel}) / Mac OS X 10.10 Yosemite])
DARWIN_VERS=$DARWIN_10_10
DEFAULT_SUPP="$srcdir/darwin14.supp ${DEFAULT_SUPP}"
;;
15.*)
AC_MSG_RESULT([Darwin 15.x (${kernel}) / Mac OS X 10.11 El Capitan])
DARWIN_VERS=$DARWIN_10_11
DEFAULT_SUPP="$srcdir/darwin15.supp ${DEFAULT_SUPP}"
;;
16.*)
AC_MSG_RESULT([Darwin 16.x (${kernel}) / macOS 10.12 Sierra])
DARWIN_VERS=$DARWIN_10_12
DEFAULT_SUPP="$srcdir/darwin16.supp ${DEFAULT_SUPP}"
;;
17.*)
AC_MSG_RESULT([Darwin 17.x (${kernel}) / macOS 10.13 High Sierra])
DARWIN_VERS=$DARWIN_10_13
DEFAULT_SUPP="$srcdir/darwin17.supp ${DEFAULT_SUPP}"
;;
18.*)
AC_MSG_RESULT([Darwin 18.x (${kernel}) / macOS 10.14 Mojave])
DARWIN_VERS=$DARWIN_10_14
DEFAULT_SUPP="darwin18.supp ${DEFAULT_SUPP}"
;;
19.*)
AC_MSG_RESULT([Darwin 19.x (${kernel}) / macOS 10.15 Catalina])
DARWIN_VERS=$DARWIN_10_15
DEFAULT_SUPP="darwin19.supp ${DEFAULT_SUPP}"
;;
20.*)
AC_MSG_RESULT([Darwin 20.x (${kernel}) / macOS 11 Big Sur])
DARWIN_VERS=$DARWIN_11_00
DEFAULT_SUPP="darwin20.supp ${DEFAULT_SUPP}"
;;
21.*)
AC_MSG_RESULT([Darwin 21.x (${kernel}) / macOS 12 Monterey])
DARWIN_VERS=$DARWIN_12_00
DEFAULT_SUPP="darwin21.supp ${DEFAULT_SUPP}"
;;
22.*)
AC_MSG_RESULT([Darwin 22.x (${kernel}) / macOS 13 Ventura])
DARWIN_VERS=$DARWIN_13_00
DEFAULT_SUPP="darwin22.supp ${DEFAULT_SUPP}"
;;
23.*)
AC_MSG_RESULT([Darwin 23.x (${kernel}) / macOS 14 Sonoma])
DARWIN_VERS=$DARWIN_14_00
DEFAULT_SUPP="darwin23.supp ${DEFAULT_SUPP}"
;;
24.*)
AC_MSG_RESULT([Darwin 24.x (${kernel}) / macOS 15 Sequoia])
DARWIN_VERS=$DARWIN_15_00
DEFAULT_SUPP="darwin24.supp ${DEFAULT_SUPP}"
;;
*)
AC_MSG_RESULT([unsupported (${kernel})])
AC_MSG_ERROR([Valgrind works on Darwin 10.x-24.x (Mac OS X 10.6-10.11 and macOS 10.12-15.0)])
;;
esac
AC_DEFINE_UNQUOTED([DARWIN_VERS], $DARWIN_VERS, [Darwin / Mac OS X version])
AC_SUBST(DARWIN_VERS)
DEFAULT_SUPP="$srcdir/${DARWIN_DRD_SUPP} ${DEFAULT_SUPP}"
AC_MSG_CHECKING([for the the minimum macOS SDK version])
DARWIN_MIN_SDK="10.6"
if test $DARWIN_VERS -ge $DARWIN_11_00; then
DARWIN_MIN_SDK="10.8"
fi
AC_SUBST(DARWIN_MIN_SDK)
AC_DEFINE_UNQUOTED([DARWIN_MIN_SDK], $DARWIN_MIN_SDK, [Darwin / Mac OS X minimum SDK version])
AC_MSG_RESULT([${DARWIN_MIN_SDK}])
AC_MSG_CHECKING([for the Xcode SDK version])
xcodeversion="legacy"
if test "x$XCRUN" != "xno"; then
xcodeversion=`xcrun --sdk macosx --show-sdk-version`
fi
case "${xcodeversion}" in
10.14.6)
AC_DEFINE([XCODE_VERS], XCODE_10_14_6, [Xcode version])
;;
legacy|10.5*|10.6*|10.7*|10.8*|10.9*|10.10*|10.11*|10.12*|10.13*|10.14*)
AC_DEFINE([XCODE_VERS], XCODE_10_XX, [Xcode version])
;;
10.15*)
AC_DEFINE([XCODE_VERS], XCODE_10_15, [Xcode version])
;;
11.*)
AC_DEFINE([XCODE_VERS], XCODE_11_0, [Xcode version])
;;
12.*)
AC_DEFINE([XCODE_VERS], XCODE_12_0, [Xcode version])
;;
13.*)
AC_DEFINE([XCODE_VERS], XCODE_13_0, [Xcode version])
;;
14.*)
AC_DEFINE([XCODE_VERS], XCODE_14_0, [Xcode version])
;;
15.*)
AC_DEFINE([XCODE_VERS], XCODE_15_0, [Xcode version])
;;
*)
AC_MSG_RESULT([unsupported (${xcodeversion})])
AC_MSG_ERROR([Valgrind works on Darwin 10.x-24.x (Mac OS X 10.6-11 and macOS 10.12-15.0)])
;;
esac
AC_MSG_RESULT([${xcodeversion}])
;;
solaris2.11*)
AC_MSG_RESULT([ok (${host_os})])
VGCONF_OS="solaris"
uname_v=$( uname -v )
case "$uname_v" in
11.4.*)
DEFAULT_SUPP="$srcdir/solaris12.supp ${DEFAULT_SUPP}"
;;
*)
DEFAULT_SUPP="$srcdir/solaris11.supp ${DEFAULT_SUPP}"
;;
esac
;;
solaris2.12*)
AC_MSG_RESULT([ok (${host_os})])
VGCONF_OS="solaris"
DEFAULT_SUPP="$srcdir/solaris12.supp ${DEFAULT_SUPP}"
;;
*)
AC_MSG_RESULT([no (${host_os})])
AC_MSG_ERROR([Valgrind is operating system specific. Sorry.])
;;
esac
#----------------------------------------------------------------------------
# If we are building on a 64 bit platform test to see if the system
# supports building 32 bit programs and disable 32 bit support if it
# does not support building 32 bit programs
case "$ARCH_MAX-$VGCONF_OS" in
amd64-linux|ppc64be-linux|arm64-linux|amd64-solaris)
AC_MSG_CHECKING([for 32 bit build support])
safe_CFLAGS=$CFLAGS
CFLAGS="-m32"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[
return 0;
]])], [
AC_MSG_RESULT([yes])
], [
vg_cv_only64bit="yes"
AC_MSG_RESULT([no])
])
CFLAGS=$safe_CFLAGS;;
mips64-linux)
AC_MSG_CHECKING([for 32 bit build support])
safe_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -mips32 -mabi=32"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <sys/prctl.h>
]], [[]])], [
AC_MSG_RESULT([yes])
], [
vg_cv_only64bit="yes"
AC_MSG_RESULT([no])
])
CFLAGS=$safe_CFLAGS;;
x86-darwin|amd64-darwin)
AC_MSG_CHECKING([for 32 bit build support])
if test x$xcodeversion = x10.14.6 -o $XCODE_VERS -ge $XCODE_10_15 ; then
vg_cv_only64bit="yes"
AC_MSG_RESULT([no])
else
AC_MSG_RESULT([yes])
fi
esac
if test x$vg_cv_only64bit = xyes -a x$vg_cv_only32bit = xyes; then
AC_MSG_ERROR(
[--enable-only32bit was specified but system does not support 32 bit builds])
fi
#----------------------------------------------------------------------------
# VGCONF_ARCH_PRI is the arch for the primary build target, eg. "amd64". By
# default it's the same as ARCH_MAX. But if, say, we do a build on an amd64
# machine, but --enable-only32bit has been requested, then ARCH_MAX (see
# above) will be "amd64" since that reflects the most that this cpu can do,
# but VGCONF_ARCH_PRI will be downgraded to "x86", since that reflects the
# arch corresponding to the primary build (VGCONF_PLATFORM_PRI_CAPS). It is
# passed in to compilation of many C files via -VGA_$(VGCONF_ARCH_PRI) and
# -VGP_$(VGCONF_ARCH_PRI)_$(VGCONF_OS).
AC_SUBST(VGCONF_ARCH_PRI)
# VGCONF_ARCH_SEC is the arch for the secondary build target, eg. "x86".
# It is passed in to compilation of many C files via -VGA_$(VGCONF_ARCH_SEC)
# and -VGP_$(VGCONF_ARCH_SEC)_$(VGCONF_OS), if there is a secondary target.
# It is empty if there is no secondary target.
AC_SUBST(VGCONF_ARCH_SEC)
# VGCONF_PLATFORM_PRI_CAPS is the primary build target, eg. "AMD64_LINUX".
# The entire system, including regression and performance tests, will be
# built for this target. The "_CAPS" indicates that the name is in capital
# letters, and it also uses '_' rather than '-' as a separator, because it's
# used to create various Makefile variables, which are all in caps by
# convention and cannot contain '-' characters. This is in contrast to
# VGCONF_ARCH_PRI and VGCONF_OS which are not in caps.
AC_SUBST(VGCONF_PLATFORM_PRI_CAPS)
# VGCONF_PLATFORM_SEC_CAPS is the secondary build target, if there is one.
# Valgrind and tools will also be built for this target, but not the
# regression or performance tests.
#
# By default, the primary arch is the same as the "max" arch, as commented
# above (at the definition of ARCH_MAX). We may choose to downgrade it in
# the big case statement just below here, in the case where we're building
# on a 64 bit machine but have been requested only to do a 32 bit build.
AC_SUBST(VGCONF_PLATFORM_SEC_CAPS)
AC_MSG_CHECKING([for a supported CPU/OS combination])
# NB. The load address for a given platform may be specified in more
# than one place, in some cases, depending on whether we're doing a biarch,
# 32-bit only or 64-bit only build. eg see case for amd64-linux below.
# Be careful to give consistent values in all subcases. Also, all four
# valt_load_addres_{pri,sec}_{norml,inner} values must always be set,
# even if it is to "0xUNSET".
#
case "$ARCH_MAX-$VGCONF_OS" in
x86-linux)
VGCONF_ARCH_PRI="x86"
VGCONF_ARCH_SEC=""
VGCONF_PLATFORM_PRI_CAPS="X86_LINUX"
VGCONF_PLATFORM_SEC_CAPS=""
valt_load_address_pri_norml="0x58000000"
valt_load_address_pri_inner="0x38000000"
valt_load_address_sec_norml="0xUNSET"
valt_load_address_sec_inner="0xUNSET"
AC_MSG_RESULT([ok (${ARCH_MAX}-${VGCONF_OS})])
;;
amd64-linux)
valt_load_address_sec_norml="0xUNSET"
valt_load_address_sec_inner="0xUNSET"
if test x$vg_cv_only64bit = xyes; then
VGCONF_ARCH_PRI="amd64"
VGCONF_ARCH_SEC=""
VGCONF_PLATFORM_PRI_CAPS="AMD64_LINUX"
VGCONF_PLATFORM_SEC_CAPS=""
valt_load_address_pri_norml="0x58000000"
valt_load_address_pri_inner="0x38000000"
elif test x$vg_cv_only32bit = xyes; then
VGCONF_ARCH_PRI="x86"
VGCONF_ARCH_SEC=""
VGCONF_PLATFORM_PRI_CAPS="X86_LINUX"
VGCONF_PLATFORM_SEC_CAPS=""
valt_load_address_pri_norml="0x58000000"
valt_load_address_pri_inner="0x38000000"
else
VGCONF_ARCH_PRI="amd64"
VGCONF_ARCH_SEC="x86"
VGCONF_PLATFORM_PRI_CAPS="AMD64_LINUX"
VGCONF_PLATFORM_SEC_CAPS="X86_LINUX"
valt_load_address_pri_norml="0x58000000"
valt_load_address_pri_inner="0x38000000"
valt_load_address_sec_norml="0x58000000"
valt_load_address_sec_inner="0x38000000"
fi
AC_MSG_RESULT([ok (${ARCH_MAX}-${VGCONF_OS})])
;;
ppc32-linux)
VGCONF_ARCH_PRI="ppc32"
VGCONF_ARCH_SEC=""
VGCONF_PLATFORM_PRI_CAPS="PPC32_LINUX"
VGCONF_PLATFORM_SEC_CAPS=""
valt_load_address_pri_norml="0x58000000"
valt_load_address_pri_inner="0x38000000"
valt_load_address_sec_norml="0xUNSET"
valt_load_address_sec_inner="0xUNSET"
AC_MSG_RESULT([ok (${ARCH_MAX}-${VGCONF_OS})])
;;
ppc64be-linux)
valt_load_address_sec_norml="0xUNSET"
valt_load_address_sec_inner="0xUNSET"
if test x$vg_cv_only64bit = xyes; then
VGCONF_ARCH_PRI="ppc64be"
VGCONF_ARCH_SEC=""
VGCONF_PLATFORM_PRI_CAPS="PPC64BE_LINUX"
VGCONF_PLATFORM_SEC_CAPS=""
valt_load_address_pri_norml="0x58000000"
valt_load_address_pri_inner="0x38000000"
elif test x$vg_cv_only32bit = xyes; then
VGCONF_ARCH_PRI="ppc32"
VGCONF_ARCH_SEC=""
VGCONF_PLATFORM_PRI_CAPS="PPC32_LINUX"
VGCONF_PLATFORM_SEC_CAPS=""
valt_load_address_pri_norml="0x58000000"
valt_load_address_pri_inner="0x38000000"
else
VGCONF_ARCH_PRI="ppc64be"
VGCONF_ARCH_SEC="ppc32"
VGCONF_PLATFORM_PRI_CAPS="PPC64BE_LINUX"
VGCONF_PLATFORM_SEC_CAPS="PPC32_LINUX"
valt_load_address_pri_norml="0x58000000"
valt_load_address_pri_inner="0x38000000"
valt_load_address_sec_norml="0x58000000"
valt_load_address_sec_inner="0x38000000"
fi
AC_MSG_RESULT([ok (${ARCH_MAX}-${VGCONF_OS})])
;;
ppc64le-linux)
# Little Endian is only supported on PPC64
valt_load_address_sec_norml="0xUNSET"
valt_load_address_sec_inner="0xUNSET"
VGCONF_ARCH_PRI="ppc64le"
VGCONF_ARCH_SEC=""
VGCONF_PLATFORM_PRI_CAPS="PPC64LE_LINUX"
VGCONF_PLATFORM_SEC_CAPS=""
valt_load_address_pri_norml="0x58000000"
valt_load_address_pri_inner="0x38000000"
AC_MSG_RESULT([ok (${ARCH_MAX}-${VGCONF_OS})])
;;
x86-freebsd)
VGCONF_ARCH_PRI="x86"
VGCONF_ARCH_SEC=""
VGCONF_PLATFORM_PRI_CAPS="X86_FREEBSD"
VGCONF_PLATFORM_SEC_CAPS=""
valt_load_address_pri_norml="0x38000000"
valt_load_address_pri_inner="0x28000000"
valt_load_address_sec_norml="0xUNSET"
valt_load_address_sec_inner="0xUNSET"
AC_MSG_RESULT([ok (${ARCH_MAX}-${VGCONF_OS})])
;;
amd64-freebsd)
if test x$vg_cv_only64bit = xyes; then
VGCONF_ARCH_PRI="amd64"
VGCONF_ARCH_SEC=""
VGCONF_PLATFORM_PRI_CAPS="AMD64_FREEBSD"
VGCONF_PLATFORM_SEC_CAPS=""
elif test x$vg_cv_only32bit = xyes; then