source: trunk/configure.ac

Last change on this file was 3995, checked in by Peter, 8 months ago

avoid using macros marked obsolete and instead use versions in LT_ namespace. This means libtool v2 is required to bootstrap. closes #960.

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