-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfigure.in
199 lines (172 loc) · 4.19 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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
dnl $XTermId: configure.in,v 1.55 2024/09/09 21:05:38 tom Exp $
dnl
dnl ---------------------------------------------------------------------------
dnl
dnl Copyright 2006-2023,2024 by Thomas E. Dickey
dnl
dnl All Rights Reserved
dnl
dnl Permission to use, copy, modify, and distribute this software and its
dnl documentation for any purpose and without fee is hereby granted,
dnl provided that the above copyright notice appear in all copies and that
dnl both that copyright notice and this permission notice appear in
dnl supporting documentation, and that the name of the above listed
dnl copyright holder(s) not be used in advertising or publicity pertaining
dnl to distribution of the software without specific, written prior
dnl permission.
dnl
dnl THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD
dnl TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
dnl AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
dnl LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
dnl WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
dnl ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
dnl OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
dnl
dnl ---------------------------------------------------------------------------
AC_PREREQ(2.52.20240618)
AC_INIT(luit.c)
AC_CONFIG_HEADER(config.h:config_h.in)
CF_CHECK_CACHE
CF_WITH_SYSTYPE
CF_GLOB_FULLPATH
AC_ARG_PROGRAM
CF_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
CF_PROG_LINT
CF_MAKE_TAGS
AC_CONST
AC_PATH_XTRA
CF_XOPEN_SOURCE(600)
AC_CHECK_DECL(exit)
CF_SIGWINCH
CF_SVR4
CF_SYSV
AC_TYPE_UID_T
CF_WITHOUT_X
CF_DISABLE_ECHO
CF_ENABLE_WARNINGS(Wwrite-strings Wconversion)
AC_CHECK_HEADERS( \
poll.h \
pty.h \
stropts.h \
sys/ioctl.h \
sys/param.h \
sys/poll.h \
sys/select.h \
sys/time.h \
termios.h \
)
AC_CHECK_FUNCS(\
poll \
putenv \
select \
strdup \
strcasecmp \
)
CF_FUNC_SETGROUPS
CF_CHECK_TYPE([nfds_t],[unsigned long],[
#include <sys/types.h>
#ifdef HAVE_SYS_POLL_H
#include <sys/poll.h>
#endif
])
CF_SYS_TIME_SELECT
# workaround for divergence of xterm/luit in the [CF_FUNC_GRANTPT] macro...
AC_CHECK_FUNCS(grantpt)
disable_openpty=$ac_cv_func_grantpt
CF_FUNC_GRANTPT
CF_FUNC_POLL
AC_MSG_CHECKING(if you want to use fontenc)
CF_ARG_ENABLE(fontenc,
[ --enable-fontenc enable/disable use of fontenc],
[with_fontenc=yes],
[with_fontenc=maybe])
AC_MSG_RESULT($with_fontenc)
AC_MSG_CHECKING(if you want to use iconv)
CF_ARG_DISABLE(iconv,
[ --disable-iconv enable/disable use of iconv],
[with_iconv=no],
[with_iconv=maybe])
AC_MSG_RESULT($with_iconv)
case $with_iconv in
yes)
case $with_fontenc in
yes)
with_fontenc=no
AC_MSG_WARN(overriding deprecated fontenc)
;;
maybe|no)
with_fontenc=no
AC_MSG_NOTICE(using iconv)
;;
esac
;;
no)
case $with_fontenc in
yes)
;;
no)
AC_MSG_ERROR(you must choose between iconv and fontenc)
;;
maybe)
with_fontenc=yes
AC_MSG_NOTICE(using fontenc)
;;
esac
;;
maybe)
case $with_fontenc in
yes)
with_iconv=no
AC_MSG_NOTICE(using fontenc)
;;
no|maybe)
with_iconv=yes
with_fontenc=no
AC_MSG_NOTICE(using iconv)
;;
esac
;;
esac
CF_WITH_ZLIB
if test "x$ac_cv_func_zError" = xyes
then
AC_DEFINE(USE_ZLIB,1,[Define to 1 if we can link with zlib])
fi
if test "$with_fontenc" = yes
then
CF_X_FONTENC
if test $cf_have_fontenc_libs = yes ; then
AC_DEFINE(USE_FONTENC,1,[Define to 1 if font-encoding libraries can/should be used])
else
AC_MSG_ERROR(cannot link with fontenc)
fi
fi
AM_LANGINFO_CODESET
# Since iconv is widely available, fallback to using it if fontenc is neither
# requested nor available.
if test "$with_iconv" = yes
then
AM_ICONV
AC_DEFINE(USE_ICONV,1,[Define to 1 if iconv-libraries should be used])
CF_ADD_LIBS($LIBICONV)
EXTRASRCS="$EXTRASRCS luitconv.c builtin.c"
EXTRAOBJS="$EXTRAOBJS luitconv\$o builtin\$o"
fi
CF_WITH_ENCODINGS_DIR
CF_WITH_LOCALE_ALIAS
CF_WITH_MAN2HTML
CF_DISABLE_LEAKS
CF_ENABLE_TRACE
if test "$with_trace" != no
then
EXTRASRCS="$EXTRASRCS trace.c"
EXTRAOBJS="$EXTRAOBJS trace\$o"
fi
CF_DISABLE_RPATH_HACK
AC_SUBST(EXTRASRCS)
AC_SUBST(EXTRAOBJS)
AC_OUTPUT(Makefile,,,cat)
CF_MAKE_DOCS(luit,[\$(manext)])