1 dnl Process this file with autoconf to produce a configure script.
5 AC_INIT(pspp, 0.4.1,bug-gnu-pspp@gnu.org)
6 AC_CONFIG_HEADERS([config.h])
9 dnl Checks for programs.
16 PSPP_ENABLE_WARNING(-Wdeclaration-after-statement)
18 AM_CONDITIONAL(cc_is_gcc, test x"$GCC" = x"yes" )
21 dnl Check that Perl is available.
22 AC_PATH_PROG([PERL], perl, no)
24 if test "$PERL" = no; then
25 AC_MSG_ERROR([perl is not found])
27 $PERL -e 'require 5.005_03;' || {
28 AC_MSG_ERROR([Perl 5.005_03 or better is required])
31 dnl Internationalization macros.
33 AM_GNU_GETTEXT_VERSION([0.14.5])
35 dnl Checks for libraries.
39 AC_ARG_WITH(libplot, [ --without-libplot don't compile in support of charts (using libplot)])
41 if test x"$with_libplot" != x"no" ; then
42 AC_CHECK_LIB(plot, pl_newpl_r,,
43 AC_MSG_ERROR([You must install libplot development libraries (or use --without-libplot)])
46 AM_CONDITIONAL(WITHCHARTS, test x"$with_libplot" != x"no")
49 AC_ARG_WITH(gui, [ --without-gui don't build the PSPPIRE gui])
51 if test x"$with_gui" != x"no" ; then
52 PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.6.0)
53 PKG_CHECK_MODULES(GLADE, libglade-2.0)
55 AM_CONDITIONAL(WITHGUI, test x"$with_gui" != x"no")
58 dnl Check that off_t is defined as an integer type.
59 dnl Solaris sometimes declares it as a struct, if it
60 dnl thinks that the compiler does not support `long long'.
61 AC_COMPILE_IFELSE([#include <sys/types.h>
68 }], [], [AC_MSG_ERROR(
69 [Your system's definition of off_t is broken. You are probably
70 using Solaris. You can probably fix the problem with
71 `--disable-largefile' or `CFLAGS=-ansi'.])])
73 AC_CHECK_LIB(gslcblas,main,,AC_MSG_ERROR([You must install libgslcblas development libraries]))
74 AC_CHECK_LIB(gsl, gsl_cdf_chisq_Q,,
75 AC_MSG_ERROR([You must install development libraries for libgsl version 1.4 or later]))
77 AC_CHECK_LIB(ncurses, tgetent)
78 AC_CHECK_HEADERS(termcap.h)
82 dnl Checks for header files.
83 AC_CHECK_HEADERS([limits.h memory.h sys/stat.h sys/time.h sys/types.h \
84 fpu_control.h sys/mman.h sys/wait.h ieeefp.h fenv.h] )
92 dnl Dont use AC_TYPE_OFF_T --- it doesnt generate the HAVE_TYPE macro
94 AC_CHECK_SIZEOF(short, 2)
95 AC_CHECK_SIZEOF(int, 4)
96 AC_CHECK_SIZEOF(long, 4)
97 AC_CHECK_SIZEOF(long long, 0)
98 AC_CHECK_SIZEOF(float, 0)
99 AC_CHECK_SIZEOF(double, 8)
100 AC_CHECK_SIZEOF(long double, 0)
102 AC_DEFINE(FPREP_IEEE754, 1,
103 [Define for machines that have IEEE 754 floating point arithmetic,
104 the most common format today.])
109 AC_CHECK_FUNCS([strchr strrchr __setfpucw isinf isnan finite getpid feholdexcept])
114 AM_CONDITIONAL(unix, test x"$host_os" != x"msdos" )
115 AM_CONDITIONAL(msdos, test x"$host_os" = x"msdos" )
117 dnl This is needed otherwise --with-included-gettext fails
118 AH_BOTTOM([#include <locale.h>])
120 AC_ARG_ENABLE(debug, [ --enable-debug Turn on diagnostic features in the program])
121 if test x"$enable_debug" = x"yes" ; then
122 AC_DEFINE(DEBUGGING, 1, [Define to 1 if debugging is enabled.])
125 AC_CONFIG_FILES([Makefile gl/Makefile intl/Makefile po/Makefile.in])
129 dnl configure.ac ends here