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