source: trunk/configure.ac @ 4326

Last change on this file since 4326 was 4326, checked in by Peter, 7 months ago

We had two macros with very similar behaviour: YAT_AC_APPEND in
'yat_svn_release' and private macro _YAT_AC_APPEND_TO_FILE. Replace
with new macro YAT_AC_APPEND_TO_FILE with tested and documented
behaviour. Similarly a macro YAT_AC_WRITE_TO_FILE.

Introduce a new macro YAT_AM_LOCAL, which is recommended to use when
using any of the macros generating automake input.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 19.8 KB
Line 
1## Process this file with autoconf to produce a configure script.
2##
3## $Id: configure.ac 4326 2023-03-12 00:37:24Z 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, 2021, 2022 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
118
119AC_PROG_SED
120LT_INIT
121
122# find the compiler vendor: gnu, intel, etc
123AX_COMPILER_VENDOR
124
125AC_ARG_VAR([DOXYGEN], [path to doxygen program])
126have_doxygen=no
127
128# Let the user turn off usage of doxygen
129AS_VAR_IF([DOXYGEN], [no], [
130  have_doxygen=notwanted
131], [
132  AC_PATH_PROG([DOXYGEN], [doxygen], [no])
133  AS_VAR_IF([DOXYGEN], [no], [
134   AC_MSG_WARN([unable to find doxygen application])
135  ], [ # if we found doxygen look that it's new enough
136   doxygen_min_version=1.5
137   AC_MSG_CHECKING([if doxygen is at least $doxygen_min_version])
138   doxygen_version=`$DOXYGEN --version`
139   AX_COMPARE_VERSION([$doxygen_version], [ge], [$doxygen_min_version],
140                      [have_doxygen=yes], [have_doxygen=old])
141   AC_MSG_RESULT([$doxygen_version])
142 ])
143])
144
145AC_SUBST(have_doxygen)
146AM_CONDITIONAL([DX_ENABLE_HTML], [test x$have_doxygen = xyes])
147
148# check for quiet_NaN support in OS
149# Check at run-time, but if we are cross-compiling fall back on a
150# compilation test
151AC_MSG_CHECKING([if std::numeric_limits<>::has_quiet_NaN is true])
152AC_RUN_IFELSE(
153  [AC_LANG_PROGRAM(
154    [@%:@include <limits>],
155    [return !std::numeric_limits<double>::has_quiet_NaN])],
156  [quiet_nan=yes
157   AC_MSG_RESULT($quiet_nan)],
158  [quiet_nan=no
159   AC_MSG_RESULT($quiet_nan)],
160  # if we are cross-compiling fall back on compilation test
161  [AC_MSG_RESULT(cross-compiling)
162   AC_MSG_CHECKING([for std::numeric_limits<>::quiet_NaN()])
163    AC_COMPILE_IFELSE(
164     [AC_LANG_PROGRAM(
165        [@%:@include <limits>
166         extern void f(double);],
167        [f(std::numeric_limits<double>::quiet_NaN())])],
168     [quiet_nan=yes],
169     [quiet_nan=no])
170   AC_MSG_RESULT($quiet_nan)])
171# No support for quiet NAN is fatal -- sub-sequent compilation, or execution
172# of created binary, will fail.
173AS_IF([test x"$quiet_nan" = x"no"], [
174  AC_MSG_FAILURE([dnl
175Support for quiet NAN required. yat will not work on this system!])
176])
177
178# Check for infinity support for doubles in OS
179# Check at run-time, but if we are cross-compiling fall back on a
180# compilation test
181AC_MSG_CHECKING([if std::numeric_limits<>::has_infinity is true])
182AC_RUN_IFELSE(
183  [AC_LANG_PROGRAM(
184    [@%:@include <limits>],
185    [return !std::numeric_limits<double>::has_infinity])],
186  [has_infinity=yes
187   AC_MSG_RESULT($has_infinity)],
188  [has_infinity=no
189   AC_MSG_RESULT($has_infinity)],
190  # if we are cross-compiling fall back on compilation test
191  [AC_MSG_RESULT(cross-compiling)
192   AC_MSG_CHECKING([for std::numeric_limits<>::infinity()])
193    AC_COMPILE_IFELSE(
194     [AC_LANG_PROGRAM(
195        [@%:@include <limits>
196         extern void f(double);],
197        [f(std::numeric_limits<double>::infinity())])],
198     [has_infinity=yes],
199     [has_infinity=no])
200   AC_MSG_RESULT($has_infinity)])
201# No support for infinity is fatal -- sub-sequent compilation, or execution
202# of created binary, will fail.
203AS_IF([test x"${has_infinity}" = x"no"], [
204  AC_MSG_FAILURE([dnl
205Support for infinity required. yat will not work on this system!])
206])
207
208
209AC_MSG_CHECKING([g++ deprecation attribute])
210AC_COMPILE_IFELSE(
211   [AC_LANG_PROGRAM([[void f() __attribute__ ((deprecated));]],)],
212   [AC_DEFINE([YAT_HAVE_GCC_DEPRECATED], [1],
213              [Define if compiler supports deprecated attribute, as in g++ 4.0])
214    AC_MSG_RESULT([yes])],
215   [AC_MSG_RESULT([no])] )
216
217# Save user-defined environment settings for later restoration
218APR_SAVE_THE_ENVIRONMENT(CPPFLAGS)
219APR_SAVE_THE_ENVIRONMENT(CXXFLAGS)
220APR_SAVE_THE_ENVIRONMENT(LDFLAGS)
221APR_SAVE_THE_ENVIRONMENT(LIBS)
222user_LIBS=$LIBS
223
224AS_CASE([$host_os], [darwin*], [
225  YAT_LD_ADD_FLAG([LDFLAGS], [-Wl,-flat_namespace])
226])
227
228# prefer using libtool in link tests
229YAT_USE_LIBTOOL_PUSH
230
231YAT_THREAD([
232  CPPFLAGS="$CPPFLAGS $YAT_THREAD_CPPFLAGS"
233  LIBS="$LIBS $YAT_THREAD_LIBS"
234], [
235  AC_MSG_FAILURE([$CXX does not work with std::thread])
236])
237
238# Checks for libraries.
239AC_MSG_NOTICE([checking for libraries])
240LT_LIB_M
241LIBS="$LIBM $LIBS"
242# we store libs in YAT_STATIC_LIBS that are not suitable to link into
243# libyat but are needed when creating applications linking against
244# libyat. Typically these are static (only) libraries, but see ticket
245# 737 for discussion.
246YAT_STATIC_LIBS=
247YAT_CHECK_LA_LIBS([
248  double cos(double x);
249  double foo(double x) { return cos(x); }
250], [$LIBS], [$LIBM], [YAT_STATIC_LIBS])
251
252# GNU Scientific Library, GSL http://www.gnu.org/software/gsl/, checks
253m4_define([YAT_REQUIRED_GSL_VERSION], [2.2])
254YAT_CHECK_GSL([YAT_REQUIRED_GSL_VERSION], [],
255   [AC_MSG_FAILURE([dnl
256GSL YAT_REQUIRED_GSL_VERSION (or newer) not found. The GNU Scientific Library
257(GSL) library cannot be found. Please make sure GSL is installed.])
258])
259
260# Boost http://www.boost.org
261m4_define([YAT_REQUIRED_BOOST_VERSION], [1.66])
262AX_BOOST_BASE([YAT_REQUIRED_BOOST_VERSION], [], [AC_MSG_FAILURE([dnl
263Boost YAT_REQUIRED_BOOST_VERSION (or newer) not found. Please install boost, or provide
264CPPFLAGS=-I/path/to/boost])
265])
266# skip boost link tests if boost is not wanted (--without-boost)
267AS_IF([test x"$want_boost" = x"yes"],[
268  YAT_CPP_ADD_FLAG([CPPFLAGS], [$BOOST_CPPFLAGS])
269  YAT_LD_ADD_FLAG([LDFLAGS], [$BOOST_LDFLAGS])
270  AX_BOOST_IOSTREAMS
271  LIBS="$BOOST_IOSTREAMS_LIB $LIBS"
272  # Check if $BOOST_IOSTREAMS_LIB is appropriate for libyat.la
273  YAT_CHECK_LA_LIBS([
274    @%:@include <boost/iostreams/filtering_stream.hpp>
275    int my_func(void)
276    { boost::iostreams::filtering_istream fis; return 0; }
277  ], [$BOOST_IOSTREAMS_LIB $user_LIBS],
278     [$BOOST_IOSTREAMS_LIB],
279     [YAT_STATIC_LIBS])
280
281])
282
283# find library implementing BLAS C API, or use gslcblas
284# We wait doing this test until after -L flags have been added to
285# LDFLAGS from gsl and boost, so the search path is the same in the
286# test as at make time and to avoid using the library (see ticket
287# #922)
288YAT_LIB_CBLAS([YAT_CBLAS_LIB=$CBLAS_LIB], [YAT_CBLAS_LIB=-lgslcblas])
289LIBS="-lgsl $YAT_CBLAS_LIB $LIBS"
290
291YAT_CHECK_LA_LIBS([
292  double gsl_cdf_hypergeometric_P(const unsigned int k, const unsigned int n1,
293                                  const unsigned int n2, const unsigned int t);
294  double yat_foo(void) { return gsl_cdf_hypergeometric_P(1,2,3,10); }
295], [$LIBS], [-lgsl], [YAT_STATIC_LIBS])
296
297# see tickets #648 #687
298AC_MSG_CHECKING([whether constructor in boost concept is supported])
299AC_COMPILE_IFELSE([
300  AC_LANG_PROGRAM(
301    [
302     @%:@include <boost/concept_check.hpp>
303     template <typename T>
304     class MyConcept
305     {
306     public:
307       MyConcept(void) {}
308       BOOST_CONCEPT_USAGE(MyConcept){}
309     };
310    ],[
311     MyConcept<double> x;
312     x = x;
313    ])
314  ],
315  [AC_MSG_RESULT([yes])
316   AC_DEFINE([YAT_HAVE_BOOST_CONCEPT_WITH_CONSTRUCTOR],[1],
317             [define if compiler supports boost concept with constructor])
318  ],
319  [AC_MSG_RESULT([no])]
320)
321
322# Check if boost::iterator_facade::operator-> works with a proxy class
323# as reference_type; otherwise workaround is needed in
324# e.g. BamPairIterator. See ticket #790.
325AC_MSG_CHECKING([if boost::iterator_facade::operator-> works])
326AC_COMPILE_IFELSE(
327  [AC_LANG_PROGRAM(
328    [@%:@include <iterator>
329     @%:@include <boost/iterator/iterator_facade.hpp>
330     struct MyClass { void foo(void) const { } };
331     struct MyProxy { void foo(void) const { } };
332     // a nonsense class (only for compiler test purposes)
333     class MyIterator
334       : public boost::iterator_facade<
335        MyIterator, const MyClass, std::input_iterator_tag, MyProxy
336       >
337     {
338       friend class boost::iterator_core_access;
339       const MyProxy dereference(void) const { return MyProxy(); }
340       bool equal(const MyIterator& other) const { return true; }
341       void increment(void) {}
342     };
343    ],
344    [MyIterator iter; iter->foo();]
345    )
346  ],[
347    AC_MSG_RESULT([yes])
348    AC_DEFINE([YAT_HAVE_BOOST_ITERATOR_FACADE_PROXY_PTR], [1],
349              [Define to 1 if boost::iterator_facade::operator-> works])
350  ],[
351    AC_MSG_RESULT([no])
352  ])
353
354
355# check for hts and samtools available from http://www.htslib.org
356YAT_CHECK_HTSLIB([1.10])
357
358#support for large files
359AC_SYS_LARGEFILE
360if test "$enable_largefile" = "no"; then
361  AC_DEFINE([YAT_LFS_DISABLED], 1,
362            [defined to 1 if large file support is disabled])
363fi
364
365AC_DEFINE([HAVE_INLINE], [1], [Define if inline is available on system])
366# default is same as --disable-debug
367AC_ARG_ENABLE([debug],
368  [AS_HELP_STRING([--enable-debug],[turn on debug options and code])],
369        [], [enable_debug=no])
370
371# If neither --enable-assert nor --disable-assert, set enable_assert
372# to same as enable_debug
373AC_ARG_ENABLE([assert],
374              [AS_HELP_STRING([--enable-assert], [turn on assertions])],
375              [], [enable_assert=$enable_debug])
376
377# we use prefix INTERNAL_ for variables that are solely needed for
378# building yat, i.e., they are not needed for a user of yat and are
379# not propagated to yat-config or yat.m4.
380AC_ARG_VAR([INTERNAL_CPPFLAGS],
381           [Similar to CPPFLAGS but value is not propagated to yat-config])
382AC_ARG_VAR([INTERNAL_CXXFLAGS],
383           [Similar to CXXFLAGS but value is not propagated to yat-config])
384AC_ARG_VAR([INTERNAL_LDFLAGS],
385           [Similar to LDFLAGS but value is not propagated to yat-config])
386
387AS_IF([test "${enable_debug}" = "yes"], [
388  AC_DEFINE([YAT_DEBUG], [1], [Define to activate yat assertioons])
389  YAT_CXX_ADD_FLAG([INTERNAL_CXXFLAGS], [-Wall -pedantic -g -O])
390], [
391  # avoid defining GSL_RANGE_CHECK_OFF if GSL_RANGE_CHECK is already defined
392  AC_CHECK_DECL([GSL_RANGE_CHECK],[],
393                [AC_DEFINE([GSL_RANGE_CHECK_OFF], [1],
394                           [Define to turn off GSL range checks])])
395  # If CXXFLAGS not set by user, set it to default value
396  AS_IF([test x$CXXFLAGS_set_by_user != xyes], [
397    YAT_CXX_ADD_FLAG([INTERNAL_CXXFLAGS],[-O3])
398  ])
399])
400
401AS_IF([test x"$enable_assert" = x"no"], [
402  AC_DEFINE([NDEBUG], [1], [Define to turn off assertions])
403])
404
405# turn off compiler warning #654 from intel compiler
406AS_IF([test x"$ax_cv_cxx_compiler_vendor" = x"intel"], [
407  YAT_CXX_ADD_FLAG([CXXFLAGS], ['-diag-disable 654'])
408])
409
410# Turns warnings to errors in compilation tests. Only put tests that
411# should be warning sensitive below this point. Can't find any
412# mechanism to revert AC_LANG_WERROR
413AC_LANG_WERROR
414
415# GCC 4.0.1 on OSX complains about -pthread (issue #713)
416AS_IF([AS_ECHO(["$CPPFLAGS"]) | $GREP '\-pthread' > /dev/null],
417  [AX_CHECK_PREPROC_FLAG([-pthread], [],
418     [CPPFLAGS=`AS_ECHO(["$CPPFLAGS"]) | $SED 's%-pthread%%'`],
419     [$INTERNAL_CPPFLAGS])
420])
421
422# When compiling boost::Mutable_*Iterator some versions of clang complains:
423# warning: unsequenced modification and access to 'i' [-Wunsequenced]
424# Test if compiler gives that warning, and if it does turn it off.
425yat_save_CXXFLAGS=$CXXFLAGS
426AC_MSG_CHECKING([whether 'boost/concept_check.hpp' causes compiler warnings])
427CXXFLAGS="$INTERNAL_CXXFLAGS $CXXFLAGS"
428AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
429  [
430    @%:@include <boost/concept_check.hpp>
431  ],[
432    BOOST_CONCEPT_ASSERT((boost::Mutable_RandomAccessIterator<double* >));
433  ])
434], [ # IF-SUCCESSFUL
435  AC_MSG_RESULT([no])
436  # restore CXXFLAGS
437  CXXFLAGS=$yat_save_CXXFLAGS
438], [ # IF-FAILED
439  AC_MSG_RESULT([yes])
440  CXXFLAGS=$yat_save_CXXFLAGS
441  YAT_CXX_ADD_FLAG([CXXFLAGS], [-Wno-unsequenced])
442])
443
444AC_CONFIG_FILES([build_support/gen_yat_pc.sh],
445                [chmod +x build_support/gen_yat_pc.sh])
446AC_CONFIG_FILES([Makefile
447     doc/first_page.doxygen
448                 test/defs.sh
449])
450
451AC_CONFIG_HEADERS([yat/utility/config_public.h])
452canonical_abs_top_srcdir=`cd $srcdir && pwd -P`
453AC_SUBST([canonical_abs_top_srcdir])
454canonical_abs_top_builddir=`pwd -P`
455AC_SUBST([canonical_abs_top_builddir])
456
457# for the test suite
458yat_abs_top_srcdir=`cd $srcdir && pwd`
459AC_DEFINE_UNQUOTED([YAT_ABS_TOP_SRCDIR], ["$yat_abs_top_srcdir"],
460                   [Define to absolute path to top yat src dir])
461
462# Reset flags
463APR_RESTORE_THE_ENVIRONMENT(CPPFLAGS, YAT_)
464APR_RESTORE_THE_ENVIRONMENT(CXXFLAGS, YAT_)
465APR_RESTORE_THE_ENVIRONMENT(LDFLAGS, YAT_)
466APR_RESTORE_THE_ENVIRONMENT(LIBS, YAT_)
467
468# Set some variables useful when linking
469AC_SUBST([YAT_STATIC_LIBS])
470
471# libs used in libyat.la
472yat_libyat_la_LIBADD="$YAT_LIBS"
473# We avoid linking in cblas in libyat.la, to let users choose
474# favourite cblas library at link time.
475YAT_VAR_REMOVE([yat_libyat_la_LIBADD], [$YAT_CBLAS_LIB])
476# we avoid linking in YAT_STATIC_LIBS as they have been detected to
477# not be suitable libtool archive.
478YAT_VAR_REMOVE([yat_libyat_la_LIBADD], [$YAT_STATIC_LIBS])
479AC_SUBST([yat_libyat_la_LIBADD])
480
481# Primary LIBS are same as linked into libyat.la excluding LIBM
482YAT_PRIMARY_LIBS=$yat_libyat_la_LIBADD
483YAT_VAR_REMOVE([YAT_PRIMARY_LIBS], [$LIBM])
484AC_SUBST(YAT_PRIMARY_LIBS)
485
486# Assign LIBS variables for yat.pc
487YAT_PC_LIBS_PRIVATE=$YAT_LIBS
488
489# Dependency to GSL is noted via 'Requires' field
490YAT_VAR_REMOVE([YAT_PC_LIBS_PRIVATE], [-lgsl $YAT_CBLAS_LIB $LIBM])
491YAT_PC_REQUIRES="gsl >= YAT_REQUIRED_GSL_VERSION"
492
493# ignore this whole htslib thing if --without-htslib
494AS_IF([test x$with_htslib != x"no"], [
495  # htslib comes with a pc file, so we can require htslib in yat.pc
496  YAT_VAR_REMOVE([YAT_PC_LIBS_PRIVATE], [$HTS_LIBS -lz])
497  YAT_PC_REQUIRES="$YAT_PC_REQUIRES htslib"
498])
499
500# Having libs declared as LIBS.private in yat.pc assumes that libs
501# have been linked into libyat. Therefore for each lib check if it is
502# mentioned in $yat_libyat_la_LIBADD, and if it's not move
503# lib to LIBS variable.
504for lib in $YAT_PC_LIBS_PRIVATE; do
505  YAT_SET_CONTAINS([$yat_libyat_la_LIBADD], [$lib], [
506  ], [
507    # move lib from $YAT_PC_LIBS_PRIVATE to $YAT_PC_LIBS
508    YAT_VAR_REMOVE([YAT_PC_LIBS_PRIVATE], [$lib])
509    YAT_PC_LIBS="$YAT_PC_LIBS $lib"
510  ])
511done
512
513AC_SUBST([YAT_PC_LIBS])
514AC_SUBST([YAT_PC_REQUIRES])
515AC_SUBST([YAT_PC_LIBS_PRIVATE])
516AC_SUBST([YAT_PC_REQUIRES_PRIVATE])
517
518# propagate some variables to 'yat-config'
519AC_ARG_VAR([YAT_CONFIG_CPPFLAGS],
520           [Similar to CPPFLAGS but value is only propagated to yat-config])
521AC_ARG_VAR([YAT_CONFIG_CXXFLAGS],
522           [Similar to CXXFLAGS but value is only propagated to yat-config])
523AC_ARG_VAR([YAT_CONFIG_LDFLAGS],
524           [Similar to LDFLAGS but value is only propagated to yat-config])
525AC_SUBST([YAT_CONFIG_CPPFLAGS])
526AC_SUBST([YAT_CONFIG_CXXFLAGS])
527AC_SUBST([YAT_CONFIG_LDFLAGS])
528
529AC_SUBST([GXX])
530AC_SUBST(YAT_LIBS)
531AC_SUBST(YAT_CBLAS_LIB)
532
533# set and AC_SUBST variables that are interpreted by Automake
534AM_CPPFLAGS="$INTERNAL_CPPFLAGS $YAT_CPPFLAGS"
535AM_CXXFLAGS="$INTERNAL_CXXFLAGS $YAT_CXXFLAGS"
536AM_LDFLAGS="$INTERNAL_LDFLAGS $YAT_LDFLAGS"
537
538AC_SUBST(AM_CPPFLAGS)
539AC_SUBST(AM_CXXFLAGS)
540AC_SUBST(AM_LDFLAGS)
541AC_SUBST([enable_shared])
542AC_SUBST([enable_static])
543
544# Name of directory libtool put stuff int - needed for some tests
545AC_SUBST([lt_cv_objdir])
546
547YAT_AM_LOCAL([yat_am_local.am])
548YAT_SVN_RELEASE([],
549  [$(YAT_MAJOR_VERSION).$(YAT_MINOR_VERSION)],
550  [libyat@frs.sourceforge.net:/home/frs/project/l/li/libyat],
551  [https://sourceforge.net/projects/libyat/files/$(distdir).tar.gz/files],
552  [https://dev.thep.lu.se/yat/browser/tags/$(VERSION)/NEWS])
553
554# make shell tests work in VPATH builds
555AC_CONFIG_LINKS([test/init.sh:test/init.sh])
556
557# set some variable for final message
558AS_CASE([$have_doxygen],
559        [yes], [doxygen_message=yes],
560        [no], [doxygen_message="no (doxygen not found)"],
561        [old], [doxygen_message="no (\`$DOXYGEN' too old)"],
562        [notwanted], [doxygen_message="no"],
563        [AC_MSG_WARN([unexpected value \$have_doxygen: '$have_doxygen'])
564         AS_BOX([Report this to ]AC_PACKAGE_BUGREPORT)
565        ])
566
567yat_gslcblas_message=
568AS_IF([test "x$YAT_CBLAS_LIB" = "x-lgslcblas"], [
569yat_gslcblas_message='
570  GSL CBLAS found. This is a reference implementation only.
571  Consider using hardware optimized BLAS.
572  ATLAS (http://math-atlas.sourceforge.net/) provides an
573  optimized BLAS library. It is supported by yat!
574'
575])
576
577# Create output.
578AC_OUTPUT
579
580
581# Some more messages.
582AC_MSG_RESULT([
583yat is configured as follows:
584
585  Build Shared Library: $enable_shared
586  Build Static Library: $enable_static
587  Build Documentation:  $doxygen_message
588  With Bam Support:     $with_htslib
589
590Options used to compile and link:
591  VERSION     = $VERSION
592  CXX         = $CXX
593  CPPFLAGS    = $CPPFLAGS
594  YAT_CPPFLAGS= $AM_CPPFLAGS
595  CXXFLAGS    = $CXXFLAGS
596  YAT_CXXFLAGS= $AM_CXXFLAGS
597  LD          = $LD
598  LDFLAGS     = $LDFLAGS
599  YAT_LDFLAGS = $AM_LDFLAGS
600  LIBS        = $LIBS
601  YAT_LIBS    = $YAT_LIBS
602${yat_gslcblas_message}dnl
603----------------------------------------------------------------
604Now type `make'. dnl
605])
Note: See TracBrowser for help on using the repository browser.