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.
18 PSPP_ENABLE_OPTION(-Wdeclaration-after-statement)
20 AM_CONDITIONAL(cc_is_gcc, test x"$GCC" = x"yes" )
25 dnl Internationalization macros.
26 AM_GNU_GETTEXT([external], [need-ngettext])
27 AM_GNU_GETTEXT_VERSION([0.16.1])
29 dnl Checks for libraries.
34 AM_CONDITIONAL(WITHCHARTS, test x"$with_libplot" != x"no")
39 [AS_HELP_STRING([--without-gui], [don't build the PSPPIRE gui])])
41 if test x"$with_gui" != x"no" ; then
42 PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.8.0,,
43 [PSPP_REQUIRED_PREREQ([gtk+ 2.0 v2.8.0 or later (or use --without-gui)])])
44 PKG_CHECK_MODULES(GLADE, libglade-2.0 >= 2.6.0,,
45 [PSPP_REQUIRED_PREREQ([libglade 2.0 (or use --without-gui)])])
47 AM_CONDITIONAL(WITHGUI, test x"$with_gui" != x"no")
50 dnl Checks needed for psql reader
51 AC_CHECK_PROG(psql_support, pg_config, yes, no)
52 if test x"$psql_support" = x"yes" ; then
53 AC_DEFINE([PSQL_SUPPORT], 1,
54 [Define to 1 if building in support for reading from postgres databases.])
55 PG_CFLAGS=-I`pg_config --includedir`
57 PG_LDFLAGS=-L`pg_config --libdir`
61 PKG_CHECK_MODULES(OPENSSL,libssl,
62 AC_DEFINE([USE_SSL],1,
63 [Define to 1 if the openssl library is present.])
66 AM_CONDITIONAL(PSQL_SUPPORT, test x"$psql_support" = x"yes")
68 dnl Checks needed for gnumeric reader
70 PKG_CHECK_MODULES(LIBXML2, libxml-2.0,,
71 [PSPP_OPTIONAL_PREREQ([libxml2]); gnm_support=no;]);
72 AC_SEARCH_LIBS(gzopen,z,,[PSPP_OPTIONAL_PREREQ([zlib]); gnm_support=no;])
73 AC_CHECK_HEADERS(zlib.h,,[PSPP_OPTIONAL_PREREQ([zlib]); gnm_support=no;])
75 if test x"$gnm_support" = x"yes" ; then
76 AC_DEFINE([GNM_SUPPORT], 1,
77 [Define to 1 if building in support for reading Gnumeric files.])
79 AM_CONDITIONAL(GNM_SUPPORT, test x"$gnm_support" = x"yes")
83 [AS_HELP_STRING([--with-gui-tools], [build the gui developer tools])])
84 if test x"$with_gui_tools" = x"yes" ; then
85 PKG_CHECK_MODULES(GLADE_UI, gladeui-1.0)
87 AM_CONDITIONAL(WITH_GUI_TOOLS, test x"$with_gui_tools" = x"yes")
89 AC_CHECK_LIB(gslcblas,main,,[PSPP_REQUIRED_PREREQ([libgslcblas])])
90 AC_CHECK_LIB(gsl, gsl_cdf_chisq_Q,,[PSPP_REQUIRED_PREREQ([libgsl (version 1.4 or later)])])
92 AC_CHECK_LIB(ncurses, tgetent)
93 AC_CHECK_HEADERS(termcap.h)
97 dnl Checks for header files.
98 AC_CHECK_HEADERS([sys/wait.h fpu_control.h ieeefp.h fenv.h])
105 AC_CHECK_SIZEOF(double)
109 AC_CHECK_FUNCS([__setfpucw fork execl execlp isinf isnan finite getpid feholdexcept fpsetmask popen round])
115 [AS_HELP_STRING([--enable-debug],
116 [Turn on diagnostic features in the program])])
117 if test x"$enable_debug" = x"yes" ; then
118 AC_DEFINE(DEBUGGING, 1, [Define to 1 if debugging is enabled.])
122 if test "$am_cv_func_iconv" != "yes"; then
123 PSPP_REQUIRED_PREREQ([iconv (see http://www.gnu.org/software/libiconv/)])
128 AC_CONFIG_FILES([Makefile gl/Makefile po/Makefile.in])
131 echo "PSPP configured successfully."
133 dnl configure.ac ends here