1dnl Process this file with autoconf to produce a configure script.
2
3AC_INIT([gsl],[2.7])
4AC_CONFIG_SRCDIR(gsl_math.h)
5
6AM_INIT_AUTOMAKE([gnu])
7AC_CONFIG_HEADERS([config.h])
8AM_MAINTAINER_MODE
9
10dnl Library versioning (C:R:A == current:revision:age)
11dnl See the libtool manual for an explanation of the numbers
12dnl
13dnl gsl-1.0    libgsl 0:0:0  libgslcblas 0:0:0
14dnl gsl-1.1    libgsl 1:0:1  libgslcblas 0:0:0
15dnl gsl-1.1.1  libgsl 2:0:2  libgslcblas 0:0:0
16dnl gsl-1.2    libgsl 3:0:3  libgslcblas 0:0:0
17dnl gsl-1.3    libgsl 4:0:4  libgslcblas 0:0:0
18dnl gsl-1.4    libgsl 5:0:5  libgslcblas 0:0:0
19dnl gsl-1.5    libgsl 6:0:6  libgslcblas 0:0:0
20dnl gsl-1.6    libgsl 7:0:7  libgslcblas 0:0:0
21dnl gsl-1.7    libgsl 8:0:8  libgslcblas 0:0:0
22dnl gsl-1.8    libgsl 9:0:9  libgslcblas 0:0:0
23dnl gsl-1.9    libgsl 10:0:10 libgslcblas 0:0:0
24dnl gsl-1.10   libgsl 10:0:10 (*) libgslcblas 0:0:0
25dnl gsl-1.11   libgsl 12:0:12  libgslcblas 0:0:0
26dnl gsl-1.12   libgsl 13:0:13  libgslcblas 0:0:0
27dnl gsl-1.13   libgsl 14:0:14  libgslcblas 0:0:0
28dnl gsl-1.14   libgsl 15:0:15  libgslcblas 0:0:0
29dnl gsl-1.15   libgsl 16:0:16  libgslcblas 0:0:0
30dnl gsl-1.16   libgsl 17:0:17  libgslcblas 0:0:0
31dnl gsl-2.0    libgsl 18:0:18  (**) libgslcblas 0:0:0
32dnl gsl-2.1    libgsl 19:0:0   libgslcblas 0:0:0
33dnl gsl-2.2    libgsl 20:0:1   libgslcblas 0:0:0
34dnl gsl-2.2.1  libgsl 21:0:2   libgslcblas 0:0:0
35dnl gsl-2.3    libgsl 22:0:3   libgslcblas 0:0:0
36dnl gsl-2.4    libgsl 23:0:0   libgslcblas 0:0:0
37dnl gsl-2.5    libgsl 24:0:1   libgslcblas 0:0:0
38dnl gsl-2.6    libgsl 25:0:0   libgslcblas 0:0:0
39dnl gsl-2.7    libgsl 26:0:1   libgslcblas 0:0:0
40dnl
41dnl (*) There was an error on this release.  Firstly, the versioning
42dnl numbers were not updated.  Secondly, 2 functions were removed, but
43dnl the age not reset--this should have been 11:0:0.  However these
44dnl functions were not documented and are regarded as internal, so we
45dnl will assume 11:0:11.
46dnl
47dnl (**) There was an error on this release. Age should have been
48dnl reset to 18:0:0
49dnl
50dnl How to update library version number
51dnl ====================================
52dnl
53dnl C: increment if the interface has additions, changes, removals.
54dnl
55dnl R: increment any time the source changes; set to 0 if you
56dnl incremented CURRENT
57dnl
58dnl A: increment if any interfaces have been added; set to 0 if any
59dnl interfaces have been removed. removal has precedence over adding,
60dnl so set to 0 if both happened.
61dnl
62dnl See https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
63dnl for more detailed info
64
65dnl
66GSL_CURRENT=26
67GSL_REVISION=0
68GSL_AGE=1
69dnl
70CBLAS_CURRENT=0
71CBLAS_REVISION=0
72CBLAS_AGE=0
73
74GSL_LT_VERSION="${GSL_CURRENT}:${GSL_REVISION}:${GSL_AGE}"
75AC_SUBST(GSL_LT_VERSION)
76
77GSL_LT_CBLAS_VERSION="${CBLAS_CURRENT}:${CBLAS_REVISION}:${CBLAS_AGE}"
78AC_SUBST(GSL_LT_CBLAS_VERSION)
79
80case "$VERSION" in
81    *+)
82        ;;
83    *)
84        AC_DEFINE(RELEASED,[],[Defined if this is an official release])
85        ;;
86esac
87
88dnl Split VERSION into GSL_VERSION_MAJOR and GSL_VERSION_MINOR
89dnl Follows AX_SPLIT_VERSION macro from AC-Archive
90dnl Rhys Ulerich <rhys.ulerich@gmail.com>
91AC_PROG_SED
92GSL_MAJOR_VERSION=`echo "$VERSION" | $SED 's/\([[^.]][[^.]]*\).*/\1/'`
93GSL_MINOR_VERSION=`echo "$VERSION" | $SED 's/[[^.]][[^.]]*.\([[^.]][[^.]]*\).*/\1/'`
94AC_SUBST(GSL_MAJOR_VERSION)
95AC_SUBST(GSL_MINOR_VERSION)
96
97AC_PROG_MKDIR_P
98
99dnl things required by automake
100dnl AC_ARG_PROGRAM
101AC_PROG_MAKE_SET
102
103dnl Check for which system.
104AC_CANONICAL_HOST
105
106dnl Checks for programs.
107AC_LANG(C)
108AC_PROG_CC
109AC_PROG_CPP
110AC_PROG_INSTALL
111AC_PROG_LN_S
112LT_INIT([win32-dll])
113
114dnl Check compiler features
115AC_TYPE_SIZE_T
116dnl AC_C_CONST
117AC_C_VOLATILE
118AC_C_INLINE
119AC_C_CHAR_UNSIGNED
120
121GSL_CFLAGS="-I$includedir"
122GSL_LIBS="-L$libdir -lgsl"
123dnl macro from libtool - can be replaced with LT_LIB_M when we require libtool 2
124LT_LIB_M
125GSL_LIBM=$LIBM
126
127AC_SUBST(GSL_CFLAGS)
128AC_SUBST(GSL_LIBS)
129AC_SUBST(GSL_LIBM)
130
131if test "$ac_cv_c_inline" != no ; then
132dnl Check for "extern inline", using a modified version of the test
133dnl for AC_C_INLINE from acspecific.mt
134dnl
135   AC_CACHE_CHECK([for GNU-style extern inline], ac_cv_c_extern_inline,
136   [ac_cv_c_extern_inline=no
137   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[extern $ac_cv_c_inline double foo(double x);
138   extern $ac_cv_c_inline double foo(double x) { return x + 1.0 ; } ;
139   double foo (double x) { return x + 1.0 ; };]], [[  foo(1.0)  ]])],[ac_cv_c_extern_inline="yes"],[])
140   ])
141
142   if test "$ac_cv_c_extern_inline" != no ; then
143      AC_DEFINE(HAVE_INLINE,[1],[Define if you have inline])
144   else
145      AC_CACHE_CHECK([for C99-style inline], ac_cv_c_c99inline,
146      [ac_cv_c_c99inline=no
147      dnl next line is a necessary condition
148      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[extern inline void* foo() { foo(); return &foo ; };]],
149      [[  return foo() != 0 ]])],[ac_cv_c_c99inline="yes"],[])
150      dnl but not sufficient, extern must work but inline on its own should not
151      if test "$ac_cv_c_c99inline" != no ; then
152            AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[inline void* foo() { foo(); return &foo ; };]],
153            [[  return foo() != 0 ]])],[],ac_cv_c_c99inline="no")
154      fi
155      ])
156      if test "$ac_cv_c_c99inline" != no ; then
157         AC_DEFINE(HAVE_INLINE,[1],[Define if you have inline])
158         AC_DEFINE(HAVE_C99_INLINE,[1],[Define if you have inline with C99 behavior])
159      fi
160   fi
161fi
162
163dnl Checks for header files.
164AC_CHECK_HEADERS(ieeefp.h)
165AC_CHECK_HEADERS(complex.h)
166
167dnl Checks for typedefs, structures, and compiler characteristics.
168
169case $host in
170  *-*-cygwin* | *-*-mingw* )
171  if test "$enable_shared" = yes; then
172    GSLCBLAS_LDFLAGS="$GSLCBLAS_LDFLAGS -no-undefined"
173    GSL_LDFLAGS="$GSL_LDFLAGS -no-undefined"
174    GSL_LIBADD="cblas/libgslcblas.la"
175  fi
176  ;;
177esac
178
179AC_SUBST(GSLCBLAS_LDFLAGS)
180AC_SUBST(GSL_LDFLAGS)
181AC_SUBST(GSL_LIBADD)
182
183dnl Checks for library functions.
184
185dnl AC_FUNC_ALLOCA
186AC_FUNC_VPRINTF
187
188dnl strcasecmp, strerror, xmalloc, xrealloc, probably others should be added.
189dnl removed strerror from this list, it's hardcoded in the err/ directory
190dnl Any functions which appear in this list of functions should be provided
191dnl in the utils/ directory
192dnl xmalloc is not used, removed (bjg)
193AC_REPLACE_FUNCS(memcpy memmove strdup strtol strtoul)
194
195AC_CACHE_CHECK(for EXIT_SUCCESS and EXIT_FAILURE,
196ac_cv_decl_exit_success_and_failure,
197AC_EGREP_CPP(yes,
198[
199#include <stdlib.h>
200#ifdef EXIT_SUCCESS
201yes
202#endif
203],
204ac_cv_decl_exit_success_and_failure=yes,
205ac_cv_decl_exit_success_and_failure=no)
206)
207
208if test "$ac_cv_decl_exit_success_and_failure" = yes ; then
209  AC_DEFINE(HAVE_EXIT_SUCCESS_AND_FAILURE,1,[Defined if you have ansi EXIT_SUCCESS and EXIT_FAILURE in stdlib.h])
210fi ;
211
212dnl Use alternate libm if specified by user
213
214if test "x$LIBS" = "x" ; then
215  AC_CHECK_LIB(m, cos)
216fi
217
218dnl Remember to put a definition in acconfig.h for each of these
219AC_CHECK_DECLS(feenableexcept,,,[#define _GNU_SOURCE 1
220#include <fenv.h>])
221AC_CHECK_DECLS(fesettrapenable,,,[#define _GNU_SOURCE 1
222#include <fenv.h>])
223AC_CHECK_DECLS(hypot,,,[#include <math.h>])
224AC_CHECK_DECLS(expm1,,,[#include <math.h>])
225AC_CHECK_DECLS(acosh,,,[#include <math.h>])
226AC_CHECK_DECLS(asinh,,,[#include <math.h>])
227AC_CHECK_DECLS(atanh,,,[#include <math.h>])
228AC_CHECK_DECLS(ldexp,,,[#include <math.h>])
229AC_CHECK_DECLS(frexp,,,[#include <math.h>])
230AC_CHECK_DECLS([fprnd_t],[],[],[[#include <float.h>]])
231AC_CHECK_DECLS(isinf,,,[#include <math.h>])
232AC_CHECK_DECLS(isfinite,,,[#include <math.h>])
233AC_CHECK_DECLS(finite,,,[#include <math.h>
234#if HAVE_IEEEFP_H
235#include <ieeefp.h>
236#endif])
237AC_CHECK_DECLS(isnan,,,[#include <math.h>])
238
239dnl OpenBSD has a broken implementation of log1p.
240case "$host" in
241    *-*-*openbsd*)
242       AC_MSG_RESULT([avoiding OpenBSD system log1p - using gsl version])
243       ;;
244    *)
245        AC_CHECK_DECLS(log1p,,,[#include <math.h>])
246       ;;
247esac
248
249AC_CACHE_CHECK([for long double stdio], ac_cv_func_printf_longdouble,
250[AC_RUN_IFELSE([AC_LANG_SOURCE([[
251#include <stdlib.h>
252#include <stdio.h>
253int main (void)
254{
255const char * s = "5678.25"; long double x = 1.234 ;
256fprintf(stderr,"%Lg\n",x) ;
257sscanf(s, "%Lg", &x);
258if (x == 5678.25) {exit (0);} else {exit(1); };
259}]])],[ac_cv_func_printf_longdouble="yes"],[ac_cv_func_printf_longdouble="no"],[ac_cv_func_printf_longdouble="no"])])
260
261if test "$ac_cv_func_printf_longdouble" != no; then
262  AC_DEFINE(HAVE_PRINTF_LONGDOUBLE,1,[Define this if printf can handle %Lf for long double])
263fi
264
265AC_CACHE_CHECK([for extended floating point registers],ac_cv_c_extended_fp,
266[case "$host" in
267    *sparc*-*-*)
268        ac_cv_c_extended_fp=no
269        ;;
270    *powerpc*-*-*)
271        ac_cv_c_extended_fp=no
272        ;;
273    *hppa*-*-*)
274        ac_cv_c_extended_fp=no
275        ;;
276    *alpha*-*-*)
277        ac_cv_c_extended_fp=no
278        ;;
279    *68k*-*-*)
280        ac_cv_c_extended_fp=yes
281        ;;
282    *86-*-*)
283        ac_cv_c_extended_fp=yes
284        ;;
285    x86_64-*-*)
286        ac_cv_c_extended_fp=yes
287        ;;
288    *)
289        ac_cv_c_extended_fp=unknown
290        ;;
291esac
292])
293
294if test $ac_cv_c_extended_fp != "no" ; then
295    AC_DEFINE(HAVE_EXTENDED_PRECISION_REGISTERS,1,[Defined on architectures with excess floating-point precision])
296fi
297
298AC_CACHE_CHECK([for IEEE arithmetic interface type], ac_cv_c_ieee_interface,
299[case "$host" in
300    sparc-*-linux*)
301        ac_cv_c_ieee_interface=gnusparc
302        ;;
303    m68k-*-linux*)
304        ac_cv_c_ieee_interface=gnum68k
305        ;;
306    powerpc-*-linux*)
307        ac_cv_c_ieee_interface=gnuppc
308        ;;
309    *86-*-gnu | *86_64-*-gnu | *86-*-linux* | *86_64-*-linux*)
310        ac_cv_c_ieee_interface=gnux86
311        ;;
312    *-*-sunos4*)
313        ac_cv_c_ieee_interface=sunos4
314        ;;
315    *-*-solaris*)
316        ac_cv_c_ieee_interface=solaris
317        ;;
318    *-*-hpux11*)
319        ac_cv_c_ieee_interface=hpux11
320        ;;
321    *-*-hpux*)
322        ac_cv_c_ieee_interface=hpux
323        ;;
324    *-*-osf*)
325        ac_cv_c_ieee_interface=tru64
326        ;;
327    *-*-aix*)
328        ac_cv_c_ieee_interface=aix
329        ;;
330    *-*-irix*)
331        ac_cv_c_ieee_interface=irix
332        ;;
333    powerpc-*-*darwin*)
334        ac_cv_c_ieee_interface=darwin
335        ;;
336    *86-*-*darwin*)
337        ac_cv_c_ieee_interface=darwin86
338        ;;
339    *-*-*netbsd*)
340        ac_cv_c_ieee_interface=netbsd
341        ;;
342    *-*-*openbsd*)
343        ac_cv_c_ieee_interface=openbsd
344        ;;
345    *-*-*bsd*)
346        ac_cv_c_ieee_interface=freebsd
347        ;;
348    *-*-os2*)
349        ac_cv_c_ieee_interface=os2emx
350        ;;
351    *)
352        ac_cv_c_ieee_interface=unknown
353        ;;
354esac
355])
356
357if test "$ac_cv_c_ieee_interface" = "gnux86" ; then
358    AC_CACHE_CHECK([for FPU_SETCW], ac_cv_c_fpu_setcw,
359    [ac_cv_c_fpu_setcw=no
360    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <fpu_control.h>
361#ifndef _FPU_SETCW
362#include <i386/fpu_control.h>
363#define _FPU_SETCW(cw) __setfpucw(cw)
364#endif
365]], [[ unsigned short mode = 0 ; _FPU_SETCW(mode); ]])],[ac_cv_c_fpu_setcw="yes"],[ac_cv_c_ieee_interface=unknown])
366    ])
367fi
368
369if test "$ac_cv_c_ieee_interface" = "gnux86" ; then
370    AC_CACHE_CHECK([for SSE extensions], ac_cv_c_fpu_sse,
371    [ac_cv_c_fpu_sse=no
372    AC_RUN_IFELSE([AC_LANG_PROGRAM([[
373#include <stdlib.h>
374#define _FPU_SETMXCSR(cw_sse) asm volatile ("ldmxcsr %0" : : "m" (*&cw_sse))
375]], [[ unsigned int mode = 0x1f80 ; _FPU_SETMXCSR(mode); exit(0); ]])],[ac_cv_c_fpu_sse="yes"],[ac_cv_c_fpu_sse="no"],[
376        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
377#include <stdlib.h>
378#define _FPU_SETMXCSR(cw_sse) asm volatile ("ldmxcsr %0" : : "m" (*&cw_sse))
379]], [[ unsigned int mode = 0x1f80 ; _FPU_SETMXCSR(mode); exit(0); ]])],[ac_cv_c_fpu_sse="yes"],[ac_cv_c_fpu_sse="no"])
380])])
381
382    if test $ac_cv_c_fpu_sse = yes; then
383        AC_DEFINE([HAVE_FPU_X86_SSE], 1,
384                  [Define if x86 processor has sse extensions.])
385   fi
386fi
387
388ac_tr_ieee_interface=HAVE_`echo $ac_cv_c_ieee_interface | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_IEEE_INTERFACE
389AC_DEFINE_UNQUOTED($ac_tr_ieee_interface,1,[IEEE Interface Type])
390
391AC_SUBST(HAVE_GNUSPARC_IEEE_INTERFACE)
392AC_SUBST(HAVE_GNUM68K_IEEE_INTERFACE)
393AC_SUBST(HAVE_GNUPPC_IEEE_INTERFACE)
394AC_SUBST(HAVE_GNUX86_IEEE_INTERFACE)
395AC_SUBST(HAVE_SUNOS4_IEEE_INTERFACE)
396AC_SUBST(HAVE_SOLARIS_IEEE_INTERFACE)
397AC_SUBST(HAVE_HPUX11_IEEE_INTERFACE)
398AC_SUBST(HAVE_HPUX_IEEE_INTERFACE)
399AC_SUBST(HAVE_TRU64_IEEE_INTERFACE)
400AC_SUBST(HAVE_IRIX_IEEE_INTERFACE)
401AC_SUBST(HAVE_AIX_IEEE_INTERFACE)
402AC_SUBST(HAVE_FREEBSD_IEEE_INTERFACE)
403AC_SUBST(HAVE_OS2EMX_IEEE_INTERFACE)
404AC_SUBST(HAVE_NETBSD_IEEE_INTERFACE)
405AC_SUBST(HAVE_OPENBSD_IEEE_INTERFACE)
406AC_SUBST(HAVE_DARWIN_IEEE_INTERFACE)
407AC_SUBST(HAVE_DARWIN86_IEEE_INTERFACE)
408
409dnl Check for IEEE control flags
410
411save_cflags="$CFLAGS"
412AC_CACHE_CHECK([for IEEE compiler flags], ac_cv_c_ieee_flags,
413[
414case "$host" in
415    alpha*-*-*)
416        if test X"$GCC" = Xyes ; then
417            ieee_flags='-mieee -mfp-rounding-mode=d'
418        else
419            # This assumes Compaq's C compiler.
420            ieee_flags='-ieee -fprm d'
421        fi
422        ;;
423esac
424if test X"$ieee_flags" != X ; then
425  CFLAGS="$ieee_flags $CFLAGS"
426  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[int foo;]])],[ac_cv_c_ieee_flags="$ieee_flags"],[ac_cv_c_ieee_flags="none"])
427else
428  ac_cv_c_ieee_flags="none"
429fi])
430
431if test "$ac_cv_c_ieee_flags" != "none" ; then
432   CFLAGS="$ac_cv_c_ieee_flags $save_cflags"
433else
434   CFLAGS="$save_cflags"
435fi
436
437dnl Check IEEE comparisons, whether "x != x" is true for NaNs
438dnl
439AC_CACHE_CHECK([for IEEE comparisons], ac_cv_c_ieee_comparisons,
440[AC_RUN_IFELSE([AC_LANG_SOURCE([[
441#include <math.h>
442int main (void)
443{
444   int status; double inf, nan;
445   inf = exp(1.0e10);
446   nan = inf / inf ;
447   status = (nan == nan);
448   exit (status);
449}]])],[ac_cv_c_ieee_comparisons="yes"],[ac_cv_c_ieee_comparisons="no"],[ac_cv_c_ieee_comparisons="yes"])
450])
451
452if test "$ac_cv_c_ieee_comparisons" != no ; then
453  AC_DEFINE(HAVE_IEEE_COMPARISONS,1,[Define this if IEEE comparisons work correctly (e.g. NaN != NaN)])
454fi
455
456dnl Check for IEEE denormalized arithmetic
457dnl
458AC_CACHE_CHECK([for IEEE denormalized values], ac_cv_c_ieee_denormals,
459[AC_RUN_IFELSE([AC_LANG_SOURCE([[
460#include <math.h>
461int main (void)
462{
463   int i, status;
464   volatile double z = 1e-308;
465   for (i = 0; i < 5; i++) { z = z / 10.0 ; };
466   for (i = 0; i < 5; i++) { z = z * 10.0 ; };
467   status = (z == 0.0);
468   exit (status);
469}]])],[ac_cv_c_ieee_denormals="yes"],[ac_cv_c_ieee_denormals="no"],[ac_cv_c_ieee_denormals="yes"])
470])
471
472if test "$ac_cv_c_ieee_denormals" != no ; then
473  AC_DEFINE(HAVE_IEEE_DENORMALS,1,[Define this if IEEE denormalized numbers are available])
474fi
475
476AH_TEMPLATE([HIDE_INLINE_STATIC],[Define if you need to hide the static definitions of inline functions])
477
478AH_BOTTOM([/* Use 0 and 1 for EXIT_SUCCESS and EXIT_FAILURE if we don't have them */
479#if !HAVE_EXIT_SUCCESS_AND_FAILURE
480#define EXIT_SUCCESS 0
481#define EXIT_FAILURE 1
482#endif])
483
484AH_BOTTOM([/* Define one of these if you have a known IEEE arithmetic interface */
485#undef HAVE_GNUSPARC_IEEE_INTERFACE
486#undef HAVE_GNUM68K_IEEE_INTERFACE
487#undef HAVE_GNUPPC_IEEE_INTERFACE
488#undef HAVE_GNUX86_IEEE_INTERFACE
489#undef HAVE_SUNOS4_IEEE_INTERFACE
490#undef HAVE_SOLARIS_IEEE_INTERFACE
491#undef HAVE_HPUX11_IEEE_INTERFACE
492#undef HAVE_HPUX_IEEE_INTERFACE
493#undef HAVE_TRU64_IEEE_INTERFACE
494#undef HAVE_IRIX_IEEE_INTERFACE
495#undef HAVE_AIX_IEEE_INTERFACE
496#undef HAVE_FREEBSD_IEEE_INTERFACE
497#undef HAVE_OS2EMX_IEEE_INTERFACE
498#undef HAVE_NETBSD_IEEE_INTERFACE
499#undef HAVE_OPENBSD_IEEE_INTERFACE
500#undef HAVE_DARWIN_IEEE_INTERFACE
501#undef HAVE_DARWIN86_IEEE_INTERFACE])
502
503AH_BOTTOM([/* Define a rounding function which moves extended precision values
504   out of registers and rounds them to double-precision. This should
505   be used *sparingly*, in places where it is necessary to keep
506   double-precision rounding for critical expressions while running in
507   extended precision. For example, the following code should ensure
508   exact equality, even when extended precision registers are in use,
509
510      double q = GSL_COERCE_DBL(3.0/7.0) ;
511      if (q == GSL_COERCE_DBL(3.0/7.0)) { ... } ;
512
513   It carries a penalty even when the program is running in double
514   precision mode unless you compile a separate version of the
515   library with HAVE_EXTENDED_PRECISION_REGISTERS turned off. */
516
517#if HAVE_EXTENDED_PRECISION_REGISTERS
518#define GSL_COERCE_DBL(x) (gsl_coerce_double(x))
519#else
520#define GSL_COERCE_DBL(x) (x)
521#endif])
522
523AH_BOTTOM([/* Substitute gsl functions for missing system functions */
524
525#if !HAVE_DECL_HYPOT
526#define hypot gsl_hypot
527#endif
528
529#if !HAVE_DECL_LOG1P
530#define log1p gsl_log1p
531#endif
532
533#if !HAVE_DECL_EXPM1
534#define expm1 gsl_expm1
535#endif
536
537#if !HAVE_DECL_ACOSH
538#define acosh gsl_acosh
539#endif
540
541#if !HAVE_DECL_ASINH
542#define asinh gsl_asinh
543#endif
544
545#if !HAVE_DECL_ATANH
546#define atanh gsl_atanh
547#endif
548
549#if !HAVE_DECL_LDEXP
550#define ldexp gsl_ldexp
551#endif
552
553#if !HAVE_DECL_FREXP
554#define frexp gsl_frexp
555#endif
556
557#if !HAVE_DECL_ISINF
558#define isinf gsl_isinf
559#endif
560
561#if !HAVE_DECL_ISFINITE
562#define isfinite gsl_finite
563#endif
564
565#if !HAVE_DECL_FINITE
566#define finite gsl_finite
567#endif
568
569#if !HAVE_DECL_ISNAN
570#define isnan gsl_isnan
571#endif])
572
573AH_BOTTOM([#ifdef __GNUC__
574#define DISCARD_POINTER(p) do { ; } while(p ? 0 : 0);
575#else
576#define DISCARD_POINTER(p) /* ignoring discarded pointer */
577#endif])
578
579AH_BOTTOM([#if defined(GSL_RANGE_CHECK_OFF) || !defined(GSL_RANGE_CHECK)
580#define GSL_RANGE_CHECK 0  /* turn off range checking by default internally */
581#endif])
582
583AH_BOTTOM([#define RETURN_IF_NULL(x) if (!x) { return ; }
584])
585
586AH_VERBATIM([GSL_DISABLE_DEPRECATED],
587[/* Disable deprecated functions and enums while building */
588#undef GSL_DISABLE_DEPRECATED])
589
590dnl
591AC_CONFIG_FILES([            \
592Makefile                     \
593gsl_version.h                \
594gsl.spec                     \
595blas/Makefile                \
596block/Makefile               \
597bspline/Makefile             \
598bst/Makefile                 \
599cblas/Makefile               \
600cdf/Makefile                 \
601cheb/Makefile                \
602combination/Makefile         \
603complex/Makefile             \
604const/Makefile               \
605deriv/Makefile               \
606dht/Makefile                 \
607diff/Makefile                \
608doc/Makefile                 \
609doc/examples/Makefile        \
610eigen/Makefile               \
611err/Makefile                 \
612fft/Makefile                 \
613filter/Makefile              \
614fit/Makefile                 \
615gsl/Makefile                 \
616histogram/Makefile           \
617ieee-utils/Makefile          \
618integration/Makefile         \
619interpolation/Makefile       \
620linalg/Makefile              \
621matrix/Makefile              \
622min/Makefile                 \
623monte/Makefile               \
624movstat/Makefile             \
625multifit/Makefile            \
626multifit_nlinear/Makefile    \
627multilarge/Makefile          \
628multilarge_nlinear/Makefile  \
629multimin/Makefile            \
630multiroots/Makefile          \
631multiset/Makefile            \
632ntuple/Makefile              \
633ode-initval/Makefile         \
634ode-initval2/Makefile        \
635permutation/Makefile         \
636poly/Makefile                \
637qrng/Makefile                \
638randist/Makefile             \
639rng/Makefile                 \
640roots/Makefile               \
641rstat/Makefile               \
642siman/Makefile               \
643sort/Makefile                \
644spblas/Makefile              \
645splinalg/Makefile            \
646spmatrix/Makefile            \
647specfunc/Makefile            \
648statistics/Makefile          \
649sum/Makefile                 \
650sys/Makefile                 \
651test/Makefile                \
652utils/Makefile               \
653vector/Makefile              \
654wavelet/Makefile             \
655])
656
657AC_OUTPUT
658