1 dnl Process this file with autoconf to produce a configure script.
5 AC_INIT(pspp, 0.4.3,bug-gnu-pspp@gnu.org)
6 AC_CONFIG_HEADERS([config.h])
9 dnl Checks for programs.
17 PSPP_ENABLE_OPTION(-Wdeclaration-after-statement)
19 AM_CONDITIONAL(cc_is_gcc, test x"$GCC" = x"yes" )
24 dnl Internationalization macros.
25 AM_GNU_GETTEXT([external], [need-ngettext])
26 AM_GNU_GETTEXT_VERSION([0.16.1])
28 dnl Checks for libraries.
33 AM_CONDITIONAL(WITHCHARTS, test x"$with_libplot" != x"no")
36 AC_ARG_WITH(gui, [ --without-gui don't build the PSPPIRE gui])
38 if test x"$with_gui" != x"no" ; then
39 PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.8.0,,
40 [PSPP_REQUIRED_PREREQ([gtk+ 2.0 v2.8.0 or later (or use --without-gui)])])
41 PKG_CHECK_MODULES(GLADE, libglade-2.0,,
42 [PSPP_REQUIRED_PREREQ([libglade 2.0 (or use --without-gui)])])
44 AM_CONDITIONAL(WITHGUI, test x"$with_gui" != x"no")
46 AC_ARG_WITH(gui_tools, [ --with-gui-tools build the gui developer tools])
47 if test x"$with_gui_tools" = x"yes" ; then
48 PKG_CHECK_MODULES(GLADE_UI, libgladeui-1.0)
50 AM_CONDITIONAL(WITH_GUI_TOOLS, test x"$with_gui_tools" = x"yes")
54 AC_CHECK_LIB(gslcblas,main,,[PSPP_REQUIRED_PREREQ([libgslcblas])])
55 AC_CHECK_LIB(gsl, gsl_cdf_chisq_Q,,[PSPP_REQUIRED_PREREQ([libgsl (version 1.4 or later)])])
57 AC_CHECK_LIB(ncurses, tgetent)
58 AC_CHECK_HEADERS(termcap.h)
62 dnl Checks for header files.
63 AC_CHECK_HEADERS([limits.h memory.h sys/stat.h sys/time.h sys/types.h \
64 fpu_control.h sys/mman.h sys/wait.h ieeefp.h fenv.h] )
72 dnl Dont use AC_TYPE_OFF_T --- it doesnt generate the HAVE_TYPE macro
74 AC_CHECK_SIZEOF(float, 0)
75 AC_CHECK_SIZEOF(double, 8)
76 AC_CHECK_SIZEOF(long double, 0)
78 AC_DEFINE(FPREP_IEEE754, 1,
79 [Define for machines that have IEEE 754 floating point arithmetic,
80 the most common format today.])
85 AC_CHECK_FUNCS([__setfpucw execl fork isinf isnan finite getpid feholdexcept fpsetmask popen round trunc])
89 dnl This is needed otherwise --with-included-gettext fails
90 AH_BOTTOM([#include <locale.h>])
92 AC_ARG_ENABLE(debug, [ --enable-debug Turn on diagnostic features in the program])
93 if test x"$enable_debug" = x"yes" ; then
94 AC_DEFINE(DEBUGGING, 1, [Define to 1 if debugging is enabled.])
98 if test "$am_cv_func_iconv" != "yes"; then
99 PSPP_REQUIRED_PREREQ([iconv (see http://www.gnu.org/software/libiconv/)])
104 AC_CONFIG_FILES([Makefile gl/Makefile po/Makefile.in])
108 dnl configure.ac ends here