Debian Codegraph @

easel/configure.ac

raw
1 # process this file with autoconf to produce the Easel configuration script.
2 #
3 # reminders to save re-reading autoconf manual for the n'th time:
4 # output variables:
5 # - defined here as normal shell variables, e.g. FOO="my string"
6 # - are made into output variables by calling AC_SUBST(FOO)
7 # - @FOO@ in an output file is then substituted
8 # - output files assigned w/ AC_CONFIG_FILES; e.g. Makefile.in
9 #
10 # C preprocessor symbols:
11 # - defined here by calling AC_DEFINE(FOO) or AC_DEFINE(FOO, [42])
12 # - #undef FOO lines in a config file become #define FOO or #define FOO 42
13 # - config files assigned w/ AC_CONFIG_HEADERS; e.g. easel.h.in
14 #
15 # shell variables:
16 # - defined as usual, e.g. esl_var=no
17 # - use within scope of the configure script
18 #
19 # Contents:
20 # 1. autoconf requirements
21 # 2. AC_INIT
22 # 3. info on the package
23 # 4. process ./configure commandline options
24 # 5. checks for programs, including ${CC}, ${CFLAGS}
25 # 6. checks for libraries
26 # 7. checks for header files
27 # 8. checks for types
28 # 9. checks for structures
29 # 10. checks for compiler characteristics
30 # 11. checks for library functions
31 # 12. checks for system services
32 # 13. AC_CONFIG_FILES
33 # 14. AC_OUTPUT
34 #
35 # This order obeys autoconf manual, "standard configure.ac layout".
36 #
37 # To update config.guess and config.sub from GNU:
38 # wget -O config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD'
39 # wget -O config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD'
40 #
41 # Use full 3-arg form of AC_DEFINE() macros. autoheader chokes if you
42 # don't. We don't use autoheader (we only use autoconf, out of the
43 # GNU build tools, to limit complexity) but some packagers do, such
44 # as Debian.
45
46
47
48 ################################################################
49 # 1. autoconf requirements
50 ################################################################
51 # autoconf 2.61 has a bug in AC_FUNC_FSEEKO; make sure we don't use it.
52 # 2.63 was released in 2008.
53 AC_PREREQ(2.63)
54
55 m4_include([m4/ax_gcc_func_attribute.m4])
56
57 m4_include([m4/esl_sse.m4])
58 m4_include([m4/esl_sse4.m4])
59 m4_include([m4/esl_avx.m4])
60 m4_include([m4/esl_avx512.m4])
61 m4_include([m4/esl_neon.m4])
62 m4_include([m4/esl_vmx.m4])
63
64 m4_include([m4/ax_prog_cc_mpi.m4])
65 m4_include([m4/ax_pthread.m4])
66
67 m4_include([m4/esl_pic_flags.m4])
68
69 ################################################################
70 # 2. AC_INIT
71 ################################################################
72 AC_INIT(Easel, 0.49, [email protected], easel)
73 AC_MSG_NOTICE([Configuring the Easel library for your system.])
74
75 # remember if the user is overriding CFLAGS
76 esl_cflags_env_set=no
77 if test x"$CFLAGS" != x; then
78 esl_cflags_env_set=yes
79 fi
80
81
82
83 ################################################################
84 # 3. Info on the package
85 ################################################################
86 #
87 # AC_INIT args set these output variables and preprocessor symbols:
88 # PACKAGE_NAME <package> e.g. "Easel"
89 # PACKAGE_VERSION <version> e.g. "0.44"
90 # PACKAGE_BUGREPORT <bug-report> e.g. "[email protected]"
91 # PACKAGE_TARNAME <tarname> e.g. "easel"
92 # From them, AC_INIT automatically derives one more:
93 # PACKAGE_STRING <package> <version>, e.g. "Easel 0.44"
94 # Then we define some of our own:
95 # EASEL_DATE release date: e.g. "August 2017"
96 # EASEL_COPYRIGHT one-line copyright string
97 # EASEL_LICENSE one-line license string
98 # EASEL_URL URL home for Easel.
99 # because Easel is designed to be a library and must coexist with
100 # packages that include it as a subdirectory (HMMER, Infernal...),
101 # we don't want to use AC_INIT's PACKAGE_ variables as preprocessor
102 # symbols to put version info into executables; we'll get name clashes,
103 # plus we might want to have both Easel version info and main package
104 # version info. So, we use the PACKAGE_ stuff to make a
105 # new preprocessor symbol of our own:
106 # EASEL_VERSION e.g. "1.9a"
107 #
108
109 EASEL_DATE="Aug 2023"
110 EASEL_COPYRIGHT="Copyright (C) 2023 Howard Hughes Medical Institute"
111 EASEL_LICENSE="Freely distributed under the BSD open source license."
112 EASEL_VERSION=$PACKAGE_VERSION
113 EASEL_URL="http://bioeasel.org/"
114
115 AC_SUBST(EASEL_DATE)
116 AC_SUBST(EASEL_COPYRIGHT)
117 AC_SUBST(EASEL_LICENSE)
118 AC_SUBST(EASEL_VERSION)
119 AC_SUBST(EASEL_URL)
120
121 AC_DEFINE_UNQUOTED([EASEL_DATE], ["$EASEL_DATE"], [Easel release date])
122 AC_DEFINE_UNQUOTED([EASEL_COPYRIGHT], ["$EASEL_COPYRIGHT"], [Easel brief copyright statement])
123 AC_DEFINE_UNQUOTED([EASEL_LICENSE], ["$EASEL_LICENSE"], [Easel brief license statement])
124 AC_DEFINE_UNQUOTED([EASEL_VERSION], ["$EASEL_VERSION"], [Easel version number])
125 AC_DEFINE_UNQUOTED([EASEL_URL], ["$EASEL_URL"], [Easel web URL])
126
127
128 # Figure out what host we're compiling on.
129 # Three GNU scripts must be included in the distro:
130 # install.sh, config.guess, config.sub
131 # This sets four shell variables:
132 # host example: i686-pc-linux-gnu
133 # host_cpu example: i686
134 # host_vendor example: pc
135 # host_os example: linux-gnu
136 AC_CANONICAL_HOST
137
138
139
140
141
142 ################################################################
143 # 4. Process ./configure command line options
144 ################################################################
145
146
147 # --enable-debugging - enable basic debugging code (level 1)
148 # --enable-debugging=x - also set verbosity level to <x> (1-3)
149 #
150 # At all levels, replaces CFLAGS w/ "-g -Wall" (so it assumes gcc).
151 # Sets the eslDEBUGLEVEL preprocessor symbol to <x>
152 #
153 AC_ARG_ENABLE(debugging,
154 [AS_HELP_STRING([--enable-debugging],[include debugging code])
155 AS_HELP_STRING([--enable-debugging=x],[also set diagnostics verbosity level to <x> (1-3)])],
156 enable_debugging=$enableval, enable_debugging=no)
157
158 case $enable_debugging in
159 yes) AC_DEFINE([eslDEBUGLEVEL], 1, [debugging on, low verbosity]);;
160 1) AC_DEFINE([eslDEBUGLEVEL], 1, [debugging on, low verbosity]);;
161 2) AC_DEFINE([eslDEBUGLEVEL], 2, [debugging on, moderate verbosity]);;
162 3) AC_DEFINE([eslDEBUGLEVEL], 3, [debugging on, high verbosity]);;
163 no) AC_DEFINE([eslDEBUGLEVEL], 0, [debugging off]);;
164 *) AC_MSG_ERROR([Unknown argument to --enable-debugging: $enable_debugging]);;
165 esac
166
167 AC_ARG_ENABLE(gcov, [AS_HELP_STRING([--enable-gcov], [compile for code coverage testing])], enable_gcov=$enableval, enable_gcov=no)
168 AC_ARG_ENABLE(gprof, [AS_HELP_STRING([--enable-gprof], [compile for gcc code profiling])], enable_gprof=$enableval, enable_gprof=no)
169 AC_ARG_ENABLE(asan, [AS_HELP_STRING([--enable-asan], [compile with address sanitizer]) ], enable_asan=$enableval, enable_asan=no)
170 AC_ARG_ENABLE(tsan, [AS_HELP_STRING([--enable-tsan], [compile with thread sanitizer]) ], enable_tsan=$enableval, enable_tsan=no)
171 AC_ARG_ENABLE(sse, [AS_HELP_STRING([--enable-sse], [enable our SSE vector code])], enable_sse=$enableval, enable_sse=check)
172 AC_ARG_ENABLE(sse4, [AS_HELP_STRING([--enable-sse4], [enable our SSE4 vector code])], enable_sse4=$enableval, enable_sse4=check)
173 AC_ARG_ENABLE(avx, [AS_HELP_STRING([--enable-avx], [enable our AVX vector code])], enable_avx=$enableval, enable_avx=check)
174 AC_ARG_ENABLE(avx512, [AS_HELP_STRING([--enable-avx512], [enable our AVX-512 vector code])], enable_avx512=$enableval, enable_avx512=check)
175 AC_ARG_ENABLE(neon, [AS_HELP_STRING([--enable-neon], [enable our NEON vector code])] , enable_neon=$enableval, enable_neon=check)
176 AC_ARG_ENABLE(vmx, [AS_HELP_STRING([--enable-vmx], [enable our Altivec/VMX vector code])], enable_vmx=$enableval, enable_vmx=check)
177
178 AC_ARG_ENABLE(threads, [AS_HELP_STRING([--enable-threads], [enable POSIX threads parallelization])], enable_threads=$enableval, enable_threads=check)
179 AC_ARG_ENABLE(mpi, [AS_HELP_STRING([--enable-mpi], [enable MPI parallelization])], enable_mpi=$enableval, enable_mpi=no)
180
181 AC_ARG_ENABLE(pic, [AS_HELP_STRING([--enable-pic], [enable position-independent code])], enable_pic=$enableval, enable_pic=no)
182
183 AC_ARG_WITH(gsl, [AS_HELP_STRING([--with-gsl], [use the GSL, GNU Scientific Library])], with_gsl=$withval, with_gsl=no)
184
185
186
187
188
189 ################################################################
190 # 5. Checks for programs, including ${CC} and its ${CFLAGS}
191 ################################################################
192
193 # Choose our compiler - which might be mpicc, if enable_mpi is "yes".
194 # AX_PROG_CC_MPI will call AC_PROG_CC if enable_mpi is "no".
195 #
196 AX_PROG_CC_MPI([test x"$enable_mpi" = xyes],
197 [AC_DEFINE(HAVE_MPI, 1, [Use MPI parallelization])],
198 [ if test x"$enable_mpi" = xyes; then
199 AC_MSG_ERROR([MPI library not found for --enable-mpi]);
200 fi])
201 AC_PROG_CC
202
203 AC_PROG_CPP
204 AC_PROG_INSTALL
205 AC_PROG_RANLIB
206 AC_PATH_PROG([AR], [ar], [:], [$PATH:/usr/ccs/bin:/usr/xpg4/bin])
207
208
209 # Select our default optimization flags in CFLAGS.
210 # --enable-gcov, --enable-gprof, and --enable-debugging are mutually exclusive.
211 #
212 if test "$enable_gcov" = "yes"; then
213 if test "$sre_cflags_env_set" = "yes"; then
214 AC_MSG_ERROR([--enable-gcov overrides CFLAGS, so don't set CFLAGS])
215 fi
216 CFLAGS="-g -Wall -fprofile-arcs -ftest-coverage"
217 elif test "$enable_gprof" = "yes"; then
218 if test "$sre_cflags_env_set" = "yes"; then
219 AC_MSG_ERROR([--enable-gprof overrides CFLAGS, so don't set CFLAGS])
220 fi
221 CFLAGS="-O -g -pg"
222 elif test "$enable_debugging" != "no"; then
223 if test "$GCC" = "yes"; then
224 CFLAGS="-g -Wall"
225 fi
226 elif test "$esl_cflags_env_set" != "yes"; then
227 CFLAGS="-O3"
228 fi
229
230
231 # Turn on a sanitizer, if asked.
232 #
233 if test "$enable_asan" = "yes"; then
234 CFLAGS="$CFLAGS -fsanitize=address"
235 LDFLAGS="$LDFLAGS -fsanitize=address"
236 AC_DEFINE(eslENABLE_ASAN, 1, [Using address sanitizer])
237 fi
238 if test "$enable_tsan" = "yes"; then
239 if test "$enable_asan" = "yes"; then
240 AC_MSG_FAILURE([The address and thread sanitizers are incompatible. Use only one of --enable-asan and --enable-tsan])
241 fi
242 CFLAGS="$CFLAGS -fsanitize=thread"
243 LDFLAGS="$LDFLAGS -fsanitize=thread"
244 AC_DEFINE(eslENABLE_TSAN, 1, [Using threads sanitizer])
245 fi
246
247
248 # PIC (position-independent code) for shared library support
249 #
250 if test "$enable_pic" = "yes"; then
251 ESL_PIC_FLAGS
252 fi
253
254
255 # Support for POSIX multithreading (we should generally have this)
256 #
257 if test "$enable_threads" != "no"; then
258 AX_PTHREAD([
259 AC_DEFINE(HAVE_PTHREAD, 1, [Set to enable POSIX multithreading])
260 AC_SUBST(PTHREAD_LIBS)
261 AC_SUBST(PTHREAD_CFLAGS)
262 ],[
263 if test "$enable_threads" = "yes"; then
264 AC_MSG_FAILURE([Unable to compile with POSIX multithreading.])
265 fi
266 enable_threads=no
267 ])
268 fi
269
270
271 # Support for vector implementations (xref SRE:H3/28)
272 #
273 # We only worry about compile time here: i.e. do the compiler and
274 # linker support an instruction set. A program should also check at
275 # runtime that its processor supports the instruction set, using code
276 # in esl_cpu.
277 #
278 # Our "SSE" implementations require <=SSE2;
279 # "SSE4" requires <= SSE4.1;
280 # "AVX" requires <= AVX2;
281 # "AVX512" requires the F, ER, and BW subsets.
282 #
283 # If we were explicitly told to enable one ($enable_foo="yes") and we
284 # can't, fail with an error.
285 #
286 # If we're autodetecting ($enable_foo="check"), set $enable_foo to the
287 # result ("yes" or "no").
288 #
289 # If vector support "foo" is enabled:
290 # - define preprocessor symbol eslENABLE_FOO (esl_config.h.in)
291 # - set output variable FOO_CFLAGS, if needed (Makefile.in)
292 # - set shell variable $enable_foo to "yes"
293 # and if vector support is available (regardless of whether we
294 # decide to enable it), the autoconf macros:
295 # - set shell variable $esl_have_foo to "yes"
296 # - set shell var $esl_foo_cflags to any necessary compiler flags
297 #
298 if test "$enable_sse" = "yes" || test "$enable_sse" = "check"; then
299 ESL_SSE([
300 AC_DEFINE(eslENABLE_SSE, 1, [Set to enable SSE vector implementations])
301 SSE_CFLAGS=$esl_sse_cflags
302 AC_SUBST(SSE_CFLAGS)
303 enable_sse=yes
304 ],[
305 if test "$enable_sse" = "yes"; then
306 AC_MSG_FAILURE([Unable to compile SSE. Try another compiler, or --disable-sse])
307 fi
308 enable_sse=no
309 ])
310 fi
311
312 if test "$enable_sse4" = "yes" || test "$enable_sse4" = "check"; then
313 ESL_SSE4([
314 AC_DEFINE(eslENABLE_SSE4, 1, [Set to enable SSE4 vector implementations])
315 SSE4_CFLAGS=$esl_sse4_cflags
316 AC_SUBST(SSE4_CFLAGS)
317 enable_sse4=yes
318 ],[
319 if test "$enable_sse4" = "yes"; then
320 AC_MSG_FAILURE([Unable to compile SSE4. Try another compiler, or --disable-sse4])
321 fi
322 enable_sse4=no
323 ])
324 fi
325
326 if test "$enable_avx" = "yes" || test "$enable_avx" = "check"; then
327 ESL_AVX([
328 AC_DEFINE(eslENABLE_AVX, 1, [Set to enable AVX vector implementations])
329 AVX_CFLAGS=$esl_avx_cflags
330 AC_SUBST(AVX_CFLAGS)
331 enable_avx=yes
332 ],[
333 if test "$enable_avx" = "yes"; then
334 AC_MSG_FAILURE([Unable to compile AVX. Try another compiler, or --disable-avx])
335 fi
336 enable_avx=no
337 ])
338 fi
339
340 if test "$enable_avx512" = "yes" || test "$enable_avx512" = "check"; then
341 ESL_AVX512([
342 AC_DEFINE(eslENABLE_AVX512, 1, [Set to enable AVX-512 vector implementations])
343 AVX512_CFLAGS=$esl_avx512_cflags
344 AC_SUBST(AVX512_CFLAGS)
345 enable_avx512=yes
346 ],[
347 if test "$enable_avx512" = "yes"; then
348 AC_MSG_FAILURE([Unable to compile AVX-512. Try another compiler, or --disable-avx512])
349 fi
350 enable_avx512=no
351 ])
352 fi
353
354 if test "$enable_neon" = "yes" || test "$enable_neon" = "check"; then
355 ESL_NEON([
356 AC_DEFINE(eslENABLE_NEON, 1, [Set to enable ARM NEON vector implementations])
357 AS_VAR_IF([esl_have_neon_aarch64],[yes],[AC_DEFINE(eslHAVE_NEON_AARCH64, 1, [Set to enable the ARM AARCH64 version of NEON])])
358 NEON_CFLAGS=$esl_neon_cflags
359 AC_SUBST(NEON_CFLAGS)
360 enable_neon=yes
361 ],[
362 if test "$enable_neon" = "yes"; then
363 AC_MSG_FAILURE([Unable to compile ARM NEON. Try another compiler, or --disable-neon])
364 fi
365 enable_neon=no
366 ])
367 fi
368
369 if test "$enable_vmx" = "yes" || test "$enable_vmx" = "check"; then
370 ESL_VMX([
371 AC_DEFINE(eslENABLE_VMX, 1, [Set to enable Altivec/VMX vector implementations])
372 VMX_CFLAGS=$esl_vmx_cflags
373 AC_SUBST(VMX_CFLAGS)
374 enable_vmx=yes
375 ],[
376 if test "$enable_vmx" = "yes"; then
377 AC_MSG_FAILURE([Unable to compile Altivec/VMX. Try another compiler, or --disable-vmx])
378 fi
379 enable_vmx=no
380 ])
381 fi
382
383
384
385 # For x86 platforms, check if we can set floating point math to not
386 # use denormalized floats. On some platforms, denormalized math incurs
387 # a large performance penalty. The recursions in the Forward/Backward
388 # algorithms underflow to zero by design.
389 #
390 esl_save_cflags="$CFLAGS"
391 CFLAGS="$CFLAGS $SSE_CFLAGS $SSE4_CFLAGS"
392
393 AC_MSG_CHECKING([whether flush-to-zero (FTZ) is supported])
394 AC_COMPILE_IFELSE(
395 [AC_LANG_PROGRAM(
396 [#include <xmmintrin.h>],
397 [_MM_SET_FLUSH_ZERO_MODE (_MM_FLUSH_ZERO_ON);])],
398 [ AC_MSG_RESULT([yes])
399 AC_DEFINE([HAVE_FLUSH_ZERO_MODE], 1, [Set to support FTZ, flush-to-zero mode])],
400 [ AC_MSG_RESULT([no]) ])
401
402 AC_MSG_CHECKING([whether denormals-are-zero (DAZ) is supported])
403 AC_COMPILE_IFELSE(
404 [AC_LANG_PROGRAM(
405 [#include <pmmintrin.h>],
406 [_MM_SET_DENORMALS_ZERO_MODE (_MM_DENORMALS_ZERO_ON);])],
407 [ AC_MSG_RESULT([yes])
408 AC_DEFINE([HAVE_DENORMALS_ZERO_MODE], 1, [Set to support DAZ, denormals-are-zero mode])],
409 [ AC_MSG_RESULT([no]) ])
410
411 CFLAGS="$esl_save_cflags"
412
413
414
415 # Define HAVE_GZIP if gzip is in $PATH (or if HAVE_GZIP is already set)
416 AC_PATH_PROG(HAVE_GZIP, "gzip", "no")
417 if test "${HAVE_GZIP}" = "no"; then
418 AC_MSG_WARN([gzip not found])
419 else
420 AC_DEFINE([HAVE_GZIP],1,[Support external gzip decompression])
421 fi
422
423
424 # We need python 3 for 'make check' and some dev tools. sqc checks
425 # too, as does the Makefile, but we also check in ./configure, so we
426 # don't recommend 'make check' to the user if they can't use it.
427 #
428 AC_CHECK_PROG(HAVE_PYTHON3, python3, yes)
429
430
431 ################################################################
432 # 6. Checks for libraries
433 #################################################################
434 LIBGSL=
435 AS_IF([test "x$with_gsl" != xno],
436 [AC_CHECK_LIB([gsl], [gsl_expm1],
437 [AC_SUBST([LIBGSL], ["-lgsl -lgslcblas"])
438 AC_DEFINE([HAVE_LIBGSL], [1], [Define if you have libgsl])
439 ],
440 [if test "x$with_gsl" != xcheck; then
441 AC_MSG_FAILURE(
442 [--with-gsl was given, but GSL library was not found])
443 fi
444 ],
445 [-lgslcblas]
446 )])
447
448
449 # Easel stopwatch high-res timer may try to use clock_gettime,
450 # which may be in librt
451 AC_SEARCH_LIBS(clock_gettime, [rt posix4])
452
453
454 ################################################################
455 # 7. Checks for headers
456 ################################################################
457
458 AC_CHECK_HEADERS([\
459 endian.h \
460 inttypes.h \
461 stdint.h \
462 strings.h \
463 unistd.h \
464 sys/types.h \
465 netinet/in.h
466 ])
467
468 # Check for sysctl.h separately. On OpenBSD, it requires
469 # <sys/param.h> and autoconf needs special logic to deal w. this as
470 # follows.
471 AC_CHECK_HEADERS([sys/param.h])
472 AC_CHECK_HEADERS([sys/sysctl.h], [], [],
473 [[#ifdef HAVE_SYS_PARAM_H
474 #include <sys/param.h>
475 #endif
476 ]])
477
478
479
480 ################################################################
481 # 8. Checks for types
482 ################################################################
483 # - Define WORDS_BIGENDIAN on bigendian platforms.
484 # - Make sure we have C99 exact-size integer types;
485 # ssi uses 16, 32, and 64-bit ints, and we
486 # use 8-bit unsigned chars for digitized sequence.
487 # - Make sure we have off_t.
488 #
489 AC_C_BIGENDIAN
490 AC_TYPE_INT8_T
491 AC_TYPE_INT16_T
492 AC_TYPE_INT32_T
493 AC_TYPE_INT64_T
494 AC_TYPE_UINT8_T
495 AC_TYPE_UINT16_T
496 AC_TYPE_UINT32_T
497 AC_TYPE_UINT64_T
498 AC_TYPE_OFF_T
499
500 ################################################################
501 # 9. Checks for structures - currently none
502 #################################################################
503
504
505 ################################################################
506 # 10. Checks for compiler characteristics
507 #################################################################
508
509 # __attribute__() tags on function declarations
510 # HAVE_FUNC_ATTRIBUTE_NORETURN
511 #
512 # The clang static analyzer can't figure out that some of our
513 # varargs-dependent fatal error handlers (esl_fatal(), for example)
514 # cannot return. To tell it so, we take advantage of __attribute__
515 # tags on function declarations, a non-ISO gcc extension, when
516 # available. gcc, clang, and other gcc-like compilers support this.
517 #
518 AX_GCC_FUNC_ATTRIBUTE(noreturn)
519
520 # HAVE_FUNC_ATTRIBUTE_FORMAT
521 #
522 # We have some printf()-style functions that use varargs.
523 # Apparently when you do something like
524 # int64_t bigint;
525 # my_printf("%d", bigint);
526 # a compiler can't normally detect the size mismatch between the
527 # specifier (%d) and the argument (bigint). Usually this isn't a
528 # problem (apparently most platforms cast appropriately) but we had
529 # problems on ARM. gcc-like compilers allow declaring an attribute
530 # of format(printf, <string_index>, <first-to-check>), enabling the
531 # compiler to typecheck printf()-like arguments, and warn appropriately.
532 # We only need or use this in development.
533 AX_GCC_FUNC_ATTRIBUTE(format)
534
535
536 ################################################################
537 # 11. Checks for library functions: define HAVE_FOO
538 ################################################################
539
540 # multiline argument to AC_CHECK_FUNCS needs the \'s
541 AC_CHECK_FUNCS([ \
542 aligned_alloc \
543 erfc \
544 getpid \
545 _mm_malloc \
546 popen \
547 posix_memalign \
548 strcasecmp \
549 strsep \
550 sysconf \
551 sysctl \
552 times \
553 ])
554
555 AC_SEARCH_LIBS(ntohs, socket)
556 AC_SEARCH_LIBS(ntohl, socket)
557 AC_SEARCH_LIBS(htons, socket)
558 AC_SEARCH_LIBS(htonl, socket)
559 AC_SEARCH_LIBS(socket, socket)
560 AC_SEARCH_LIBS(inet_pton, nsl)
561
562 AC_FUNC_FSEEKO
563
564 #################################################################
565 # 12. System services
566 #################################################################
567 AC_SYS_LARGEFILE
568
569
570 #################################################################
571 # 13. Write out esl_config.h header and the Makefiles
572 #################################################################
573
574 # Easel Makefiles
575 AC_CONFIG_FILES([ \
576 Makefile \
577 miniapps/Makefile \
578 testsuite/Makefile \
579 documentation/Makefile \
580 ])
581
582 # Substitutions in Easel man pages:
583 # EASEL_VERSION, EASEL_DATE, EASEL_COPYRIGHT, EASEL_LICENSE, EASEL_URL
584 AC_CONFIG_FILES([ \
585 miniapps/esl-afetch.man \
586 miniapps/esl-alimanip.man \
587 miniapps/esl-alimap.man \
588 miniapps/esl-alimask.man \
589 miniapps/esl-alimerge.man \
590 miniapps/esl-alipid.man \
591 miniapps/esl-alirev.man \
592 miniapps/esl-alistat.man \
593 miniapps/esl-compalign.man \
594 miniapps/esl-compstruct.man \
595 miniapps/esl-construct.man \
596 miniapps/esl-histplot.man \
597 miniapps/esl-mask.man \
598 miniapps/esl-mixdchlet.man \
599 miniapps/esl-reformat.man \
600 miniapps/esl-selectn.man \
601 miniapps/esl-seqrange.man \
602 miniapps/esl-seqstat.man \
603 miniapps/esl-sfetch.man \
604 miniapps/esl-shuffle.man \
605 miniapps/esl-ssdraw.man \
606 miniapps/esl-translate.man \
607 miniapps/esl-weight.man \
608 ])
609
610 AC_CONFIG_HEADERS([decoy_config.h]) # This keeps gnu 'autoheader' from overwriting our esl_config.h.in
611 AC_CONFIG_HEADERS([esl_config.h])
612
613
614
615 #################################################################
616 # 14. et voila!
617 #################################################################
618 AC_OUTPUT
619
620 echo "
621
622 Easel configuration (generated esl_config.h and Makefiles):
623
624 Host: $host
625
626 Compiler:
627 CC= $CC
628 CFLAGS= $CFLAGS
629 LDFLAGS= $LDFLAGS
630 PTHREAD_CFLAGS= $PTHREAD_CFLAGS
631 SSE_CFLAGS= $SSE_CFLAGS
632 SSE4_CFLAGS= $SSE4_CFLAGS
633 AVX_CFLAGS= $AVX_CFLAGS
634 AVX512_CFLAGS= $AVX512_CFLAGS
635 NEON_CFLAGS= $NEON_CFLAGS
636 VMX_CFLAGS= $VMX_CFLAGS
637 PIC_CFLAGS= $PIC_CFLAGS
638
639 Vector implementations enabled:
640 sse: $enable_sse
641 sse4: $enable_sse4
642 avx: $enable_avx
643 avx512: $enable_avx512
644 neon: $enable_neon
645 vmx: $enable_vmx"
646
647
648 if test x"$HAVE_PYTHON3" = x"yes"; then echo "
649 Now do 'make' to build Easel, and optionally:
650 'make check' to run self-tests.";
651 else echo "
652 (No python3 found, so 'make check' is disabled.)
653
654 Now do 'make' to build Easel.";
655 fi
656