Diff of /configure.ac [000000] .. [942946] Maximize Restore

  Switch to unified view

a b/configure.ac
1
dnl Process this file with autoconf to produce a configure script.
2
AC_INIT([JAGS], [0.97.1], [jags@iarc.fr], [JAGS])
3
AC_CONFIG_SRCDIR(src/lib/Console.cc)
4
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
5
6
AC_PROG_CXX
7
AM_PROG_LEX
8
AC_PROG_YACC
9
10
case "${host_os}" in
11
  darwin*)
12
    ## Allow linking of code compiled with Apple GCC and code
13
    ## compiled with GNU GCC.
14
    AC_CHECK_LIB(cc_dynamic, main)
15
    ;;
16
  *)
17
    ;;
18
esac
19
20
dnl libtool dynamic loading
21
AC_LIBTOOL_DLOPEN
22
AC_LIBLTDL_CONVENIENCE
23
AC_PROG_LIBTOOL
24
AC_CONFIG_SUBDIRS(libltdl)
25
AC_SUBST(INCLTDL)
26
AC_SUBST(LIBLTDL)
27
28
dnl fortran stuff
29
ACX_F77_WRAPPERS
30
ACX_F77_LIBRARY_LDFLAGS
31
ACX_LAPACK([],[
32
  AC_MSG_ERROR("You need to install the LAPACK library")
33
])
34
35
dnl Rmath stuff
36
37
AC_DEFINE(MATHLIB_STANDALONE, 1, [Define if you have standalone R math library])
38
39
dnl Relevant parts lifted from R's configure.ac, version 2.3.0
40
AC_CHECK_LIB(m, sin)
41
42
## IEEE 754. We rely on this in e.g. the working log test.
43
R_IEEE_754
44
45
R_CHECK_FUNCS([expm1 log1p], [#include <math.h>])
46
## Used to build src/include/Rmath.h.
47
## <NOTE>
48
## we don't use AC_CONFIG_HEADERS on Rmath.h.in because
49
## a) that would comment out #undef statements in Rmath.h.in and
50
## b) Rmath.h should be a self-contained file for standalone Rmath use.
51
## </NOTE>
52
#if test "${ac_cv_func_expm1}" = yes; then
53
if test "${ac_cv_have_decl_expm1}" = yes; then
54
  RMATH_HAVE_EXPM1="# define HAVE_EXPM1 1"
55
else
56
  RMATH_HAVE_EXPM1="# undef HAVE_EXPM1"
57
fi
58
AC_SUBST(RMATH_HAVE_EXPM1)
59
#if test "${ac_cv_func_log1p}" = yes; then
60
if test "${ac_cv_have_decl_expm1}" = yes; then
61
  RMATH_HAVE_LOG1P="# define HAVE_LOG1P 1"
62
else
63
  RMATH_HAVE_LOG1P="# undef HAVE_LOG1P"
64
fi
65
AC_SUBST(RMATH_HAVE_LOG1P)
66
67
R_FUNC_LOG
68
R_FUNC_LOG1P
69
70
dnl End Rmath stuff
71
72
jagshomedir=${libdir}/jags
73
AC_SUBST(jagshomedir)
74
jagslibdir=${jagshomedir}/lib
75
AC_SUBST(jagslibdir)
76
jagsincludedir=${jagshomedir}/include
77
AC_SUBST(jagsincludedir)
78
jagsmoddir=${jagshomedir}/modules
79
AC_SUBST(jagsmoddir)
80
81
AC_CONFIG_HEADERS([src/include/config.h])
82
AC_CONFIG_FILES([
83
  Makefile
84
  m4/Makefile
85
  etc/Makefile
86
  etc/Makeconf
87
  src/Makefile
88
  src/lib/Makefile
89
  src/lib/sarray/Makefile
90
  src/lib/function/Makefile
91
  src/lib/distribution/Makefile
92
  src/lib/graph/Makefile
93
  src/lib/sampler/Makefile
94
  src/lib/model/Makefile
95
  src/lib/compiler/Makefile
96
  src/lib/rng/Makefile
97
  src/include/Makefile
98
  src/include/sarray/Makefile
99
  src/include/function/Makefile
100
  src/include/distribution/Makefile
101
  src/include/graph/Makefile
102
  src/include/sampler/Makefile
103
  src/include/model/Makefile
104
  src/include/compiler/Makefile
105
  src/include/rng/Makefile
106
  src/modules/Makefile
107
  src/modules/basefunctions/Makefile
108
  src/modules/baserngs/Makefile
109
  src/modules/basesamplers/Makefile
110
  src/modules/bugs/Makefile   
111
  src/modules/bugs/functions/Makefile 
112
  src/modules/bugs/distributions/Makefile 
113
  src/modules/bugs/samplers/Makefile  
114
  src/modules/bugs/rmath/Makefile 
115
  src/modules/bugs/matrix/Makefile    
116
  src/terminal/Makefile
117
])
118
AC_OUTPUT