source: trunk/configure.ac

Last change on this file was 4142, checked in by Peter, 4 months ago

prefer https when uploading to sourceforge

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 20.5 KB
Line 
1## Process this file with autoconf to produce a configure script.
2##
3## $Id: configure.ac 4142 2022-02-07 01:03:55Z peter $
4
5# Copyright (C) 2003 Daniel Dalevi, Jari Häkkinen
6# Copyright (C) 2004 Jari Häkkinen
7# Copyright (C) 2005, 2006 Jari Häkkinen, Peter Johansson
8# Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson, Markus Ringnér
9# Copyright (C) 2009 Jari Häkkinen, Peter Johansson
10# Copyright (C) 2010, 2011 Peter Johansson
11# Copyright (C) 2012 Jari Häkkinen, Peter Johansson
12# Copyright (C) 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Peter Johansson
13#
14# This file is part of the yat library, https://dev.thep.lu.se/yat
15#
16# The yat library is free software; you can redistribute it
17# and/or modify it under the terms of the GNU General Public License as
18# published by the Free Software Foundation; either version 3 of the
19# License, or (at your option) any later version.
20#
21# The yat library is distributed in the hope that it will be useful,
22# but WITHOUT ANY WARRANTY; without even the implied warranty of
23# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
24# General Public License for more details.
25#
26# You should have received a copy of the GNU General Public License
27# along with yat. If not, see <https://www.gnu.org/licenses/>.
28#
29# If you grabbed the source from the subversion repository you should,
30# at top-level, execute:
31#     ./bootstrap
32# To push subsequent changes of this file into the build scripts you
33# must issue:
34#     autoreconf
35
36
37m4_include([m4/version.m4])
38AC_INIT([yat],[my_VERSION],[libyat-users@lists.sourceforge.net],,
39        [https://dev.thep.lu.se/yat])
40MY_VERSION
41AC_PREREQ([2.64])
42AC_CONFIG_SRCDIR([yat/utility/Matrix.h])
43AC_CONFIG_AUX_DIR([autotools])
44dnl arg below should be the same as in Makefile.am
45AC_CONFIG_MACRO_DIR([m4])
46AC_PREFIX_DEFAULT([/usr/local])
47
48# Set default htmldir to ${docdir}/html
49AS_VAR_IF([$htmldir], ['${docdir}'], [htmldir='${docdir}/html'])
50
51AC_SUBST([YAT_LT_VERSION], [YAT_LT_VERSION_INFO])
52AC_DEFINE([YAT_VERSION], ["my_VERSION"], [version])
53
54AC_CONFIG_HEADERS([config.h])
55AM_INIT_AUTOMAKE([1.11 std-options color-tests parallel-tests
56                  silent-rules subdir-objects])
57
58# Set default programming language
59AC_LANG(C++)
60
61# propagate selected configure variables to DISTCHECK_CONFIGURE_FLAGS
62for var in CPPFLAGS CXX CXXFLAGS CXXCPP LDFLAGS LIBS; do
63  eval isset=\${$var+set}
64  if test "$isset" = 'set' ; then
65    eval val=$`echo $var`
66    DISTCHECK_CONFIGURE_FLAGS="${DISTCHECK_CONFIGURE_FLAGS}'${var}=${val}' "
67  fi
68done
69AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
70
71# record if CXXFLAGS was set by user for further use below
72AS_IF([test "${CXXFLAGS+set}" = set], [
73  CXXFLAGS_set_by_user=yes
74],[
75  AS_IF([test "${INTERNAL_CXXFLAGS+set}" = set], [
76    CXXFLAGS_set_by_user=yes
77  ], [
78    CXXFLAGS_set_by_user=no
79  ])
80  # set CXXFLAGS to avoid expansion in AC_PROG_CXX
81  CXXFLAGS=
82])
83
84# Checks for programs.
85dnl FIXME remove m4_ifdef when we assume Automake 1.12
86m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
87AC_PROG_CXX
88
89yat_search_cxx11=no
90AC_ARG_ENABLE([cxx11],
91  [AS_HELP_STRING([--enable-cxx11],
92                  [search for compiler options to build with C++11 support])],
93  [AS_CASE([$enable_cxx11],
94           [yes], [yat_search_cxx11=yes],
95           [no], [AC_MSG_ERROR([invalid option: --disable-cxx11])],
96           [AC_MSG_ERROR([invalid argument for --enable-cxx11: $enable_cxx11])])
97  ])
98
99
100YAT_CXX11([$yat_search_cxx11], [
101    yat_has_cxx11=yes
102    # If a C++11 compliant compiler was found, apply the old tests,
103    # just to be sure but with no option searching.
104    # no need to check for YAT_CXX_RVALUE
105    YAT_CXX_ATOMIC([], [yat_has_cxx11=no])
106    YAT_CXX_LOG2([], [yat_has_cxx11=no])
107    YAT_CXX_THROW_IF_NESTED([], [yat_has_cxx11=no])
108  ], [
109    yat_has_cxx11=no
110])
111AS_VAR_IF([yat_has_cxx11], [no], [
112  AC_MSG_FAILURE([$CXX is not a C++11 compiler])
113])
114# test for some features available in modern C++ versions (but not in c++11)
115YAT_FUNC_STRING_ENDS_WITH
116YAT_FUNC_STRING_STARTS_WITH
117YAT_FUNC_STRING_CONTAINS
118sleep 10
119
120AC_PROG_SED
121LT_INIT
122
123# find the compiler vendor: gnu, intel, etc
124AX_COMPILER_VENDOR
125
126AC_ARG_VAR([DOXYGEN], [path to doxygen program])
127have_doxygen=no
128
129# Let the user turn off usage of doxygen
130AS_VAR_IF([DOXYGEN], [no], [
131  have_doxygen=notwanted
132], [
133  AC_PATH_PROG([DOXYGEN], [doxygen], [no])
134  AS_VAR_IF([DOXYGEN], [no], [
135   AC_MSG_WARN([unable to find doxygen application])
136  ], [ # if we found doxygen look that it's new enough
137   doxygen_min_version=1.5
138   AC_MSG_CHECKING([if doxygen is at least $doxygen_min_version])
139   doxygen_version=`$DOXYGEN --version`
140   AX_COMPARE_VERSION([$doxygen_version], [ge], [$doxygen_min_version],
141                      [have_doxygen=yes], [have_doxygen=old])
142   AC_MSG_RESULT([$doxygen_version])
143 ])
144])
145
146AC_SUBST(have_doxygen)
147AM_CONDITIONAL([DX_ENABLE_HTML], [test x$have_doxygen = xyes])
148
149# check for quiet_NaN support in OS
150# Check at run-time, but if we are cross-compiling fall back on a
151# compilation test
152AC_MSG_CHECKING([if std::numeric_limits<>::has_quiet_NaN is true])
153AC_RUN_IFELSE(
154  [AC_LANG_PROGRAM(
155    [@%:@include <limits>],
156    [return !std::numeric_limits<double>::has_quiet_NaN])],
157  [quiet_nan=yes
158   AC_MSG_RESULT($quiet_nan)],
159  [quiet_nan=no
160   AC_MSG_RESULT($quiet_nan)],
161  # if we are cross-compiling fall back on compilation test
162  [AC_MSG_RESULT(cross-compiling)
163   AC_MSG_CHECKING([for std::numeric_limits<>::quiet_NaN()])
164    AC_COMPILE_IFELSE(
165     [AC_LANG_PROGRAM(
166        [@%:@include <limits>
167         extern void f(double);],
168        [f(std::numeric_limits<double>::quiet_NaN())])],
169     [quiet_nan=yes],
170     [quiet_nan=no])
171   AC_MSG_RESULT($quiet_nan)])
172# No support for quiet NAN is fatal -- sub-sequent compilation, or execution
173# of created binary, will fail.
174AS_IF([test x"$quiet_nan" = x"no"], [
175  AC_MSG_FAILURE([dnl
176Support for quiet NAN required. yat will not work on this system!])
177])
178
179# Check for infinity support for doubles in OS
180# Check at run-time, but if we are cross-compiling fall back on a
181# compilation test
182AC_MSG_CHECKING([if std::numeric_limits<>::has_infinity is true])
183AC_RUN_IFELSE(
184  [AC_LANG_PROGRAM(
185    [@%:@include <limits>],
186    [return !std::numeric_limits<double>::has_infinity])],
187  [has_infinity=yes
188   AC_MSG_RESULT($has_infinity)],
189  [has_infinity=no
190   AC_MSG_RESULT($has_infinity)],
191  # if we are cross-compiling fall back on compilation test
192  [AC_MSG_RESULT(cross-compiling)
193   AC_MSG_CHECKING([for std::numeric_limits<>::infinity()])
194    AC_COMPILE_IFELSE(
195     [AC_LANG_PROGRAM(
196        [@%:@include <limits>
197         extern void f(double);],
198        [f(std::numeric_limits<double>::infinity())])],
199     [has_infinity=yes],
200     [has_infinity=no])
201   AC_MSG_RESULT($has_infinity)])
202# No support for infinity is fatal -- sub-sequent compilation, or execution
203# of created binary, will fail.
204AS_IF([test x"${has_infinity}" = x"no"], [
205  AC_MSG_FAILURE([dnl
206Support for infinity required. yat will not work on this system!])
207])
208
209
210AC_MSG_CHECKING([g++ deprecation attribute])
211AC_COMPILE_IFELSE(
212   [AC_LANG_PROGRAM([[void f() __attribute__ ((deprecated));]],)],
213   [AC_DEFINE([YAT_HAVE_GCC_DEPRECATED], [1],
214              [Define if compiler supports deprecated attribute, as in g++ 4.0])
215    AC_MSG_RESULT([yes])],
216   [AC_MSG_RESULT([no])] )
217
218AC_MSG_CHECKING([if std::multiset::iterator is mutable])
219AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <set>
220                                     @%:@include <vector>]],
221                                   [[std::set<std::vector<double> > s;
222                                     std::vector<double> v;
223                                     s.insert(v);
224                                     s.begin()->reserve(100);
225                                   ]])],
226                  [AC_DEFINE([MULTISET_ITERATOR_IS_MUTABLE], [1],
227                             [Define if std::multiset::iterator is mutable])
228                   AC_MSG_RESULT([yes])
229                  ],
230                  [AC_MSG_RESULT([no])] )
231
232# Save user-defined environment settings for later restoration
233APR_SAVE_THE_ENVIRONMENT(CPPFLAGS)
234APR_SAVE_THE_ENVIRONMENT(CXXFLAGS)
235APR_SAVE_THE_ENVIRONMENT(LDFLAGS)
236APR_SAVE_THE_ENVIRONMENT(LIBS)
237user_LIBS=$LIBS
238
239AS_CASE([$host_os], [darwin*], [
240  YAT_LD_ADD_FLAG([LDFLAGS], [-Wl,-flat_namespace])
241])
242
243# prefer using libtool in link tests
244YAT_USE_LIBTOOL_PUSH
245
246YAT_THREAD([
247  CPPFLAGS="$CPPFLAGS $YAT_THREAD_CPPFLAGS"
248  LIBS="$LIBS $YAT_THREAD_LIBS"
249], [
250  AC_MSG_FAILURE([$CXX does not work with std::thread])
251])
252
253# Checks for libraries.
254AC_MSG_NOTICE([checking for libraries])
255LT_LIB_M
256LIBS="$LIBM $LIBS"
257# we store libs in YAT_STATIC_LIBS that are not suitable to link into
258# libyat but are needed when creating applications linking against
259# libyat. Typically these are static (only) libraries, but see ticket
260# 737 for discussion.
261YAT_STATIC_LIBS=
262YAT_CHECK_LA_LIBS([
263  double cos(double x);
264  double foo(double x) { return cos(x); }
265], [$LIBS], [$LIBM], [YAT_STATIC_LIBS])
266
267# GNU Scientific Library, GSL http://www.gnu.org/software/gsl/, checks
268m4_define([YAT_REQUIRED_GSL_VERSION], [1.13])
269YAT_CHECK_GSL([YAT_REQUIRED_GSL_VERSION], [],
270   [AC_MSG_FAILURE([dnl
271GSL YAT_REQUIRED_GSL_VERSION (or newer) not found. The GNU Scientific Library
272(GSL) library cannot be found. Please make sure GSL is installed.])
273])
274
275# Boost http://www.boost.org
276m4_define([YAT_REQUIRED_BOOST_VERSION], [1.35])
277AX_BOOST_BASE([YAT_REQUIRED_BOOST_VERSION], [], [AC_MSG_FAILURE([dnl
278Boost YAT_REQUIRED_BOOST_VERSION (or newer) not found. Please install boost, or provide
279CPPFLAGS=-I/path/to/boost])
280])
281# skip boost link tests if boost is not wanted (--without-boost)
282AS_IF([test x"$want_boost" = x"yes"],[
283  YAT_CPP_ADD_FLAG([CPPFLAGS], [$BOOST_CPPFLAGS])
284  YAT_LD_ADD_FLAG([LDFLAGS], [$BOOST_LDFLAGS])
285  AX_BOOST_IOSTREAMS
286  LIBS="$BOOST_IOSTREAMS_LIB $LIBS"
287  # Check if $BOOST_IOSTREAMS_LIB is appropriate for libyat.la
288  YAT_CHECK_LA_LIBS([
289    @%:@include <boost/iostreams/filtering_stream.hpp>
290    int my_func(void)
291    { boost::iostreams::filtering_istream fis; return 0; }
292  ], [$BOOST_IOSTREAMS_LIB $user_LIBS],
293     [$BOOST_IOSTREAMS_LIB],
294     [YAT_STATIC_LIBS])
295
296])
297
298# find library implementing BLAS C API, or use gslcblas
299# We wait doing this test until after -L flags have been added to
300# LDFLAGS from gsl and boost, so the search path is the same in the
301# test as at make time and to avoid using the library (see ticket
302# #922)
303YAT_LIB_CBLAS([YAT_CBLAS_LIB=$CBLAS_LIB], [YAT_CBLAS_LIB=-lgslcblas])
304LIBS="-lgsl $YAT_CBLAS_LIB $LIBS"
305
306YAT_CHECK_LA_LIBS([
307  double gsl_cdf_hypergeometric_P(const unsigned int k, const unsigned int n1,
308                                  const unsigned int n2, const unsigned int t);
309  double yat_foo(void) { return gsl_cdf_hypergeometric_P(1,2,3,10); }
310], [$LIBS], [-lgsl], [YAT_STATIC_LIBS])
311
312# see tickets #648 #687
313AC_MSG_CHECKING([whether constructor in boost concept is supported])
314AC_COMPILE_IFELSE([
315  AC_LANG_PROGRAM(
316    [
317     @%:@include <boost/concept_check.hpp>
318     template <typename T>
319     class MyConcept
320     {
321     public:
322       MyConcept(void) {}
323       BOOST_CONCEPT_USAGE(MyConcept){}
324     };
325    ],[
326     MyConcept<double> x;
327     x = x;
328    ])
329  ],
330  [AC_MSG_RESULT([yes])
331   AC_DEFINE([YAT_HAVE_BOOST_CONCEPT_WITH_CONSTRUCTOR],[1],
332             [define if compiler supports boost concept with constructor])
333  ],
334  [AC_MSG_RESULT([no])]
335)
336
337# Check if boost::iterator_facade::operator-> works with a proxy class
338# as reference_type; otherwise workaround is needed in
339# e.g. BamPairIterator. See ticket #790.
340AC_MSG_CHECKING([if boost::iterator_facade::operator-> works])
341AC_COMPILE_IFELSE(
342  [AC_LANG_PROGRAM(
343    [@%:@include <iterator>
344     @%:@include <boost/iterator/iterator_facade.hpp>
345     struct MyClass { void foo(void) const { } };
346     struct MyProxy { void foo(void) const { } };
347     // a nonsense class (only for compiler test purposes)
348     class MyIterator
349       : public boost::iterator_facade<
350        MyIterator, const MyClass, std::input_iterator_tag, MyProxy
351       >
352     {
353       friend class boost::iterator_core_access;
354       const MyProxy dereference(void) const { return MyProxy(); }
355       bool equal(const MyIterator& other) const { return true; }
356       void increment(void) {}
357     };
358    ],
359    [MyIterator iter; iter->foo();]
360    )
361  ],[
362    AC_MSG_RESULT([yes])
363    AC_DEFINE([YAT_HAVE_BOOST_ITERATOR_FACADE_PROXY_PTR], [1],
364              [Define to 1 if boost::iterator_facade::operator-> works])
365  ],[
366    AC_MSG_RESULT([no])
367  ])
368
369
370# check for hts and samtools available from http://www.htslib.org
371YAT_CHECK_HTSLIB
372
373#support for large files
374AC_SYS_LARGEFILE
375if test "$enable_largefile" = "no"; then
376  AC_DEFINE([YAT_LFS_DISABLED], 1,
377            [defined to 1 if large file support is disabled])
378fi
379
380AC_DEFINE([HAVE_INLINE], [1], [Define if inline is available on system])
381# default is same as --disable-debug
382AC_ARG_ENABLE([debug],
383  [AS_HELP_STRING([--enable-debug],[turn on debug options and code])],
384        [], [enable_debug=no])
385
386# If neither --enable-assert nor --disable-assert, set enable_assert
387# to same as enable_debug
388AC_ARG_ENABLE([assert],
389              [AS_HELP_STRING([--enable-assert], [turn on assertions])],
390              [], [enable_assert=$enable_debug])
391
392# we use prefix INTERNAL_ for variables that are solely needed for
393# building yat, i.e., they are not needed for a user of yat and are
394# not propagated to yat-config or yat.m4.
395AC_ARG_VAR([INTERNAL_CPPFLAGS],
396           [Similar to CPPFLAGS but value is not propagated to yat-config])
397AC_ARG_VAR([INTERNAL_CXXFLAGS],
398           [Similar to CXXFLAGS but value is not propagated to yat-config])
399AC_ARG_VAR([INTERNAL_LDFLAGS],
400           [Similar to LDFLAGS but value is not propagated to yat-config])
401
402AS_IF([test "${enable_debug}" = "yes"], [
403  AC_DEFINE([YAT_DEBUG], [1], [Define to activate yat assertioons])
404  YAT_CXX_ADD_FLAG([INTERNAL_CXXFLAGS], [-Wall -pedantic -g -O])
405], [
406  # avoid defining GSL_RANGE_CHECK_OFF if GSL_RANGE_CHECK is already defined
407  AC_CHECK_DECL([GSL_RANGE_CHECK],[],
408                [AC_DEFINE([GSL_RANGE_CHECK_OFF], [1],
409                           [Define to turn off GSL range checks])])
410  # If CXXFLAGS not set by user, set it to default value
411  AS_IF([test x$CXXFLAGS_set_by_user != xyes], [
412    YAT_CXX_ADD_FLAG([INTERNAL_CXXFLAGS],[-O3])
413  ])
414])
415
416AS_IF([test x"$enable_assert" = x"no"], [
417  AC_DEFINE([NDEBUG], [1], [Define to turn off assertions])
418])
419
420# turn off compiler warning #654 from intel compiler
421AS_IF([test x"$ax_cv_cxx_compiler_vendor" = x"intel"], [
422  YAT_CXX_ADD_FLAG([CXXFLAGS], ['-diag-disable 654'])
423])
424
425# Turns warnings to errors in compilation tests. Only put tests that
426# should be warning sensitive below this point. Can't find any
427# mechanism to revert AC_LANG_WERROR
428AC_LANG_WERROR
429
430# GCC 4.0.1 on OSX complains about -pthread (issue #713)
431AS_IF([AS_ECHO(["$CPPFLAGS"]) | $GREP '\-pthread' > /dev/null],
432  [AX_CHECK_PREPROC_FLAG([-pthread], [],
433     [CPPFLAGS=`AS_ECHO(["$CPPFLAGS"]) | $SED 's%-pthread%%'`],
434     [$INTERNAL_CPPFLAGS])
435])
436
437# When compiling boost::Mutable_*Iterator some versions of clang complains:
438# warning: unsequenced modification and access to 'i' [-Wunsequenced]
439# Test if compiler gives that warning, and if it does turn it off.
440yat_save_CXXFLAGS=$CXXFLAGS
441AC_MSG_CHECKING([whether 'boost/concept_check.hpp' causes compiler warnings])
442CXXFLAGS="$INTERNAL_CXXFLAGS $CXXFLAGS"
443AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
444  [
445    @%:@include <boost/concept_check.hpp>
446  ],[
447    BOOST_CONCEPT_ASSERT((boost::Mutable_RandomAccessIterator<double* >));
448  ])
449], [ # IF-SUCCESSFUL
450  AC_MSG_RESULT([no])
451  # restore CXXFLAGS
452  CXXFLAGS=$yat_save_CXXFLAGS
453], [ # IF-FAILED
454  AC_MSG_RESULT([yes])
455  CXXFLAGS=$yat_save_CXXFLAGS
456  YAT_CXX_ADD_FLAG([CXXFLAGS], [-Wno-unsequenced])
457])
458
459AC_CONFIG_FILES([build_support/gen_yat_pc.sh],
460                [chmod +x build_support/gen_yat_pc.sh])
461AC_CONFIG_FILES([Makefile
462     doc/first_page.doxygen
463                 test/defs.sh
464])
465
466AC_CONFIG_HEADERS([yat/utility/config_public.h])
467canonical_abs_top_srcdir=`cd $srcdir && pwd -P`
468AC_SUBST([canonical_abs_top_srcdir])
469canonical_abs_top_builddir=`pwd -P`
470AC_SUBST([canonical_abs_top_builddir])
471
472# for the test suite
473yat_abs_top_srcdir=`cd $srcdir && pwd`
474AC_DEFINE_UNQUOTED([YAT_ABS_TOP_SRCDIR], ["$yat_abs_top_srcdir"],
475                   [Define to absolute path to top yat src dir])
476
477# Reset flags
478APR_RESTORE_THE_ENVIRONMENT(CPPFLAGS, YAT_)
479APR_RESTORE_THE_ENVIRONMENT(CXXFLAGS, YAT_)
480APR_RESTORE_THE_ENVIRONMENT(LDFLAGS, YAT_)
481APR_RESTORE_THE_ENVIRONMENT(LIBS, YAT_)
482
483# Set some variables useful when linking
484AC_SUBST([YAT_STATIC_LIBS])
485
486# libs used in libyat.la
487yat_libyat_la_LIBADD="$YAT_LIBS"
488# We avoid linking in cblas in libyat.la, to let users choose
489# favourite cblas library at link time.
490YAT_VAR_REMOVE([yat_libyat_la_LIBADD], [$YAT_CBLAS_LIB])
491# we avoid linking in YAT_STATIC_LIBS as they have been detected to
492# not be suitable libtool archive.
493YAT_VAR_REMOVE([yat_libyat_la_LIBADD], [$YAT_STATIC_LIBS])
494AC_SUBST([yat_libyat_la_LIBADD])
495
496# Primary LIBS are same as linked into libyat.la excluding LIBM
497YAT_PRIMARY_LIBS=$yat_libyat_la_LIBADD
498YAT_VAR_REMOVE([YAT_PRIMARY_LIBS], [$LIBM])
499AC_SUBST(YAT_PRIMARY_LIBS)
500
501# Assign LIBS variables for yat.pc
502YAT_PC_LIBS_PRIVATE=$YAT_LIBS
503
504# Dependency to GSL is noted via 'Requires' field
505YAT_VAR_REMOVE([YAT_PC_LIBS_PRIVATE], [-lgsl $YAT_CBLAS_LIB $LIBM])
506YAT_PC_REQUIRES="gsl >= YAT_REQUIRED_GSL_VERSION"
507
508# ignore this whole htslib thing if --without-htslib
509AS_IF([test x$with_htslib != x"no"], [
510  # htslib comes with a pc file, so we can require htslib in yat.pc
511  YAT_VAR_REMOVE([YAT_PC_LIBS_PRIVATE], [$HTS_LIBS -lz])
512  YAT_PC_REQUIRES="$YAT_PC_REQUIRES htslib"
513])
514
515# Having libs declared as LIBS.private in yat.pc assumes that libs
516# have been linked into libyat. Therefore for each lib check if it is
517# mentioned in $yat_libyat_la_LIBADD, and if it's not move
518# lib to LIBS variable.
519for lib in $YAT_PC_LIBS_PRIVATE; do
520  YAT_SET_CONTAINS([$yat_libyat_la_LIBADD], [$lib], [
521  ], [
522    # move lib from $YAT_PC_LIBS_PRIVATE to $YAT_PC_LIBS
523    YAT_VAR_REMOVE([YAT_PC_LIBS_PRIVATE], [$lib])
524    YAT_PC_LIBS="$YAT_PC_LIBS $lib"
525  ])
526done
527
528AC_SUBST([YAT_PC_LIBS])
529AC_SUBST([YAT_PC_REQUIRES])
530AC_SUBST([YAT_PC_LIBS_PRIVATE])
531AC_SUBST([YAT_PC_REQUIRES_PRIVATE])
532
533# propagate some variables to 'yat-config'
534AC_ARG_VAR([YAT_CONFIG_CPPFLAGS],
535           [Similar to CPPFLAGS but value is only propagated to yat-config])
536AC_ARG_VAR([YAT_CONFIG_CXXFLAGS],
537           [Similar to CXXFLAGS but value is only propagated to yat-config])
538AC_ARG_VAR([YAT_CONFIG_LDFLAGS],
539           [Similar to LDFLAGS but value is only propagated to yat-config])
540AC_SUBST([YAT_CONFIG_CPPFLAGS])
541AC_SUBST([YAT_CONFIG_CXXFLAGS])
542AC_SUBST([YAT_CONFIG_LDFLAGS])
543
544AC_SUBST([GXX])
545AC_SUBST(YAT_LIBS)
546AC_SUBST(YAT_CBLAS_LIB)
547
548# set and AC_SUBST variables that are interpreted by Automake
549AM_CPPFLAGS="$INTERNAL_CPPFLAGS $YAT_CPPFLAGS"
550AM_CXXFLAGS="$INTERNAL_CXXFLAGS $YAT_CXXFLAGS"
551AM_LDFLAGS="$INTERNAL_LDFLAGS $YAT_LDFLAGS"
552
553AC_SUBST(AM_CPPFLAGS)
554AC_SUBST(AM_CXXFLAGS)
555AC_SUBST(AM_LDFLAGS)
556AC_SUBST([enable_shared])
557AC_SUBST([enable_static])
558
559# Name of directory libtool put stuff int - needed for some tests
560AC_SUBST([lt_cv_objdir])
561
562YAT_SVN_RELEASE([am/maintainer.am],
563  [$(YAT_MAJOR_VERSION).$(YAT_MINOR_VERSION)],
564  [libyat@frs.sourceforge.net:/home/frs/project/l/li/libyat],
565  [https://sourceforge.net/projects/libyat/files/$(distdir).tar.gz/files],
566  [https://dev.thep.lu.se/yat/browser/tags/$(VERSION)/NEWS])
567
568# make shell tests work in VPATH builds
569AC_CONFIG_LINKS([test/init.sh:test/init.sh])
570
571# set some variable for final message
572AS_CASE([$have_doxygen],
573        [yes], [doxygen_message=yes],
574        [no], [doxygen_message="no (doxygen not found)"],
575        [old], [doxygen_message="no (\`$DOXYGEN' too old)"],
576        [notwanted], [doxygen_message="no"],
577        [AC_MSG_WARN([unexpected value \$have_doxygen: '$have_doxygen'])
578         AS_BOX([Report this to ]AC_PACKAGE_BUGREPORT)
579        ])
580
581yat_gslcblas_message=
582AS_IF([test "x$YAT_CBLAS_LIB" = "x-lgslcblas"], [
583yat_gslcblas_message='
584  GSL CBLAS found. This is a reference implementation only.
585  Consider using hardware optimized BLAS.
586  ATLAS (http://math-atlas.sourceforge.net/) provides an
587  optimized BLAS library. It is supported by yat!
588'
589])
590
591# Create output.
592AC_OUTPUT
593
594
595# Some more messages.
596AC_MSG_RESULT([
597yat is configured as follows:
598
599  Build Shared Library: $enable_shared
600  Build Static Library: $enable_static
601  Build Documentation:  $doxygen_message
602  With Bam Support:     $with_htslib
603
604Options used to compile and link:
605  VERSION     = $VERSION
606  CXX         = $CXX
607  CPPFLAGS    = $CPPFLAGS
608  YAT_CPPFLAGS= $AM_CPPFLAGS
609  CXXFLAGS    = $CXXFLAGS
610  YAT_CXXFLAGS= $AM_CXXFLAGS
611  LD          = $LD
612  LDFLAGS     = $LDFLAGS
613  YAT_LDFLAGS = $AM_LDFLAGS
614  LIBS        = $LIBS
615  YAT_LIBS    = $YAT_LIBS
616${yat_gslcblas_message}dnl
617----------------------------------------------------------------
618Now type `make'. dnl
619])
Note: See TracBrowser for help on using the repository browser.