-
Notifications
You must be signed in to change notification settings - Fork 5
/
configure.ac
1880 lines (1735 loc) · 65.2 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
# ----------------------------------------------------------------------
#
# Configure the coNCePTuaL compiler
#
# By Scott Pakin <[email protected]>
#
# ----------------------------------------------------------------------
#
#
# Copyright (C) 2003, Triad National Security, LLC
# All rights reserved.
#
# Copyright (2003). Triad National Security, LLC. This software
# was produced under U.S. Government contract 89233218CNA000001 for
# Los Alamos National Laboratory (LANL), which is operated by Los
# Alamos National Security, LLC (Triad) for the U.S. Department
# of Energy. The U.S. Government has rights to use, reproduce,
# and distribute this software. NEITHER THE GOVERNMENT NOR TRIAD
# MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LIABILITY
# FOR THE USE OF THIS SOFTWARE. If software is modified to produce
# derivative works, such modified software should be clearly marked,
# so as not to confuse it with the version available from LANL.
#
# Additionally, redistribution and use in source and binary forms,
# with or without modification, are permitted provided that the
# following conditions are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
#
# * Neither the name of Triad National Security, LLC, Los Alamos
# National Laboratory, the U.S. Government, nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY TRIAD AND CONTRIBUTORS "AS IS" AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL TRIAD OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
# OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
# OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#
# ----------------------------------------------------------------------
# Initialize Autoconf.
AC_INIT([coNCePTuaL], [1.5.1b], [[email protected]], [conceptual])
# The following files are deleted by "make distclean" but checked
# early in configure for their existence. Hence, we create them right
# away before we even know what they should contain.
touch substitutions.dat.in
touch ncptl.pc.in
# Finish initializing Autoconf.
AC_PREREQ([2.65])
AC_REVISION($Revision: 3.242 $)
AC_CONFIG_SRCDIR([yacc.py])
AC_COPYRIGHT([PUT_LICENSE_][TEXT_HERE])
AC_CONFIG_MACRO_DIR([m4])
AX_SAVE_WARNINGS
# Ensure that Libtool can find a make program. We've used an
# OpenSolaris system whose default path lacked make
# (/usr/ccs/bin/make) but included gmake.
AC_CHECK_PROGS([MAKE], [gmake make], [no])
if test "$MAKE" = no ; then
AC_MSG_ERROR([$PACKAGE_NAME can't build without a make program])
fi
# Initialize Automake.
dnl Later versions than Automake 1.6 are needed to pass "make distcheck".
AM_INIT_AUTOMAKE([1.6])
AM_CONFIG_HEADER(config.h)dnl Brackets screw up the "missing" script.
AM_MAINTAINER_MODE
dnl Automake 1.6 incorrectly generates *two* ncptl.h.ni targets if
dnl ncptl.h:ncptl.h.ni is listed in AM_CONFIG_HEADER and
dnl ncptl.h.ni:ncptl.h.in is listed in AC_CONFIG_FILES. The following
dnl line is a kludge to hide a call to AC_CONFIG_HEADERS from Automake so
dnl that it doesn't generate an extraneous ncptl.h.ni target.
m4_substr([XAC_CONFIG_HEADERS], 1)([ncptl.h:ncptl.h.ni])
# Facilitate cross-compiling to the same architecture/operating system.
AC_ARG_WITH([cross-compilation],
[AC_HELP_STRING([--with-cross-compilation],
[force cross-compilation])],
[cross_compiling=yes])
# Try to expand the CC filename.
AM_PROG_CC_STDC
if test ! -z "$CC" ; then
AC_PATH_PROG([full_CC], [$CC], [$CC])
AC_MSG_CHECKING([if we can expand \"$CC\"])
set dummy $CC
shift
shift
full_CC="$full_CC $*"
AC_MSG_RESULT([$full_CC])
fi
# Libtool's default ar program is "false", which produces puzzling
# "Error 1" messages when trying to build on a system lacking ar.
# We therefore preemptively check for ar with a default of "ar" so
# we can at least get a "command not found" error message.
AC_CHECK_TOOL([AR], [ar], [ar])
# Skip all of Libtool's checks for C++ and Fortran.
ac_cv_prog_ac_ct_CXX=no
ac_cv_cxx_compiler_gnu=no
ac_cv_prog_cxx_g=no
ac_cv_prog_ac_ct_F77=no
ac_cv_f77_compiler_gnu=no
ac_cv_prog_f77_g=no
am__fastdepCXX_FALSE='#'
if test "${with_tags+set}" != set; then
with_tags=
fi
# Initialize, generate, and sanity-check Libtool.
LT_INIT
while true ; do
# This is effectively a GOTO to a label right before the AC_OUTPUT stanza.
if test -z "$freshly_brewed_libtool" ; then
AM_CONDITIONAL([LOGEXTRACT_WORKS], [false])
AM_CONDITIONAL([HAVE_SWIG], [false])
AM_CONDITIONAL([JAR_SUPPORTS_E], [false])
AM_CONDITIONAL([HAVE_GPERF], [false])
AM_CONDITIONAL([HAVE_DOT], [false])
AM_CONDITIONAL([HAVE_ASY], [false])
AM_CONDITIONAL([HAVE_GIMP], [false])
AM_CONDITIONAL([HAVE_TEX], [false])
AM_CONDITIONAL([HAVE_MSGDIGEST], [false])
AM_CONDITIONAL([BUILD_RUN_TIME_LIBRARY], [false])
AM_CONDITIONAL([BUILD_PYMODULE], [false])
AM_PATH_PYTHON([2.2])
break
fi
AC_SUBST([LIBTOOL_DEPS])
if test `./libtool --features | grep -c 'enable shared'` -ge 1 ; then
ncptl_run_time_library_is_dynamic=yes
if test "$lt_cv_prog_cc_can_build_shared" = no ; then
AC_MSG_WARN([Libtool claims it can build shared libraries while the compiler and/or linker claims it can't; you may need to reconfigure with --disable-shared])
fi
else
ncptl_run_time_library_is_dynamic=no
fi
AC_SUBST([LIBTOOL_CURRENT], [8]) dnl Most recent library interface supported
AC_SUBST([LIBTOOL_REVISION], [0]) dnl Interface implementation number
AC_SUBST([LIBTOOL_AGE], [2]) dnl Number of older interfaces supported
# Specify the RPM release number.
AC_SUBST([RELEASE], [1])
# ----------------------------------------------------------------------
# ---------------- Define some configure-time options -----------------
# Some versions of the standard C header files require time.h to be included
# before sys/stat.h or sys/stat.h will fail to declare "struct itimerval".
ac_includes_default="#if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#else
# if HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
#endif
$ac_includes_default"
# Let the user force a line of code into the list of default includes
# and into an extra_config.h file which is included by config.h.
AC_ARG_WITH([header-code],
[AC_HELP_STRING([--with-header-code=STRING],
[force STRING into C header files])],
[ac_includes_default="$withval
$ac_includes_default"
AC_MSG_NOTICE([adding `$withval' to extra_config.h])])
cat > extra_config.h <<EXTRA_CONFIG
/* extra_config.h. Generated by configure. */
/* ----------------------------------------------------------------------
*
* coNCePTuaL supplemental configuration-specific header file
*
* ----------------------------------------------------------------------
*/
#ifndef _EXTRA_CONFIG_H_
#define _EXTRA_CONFIG_H_
AC_INCLUDES_DEFAULT
#endif
EXTRA_CONFIG
# Let the user prevent the use of arbitrary libraries.
AC_ARG_WITH([ignored-libs],
[AC_HELP_STRING([--with-ignored-libs=LIBRARIES],
[don't utilize any of the given libraries (space-separated) even if they're available])],
[ignored_libs="$ignored_libs $withval"])
# Let the user prevent the use of getopt_long.
AC_ARG_ENABLE([getopt-long],
[AC_HELP_STRING([--disable-getopt-long],
[don't parse the command line with getopt_long, even if it's available])],
[USE_GETOPT_LONG=no],
[USE_GETOPT_LONG=yes])
# Let the user inhibit building libncptlmodule.so.
AC_ARG_ENABLE([pymodule],
[AC_HELP_STRING([--disable-pymodule],
[don't build a Python interface to the coNCePTuaL run-time library, even if we can])],
[BUILD_PYMODULE=no],
[BUILD_PYMODULE=yes])
# Let the user prevent HPET from being used as the timer mechanism
# even if it's available.
AC_ARG_ENABLE([hpet],
[AC_HELP_STRING([--enable-hpet=DEVICE or
--disable-hpet],
[specify the High-Precision Event Timer (HPET) device to use or inhibit the use of HPET [/dev/hpet]])],
[hpet_device=$enableval],
[hpet_device=/dev/hpet])
if test "$hpet_device" != no ; then
AC_DEFINE_UNQUOTED([HPET_DEVICE],
["$hpet_device"],
[Define as a memory-mappable HPET device.])
fi
# Let the user force the use of gettimeofday() in ncptl_time().
AC_ARG_WITH([gettimeofday],
[AC_HELP_STRING([--with-gettimeofday],
[force the use of gettimeofday(), even if another microsecond timer is available])],
[FORCE_GETTIMEOFDAY=yes],
[FORCE_GETTIMEOFDAY=no])
if test "$FORCE_GETTIMEOFDAY" = yes ; then
AC_DEFINE([FORCE_GETTIMEOFDAY], ,
[Define if the microsecond timer should be forced to use gettimeofday().])
fi
# Let the user force the use of MPI_Wtime() in ncptl_time().
AC_ARG_WITH([mpi-wtime],
[AC_HELP_STRING([--with-mpi-wtime],
[force the use of MPI_Wtime(), even if another microsecond timer is available])],
[FORCE_MPI_WTIME=yes],
[FORCE_MPI_WTIME=no])
if test "$FORCE_MPI_WTIME" = yes ; then
AC_DEFINE([FORCE_MPI_WTIME], ,
[Define if the microsecond timer should be forced to use MPI_Wtime().])
fi
# The user can't force two different ncptl_time() timers at once.
if test "$FORCE_GETTIMEOFDAY" = yes -a "$FORCE_MPI_WTIME" = yes ; then
AC_MSG_ERROR([the --with-gettimeofday and --with-mpi-wtime options are mutually exclusive])
fi
# Let the user disable the use of all functions that invoke fork(),
# including, for example, popen() and system(). This is important for
# early InfiniBand software stacks that randomly corrupt memory when a
# process spawns a child.
AC_ARG_WITH([fork],
[AC_HELP_STRING([--without-fork],
[disable the use of fork(), popen(), system(), and any other process-spawning function])],
[ac_cv_func_fork_works=no
ac_cv_func_vfork_works=no])
# Let the user specify the name of the MPI C compiler and library.
AC_ARG_VAR([MPICC],
[C compiler to use for MPI programs])
AC_ARG_VAR([MPICPPFLAGS],
[extra C preprocessor flags (e.g., "-I<include dir>") to use when compiling MPI programs])
AC_ARG_VAR([MPICFLAGS],
[C flags (e.g., "-g -O2") to use when compiling MPI programs])
AC_ARG_VAR([MPILDFLAGS],
[extra linker flags to use when linking MPI programs])
AC_ARG_VAR([MPILIBS],
[extra linker arguments to use when linking MPI programs])
# Let the user override the datatype and constant suffix used for ncptl_int.
AC_ARG_WITH([datatype],
[AC_HELP_STRING([--with-datatype=INTTYPE],
[designate an integer datatype to use for most variables in a coNCePTuaL program [int64_t]])],
[NCPTL_INT=$withval],
[NCPTL_INT=int64_t])
AC_SUBST([NCPTL_INT])
AC_ARG_WITH([const-suffix],
[AC_HELP_STRING([--with-const-suffix=STRING],
[designate a suffix to attach to constants of type ncptl_int [LL]])],
[NCPTL_INT_SUFFIX=$withval],
[NCPTL_INT_SUFFIX=LL])
AC_DEFINE_UNQUOTED([NCPTL_INT_SUFFIX],
[$NCPTL_INT_SUFFIX],
[Define as a suffix to attach to constants of type ncptl_int.])
# Let the user override the printf() conversion specifier used for ncptl_int.
AC_ARG_WITH([printf-format],
[AC_HELP_STRING([--with-printf-format=STRING],
[specify a printf() conversion specifier (e.g., "ld" or "lld") to use for outputting a coNCePTuaL integer [PRId64]])],
[NICS=$withval],
[NICS=PRId64])
AC_SUBST([NICS])
# Let the user specify a particular datatype alignment.
AC_ARG_WITH([alignment],
[AC_HELP_STRING([--with-alignment=INTEGER],
[specify the byte alignment for data [auto]])],
[data_alignment=$withval])
# Let the user specify a particular OS page size.
AC_ARG_WITH([page-size],
[AC_HELP_STRING([--with-page-size=INTEGER],
[specify the operating system's page size in bytes [auto]])],
[AC_DEFINE_UNQUOTED([OS_PAGE_SIZE],
[$withval],
[Define as the operating system's page size in bytes (only if it can't be determined automatically).])])
# Provide a mechanism for the user to force all AM_CONDITIONALS to be true.
maybe_break=break
AC_ARG_ENABLE([broken-components],
[AC_HELP_STRING([--enable-broken-components],
[force "make" to attempt to build everything, even things expected to fail])],
[broken_components=yes
maybe_break='echo "$as_me: forging ahead because --enable-broken-components was specified" >&2'],
[broken_components=no])
if test "$maybe_break" = break ; then
AC_CACHE_CHECK([if "eval break" successfully breaks out of a loop],
[ax_cv_prog_eval_break_works],
[for ax_cv_prog_eval_break_works in yes no ; do
eval break 2>&AS_MESSAGE_LOG_FD
done])
if test "$ax_cv_prog_eval_break_works" = no ; then
maybe_break="ncptl_build_run_time_library=no_but_we_cant_break"
fi
fi
# Let the user determine if log files should contain information
# from /proc/interrupts.
read_proc_interrupts=yes
if test "$cross_compiling" = no -a ! -f /proc/interrupts ; then
# If we're not cross compiling and the build system lacks
# /proc/interrupts, assume the target system lacks /proc/interrupts
# as well.
read_proc_interrupts=no
fi
AC_ARG_ENABLE([proc-interrupts],
[AC_HELP_STRING([--enable-proc-interrupts or
--disable-proc-interrupts],
[force or inhibit coNCePTuaL programs from attempting to open /proc/interrupts during initialization [guessed]])],
[read_proc_interrupts=$enableval])
if test $read_proc_interrupts = yes ; then
AC_DEFINE([USE_PROC_INTERRUPTS], ,
[Define if it\'s okay for all processes to attempt to read /proc/interrupts during initialization.])
AC_MSG_NOTICE([including support for reading /proc/interrupts at initialization time])
else
AC_MSG_NOTICE([omitting support for /proc/interrupts])
fi
# Remind the user that he can override LIBS.
AC_ARG_VAR([LIBS], [extra libraries to link with])
# Flush the configure cache to disk.
AC_CACHE_SAVE
# ----------------------------------------------------------------------
# ------ Find various programs we need or can take advantage of. -------
# Find a Python interpreter.
AC_ARG_VAR([PYTHON], [name of the Python executable])
AM_PATH_PYTHON([2.2])
if test -z "$PYTHON" ; then
AC_MSG_ERROR([The coNCePTuaL compiler requires Python])
fi
if test "`echo ${PYTHON_VERSION} | sed 's/\..*//'`" -gt 2 ; then
AC_MSG_ERROR([The coNCePTuaL compiler does not work with Python 3+])
fi
# Find a Perl interpreter that can handle the ncptl-logextract script.
AC_ARG_VAR([PERL], [name of the Perl executable])
AC_PATH_PROG([PERL], [perl], [no])
if test "$PERL" = no ; then
ax_cv_prog_perl_logextract=no
AC_MSG_WARN([The ncptl-logextract script requires Perl])
else
AC_CACHE_CHECK([if $PERL can run ncptl-logextract],
[ax_cv_prog_perl_logextract],
[
$PERL $srcdir/ncptl-logextract.in --options-tree > /dev/null 2>&1
if test $? = 0 ; then
ax_cv_prog_perl_logextract=yes
else
_AS_ECHO([$as_me: Perl error message follows:], [AS_MESSAGE_LOG_FD])
$PERL $srcdir/ncptl-logextract.in --options-tree 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
ax_cv_prog_perl_logextract=no
fi
])
if test "$ax_cv_prog_perl_logextract" = no ; then
AC_MSG_WARN([You will not be able to run ncptl-logextract on this system])
fi
fi
AM_CONDITIONAL([LOGEXTRACT_WORKS], [test "$ax_cv_prog_perl_logextract" = yes])
LOGEXTRACT_KEYWORDS=logextract_keywords
AC_SUBST_FILE([LOGEXTRACT_KEYWORDS])
# Determine how to get a list of dynamically loaded libraries.
dynlib_cmd_fmt=no
dynlib_ext=no
AC_PATH_PROG([LDD], [ldd], [no])
if test "$ac_cv_path_LDD" != no ; then
dynlib_cmd_fmt="$ac_cv_path_LDD %s 2>/dev/null"
dynlib_ext=".so"
else
AC_PATH_PROG([OTOOL], [otool], [no])
if test "$ac_cv_path_OTOOL" != no ; then
dynlib_cmd_fmt="$ac_cv_path_OTOOL -L %s 2>/dev/null"
dynlib_ext=".dylib"
fi
fi
if test "$dynlib_cmd_fmt" != no -a "$dl_string" != no ; then
AC_DEFINE_UNQUOTED([DYNLIB_CMD_FMT],
["$dynlib_cmd_fmt"],
[Define as a template for a Bourne-shell command that gets a list of shared objects.])
AC_DEFINE_UNQUOTED([DYNLIB_EXT],
["$dynlib_ext"],
[Define as the file extension (including the leading ".") of a dynamic library])
fi
# Abort if we don't have AWK (as is the case for default installation
# of the Syllable OS, at least version 0.6.4).
AC_PROG_AWK
if test "$AWK" = "" ; then
AC_MSG_ERROR([$PACKAGE_NAME can't build without an AWK interpreter])
fi
# See if we have a working SWIG and, if not, if the supplied
# libncptl_wrap.c.in is compatible with our version of Python.
AC_PATH_PROG([SWIG], [swig], [no])
if test "$SWIG" != no ; then
AC_CACHE_CHECK([if swig works],
[ax_cv_prog_swig_works],
[ax_cv_prog_swig_works=no
echo "int dummyvar = 123;" > conftest.i
$SWIG -python -module conftest conftest.i > /dev/null 2>&1
if test $? = 0 ; then
ax_cv_prog_swig_works=yes
fi
rm -f conftest*])
if test "$ax_cv_prog_swig_works" = yes ; then
AC_DEFINE([SWIG_WORKS], ,
[Define if `swig' is usable.])
fi
fi
AM_CONDITIONAL([HAVE_SWIG], [test "$ax_cv_prog_swig_works" = yes])
if test "$SWIG" = no -o "$ax_cv_prog_swig_works" = no ; then
AC_CACHE_CHECK([the version of SWIG which produced libncptl_wrap.c.in],
[ax_cv_prog_swig_version],
[ax_cv_prog_swig_version=`cat $srcdir/libncptl_wrap.c.in | $AWK '/Version/ {print $3}'`])
if $AWK 'END {if (0+SWIGVER>1.1 && 0+PYVER<2.0) exit 0; exit 1}' SWIGVER=$ax_cv_prog_swig_version PYVER=$PYTHON_VERSION /dev/null ; then
AC_MSG_WARN([SWIG v$ax_cv_prog_swig_version is unlikely to work with Python v$PYTHON_VERSION; you may need to reconfigure with --disable-pymodule])
fi
else
AC_CACHE_CHECK([swig version],
[ax_cv_prog_swig_version],
[ax_cv_prog_swig_version=`$SWIG -version 2>&1 | $AWK '/Version/ {print [$]3}'`])
fi
SWIGVERSION=$ax_cv_prog_swig_version
AC_SUBST([SWIGVERSION])
SWIGFLAGS=`$AWK 'END {if (0+SWIGVER>=1.3) print "-addextern"; else print "-dnone"}' SWIGVER=$SWIGVERSION /dev/null`
AC_SUBST([SWIGFLAGS])
# See if the compiler used to build Python extensions is compatible
# with the compiler used to build C libraries.
PYTHON_MAKEFILE=`_AC_EVAL_STDERR(["$PYTHON -c 'from distutils.sysconfig import *; print get_makefile_filename()'"])`
if test "$ac_status" -eq 0 -a "$PYTHON_MAKEFILE" -a -f "$PYTHON_MAKEFILE" ; then
AX_PYTHON_C_COMPATIBILITY(,
[BUILD_PYMODULE=no_not_compatible
PYTHON_CC=`$PYTHON -c 'from distutils.sysconfig import *; print get_config_var("CC")'`])
else
BUILD_PYMODULE=no_no_makefile
PYTHON_MAKEFILE=${PYTHON_MAKEFILE:-config/Makefile}
fi
# See if jar exists and supports the -e option.
AC_CHECK_PROGS([JAR], [jar], [no])
if test "$ac_cv_prog_JAR" = no ; then
JAR=jar
else
AC_CACHE_CHECK([if $JAR supports -e],
[ax_cv_prog_jar_e],
[touch conftest.dat
if $JAR cfe conftest.jar gov.lanl.c3.conftest conftest.dat > /dev/null 2>&1 ; then
ax_cv_prog_jar_e=yes
else
ax_cv_prog_jar_e=no
fi])
fi
AM_CONDITIONAL([JAR_SUPPORTS_E], [test "$ax_cv_prog_jar_e" = yes])
# Find some other useful tools.
AC_PROG_CPP
AC_PROG_LN_S
AC_PATH_PROG([JYTHONC], [jythonc], [jythonc])
AC_CHECK_PROGS([JAVAC], [javac jikes guavac], [javac])
AM_PATH_LISPDIR
AC_PATH_PROG([GPERF], [gperf], [no])
if test "$ac_cv_path_GPERF" != no ; then
AC_CACHE_CHECK([if gperf is sufficiently recent],
[ax_cv_prog_gperf_recent],
[if test `echo Testing | \
$ac_cv_path_GPERF --key-positions="*" --includes --language=ANSI-C \
--initializer-suffix=", 0" --lookup-fn-name=ncptl_sig2num --enum 2>&1 |
grep -c -i unrecognized` -eq 0 ; then
ax_cv_prog_gperf_recent=yes
else
ax_cv_prog_gperf_recent=no
fi])
fi
AM_CONDITIONAL([HAVE_GPERF],
[test "$ac_cv_path_GPERF" != no -a "$ax_cv_prog_gperf_recent" = yes])
AC_PATH_PROG([GS], [gs], [gs])
AC_PATH_PROG([DOT], [dot], [no])
AM_CONDITIONAL([HAVE_DOT], [test "$ac_cv_path_DOT" != no])
if test "$ac_cv_path_DOT" = no ; then
DOT=dot
fi
AC_PATH_PROG([ASY], [asy], [no])
AM_CONDITIONAL([HAVE_ASY], [test "$ac_cv_path_ASY" != no])
if test "$ac_cv_path_ASY" = no ; then
ASY=asy
fi
AC_PATH_PROG([GIMP], [gimp], [no])
AM_CONDITIONAL([HAVE_GIMP], [test "$ac_cv_path_GIMP" != no])
if test "$ac_cv_path_GIMP" = no ; then
GIMP=gimp
fi
AC_PATH_PROG([HTMLTIDY], [tidy], [echo])
if test "$ac_cv_path_HTMLTIDY" != echo ; then
HTMLTIDY="${HTMLTIDY} -asxml -modify"
fi
AC_CHECK_PROGS([TEX], [etex tex], [no])
AM_CONDITIONAL([HAVE_TEX], [test "$TEX" != no])
if test "$TEX" = no ; then
TEX=tex
LATEX=latex
PDFTEX=pdftex
else
AC_CHECK_PROGS([LATEX], [elatex latex], [no])
AC_CHECK_PROGS([PDFTEX], [pdfetex pdftex], [pdftex])
fi
AC_CHECK_PROGS([INDENT], [indent], [no])
AC_CHECK_PROGS([MSGDIGEST], [sha512sum sha1sum md5sum], [no])
AM_CONDITIONAL([HAVE_MSGDIGEST], [test "$MSGDIGEST" != no])
AC_CHECK_PROGS([MAKEPACKAGE], [makepackage makeinstaller], [makepackage])
AC_CHECK_PROGS([PKGCONFIG], [pkg-config], [:])
if test "$ncptl_run_time_library_is_dynamic" = yes -a \
"$ac_cv_path_LDD" != no ; then
AC_CACHE_CHECK([for the name of the dynamic linker],
[ax_cv_prog_ld_so],
[ax_cv_prog_ld_so=`$ac_cv_path_LDD /bin/sh 2>&1 | $AWK '/ld.*\.so/ {print $1}; END {print "/lib/ld.so"}' | head -1`])
fi
AC_DEFINE_UNQUOTED([DYNAMIC_LINKER],
["$ax_cv_prog_ld_so"],
[Define as the name of the dynamic linker.])
# Define the complete backend list for use with --enable-broken-components.
ALL_BACKENDS="codegen_c_mpi.py codegen_c_generic.py codegen_c_udgram.py \
codegen_c_trace.py codegen_c_seq.py codegen_dot_ast.py \
codegen_interpret.py codegen_picl.py codegen_latex_vis.py \
codegen_c_profile.py codegen_c_stats.py codegen_libsea_ast.py \
codegen_paraver.py"
# Assume we can build only the parse-tree backends.
BACKENDS="codegen_dot_ast.py codegen_libsea_ast.py"
# Flush the configure cache to disk.
AC_CACHE_SAVE
# ----------------------------------------------------------------------
# -------------- See if we can build the run-time library --------------
ncptl_build_run_time_library=no
while true ; do
# Determine if AM_PROG_CC_STDC was able to provide us with an ANSI
# C compiler, ANSI C header files, and an ANSI C preprocessor.
AC_CACHE_CHECK([if $CC supports some basic ANSI C features],
[ax_cv_prog_cc_ansic],
[AC_TRY_COMPILE([
/* The following file is required by ANSI C but absent from pre-ANSI C. */
#include <stdarg.h>
/* Pre-ANSI C should choke on the following. */
void *kill_pre_ansi_c (const char *somestring, const int somenumber)
{
return (void *)(somestring+somenumber);
}
],
[
/* Pre-ANSI C lacked volatile and the preprocessor lacked string
* concatenation. */
volatile void *try_to_kill = kill_pre_ansi_c ("Die, old" " C compilers!", 123);
],
[ax_cv_prog_cc_ansic=yes],
[ax_cv_prog_cc_ansic=no])])
if test "$ax_cv_prog_cc_ansic" != yes ; then
AC_MSG_WARN([AC_PACKAGE_NAME's run-time library requires ANSI C])
eval $maybe_break
fi
AC_C_CONST
AC_C_INLINE
# Ensure that libtool isn't completely broken.
AX_PROG_LIBTOOL_WORKS(, [eval $maybe_break])
# Find a library (and headers) for parsing the command line.
USE_POPT=no
# Step 1: Check for popt.
AC_CHECK_HEADER([popt.h])
if test "$ac_cv_header_popt_h" = yes ; then
AX_CHECK_LIB([popt], [poptGetContext])
if test "$ac_cv_lib_popt_poptGetContext" = yes ; then
USE_POPT=yes
AC_DEFINE([USE_POPT], ,
[Define if popt should be used to parse the command line.])
fi
fi
if test "$USE_POPT" = no ; then
# Step 2: Check for getopt_long.
AC_CHECK_HEADERS([gnugetopt.h getopt.h])
if test "$USE_GETOPT_LONG" = yes ; then
USE_GETOPT_LONG=no
if test "$ac_cv_header_getopt_h" = yes -o \
"$ac_cv_header_gnugetopt_h" = yes ; then
AX_CHECK_LIB([gnugetopt], [getopt_long])
AC_CHECK_FUNCS([getopt_long])
if test "$ac_cv_func_getopt_long" = yes ; then
USE_GETOPT_LONG=yes
AC_DEFINE([USE_GETOPT_LONG], ,
[Define if getopt_long should be used to parse the command line.])
fi
fi
fi
if test "$USE_GETOPT_LONG" = no ; then
# Step 3: Check for getopt.
AC_CHECK_FUNCS([getopt])
if test "$ac_cv_func_getopt" = no ; then
eval $maybe_break
fi
fi
fi
# Look for a way to read the program's original command line (as
# argv[] may be modified by, say, MPI_Init()).
AX_FILE_PROC_CMDLINE
# Check for libraries, functions, and headers that we need/want.
AC_FUNC_FORK
for ax_func in log10 floor ceil sqrt trunc ; do
AX_CHECK_REQUIRES_LIBM([$ax_func],
[volatile double have_$ax_func = $ax_func(1.0);])
done
for ax_func in pow fmod ; do
AX_CHECK_REQUIRES_LIBM($ax_func,
[volatile double have_$ax_func = $ax_func(1.0, 2.0);])
done
AC_CHECK_FUNCS([setitimer], ,
[AC_MSG_WARN([Using the FOR <time> construct will result in a run-time error])])
AC_CHECK_FUNCS([getrusage], ,
[AC_MSG_WARN([Log files will not report process resource utilization])])
AX_SEARCH_LIBS([nanosleep], [rt],
[AC_CHECK_FUNCS([nanosleep])],
[AC_MSG_WARN([The SLEEPS FOR construct will produce a run-time error])])
AC_CHECK_FUNCS([getpwuid strcasestr])
AC_CHECK_TYPES([ssize_t])
AX_REQUIRE_ONE_FUNC([vfprintf], , [eval $maybe_break])
AX_REQUIRE_ONE_FUNC([vsnprintf], , [eval $maybe_break])
AC_CHECK_FUNCS([getpagesize sysconf])
AX_REQUIRE_ONE_FUNC([time], , [eval $maybe_break])
AX_REQUIRE_ONE_FUNC([sigaction signal], , [eval $maybe_break])
AX_REQUIRE_ONE_FUNC([strtok], , [eval $maybe_break])
AC_TYPE_SIGNAL
RETSIGVALUE=
if test "$ac_cv_type_signal" != void ; then
RETSIGVALUE="(RETSIGTYPE) 0"
fi
AC_DEFINE_UNQUOTED([RETSIGVALUE], [$RETSIGVALUE],
[Define as a value that a signal handler should return.])
AC_CHECK_HEADERS([unistd.h time.h sys/time.h signal.h errno.h sys/mman.h])
if test "$ac_cv_header_signal_h" = no -o \
"$ac_cv_errno_h" = no ; then
eval $maybe_break
fi
AC_CHECK_HEADERS([sys/utsname.h sys/resource.h sys/select.h ieeefp.h])
AC_HEADER_TIME
AC_CHECK_FUNCS([strerror uname llabs cbrt strsignal])
if test "$ac_cv_func_strerror" = yes ; then
AC_CHECK_DECLS([strsignal], , ,
[
#if defined(__GNUC__) && !defined(_GNU_SOURCE)
# define _GNU_SOURCE
#endif
#ifdef HAVE_STRING_H
# include <string.h>
#endif
])
fi
AC_CHECK_DECLS([sys_errlist])
AC_TYPE_UID_T
# The installation of OpenBSD 3.5 I tested lacks a trunc() function,
# as does Microsoft Windows.
AX_REQUIRE_ONE_FUNC([trunc floor fmod], , [eval $maybe_break])
AC_CHECK_FUNCS([popen])
AC_CHECK_HEADERS([sys/wait.h])
AC_CHECK_HEADERS([sys/sysmp.h])
AC_CHECK_FUNCS([sysmp])
AX_FUNC_VA_COPY
AC_CHECK_HEADERS([uuid/uuid.h],
[AX_CHECK_LIB([uuid], [uuid_unparse])])
AC_CHECK_HEADERS([glob.h],
[AC_CHECK_FUNCS([glob])])
# The Cell BE's SPUs lack a getcwd() function.
AC_CHECK_FUNCS([getcwd])
AC_CHECK_FUNCS([sched_getaffinity])
if test "$ac_cv_func_sched_getaffinity" = yes ; then
AC_CHECK_HEADERS([sched.h])
fi
# Flush the configure cache to disk.
AC_CACHE_SAVE
# Check for some relatively obscure features.
AC_MSG_NOTICE([checking for various network- and machine-specific features])
# Check for QsNet features.
AC_CHECK_HEADER([rms/rmscall.h],
[AX_CHECK_LIB([rmscall], [rms_getcap],
[# Preclude ancient distributions of Quadrics's software.
AC_CHECK_MEMBERS([ELAN_CAPABILITY.cap_version],
[LIBS="-lrmscall -lelan $LIBS"
AC_DEFINE([HAVE_LIBELAN], ,
[Define if QsNet Elan information is available.])],
,
[#include <rms/rmscall.h>])])])
# Check for BlueGene/P features.
AC_CHECK_HEADERS([common/bgp_personality.h],
[AX_CHECK_LIB([SPI.cna], [Kernel_GetPersonality],
[LIBS="-lSPI.cna $LIBS"
AC_DEFINE([HAVE_BGPPERSONALITY], ,
[Define if BlueGene/P personality information is available.])])])
# Check for BlueGene/L features.
AC_CHECK_HEADER([bglpersonality.h],
[AX_CHECK_LIB([rts.rts], [rts_get_personality],
[LIBS="-lrts.rts -ldevices.rts $LIBS"
AC_DEFINE([HAVE_BGLPERSONALITY], ,
[Define if BlueGene/L personality information is available.])],
,
[-ldevices.rts])])
# Check for Cray features.
AC_CACHE_CHECK([if _my_pnid is defined],
[ax_cv_var__my_pnid],
[AC_TRY_LINK(,
[extern unsigned int _my_pnid; _my_pnid=0;],
[ax_cv_var__my_pnid=yes],
[ax_cv_var__my_pnid=no])])
if test "$ax_cv_var__my_pnid" = yes ; then
AC_DEFINE([HAVE__MY_PNID], ,
[Define if the Cray node ID is available in _my_pnid.])
fi
cray_xt_nid_file=/proc/cray_xt/nid
AC_CACHE_CHECK([if _my_pnid is definable from a file],
[ax_cv_file_cray_xt_nid],
[if test -e $cray_xt_nid_file ; then
ax_cv_file_cray_xt_nid=yes
else
ax_cv_file_cray_xt_nid=no
fi])
if test "$ax_cv_file_cray_xt_nid" = yes ; then
AC_DEFINE_UNQUOTED([CRAY_XT_NID_FILE],
["$cray_xt_nid_file"],
[Define as a special file containing a Cray node ID.])
fi
if test "$ax_cv_var__my_pnid" = yes -o "$ax_cv_file_cray_xt_nid" = yes ; then
AC_CHECK_HEADERS([rsms/rs_id.h],
[AX_SEARCH_LIBS([rs_format_phys],
[rsmsevent],
[AC_DEFINE([HAVE_RSMSEVENT], ,
[Define if Cray event data is available.])])])
AC_CHECK_HEADERS([rca_lib.h rsms/rs_meshcoord.h])
if test "$ac_cv_header_rca_lib_h" = yes -a "$ac_cv_header_rsms_rs_meshcoord_h" = yes ; then
AX_SEARCH_LIBS([rca_get_meshcoord],
[rca],
[AC_DEFINE([HAVE_RCAMESHCOORD], ,
[Define if Cray mesh coordinates are available.])])
fi
if test "$ac_cv_header_rca_lib_h" = yes ; then
AX_SEARCH_LIBS([rca_get_meshtopology],
[rca],
[AX_SEARCH_LIBS([rs_phys2str],
[rsmsevent],
[AC_DEFINE([HAVE_RCAMESHTOPOLOGY], ,
[Define if the Cray mesh topology is available.])])])
fi
AC_CACHE_CHECK([if __cpu_mhz is defined],
[ax_cv_var___cpu_mhz],
[AC_TRY_LINK(,
[extern unsigned int __cpu_mhz; __cpu_mhz=0;],
[ax_cv_var___cpu_mhz=yes],
[ax_cv_var___cpu_mhz=no])])
if test "$ax_cv_var___cpu_mhz" = yes ; then
AC_DEFINE([HAVE___CPU_MHZ], ,
[Define if the Cray clock frequency is available in __cpu_mhz.])
fi
cray_xc_cname_file=/proc/cray_xt/cname
AC_CACHE_CHECK([if node coordinates appear in a file],
[ax_cv_file_cray_xc_cname],
[if test -e $cray_xc_cname_file ; then
ax_cv_file_cray_xc_cname=yes
else
ax_cv_file_cray_xc_cname=no
fi])
if test "$ax_cv_file_cray_xc_cname" = yes ; then
AC_DEFINE_UNQUOTED([CRAY_XC_CNAME_FILE],
["$cray_xc_cname_file"],
[Define as a special file containing a Cray node location.])
fi
fi
# Check for SGI features.
AC_CHECK_HEADERS([sys/syssgi.h invent.h])
AC_CHECK_FUNCS([syssgi getinvent])
# Check for AIX features.
AC_CHECK_HEADERS([odmi.h cf.h sys/cfgodm.h])
AC_CHECK_MEMBER([struct CuAt.name],
[AC_DEFINE([HAVE_STRUCT_CUAT], ,
[Define if you have the `CuAt' struct.])
AX_CHECK_LIB([odm], [odm_initialize])
AX_CHECK_LIB([cfg], [getattr])],
,
[
#ifdef HAVE_ODMI_H
# include <odmi.h>
#endif
#ifdef HAVE_CF_H
# include <cf.h>
#endif
#ifdef HAVE_SYS_CFGODM_H
# include <sys/cfgodm.h>
#endif
])
# Check for OpenIB InfiniBand headers and libraries.
AC_CHECK_HEADERS([infiniband/verbs.h],
[AX_CHECK_LIB([sysfs], [sysfs_open_class])
AX_CHECK_LIB([ibverbs], [ibv_query_device])
AX_REQUIRE_ONE_FUNC([ibv_get_device_list ibv_get_devices],
[AC_DEFINE([HAVE_OPENIB], ,
[Define if OpenIB headers and library files are available.])])])
# The C compiler on ASCI Red claims to support ANSI C but lacks a
# number of symbols and functions which coNCePTuaL expects to find.
AX_CHECK_SYMBOLS([optopt getppid], [int], [
#if defined(HAVE_GETOPT_H)
# include <getopt.h>
#endif])
AX_CHECK_SYMBOLS([environ], [char **])
AC_CHECK_FUNCS([realpath])
AX_REQUIRE_ONE_FUNC([vsnprintf vsprintf], , [eval $maybe_break])
# Check for the PCI Utilities interface to the PCI bus.
AC_CHECK_HEADERS([pci/pci.h],
[AX_SEARCH_LIBS([pci_scan_bus],
[pci pciutils],
[AC_DEFINE([HAVE_PCIUTILS],
,
[Define if you have the PCI Utilities library (-lpci or -lpciutils)])])])
# Check for the Hardware Abstraction Layer interface to hardware
# characteristics.
prev_CPPFLAGS="$CPPFLAGS"
prev_CFLAGS="$CFLAGS"
prev_LDFLAGS="$LDFLAGS"
prev_LIBS="$LIBS"
CPPFLAGS="$CPPFLAGS `$PKGCONFIG --silence-errors --cflags-only-I hal`"
CFLAGS="`$PKGCONFIG --silence-errors --cflags-only-other hal` $CFLAGS"
LDFLAGS="$LDFLAGS `$PKGCONFIG --silence-errors --libs-only-L hal`"
LDFLAGS="$LDFLAGS `$PKGCONFIG --silence-errors --libs-only-other hal`"
LIBS="$LIBS `$PKGCONFIG --silence-errors --libs-only-l hal`"
AC_CHECK_HEADERS([libhal.h],
[AX_CHECK_LIB([hal], [libhal_ctx_init],
[AC_DEFINE([HAVE_HAL], ,
[Define if the Hardware Abstraction Layer headers and libraries are available.])])])
if test "$ac_cv_lib_hal_libhal_ctx_init" != yes ; then
LIBS="$prev_LIBS"
LDFLAGS="$prev_LDFLAGS"
CFLAGS="$prev_CFLAGS"
CPPFLAGS="$prev_CPPFLAGS"
fi
# Check if we can explicitly stick a symbol into an ELF object's .interp
# section. Note that we pass the symbol and function declarations in
# AC_TRY_LINK's INCLUDE argument, not its BODY argument, because section
# attributes aren't allowed within function bodies.
if test "$enable_shared" = yes ; then
AC_CACHE_CHECK([if we can store symbols in .interp],
[ax_cv_prog_ld_interp],
[prev_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -Wl,-e,lib_entry_point"
AC_TRY_LINK([
char ldso[] __attribute__((section(".interp"))) = "/lib/ld.so";
void lib_entry_point (void)
{
exit (0);
}
],
,
[ax_cv_prog_ld_interp=yes],
[ax_cv_prog_ld_interp=no])
LDFLAGS="$prev_LDFLAGS"])
if test "$ax_cv_prog_ld_interp" = yes ; then
AC_DEFINE([CAN_WRITE_INTERP], ,
[Define if the compiler and linker can write explicitly into the target binary's .interp section.])
AC_SUBST([LIBRARY_ENTRY_POINT], [-Wl,-e,ncptl_log_output_dataless_log])
fi
fi
# Flush the configure cache to disk.
AC_CACHE_SAVE
# Find unsigned {8,16,32,64}-bit datatypes, a signed 64-bit datatype,
# and an unsigned integer type with the same size as a pointer.
AC_MSG_NOTICE([checking for definitions of various integer datatypes])
AC_CHECK_HEADERS([inttypes.h stdint.h sys/types.h])
AC_DEFINE_INTEGER_BITS([uint8_t],
[u_int8_t], [unsigned char], [unsigned __int8])
if test "$uint8_t" = no ; then
eval $maybe_break
fi
AC_DEFINE_INTEGER_BITS([uint16_t],
[u_int16_t], [unsigned short], [unsigned __int16])
if test "$uint16_t" = no ; then
eval $maybe_break
fi
AC_DEFINE_INTEGER_BITS([uint32_t],
[u_int32_t], [unsigned int], [unsigned __int32])
if test "$uint32_t" = no ; then
eval $maybe_break
fi
AC_DEFINE_INTEGER_BITS([uint64_t],
[u_int64_t], [unsigned long long], [unsigned __int64], [unsigned long])
if test "$uint64_t" = no ; then
eval $maybe_break
fi
AC_DEFINE_INTEGER_BITS([int64_t],
[long long], [__int64], [long])
if test "$int64_t" = no ; then
eval $maybe_break
fi
AC_CHECK_TYPE([uintptr_t], , [eval $maybe_break])
# Find an unsigned 128-bit datatype. Because such a datatype is
# currently rather rare and because the run-time library needs a 128-bit
# datatype only to touch 128-bit dummy values, we also check for "long
# double" and finally settle on a 128-bit struct.
AC_DEFINE_INTEGER_BITS([uint128_t],
[u_int128_t], [unsigned long long long], [unsigned __int128], [long double])
if test "$uint128_t" = no ; then
AC_DEFINE([MUST_FAKE_UINT128], ,
[Define if a uint128_t must be fabricated out of two uint64_t values.])
fi
# We need to be able to convert a string to an ncptl_int. If strtoll(),
# strtoq(), and _strtoi64() are all unavailable (e.g., when using the
# native Alpha C compiler), we can still use strtol() if a long is both
# large enough to contain an ncptl_int and at least 64 bits in size.
AX_REQUIRE_ONE_FUNC([strtoll strtoq _strtoi64], ,
[AC_MSG_NOTICE([checking if strtol can serve as a replacement for strtoll])
AX_REQUIRE_ONE_FUNC([strtol], , [eval $maybe_break])
AC_CACHE_CHECK([if a long can hold both an int64_t and an ncptl_int type],
[ax_cv_type_long_big_enough],
[AC_TRY_RUN([
#if HAVE_INTTYPES_H
# include <inttypes.h>
#elif HAVE_STDINT_H
# include <stdint.h>
#elif HAVE_SYS_TYPES_H
# include <sys/types.h>