Get rid of our own int32 type in favor of the standard int32_t type.
[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(float, 0)
66 AC_CHECK_SIZEOF(double, 8)
67 AC_CHECK_SIZEOF(long double, 0)
68
69 AC_DEFINE(FPREP_IEEE754, 1,
70         [Define for machines that have IEEE 754 floating point arithmetic,
71          the most common format today.])
72
73 AC_C_BIGENDIAN
74
75 AC_FUNC_VPRINTF
76 AC_CHECK_FUNCS([strchr strrchr __setfpucw isinf isnan finite getpid feholdexcept])
77
78 AC_PROG_LN_S
79
80
81 AM_CONDITIONAL(unix, test x"$host_os" != x"msdos" )
82 AM_CONDITIONAL(msdos, test x"$host_os" = x"msdos" )
83
84 dnl This is needed otherwise --with-included-gettext fails
85 AH_BOTTOM([#include <locale.h>])
86
87 AC_ARG_ENABLE(debug, [  --enable-debug          Turn on diagnostic features in the program])
88 if test x"$enable_debug" = x"yes"  ; then
89   AC_DEFINE(DEBUGGING, 1, [Define to 1 if debugging is enabled.])
90 fi
91
92 PSPP_CHECK_PREREQS
93
94 AC_CONFIG_FILES([Makefile gl/Makefile intl/Makefile po/Makefile.in])
95
96 AC_OUTPUT
97
98 dnl configure.ac ends here