1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4# $Id: configure.ac,v 1.46 2010-07-21 22:05:35 twu Exp $
5
6AC_PREREQ(2.57)
7
8## We want to get the version number from file 'VERSION' (rather than
9## specifying the version info in 'configure.ac'.  Hence, we need a bit
10## of M4 magic.  Note that M4 esyscmd has a trailing newline because the
11## shell command output has one, hence the patsubst() trick.
12#m4_define([PKG_VERSION],
13#          m4_bpatsubst(m4_esyscmd([cat VERSION]),
14#                       [\([0-9.]*\)\(\w\|\W\)*],
15#                       [\1]))
16#m4_define([PKG_VERSION],m4_esyscmd([cat VERSION]))
17m4_define([PKG_VERSION],esyscmd([cat VERSION]))
18
19AC_INIT([gmap],PKG_VERSION,[Thomas Wu <twu@gene.com>])
20AC_MSG_CHECKING(package version)
21AC_MSG_RESULT(PKG_VERSION)
22
23
24### Read defaults
25
26# Handle CONFIG_SITE better than Autoconf does
27for ac_site_file in $CONFIG_SITE; do
28  if { (eval echo $ac_site_file | grep '^\./' >/dev/null 2>&1)
29       ac_status=$?
30       (exit $ac_status); }; then
31    # ac_site_file starts with ./
32    if test -r "$ac_site_file"; then
33      ac_site_file="$ac_site_file"
34      echo "really loading site script $ac_site_file: file was found"
35      . "$ac_site_file"
36      ax_user_site_file_loaded=yes
37    else
38      AC_MSG_ERROR([cannot find $ac_site_file])
39    fi
40  else
41    # ac_site_file does not start with ./
42    if test -r "./$ac_site_file"; then
43      echo "really loading site script ./$ac_site_file: file was found"
44      . "./$ac_site_file"
45      ax_user_site_file_loaded=yes
46    elif test -r "$ac_site_file"; then
47      echo "really loading site script $ac_site_file: file was found"
48      . "$ac_site_file" 2>/dev/null
49      ax_user_site_file_loaded=yes
50    else
51      AC_MSG_ERROR([cannot find $ac_site_file])
52    fi
53  fi
54done
55
56if test x"$ax_user_site_file_loaded" != x"yes"; then
57   if test -r "./config.site"; then
58     echo "loading default site script ./config.site"
59     . "./config.site"
60   fi
61fi
62
63
64
65
66# Set default CFLAGS if not already set by user
67AC_MSG_CHECKING(CFLAGS)
68AC_ARG_VAR([CFLAGS], [Compiler flags (default: -O3 -fomit-frame-pointer)])
69if test x"$CFLAGS" = x; then
70        AC_MSG_RESULT(not set by user so using default -O3 -fomit-frame-pointer)
71        ACX_EXPAND(CFLAGS,'-O3 -fomit-frame-pointer')
72else
73	AC_MSG_RESULT($CFLAGS)
74fi
75
76#AC_MSG_CHECKING(MPI_CFLAGS)
77#AC_ARG_VAR([MPI_CFLAGS], [Compiler flags (default: -O3)])
78#AC_MSG_RESULT($MPI_CFLAGS)
79#AC_SUBST(MPI_CFLAGS)
80
81
82AC_CONFIG_SRCDIR([src/gmap.c])
83AC_CONFIG_HEADER([src/config.h])
84AC_CONFIG_AUX_DIR([config])
85# For autotest: AC_CONFIG_TESTDIR([tests],[tests:src:util])
86
87AC_CONFIG_MACRO_DIR([config])
88
89AC_SUBST([LIBGMAP_SO_VERSION], [1:0:0])
90#AC_SUBST([LIBGMAP_API_VERSION], [1.0])
91
92AC_CANONICAL_SYSTEM
93
94AC_MSG_CHECKING(for non-Intel CPU)
95case $host_cpu in
96     powerpc64le)
97     AC_MSG_RESULT(yes, power8)
98     AC_DEFINE(AX_HOST_POWER8,1,[Define to 1 if host is Power8])
99     ;;
100
101     x86_64)
102     AC_MSG_RESULT(no)
103     ;;
104
105     *)
106     AC_MSG_RESULT(no)
107     ;;
108esac
109
110
111AC_SYS_LARGEFILE
112AC_ARG_PROGRAM
113
114#AM_INIT_AUTOMAKE([no-dependencies])
115#AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
116AM_INIT_AUTOMAKE
117AM_MAINTAINER_MODE([disable])
118
119
120AM_CONDITIONAL(FULLDIST,test "x$enable_fulldist" = xyes)
121AC_ARG_ENABLE([fulldist],
122	       AC_HELP_STRING([--enable-fulldist],
123                              [For use by program maintainer]),
124	      [enable_fulldist="yes"],
125              [enable_fulldist="no"])
126
127AM_CONDITIONAL(MAINTAINER,test "x$enable_maintainer" = xyes)
128AC_ARG_ENABLE([maintainer],
129	       AC_HELP_STRING([--enable-maintainer],
130                              [For use by program maintainer]),
131	      [enable_maintainer="yes"],
132              [enable_maintainer="no"])
133
134AM_CONDITIONAL(MAKE_LIB,test "x$enable_library" = xyes)
135AC_ARG_ENABLE([lib],
136	       AC_HELP_STRING([--enable-lib],
137                              [Build and install a GMAP library (Warning: will put headers into include subdirectory) (default=disable-lib)]),
138	      [enable_library="yes"],
139              [enable_library="no"])
140
141# For Perl scripts, because otherwise configure inserts
142# @bindir@ => "${exec_prefix}/bin";
143AC_MSG_CHECKING(bindir)
144ACX_EXPAND(BINDIR,$bindir)
145AC_SUBST(BINDIR)
146AC_MSG_RESULT($BINDIR)
147
148
149
150# Checks for programs.
151#AC_PATH_PROG([PERL],[perl])
152ACX_PATH_PERL
153
154AC_PROG_CC
155AM_PROG_CC_C_O
156# AC_PROG_LIBTOOL  -- No longer working
157AX_COMPILER_VENDOR
158# AM_CONDITIONAL(INTEL_COMPILER,test "x$ax_cv_c_compiler_vendor" = xintel)
159
160
161# AX_MPI    # Sets MPICC to use for isolated source files that need it
162# AC_PROG_CC_MPI   # This sets CC to mpicc
163# AM_CONDITIONAL(MPI_FOUND,test "x$MPILIBS" != x)
164
165
166# Checks for libraries.
167AC_CHECK_LIB([m], rint)
168
169#AC_CHECK_LIB(popt, poptGetContext, [answer="yes"], [answer="no"])
170#if test x"$answer" == xyes; then
171#	AC_DEFINE([HAVE_LIBPOPT],[1],[Define to 1 if you have the 'popt' library (-lpopt)])
172#	POPT_LIBS="-lpopt"
173#else
174#	POPT_LIBS=""
175#fi
176#AC_SUBST(POPT_LIBS)
177
178
179AC_MSG_CHECKING(whether to use MPI_File for input)
180AC_ARG_ENABLE([mpi-file-input],
181              AC_HELP_STRING([--enable-mpi-file-input],
182                             [Enable MPI_File for input for MPI versions (default=yes).  Note: Use only if you have a parallel I/O file system, like Lustre]),
183              [answer="$enableval"],
184              [answer=""])
185case x"$answer" in
186	xyes)
187        AC_MSG_RESULT(enabled)
188	AC_DEFINE(USE_MPI_FILE_INPUT,1,[Define to 1 if you want to use MPI_File for input.])
189	;;
190
191	xno)
192	AC_MSG_RESULT(disabled)
193	;;
194
195	x)
196	AC_MSG_RESULT([not specified so enabled by default])
197	AC_DEFINE(USE_MPI_FILE_INPUT,1,[Define to 1 if you want to use MPI_File for input.])
198	;;
199esac
200
201
202# In call to ACX_PTHREAD, don't provide ACTION-IF-FOUND; otherwise,
203# HAVE_PTHREAD won't be defined
204AC_MSG_CHECKING(for pthreads feature)
205AC_ARG_ENABLE([pthreads],
206              AC_HELP_STRING([--enable-pthreads],
207                             [Enable pthreads (default=yes)]),
208              [answer="$enableval"],
209              [answer=""])
210case x"$answer" in
211	xyes)
212        AC_MSG_RESULT(enabled)
213	ACX_PTHREAD([],[pthread_warning=yes])
214	;;
215
216	xno)
217	AC_MSG_RESULT(disabled)
218	;;
219
220	x)
221	AC_MSG_RESULT([not specified so enabled by default])
222	ACX_PTHREAD([],[pthread_warning=yes])
223	;;
224esac
225
226
227# Checks for header files.
228AC_HEADER_STDC
229AC_HEADER_DIRENT
230AC_CHECK_HEADERS([fcntl.h limits.h stddef.h stdlib.h string.h strings.h unistd.h sys/types.h])
231
232# Checks for typedefs, structures, and compiler characteristics.
233AC_C_INLINE
234if test "$ac_cv_c_line" != no; then
235  AC_DEFINE(HAVE_INLINE,1,[Define to 1 if compiler supports extern inline])
236  AC_SUBST(HAVE_INLINE)
237fi
238
239AC_C_BIGENDIAN
240AC_C_CONST
241AC_C_VOLATILE
242AC_TYPE_SIZE_T
243AC_TYPE_OFF_T
244AC_CHECK_TYPES([caddr_t])
245AC_CHECK_SIZEOF(unsigned long)
246AC_CHECK_SIZEOF(unsigned long long)
247AC_CHECK_SIZEOF(off_t)
248
249
250# Checks for library functions.
251#AC_FUNC_MALLOC -- Causes use of rpl_malloc
252#AC_FUNC_REALLOC -- Causes use of rpl_realloc
253#AC_FUNC_CLOSEDIR_VOID -- We are checking return value
254
255AC_FUNC_FSEEKO
256
257#AC_FUNC_MMAP        # Checks only private fixed mapping of already-mapped memory
258
259
260AC_MSG_CHECKING(whether alloca is enabled)
261AC_ARG_ENABLE([alloca],
262	      AC_HELP_STRING([--enable-alloca],
263                             [Enable alloca (default=no) for stack-based memory allocation.  Warning: Can cause GMAP to crash on long sequences.]),
264              [answer="$enableval"],
265              [answer=""])
266case x"$answer" in
267     xyes)
268     AC_MSG_RESULT(enabled)
269     AC_FUNC_ALLOCA
270     ;;
271
272     xno)
273     AC_MSG_RESULT(disabled)
274     ;;
275
276     x)
277     AC_MSG_RESULT([not specified so disabled by default])
278     ;;
279esac
280
281
282AC_MSG_CHECKING(whether mmap is enabled)
283AC_ARG_ENABLE([mmap],
284	      AC_HELP_STRING([--enable-mmap],
285                             [Enable mmap (default=yes).  Recommend that you do not disable this unless absolutely necessary.]),
286              [answer="$enableval"],
287              [answer=""])
288case x"$answer" in
289     xyes)
290     AC_MSG_RESULT(enabled)
291     ACX_MMAP_FIXED   # Checks fixed mapping
292     ACX_MMAP_VARIABLE   # Checks variable mapping
293     ;;
294
295     xno)
296     AC_MSG_RESULT(disabled)
297     ;;
298
299     x)
300     AC_MSG_RESULT([not specified so enabled by default])
301     ACX_MMAP_FIXED   # Checks fixed mapping
302     ACX_MMAP_VARIABLE   # Checks variable mapping
303     ;;
304esac
305
306
307if test x"$acx_mmap_fixed_ok" = xyes; then
308  AC_DEFINE(HAVE_MMAP,1,[Define to 1 if you have a working 'mmap' system call.])
309else
310  if test x"$acx_mmap_variable_ok" = xyes; then
311    AC_DEFINE(HAVE_MMAP,1,[Define to 1 if you have a working 'mmap' system call.])
312  fi
313fi
314
315ACX_MMAP_FLAGS
316ACX_MADVISE_FLAGS
317ACX_SHM_FLAGS
318
319AC_CHECK_FUNCS([ceil floor index log madvise memcpy memmove memset munmap pow rint stat64 strtoul sysconf sysctl sigaction \
320                shmget shmctl shmat shmdt semget semctl semop])
321
322ACX_STRUCT_STAT64
323ACX_PAGESIZE
324
325ACX_FUNC_FOPEN_BINARY
326ACX_FUNC_FOPEN_TEXT
327
328
329#AC_MSG_CHECKING(for builtin popcount/clz/ctz features)
330#AC_ARG_ENABLE([builtin-popcount],
331#              AC_HELP_STRING([--enable-builtin-popcount],
332#                             [Enable -mpopcnt if it __builtin_popcount compiles and runs (default=yes).  May want to disable if compiling on one machine and running on another.]),
333#              [answer="$enableval"],
334#              [answer=""])
335#case x"$answer" in
336#	xyes)
337#        AC_MSG_RESULT(enabled)
338#	ACX_BUILTIN_POPCOUNT
339#	;;
340#
341#	xno)
342#	AC_MSG_RESULT(disabled)
343#	;;
344#
345#	x)
346#	AC_MSG_RESULT([not specified so enabled by default])
347#	ACX_BUILTIN_POPCOUNT
348#	;;
349#esac
350#if test x"$acx_mpopcnt_ok" = x"yes"; then
351#  POPCNT_CFLAGS="$POPCNT_CFLAGS -mpopcnt"
352#fi
353#AC_SUBST(POPCNT_CFLAGS)
354
355
356ACX_BUILTIN_POPCOUNT
357ACX_ASM_BSR
358
359
360ACX_SSE2_SHIFT_DEFECT
361ACX_SIMD_INTRINSICS
362
363AC_MSG_CHECKING(for whether simd is enabled)
364AC_ARG_ENABLE([simd],
365	      AC_HELP_STRING([--enable-simd],
366                             [Enable simd commands in general if they compile and run (default=yes).]),
367              [answer="$enableval"],
368              [answer=""])
369case x"$answer" in
370     xyes)
371     AC_MSG_RESULT(enabled)
372     ax_cv_want_simd=yes
373     ;;
374
375     xno)
376     AC_MSG_RESULT(disabled)
377     ax_cv_want_simd=no
378     ;;
379
380     x)
381     AC_MSG_RESULT([not specified so enabled by default])
382     ax_cv_want_simd=yes
383     ;;
384esac
385
386
387if test x"$ax_cv_c_compiler_vendor" = xintel; then
388AX_CPUID_INTEL
389else
390AX_CPUID_NON_INTEL
391fi
392
393AX_EXT   # Sets SIMD_CFLAGS, and HAVE_ALTIVEC,HAVE_MMX,HAVE_SSE,HAVE_SSE2,...
394if test "x$ax_cv_want_simd" = xno; then
395  compile_level=none
396elif test "x$ax_make_avx512bw" = xyes; then
397  compile_level=avx512bw
398elif test "x$ax_make_avx512" = xyes; then
399  compile_level=avx512
400elif test "x$ax_make_avx2" = xyes; then
401  compile_level=avx2
402elif test "x$ax_make_sse42" = xyes; then
403  compile_level=sse42
404elif test "x$ax_make_sse41" = xyes; then
405  compile_level=sse41
406elif test "x$ax_make_ssse3" = xyes; then
407  compile_level=ssse3
408elif test "x$ax_make_sse2" = xyes; then
409  compile_level=sse2
410else
411  compile_level=none
412fi
413
414
415# User-selected compile level
416AC_ARG_WITH([simd-level],
417            AC_HELP_STRING([--with-simd-level=STRING],
418                           [User-selected SIMD level (none, sse2, ssse3, sse41/sse4.1, sse42/sse4.2, avx2, avx512, avx512bw)]),
419            [answer="$withval"],
420            [answer=""])
421if test x"$answer" != x; then
422	AC_MSG_CHECKING(for user-selected SIMD level)
423	compile_level=$answer
424	AC_MSG_RESULT($compile_level)
425	case $compile_level in
426	avx512bw)
427	;;
428	avx512)
429	;;
430	avx2)
431	;;
432	sse42)
433	;;
434	sse4.2)
435	compile_level = sse42;
436	;;
437	sse41)
438	;;
439	sse4.1)
440	compile_level = sse41;
441	;;
442	ssse3)
443	;;
444	sse2)
445	;;
446	none)
447	;;
448	*)
449	AC_MSG_ERROR([Compiler level $compile_level not recognized.  Allowed values: none, sse2, ssse3, sse4.1 (or sse41), sse4.2 (or sse42), avx2, avx512, avx512bw])
450	;;
451	esac
452fi
453
454
455
456AM_CONDITIONAL(MAKE_AVX512BW,[test "$compile_level" = avx512bw])
457AM_CONDITIONAL(MAKE_AVX512,[test "$compile_level" = avx512])
458AM_CONDITIONAL(MAKE_AVX2,[test "$compile_level" = avx2])
459AM_CONDITIONAL(MAKE_SSE4_2,[test "$compile_level" = sse42])
460AM_CONDITIONAL(MAKE_SSE4_1,[test "$compile_level" = sse41])
461AM_CONDITIONAL(MAKE_SSSE3,[test "$compile_level" = ssse3])
462AM_CONDITIONAL(MAKE_SSE2,[test "$compile_level" = sse2])
463
464
465
466# Genome directory
467AC_MSG_CHECKING(gmapdb)
468AC_ARG_WITH([gmapdb],
469            AC_HELP_STRING([--with-gmapdb=DIR],
470                           [Default GMAP database directory]),
471            [answer="$withval"],
472            [answer=""])
473if test x"$answer" = x; then
474	ACX_EXPAND(GMAPDB,'${prefix}/share')
475else
476	GMAPDB=$answer
477fi
478AC_SUBST(GMAPDB)
479AC_MSG_RESULT($GMAPDB)
480
481
482# MAX_STACK_READLENGTH
483AC_MSG_CHECKING(MAX_STACK_READLENGTH)
484AC_ARG_VAR([MAX_STACK_READLENGTH], [Maximum read length for GSNAP allocating on stack rather than heap (default 300)])
485if test x"$MAX_STACK_READLENGTH" = x; then
486        ACX_EXPAND(MAX_STACK_READLENGTH,'300')
487fi
488AC_MSG_RESULT($MAX_STACK_READLENGTH)
489
490
491# zlib package
492
493AC_MSG_CHECKING(for zlib support)
494AC_ARG_ENABLE([zlib],
495              AC_HELP_STRING([--enable-zlib],
496                             [Enable zlib support (option needed for uncompressing gzip files) (default=yes)]),
497              [answer="$enableval"],
498              [answer=""])
499case x"$answer" in
500   xno)
501   AC_MSG_RESULT(disabled)
502   ZLIB_LIBS=""
503   have_zlib=no
504   ;;
505
506   *)
507   AC_MSG_RESULT(enabled)
508   failed=0;
509   passed=0;
510   AC_CHECK_HEADER(zlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
511   AC_CHECK_LIB(z,gzopen,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
512   AC_CHECK_LIB(z,gzeof,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
513   AC_CHECK_LIB(z,gzgetc,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
514   AC_CHECK_LIB(z,gzgets,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
515   AC_CHECK_LIB(z,gzclose,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
516   AC_MSG_CHECKING(if zlib package is complete)
517   if test $failed -gt 0
518   then
519      AC_MSG_RESULT(no -- some components failed test)
520      ZLIB_LIBS=""
521      have_zlib=no
522   else
523      AC_MSG_RESULT(working)
524      AC_DEFINE(HAVE_ZLIB,1,[Define to 1 if you have a working zlib library.])
525      ZLIB_LIBS="-lz"
526      have_zlib=yes
527
528      AC_CHECK_LIB(z,gzbuffer,have_gzbuffer=1,have_gzbuffer=0)
529      if test $have_gzbuffer -gt 0
530      then
531        AC_DEFINE(HAVE_ZLIB_GZBUFFER,1,[Define to 1 if your zlib library has a gzbuffer function.])
532      fi
533   fi
534   ;;
535
536esac
537AC_SUBST(ZLIB_LIBS)
538
539
540# bzip2 package
541
542AC_MSG_CHECKING(for bzlib support)
543AC_ARG_ENABLE([bzlib],
544              AC_HELP_STRING([--enable-bzlib],
545                             [Enable bzlib support (option needed for uncompressing bzip2 files) (default=yes)]),
546              [answer="$enableval"],
547              [answer=""])
548case x"$answer" in
549   xno)
550   AC_MSG_RESULT(disabled)
551   BZLIB_LIBS=""
552   have_bzlib=no
553   ;;
554
555   *)
556   AC_MSG_RESULT(enabled)
557   failed=0;
558   passed=0;
559   AC_CHECK_HEADER(bzlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
560   AC_CHECK_LIB(bz2,BZ2_bzReadOpen,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
561   AC_CHECK_LIB(bz2,BZ2_bzRead,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
562   AC_CHECK_LIB(bz2,BZ2_bzReadClose,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
563   AC_MSG_CHECKING(if bzlib package is complete)
564   if test $failed -gt 0
565   then
566      AC_MSG_RESULT(no -- some components failed test)
567      BZLIB_LIBS=""
568      have_bzlib=no
569   else
570      AC_MSG_RESULT(working)
571      AC_DEFINE(HAVE_BZLIB,1,[Define to 1 if you have a working bzlib library.])
572      BZLIB_LIBS="-lbz2"
573      have_bzlib=yes
574   fi
575   ;;
576
577esac
578AC_SUBST(BZLIB_LIBS)
579
580
581AC_CONFIG_FILES([Makefile])
582AC_CONFIG_FILES([src/Makefile])
583#AC_CONFIG_FILES([lib/gmap-${LIBGMAP_API_VERSION}.pc:lib/gmap.pc.in])
584#AC_CONFIG_FILES([mpi/Makefile])
585AC_CONFIG_FILES([util/Makefile])
586AC_CONFIG_FILES([util/gmap_process.pl])
587AC_CONFIG_FILES([util/gmap_build.pl])
588AC_CONFIG_FILES([util/gmap_cat.pl])
589AC_CONFIG_FILES([util/md_coords.pl])
590AC_CONFIG_FILES([util/fa_coords.pl])
591AC_CONFIG_FILES([util/psl_splicesites.pl])
592AC_CONFIG_FILES([util/psl_introns.pl])
593AC_CONFIG_FILES([util/psl_genes.pl])
594AC_CONFIG_FILES([util/ensembl_genes.pl])
595AC_CONFIG_FILES([util/gtf_splicesites.pl])
596AC_CONFIG_FILES([util/gtf_transcript_splicesites.pl])
597AC_CONFIG_FILES([util/gtf_introns.pl])
598AC_CONFIG_FILES([util/gtf_genes.pl])
599AC_CONFIG_FILES([util/gff3_splicesites.pl])
600AC_CONFIG_FILES([util/gff3_introns.pl])
601AC_CONFIG_FILES([util/gff3_genes.pl])
602AC_CONFIG_FILES([util/dbsnp_iit.pl])
603AC_CONFIG_FILES([util/gvf_iit.pl])
604AC_CONFIG_FILES([util/vcf_iit.pl])
605AC_CONFIG_FILES([tests/Makefile])
606AC_CONFIG_FILES([tests/align.test],[chmod +x tests/align.test])
607AC_CONFIG_FILES([tests/coords1.test],[chmod +x tests/coords1.test])
608AC_CONFIG_FILES([tests/setup1.test],[chmod +x tests/setup1.test])
609AC_CONFIG_FILES([tests/iit.test],[chmod +x tests/iit.test])
610
611AC_OUTPUT
612
613if test x"$perl_warning" = xyes; then
614  AC_MSG_WARN([
615
616WARNING: You don't seem to have perl installed with working
617versions of the IO::File and Getopt::Std modules.  If you know
618where such a version of Perl exists, please specify its full
619path under PERL in the config.site file and run configure again.
620])
621fi
622
623if test x"$pthread_warning" = xyes; then
624  AC_MSG_WARN([
625
626WARNING: You don't seem to have headers and libraries for pthreads.
627GMAP will work without these, but the program can run faster on
628multiprocessor machines if POSIX threads are available.  If you wish
629to enable pthreads, please specify the appropriate values for CC,
630PTHREAD_CFLAGS, and PTHREAD_LIBS in the config.site file and run
631configure again.  Otherwise, you may proceed with the rest of the
632installation.
633])
634fi
635
636if test x"$acx_mmap_fixed_ok" != xyes; then
637  if test x$"acx_mmap_variable_ok" != xyes; then
638    AC_MSG_WARN([
639
640WARNING: You don't seem to have memory mapping.  GMAP will work
641without this, but the program can run faster if memory mapping is
642available.  If you wish to enable memory mapping, please specify the
643appropriate values for CC, PTHREAD_CFLAGS, and PTHREAD_LIBS in the
644config.site file and run configure again.  Otherwise, you may proceed
645with the rest of the installation.
646])
647  fi
648fi
649
650if test x"$ax_cv_sse2_shift_defect" = xyes; then
651  AC_MSG_WARN([
652
653WARNING: Your C compiler does not know how to handle a particular
654form of the SSE2 shift commands, and must be somewhat old (probably
655gcc 4.1 or gcc 4.2).  The configure script has therefore substituted
656alternate C code that your compiler can handle.  However, for
657optimal performance, you may want to obtain a more recent C compiler
658and build the code with that.
659])
660fi
661
662if test x"$ax_cv_ext_compiler_problem" = x"yes"; then
663  AC_MSG_WARN([
664
665WARNING: Your C compiler appears not to take advantage of all of the
666SIMD features available on your computer, and must be somewhat old.
667The configure script has therefore substituted alternate C code that
668your compiler can handle.  However, for optimal performance, you may
669want to obtain a more recent C compiler and build the code with that.
670Here are the compiler flags to be used for SIMD:
671])
672fi
673
674if test x"$ax_cv_ext_linker_problem" = x"yes"; then
675  AC_MSG_WARN([
676
677WARNING: Your C linker appears not to work on SIMD header files that
678your C compiler accepts, so there appears to be some incompatibility
679between your compiler and linker.  The configure script has therefore
680substituted alternate C code that your linker can handle.  However,
681for optimal performance, you may need to set your LDFLAGS or
682LD_LIBRARY_PATH environment variable to the correct directory, or
683rebuild your compiler and linker.
684])
685fi
686
687AC_MSG_CHECKING(standard compiler and flags to be used)
688AC_MSG_RESULT($CC $CFLAGS)
689AC_MSG_CHECKING(standard linker flags to be used)
690AC_MSG_RESULT($LD_FLAGS)
691
692#AC_MSG_CHECKING(MPI compiler and flags to be used)
693#AC_MSG_RESULT($MPICC $MPI_CFLAGS)
694#AC_MSG_CHECKING(MPI linker flags to be used)
695#AC_MSG_RESULT($MPI_CLDFLAGS)
696
697AC_MSG_CHECKING(pthread compiler flags to be used)
698AC_MSG_RESULT($PTHREAD_CFLAGS)
699
700AC_MSG_CHECKING(popcnt flags to be used)
701AC_MSG_RESULT($POPCNT_CFLAGS)
702
703AC_MSG_CHECKING(compile level)
704AC_MSG_RESULT($compile_level)
705
706
707# Re-using SIMD_AVX512_CFLAGS here
708if test "$compile_level" = avx512bw; then
709   AC_MSG_CHECKING(AVX512BW compiler flags to be used)
710   AC_MSG_RESULT($SIMD_AVX512_CFLAGS)
711fi
712
713if test "$compile_level" = avx512; then
714   AC_MSG_CHECKING(AVX512 compiler flags to be used)
715   AC_MSG_RESULT($SIMD_AVX512_CFLAGS)
716fi
717
718if test "$compile_level" = avx2; then
719   AC_MSG_CHECKING(AVX2 compiler flags to be used)
720   AC_MSG_RESULT($SIMD_AVX2_CFLAGS)
721fi
722
723if test "$compile_level" = sse42; then
724   AC_MSG_CHECKING(SSE4.2 compiler flags to be used)
725   AC_MSG_RESULT($SIMD_SSE4_2_CFLAGS)
726fi
727
728if test "$compile_level" = sse41; then
729   AC_MSG_CHECKING(SSE4.1 compiler flags to be used)
730   AC_MSG_RESULT($SIMD_SSE4_1_CFLAGS)
731fi
732
733if test "$compile_level" = ssse3; then
734   AC_MSG_CHECKING(SSSE3 compiler flags to be used)
735   AC_MSG_RESULT($SIMD_SSSE3_CFLAGS)
736fi
737
738if test "$compile_level" = sse2; then
739   AC_MSG_CHECKING(SSE2 compiler flags to be used)
740   AC_MSG_RESULT($SIMD_SSE2_CFLAGS)
741fi
742
743
744#AC_MSG_CHECKING(SIMD features available on computer)
745#AC_MSG_RESULT($ax_cv_cpu_features)
746#AC_MSG_CHECKING(SIMD compiler flags to be used)
747#AC_MSG_RESULT($SIMD_CFLAGS)
748
749