File: configure.in

package info (click to toggle)
clif 0.93-9.1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 4,228 kB
  • sloc: ansic: 31,464; yacc: 5,067; lex: 819; makefile: 383; sh: 48
file content (145 lines) | stat: -rw-r--r-- 4,444 bytes parent folder | download | duplicates (7)
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
dnl Process this file with autoconf to produce a configure script
#    Clif - A C-like Interpreter Framework
#    Copyright (C) 1997, 1998 L. Koren

#    This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.

#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.

#    You should have received a copy of the GNU General Public License
#    along with this program; if not, write to the Free Software
#    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
AC_INIT(buf.h)
AC_CONFIG_HEADER(auto-config.h:config.in)
PROGS="utils/yy clif rw"
AC_SUBST(PROGS)dnl
AC_PROG_CC
AC_PROG_YACC
AC_PROG_LEX
dnl AC_PROG_INSTALL
AC_PATH_XTRA
AC_CHECK_LIB(elf,main)
AC_CHECK_LIB(ucb,main)
AC_CHECK_LIB(BSD,main)
AC_CHECK_HEADERS(assert.h)
AC_CHECK_HEADERS(limits.h)
AC_FUNC_VPRINTF
AC_TYPE_SIGNAL
AC_HEADER_STDC
AC_CHECK_FUNCS(isalpha isspace)
AC_HEADER_CHECK(signal.h,op_signal=signal.h)
AC_HEADER_CHECK(termio.h,op_termio=termio.h)
AC_HEADER_CHECK(fcntl.h,op_fcntl=fcntl.h,op_fcntl=sys/file.h)

CLIF_SVR_SIGS
if test $clif_cv_sigs = yes; then

    CLIF_SVR3_TERM

    if test $clif_cv_lnctl = yes; then
	AC_CHECK_LIB(bsd,main)
	ADD_OBJS="$ADD_OBJS sig-svr3.o"
	ADD_FORK="$ADD_FORK \$(srcdir)/sigig.c"
    else
	ADD_OBJS="$ADD_OBJS sig-svr4.o"
	ADD_FORK="$ADD_FORK \$(srcdir)/sigig.c"
    fi
    clif_cv_sigv=no
    clif_cv_lsig=no
    clif_cv_psig=no
else
    CLIF_BSD_SIG
fi

if test $clif_cv_sigv = yes; then
    ADD_OBJS="$ADD_OBJS sig-bsd.o" 
    ADD_FORK="$ADD_FORK \$(srcdir)/sigig_bsd.c"
    AC_TRY_LINK([#include<stdio.h>
	#include<$op_signal>
	#include<$op_termio>
	#include<$op_fcntl>],
	[ioctl(stdin,TIOCSTI,"\n");],
	AC_DEFINE(HAVE_TIOCSTI))
    clif_cv_lsig=no
    clif_cv_psig=no
elif test $clif_cv_sigs = no; then
    CLIF_LINUX_SIG
fi

if test $clif_cv_sigs = no && test $clif_cv_sigv = no && test $clif_cv_lsig = no; then
    AC_HEADER_CHECK(termios.h,op_termio=termios.h)
    CLIF_POSIX_SIG
else
    clif_cv_psig=no
fi

if test $clif_cv_sigs = no && test $clif_cv_sigv = no && test $clif_cv_lsig = no && test $clif_cv_psig = yes; then
    ADD_OBJS="$ADD_OBJS sig-posix.o"
    ADD_FORK="$ADD_FORK \$(srcdir)/sigig_posix.c"
elif test $clif_cv_sigs = no && test $clif_cv_sigv = no && test $clif_cv_lsig = no && test $clif_cv_psig = no; then
    AC_MSG_WARN(cannot find proper signal handling
    you should probably create new signal handling routines
    sig-....c and sigig...c are examples, cannot find)
    ADD_OBJS="$ADD_OBJS dumb.o"
    ADD_FORK="$ADD_FORK \$(srcdir)/sigig_dumb.c"
    echo "RETSIGTYPE interrupt_service () {}" > dumb.c
    echo "void interrupt_register () {}" >> dumb.c
    echo "void interrupt_service_sync () {}" >> dumb.c
    echo "void term_restore () {}" >> dumb.c
    echo "int handler;" >> dumb.c
    echo "void fatal_handler_register () {}" >> dumb.c
    echo "void fatal_handler () {}" >> dumb.c
    echo "void mysigignore () {}" > sigig_dumb.c
fi

AC_C_LONG_DOUBLE
CLIF_MAX_ALIGNMENT

dnl echo adding $ADD_OBJS $ADD_FORK
AC_ARG_ENABLE(CONTROL,
[  --enable-CONTROL        features for automatic control],
if test "$enableval" = "yes"; then
    AC_DEFINE(CONTROL)
    SH_OBJS="lin_clnt.o lin_xdr.o"
    if test $LEX = flex; then
	AC_MSG_WARN(automatic \`resume;' generation is not supported with flex)
    fi
fi)
AC_ARG_ENABLE(CODE,
[  --enable-CODE           symbolic code from virtual machine for debugging],
if test "$enableval" = "yes"; then
    AC_DEFINE(CODE)
fi)
AC_ARG_ENABLE(DEBUG,
[  --enable-DEBUG          debugging of the virtual machine],
if test "$enableval" = "yes"; then
    AC_DEFINE(DEBUG)
fi)
AC_ARG_ENABLE(CHKSTACK,
[  --enable-CHKSTACK       check stack of the virtual machine],
if test "$enableval" = "yes"; then
    AC_DEFINE(CHKSTACK)
fi)
AC_SUBST(ADD_IDIR)dnl
AC_SUBST(ADD_OBJS)dnl
AC_SUBST(ADD_FORK)dnl
AC_SUBST(SH_OBJS)dnl
AC_OUTPUT(Makefile,
rm -f Makefile.sed
echo 's|||' > Makefile.sed
rm -f Makefile.tmp
sed -f Makefile.sed Makefile > Makefile.tmp
mv Makefile.tmp Makefile
rm -f Makefile.sed
[
case x$CONFIG_HEADERS in
xauto-config.h:config.in)
echo > stamp-h ;;
esac]
)