Accept TO in any case for use with n-ary functions. Fixes bug #18923.
[pspp] / configure.ac
1 dnl Process this file with autoconf to produce a configure script.
2
3 dnl Initialize.
4 AX_PREREQ(2.57)
5 AC_INIT(pspp, 0.4.2,bug-gnu-pspp@gnu.org)
6 AC_CONFIG_HEADERS([config.h])
7 AM_INIT_AUTOMAKE(1.9)
8
9 dnl Checks for programs.
10 AC_GNU_SOURCE
11 gl_EARLY
12 AC_PROG_CC
13 AM_PROG_CC_C_O
14 AC_LIBTOOL_DLOPEN
15 AC_PROG_LIBTOOL
16
17 PSPP_ENABLE_WARNING(-Wdeclaration-after-statement)
18
19 AM_CONDITIONAL(cc_is_gcc, test x"$GCC" = x"yes" )
20
21
22 PSPP_PERL
23
24 dnl Internationalization macros.
25 AM_GNU_GETTEXT
26 AM_GNU_GETTEXT_VERSION([0.14.5])
27
28 dnl Checks for libraries.
29 AC_SYS_LARGEFILE
30 AC_FUNC_FSEEKO
31 AC_CHECK_LIB(m, sin)
32 PSPP_LIBPLOT
33 AM_CONDITIONAL(WITHCHARTS, test x"$with_libplot" != x"no")
34
35
36 AC_ARG_WITH(gui, [  --without-gui         don't build the PSPPIRE gui])
37
38 if test x"$with_gui" != x"no" ; then 
39         PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.6.0)
40         PKG_CHECK_MODULES(GLADE, libglade-2.0)
41 fi
42 AM_CONDITIONAL(WITHGUI, test x"$with_gui" != x"no")
43
44 AC_ARG_WITH(gui_tools, [  --with-gui-tools          build the gui developer tools])
45 if test x"$with_gui_tools" == x"yes" ; then 
46         PKG_CHECK_MODULES(GLADE_UI, libgladeui-1.0)
47 fi
48 AM_CONDITIONAL(WITH_GUI_TOOLS, test x"$with_gui_tools" == x"yes")
49
50 PSPP_OFF_T
51
52 AC_CHECK_LIB(gslcblas,main,,[PSPP_REQUIRED_PREREQ([libgslcblas])])
53 AC_CHECK_LIB(gsl, gsl_cdf_chisq_Q,,[PSPP_REQUIRED_PREREQ([libgsl (version 1.4 or later)])])
54
55 AC_CHECK_LIB(ncurses, tgetent)
56 AC_CHECK_HEADERS(termcap.h)
57
58 PSPP_READLINE
59
60 dnl Checks for header files.
61 AC_CHECK_HEADERS([limits.h memory.h sys/stat.h sys/time.h sys/types.h \
62                   fpu_control.h sys/mman.h sys/wait.h ieeefp.h fenv.h] )
63
64 # For gnulib.
65 gl_INIT
66
67 AC_C_CONST
68 AC_C_INLINE
69
70 dnl  Dont use AC_TYPE_OFF_T --- it doesnt generate the HAVE_TYPE macro
71 AC_CHECK_TYPES(off_t) 
72 AC_CHECK_SIZEOF(float, 0)
73 AC_CHECK_SIZEOF(double, 8)
74 AC_CHECK_SIZEOF(long double, 0)
75
76 AC_DEFINE(FPREP_IEEE754, 1,
77         [Define for machines that have IEEE 754 floating point arithmetic,
78          the most common format today.])
79
80 AC_C_BIGENDIAN
81
82 AC_FUNC_VPRINTF
83 AC_CHECK_FUNCS([__setfpucw isinf isnan finite getpid feholdexcept round trunc])
84
85 AC_PROG_LN_S
86
87
88 AM_CONDITIONAL(unix, test x"$host_os" != x"msdos" )
89 AM_CONDITIONAL(msdos, test x"$host_os" = x"msdos" )
90
91 dnl This is needed otherwise --with-included-gettext fails
92 AH_BOTTOM([#include <locale.h>])
93
94 AC_ARG_ENABLE(debug, [  --enable-debug          Turn on diagnostic features in the program])
95 if test x"$enable_debug" = x"yes"  ; then
96   AC_DEFINE(DEBUGGING, 1, [Define to 1 if debugging is enabled.])
97 fi
98
99 PSPP_CHECK_PREREQS
100
101 AC_CONFIG_FILES([Makefile gl/Makefile intl/Makefile po/Makefile.in])
102
103 AC_OUTPUT
104
105 dnl configure.ac ends here