996
|
1 dnl -*- autoconf -*-
|
|
2 dnl Process this file with autoconf to produce a configure script.
|
|
3
|
|
4 dnl Yes, that is a valid email address. If your mailer doesn't support nested
|
|
5 dnl comments, then get a better mailer.
|
|
6 AC_INIT([C-INTERCAL],[0.29],[[ais523(524\)x\((525)y)@bham.ac.uk]],[ick])
|
|
7 AC_CONFIG_SRCDIR([../src/oil.h])
|
|
8 AC_CONFIG_HEADER([bconfig.h:../src/bconfigh.in])
|
|
9 AC_CONFIG_AUX_DIR([.])
|
|
10
|
|
11 dnl Checks for programs.
|
|
12 AC_PROG_YACC
|
|
13 AC_PROG_CC
|
|
14 AM_PROG_LEX
|
|
15 AC_PROG_RANLIB
|
|
16 AC_PROG_LN_S
|
|
17
|
|
18 dnl Checks for libraries.
|
|
19
|
|
20 dnl Checks for header files.
|
|
21 AC_HEADER_STDC
|
|
22 AC_CHECK_HEADERS([sys/time.h unistd.h stdarg.h])
|
|
23 AC_CHECK_HEADERS([stdint.h],[HAVE_STDINT_H=1])
|
|
24 AC_SUBST(HAVE_STDINT_H)
|
|
25
|
|
26 dnl Checks for typedefs, structures, and compiler characteristics.
|
|
27 dnl This Autoconf input is compatible with pre-C99 Autoconf, so to
|
|
28 dnl check for long long AC_CHECK_SIZEOF is used to test for a nonzero result,
|
|
29 dnl likewise for _Bool.
|
|
30 AC_C_CONST
|
|
31 AC_C_VOLATILE
|
|
32 AC_CHECK_SIZEOF([long long int],[0])
|
|
33 AC_CHECK_SIZEOF([_Bool],[0])
|
|
34 AC_HEADER_TIME
|
|
35 AC_EXEEXT
|
|
36 AC_OBJEXT
|
|
37 AC_SYS_INTERPRETER
|
|
38 AC_TYPE_SIGNAL
|
|
39 AC_TYPE_SIZE_T
|
|
40 AC_TYPE_UINT16_T
|
|
41 AC_TYPE_UINT32_T
|
|
42
|
|
43 AC_MSG_CHECKING([[whether yyrestart() is needed]])
|
|
44 # Write a lex program that will cause an error if yyrestart exists.
|
|
45 echo '%%
|
|
46 %%
|
|
47 float yyrestart(int, ...);' | $LEX
|
|
48 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "${LEX_OUTPUT_ROOT}.c"
|
|
49 ]], [[exit(0);]])],[AC_MSG_RESULT(no)],[AC_DEFINE([NEED_YYRESTART],dnl
|
|
50 [],[Define if yyrestart() is necessary to yyparse a new file.])
|
|
51 AC_MSG_RESULT(yes)])
|
|
52 rm -f ${LEX_OUTPUT_ROOT}.c
|
|
53
|
|
54 dnl Checks for library functions.
|
|
55 AC_CHECK_FUNCS(gettimeofday gethrtime strdup strtol strtoul snprintf)
|
|
56
|
|
57 if test "$interpval" != "no"; then
|
|
58 AC_DEFINE([HAVE_SYS_INTERPRETER], [], [Define if #! works on your system.])
|
|
59 fi
|
|
60 AC_DEFINE_UNQUOTED([EXEEXT],"$EXEEXT",[Extension to use on executable files.])
|
|
61
|
|
62 AC_CONFIG_FILES([host.mak:hostmak.in])
|
|
63 AC_OUTPUT
|