9 |
dnl Checks for programs. |
dnl Checks for programs. |
10 |
AC_GNU_SOURCE |
AC_GNU_SOURCE |
11 |
AC_PROG_CC |
AC_PROG_CC |
12 |
|
gl_EARLY |
13 |
AC_PROG_RANLIB |
AC_PROG_RANLIB |
14 |
|
|
15 |
AM_CONDITIONAL(cc_is_gcc, test x"$GCC" = x"yes" ) |
AM_CONDITIONAL(cc_is_gcc, test x"$GCC" = x"yes" ) |
16 |
|
|
17 |
|
dnl Check that Perl is available. |
18 |
AC_PATH_PROG([PERL], perl, no) |
AC_PATH_PROG([PERL], perl, no) |
19 |
AC_SUBST([PERL])dnl |
AC_SUBST([PERL])dnl |
20 |
if test "$PERL" = no; then |
if test "$PERL" = no; then |
26 |
|
|
27 |
dnl Internationalization macros. |
dnl Internationalization macros. |
28 |
AM_GNU_GETTEXT |
AM_GNU_GETTEXT |
29 |
AM_GNU_GETTEXT_VERSION dnl Prevents autoreconf complaint. |
AM_GNU_GETTEXT_VERSION([0.14.5]) |
30 |
|
|
31 |
dnl Checks for libraries. |
dnl Checks for libraries. |
32 |
AC_SYS_LARGEFILE |
AC_SYS_LARGEFILE |
41 |
fi |
fi |
42 |
AM_CONDITIONAL(WITHCHARTS, test x"$with_libplot" != x"no") |
AM_CONDITIONAL(WITHCHARTS, test x"$with_libplot" != x"no") |
43 |
|
|
44 |
|
dnl Check that off_t is defined as an integer type. |
45 |
|
dnl Solaris sometimes declares it as a struct, if it |
46 |
|
dnl thinks that the compiler does not support `long long'. |
47 |
|
AC_COMPILE_IFELSE([#include <sys/types.h> |
48 |
|
#include <unistd.h> |
49 |
|
off_t x = 0; |
50 |
|
int main (void) |
51 |
|
{ |
52 |
|
lseek (0, 1, 2); |
53 |
|
return 0; |
54 |
|
}], [], [AC_MSG_ERROR( |
55 |
|
[Your system's definition of off_t is broken. You are probably |
56 |
|
using Solaris. You can probably fix the problem with |
57 |
|
`--disable-largefile' or `CFLAGS=-ansi'.])]) |
58 |
|
|
59 |
AC_CHECK_LIB(gslcblas,main,,AC_MSG_ERROR([You must install libgslcblas])) |
AC_CHECK_LIB(gslcblas,main,,AC_MSG_ERROR([You must install libgslcblas])) |
60 |
AC_CHECK_LIB(gsl, gsl_cdf_chisq_Q,, |
AC_CHECK_LIB(gsl, gsl_cdf_chisq_Q,, |
61 |
AC_MSG_ERROR([You must install libgsl version 1.4 or later])) |
AC_MSG_ERROR([You must install libgsl version 1.4 or later])) |
62 |
|
|
|
AC_CHECK_LIB(gnugetopt,getopt_long) |
|
|
AC_CHECK_FUNC(getopt_long,, |
|
|
AC_MSG_ERROR(`This application depends upon getopt_long')) |
|
|
|
|
63 |
AC_ARG_WITH(ncurses, |
AC_ARG_WITH(ncurses, |
64 |
[ --without-ncurses don't compile in ncurses command line editing]) |
[ --without-ncurses don't compile in ncurses command line editing]) |
65 |
|
|
|
|
|
66 |
if test "x$with_ncurses" = x"yes"; then |
if test "x$with_ncurses" = x"yes"; then |
67 |
AC_CHECK_LIB(ncurses, tgetent, LIBS="-lncurses $LIBS" termcap=yes, |
AC_CHECK_LIB(ncurses, tgetent, LIBS="-lncurses $LIBS" termcap=yes, |
68 |
AC_CHECK_LIB(termcap, tgetent, LIBS="-ltermcap $LIBS" termcap=yes, |
AC_CHECK_LIB(termcap, tgetent, LIBS="-ltermcap $LIBS" termcap=yes, |
69 |
termcap=no)) |
termcap=no)) |
70 |
fi |
fi |
71 |
|
|
|
|
|
72 |
if test "$termcap" = yes; then |
if test "$termcap" = yes; then |
73 |
AC_CHECK_HEADERS(termcap.h) |
AC_CHECK_HEADERS(termcap.h) |
74 |
AC_DEFINE(HAVE_LIBTERMCAP, 1, |
AC_DEFINE(HAVE_LIBTERMCAP, 1, |
96 |
AC_CHECK_HEADERS([limits.h memory.h sys/stat.h sys/time.h sys/types.h \ |
AC_CHECK_HEADERS([limits.h memory.h sys/stat.h sys/time.h sys/types.h \ |
97 |
fpu_control.h sys/mman.h sys/wait.h ieeefp.h fenv.h] ) |
fpu_control.h sys/mman.h sys/wait.h ieeefp.h fenv.h] ) |
98 |
|
|
99 |
AC_HEADER_STAT |
# For gnulib. |
100 |
AC_HEADER_STDC |
gl_LIB(libgl) |
101 |
AC_HEADER_TIME |
gl_SOURCE_BASE(gl) |
102 |
AC_HEADER_STDBOOL |
gl_M4_BASE(gl/m4) |
103 |
|
gl_MODULES(alloca alloca-opt assert full-read full-write gethostname getline getlogin_r getopt gettext memchr memcmp memmem memmove memset progname readlink restrict snprintf stat-macros stdbool stpcpy strcase strcspn strerror strftime strstr strtod strtok_r strtol strtoul vsnprintf xalloc xalloc-die xreadlink) |
104 |
|
gl_INIT |
105 |
|
|
106 |
AC_C_CONST |
AC_C_CONST |
107 |
AC_C_INLINE |
AC_C_INLINE |
108 |
|
|
109 |
dnl Dont use AC_TYPE_OFF_T --- it doesnt generate the HAVE_TYPE macro |
dnl Dont use AC_TYPE_OFF_T --- it doesnt generate the HAVE_TYPE macro |
110 |
AC_CHECK_TYPES(off_t) |
AC_CHECK_TYPES(off_t) |
|
AC_TYPE_SIZE_T |
|
|
AC_STRUCT_TM |
|
|
|
|
111 |
AC_CHECK_SIZEOF(short, 2) |
AC_CHECK_SIZEOF(short, 2) |
112 |
AC_CHECK_SIZEOF(int, 4) |
AC_CHECK_SIZEOF(int, 4) |
113 |
AC_CHECK_SIZEOF(long, 4) |
AC_CHECK_SIZEOF(long, 4) |
126 |
BLP_INT_DIGITS |
BLP_INT_DIGITS |
127 |
BLP_RANDOM |
BLP_RANDOM |
128 |
|
|
|
AC_FUNC_ALLOCA |
|
|
AC_FUNC_MEMCMP |
|
129 |
AC_FUNC_VPRINTF |
AC_FUNC_VPRINTF |
130 |
AC_REPLACE_FUNCS([memmove memset stpcpy strpbrk strerror strtol strtoul \ |
AC_CHECK_FUNCS([strchr strrchr __setfpucw isinf isnan finite getpid feholdexcept]) |
|
memchr getline getdelim strcasecmp strncasecmp memmem \ |
|
|
strtok_r]) |
|
|
AC_CHECK_FUNCS([gethostname strstr strtod __setfpucw isinf isnan finite \ |
|
|
getpid feholdexcept mkdtemp]) |
|
131 |
|
|
132 |
AC_PROG_LN_S |
AC_PROG_LN_S |
133 |
|
|
136 |
|
|
137 |
|
|
138 |
AM_CONDITIONAL(unix, test x"$host_os" != x"msdos" ) |
AM_CONDITIONAL(unix, test x"$host_os" != x"msdos" ) |
139 |
AM_CONDITIONAL(msdos, test x"$host_os" == x"msdos" ) |
AM_CONDITIONAL(msdos, test x"$host_os" = x"msdos" ) |
140 |
|
|
141 |
dnl This is needed otherwise --with-included-gettext fails |
dnl This is needed otherwise --with-included-gettext fails |
142 |
AH_BOTTOM([#include <locale.h>]) |
AH_BOTTOM([#include <locale.h>]) |
146 |
AC_DEFINE(DEBUGGING, 1, [Define to 1 if debugging is enabled.]) |
AC_DEFINE(DEBUGGING, 1, [Define to 1 if debugging is enabled.]) |
147 |
fi |
fi |
148 |
|
|
149 |
AC_CONFIG_FILES([Makefile po/Makefile.in m4/Makefile |
AC_CONFIG_FILES([Makefile m4/Makefile gl/Makefile intl/Makefile po/Makefile.in |
150 |
lib/Makefile lib/misc/Makefile lib/gsl-extras/Makefile |
lib/Makefile lib/gsl-extras/Makefile |
151 |
doc/Makefile |
doc/Makefile |
152 |
src/Makefile src/expressions/Makefile |
src/Makefile src/expressions/Makefile |
153 |
config/Makefile |
config/Makefile |
165 |
fi |
fi |
166 |
if test -f pref.h; then touch pref.h; fi |
if test -f pref.h; then touch pref.h; fi |
167 |
]) |
]) |
168 |
AC_OUTPUT(intl/Makefile) |
AC_OUTPUT |
169 |
|
|
170 |
dnl configure.ac ends here |
dnl configure.ac ends here |