blob: 6b51d284796e6656d31429e6495dcea65c9c24e6 (
plain) (
blame)
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
|
--- jtex-1.52/configure.orig Mon Sep 13 17:05:45 1993
+++ jtex-1.52/configure Wed Oct 25 11:11:21 2000
@@ -188,52 +188,44 @@
fi
if test -n "$GCC"; then
- echo checking whether -traditional is needed
- prog=
-cat <<EOF > conftest.c
-#include <termio.h>
-EOF
-err=`eval "$CPP conftest.c 2>&1 >/dev/null"`
-if test -z "$err"; then
- prog='#include <sys/types.h>
-#include <termio.h>
-main() {
- struct termio t;
- exit(ioctl(0, TCGETA, &t) == 0);
-}'
-else
- :
-fi
-rm -f conftest*
-if test -z "$prog"; then
-cat <<EOF > conftest.c
+ echo -n "checking whether -traditional is needed...."
+ ac_pattern="Autoconf.*'x'"
+ cat > conftest.c <<EOF
+#line 858 "configure"
+#include "confdefs.h"
#include <sgtty.h>
+Autoconf TIOCGETP
EOF
-err=`eval "$CPP conftest.c 2>&1 >/dev/null"`
-if test -z "$err"; then
- prog='#include <sys/types.h>
-#include <sgtty.h>
-main() {
- struct sgttyb t;
- exit(ioctl(0, TIOCGETP, &t) == 0);
-}'
+if (eval "$CPP conftest.c") 2>&1 |
+ egrep "$ac_pattern" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_prog_gcc_traditional=yes
else
- :
+ rm -rf conftest*
+ ac_cv_prog_gcc_traditional=no
fi
rm -f conftest*
-fi
-if test -n "$prog"; then
- cat <<EOF > conftest.c
-$prog
+
+ if test $ac_cv_prog_gcc_traditional = no; then
+ cat > conftest.c <<EOF
+#line 876 "configure"
+#include "confdefs.h"
+#include <termio.h>
+Autoconf TCGETA
EOF
-eval $compile
-if test -s conftest && (./conftest) 2>/dev/null; then
- CC="$CC -traditional"
-else
- :
+if (eval "$CPP conftest.c") 2>&1 |
+ egrep "$ac_pattern" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_prog_gcc_traditional=yes
fi
rm -f conftest*
+
+ fi
fi
+
+echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&2
+if test $ac_cv_prog_gcc_traditional = yes; then
+ CC="$CC -traditional"
fi
echo checking for install
|