-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathconfigure.in
156 lines (134 loc) · 4.01 KB
/
configure.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
dnl $MawkId: configure.in,v 1.54 2014/09/07 21:42:24 tom Exp $
dnl configure.in for mawk
dnl ###########################################################################
dnl configure.in
dnl copyright 2008-2013,2014, Thomas E. Dickey
dnl copyright 1991-1994,1995, Michael D. Brennan
dnl
dnl This is a source file for mawk, an implementation of
dnl the AWK programming language.
dnl
dnl Mawk is distributed without warranty under the terms of
dnl the GNU General Public License, version 2, 1991.
dnl ###########################################################################
dnl
dnl @Log: configure.in,v @
dnl Revision 1.13 1995/10/16 12:25:00 mike
dnl configure cleanup
dnl
dnl Revision 1.12 1995/04/20 20:26:51 mike
dnl beta improvements from Carl Mascott
dnl
dnl Revision 1.11 1995/01/09 01:22:30 mike
dnl check sig handler ret type to make fpe_check.c more robust
dnl
dnl Revision 1.10 1994/12/18 20:46:24 mike
dnl fpe_check -> ./fpe_check
dnl
dnl Revision 1.9 1994/12/14 14:42:55 mike
dnl more explicit that " " MATHLIB means none
dnl
dnl Revision 1.8 1994/12/11 21:26:25 mike
dnl tweak egrep for [fs]printf prototypes
dnl
dnl Revision 1.7 1994/10/16 18:38:23 mike
dnl use sed on defines.out
dnl
dnl Revision 1.6 1994/10/11 02:49:06 mike
dnl systemVr4 siginfo
dnl
dnl Revision 1.5 1994/10/11 00:39:25 mike
dnl fpe check stuff
dnl
dnl
dnl
AC_PREREQ(2.52.20011201)
AC_INIT(mawk.h)
AC_CONFIG_HEADER(config.h:config_h.in)
CF_CHECK_CACHE
AC_ARG_PROGRAM
CF_PROG_CC
AC_PROG_MAKE_SET
AC_PROG_CPP
AC_PROG_INSTALL
CF_HELP_MESSAGE(Cross-compiling)
CF_BUILD_CC
CF_MAWK_MATHLIB
CF_HELP_MESSAGE(Miscellaneous options)
CF_DISABLE_ECHO
CF_ENABLE_WARNINGS
###############################################################################
AC_MSG_CHECKING(if you want to use mawk's own regular-expressions engine)
AC_ARG_WITH([builtin-regex],
[ --without-builtin-regex do not use mawk's own regular-expressions engine],
[
with_builtin_regex=$withval
])
if test "x${with_builtin_regex}" != xno; then
with_builtin_regex=yes
CPPFLAGS="$CPPFLAGS -DLOCAL_REGEXP"
fi
AC_MSG_RESULT($with_builtin_regex)
if test "x${with_builtin_regex}" = xno; then
CF_REGEX
fi
###############################################################################
AC_MSG_CHECKING(if you want to use mawk's own srand/rand functions)
CF_ARG_ENABLE([builtin-srand],
[ --enable-builtin-srand use mawk's own srand/rand functions],
[with_builtin_srand=yes],
[with_builtin_srand=no])
if test "x${with_builtin_srand}" != xno; then
with_builtin_srand=yes
fi
AC_MSG_RESULT($with_builtin_srand)
if test "x${with_builtin_srand}" = xno; then
CF_SRAND(mawk_)
AC_DEFINE_UNQUOTED(NAME_RANDOM, "$cf_cv_srand_func")
fi
###############################################################################
AC_MSG_CHECKING(if you want mawk to initialize random numbers at startup)
CF_ARG_DISABLE([init-srand],
[ --disable-init-srand suppress automatic initialization of random numbers],
[with_init_srand=no],
[with_init_srand=yes])
if test "x${with_init_srand}" != xno; then
with_init_srand=yes
else
CPPFLAGS="$CPPFLAGS -DNO_INIT_SRAND"
fi
AC_MSG_RESULT($with_init_srand)
###############################################################################
AC_PROG_YACC
CF_PROG_LINT
CF_MAKE_TAGS
CF_XOPEN_SOURCE
CF_LARGEFILE
CF_HELP_MESSAGE(Testing-options)
CF_DISABLE_LEAKS
CF_ENABLE_TRACE
if test "x$with_trace" = xyes
then
EXTRAOBJS="$EXTRAOBJS trace\$o"
fi
AC_SUBST(EXTRAOBJS)
CF_MAWK_FIND_SIZE_T
CF_LOCALE
CF_CHECK_ENVIRON(environ)
AC_CHECK_FUNCS(fork gettimeofday matherr mktime pipe strftime tdestroy tsearch wait)
### Checks for libraries.
case $cf_cv_system_name in #(vi
*mingw32*) #(vi
CPPFLAGS="$CPPFLAGS -DWINVER=0x0501"
# LIBS=" -lpsapi $LIBS"
;;
esac
test "$ac_cv_func_fork" = yes && \
test "$ac_cv_func_pipe" = yes && \
test "$ac_cv_func_wait" = yes && \
AC_DEFINE(HAVE_REAL_PIPES,1,[Define to 1 if we have functions needed to setup Unix pipes])
AC_CHECK_HEADERS(errno.h fcntl.h unistd.h sys/wait.h)
CF_SET_MATH_LIB_VERSION
CF_MAWK_FIND_MAX_INT
CF_MAWK_RUN_FPE_TESTS
AC_OUTPUT(Makefile)