-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.in
130 lines (122 loc) · 2.9 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
dnl Process this file with autoconf to produce a configure script.
AC_INIT(bufx.h)
AC_CANONICAL_HOST
dnl AC_CANONICAL_SYSTEM
AC_PROG_CC
AC_PROG_CXX
AC_PROG_CPP
AC_PROG_INSTALL
dnl If we're able to run this script, this is true!
AC_DEFINE(UNIX)
AC_C_CONST
dnl Only add to this case statement things that we cannot design tests for.
PROG_EXT=
case $host_os in
aix4*)
CFLAGS="$CFLAGS -DAIX4 -D_BSD=44"
LIBS="$LIBS -lbsd"
;;
aix*)
LIBS="$LIBS -lbsd"
;;
apollo*)
CFLAGS="$CFLAGS -D_BUILTINS -W0,-opt,4"
;;
bsdi*)
CFLAGS="$CFLAGS -DBSDI"
;;
clix*)
# Tested on CLIX 3.1 (T.Dickey). The original makefile entry
# contributed by Alex Matulich ([email protected]) also
# references -lmalloc and -lbsd.
AC_CHECK_LIB(c_s,strcmp)
;;
convex*)
CFLAGS="$CFLAGS -D__STDC__ -Dunix"
;;
dgux*)
CFLAGS="$CFLAGS -DDGUX"
;;
hpux*)
CFLAGS="$CFLAGS -Aa -DSNAKE"
;;
isc*)
# -DPOSIX_JC is necessary, else LYBookmark.c never finds out what a mode_t is.
CFLAGS="$CFLAGS -DISC -DPOSIX_JC"
LIBS="$LIBS -linet -lnsl_s -lcposix"
;;
irix*)
# The original makefile used the $CFLAGS option -cckr for some form
# of K&R compatibility. However, this causes compilation warnings for
# varargs on IRIX 5.2, and does not appear to be needed.
#removed: CFLAGS="$CFLAGS -cckr"
;;
linux*)
CFLAGS="$CFLAGS -DLINUX"
;;
next*)
CFLAGS="$CFLAGS -DNEXT -DXMOSAIC_HACK"
;;
openbsd*)
LIBS="$LIBS -lcompat"
;;
os2*)
# We make sure -Zexe is not used -- it would interfere with @PROG_EXT@
CFLAGS="$CFLAGS -Zmt -D__ST_MT_ERRNO__"
LDFLAGS=`echo "$LDFLAGS -Zmt -Zcrtdll" | sed "s/-Zexe//g"`
PROG_EXT=".exe"
;;
osf*)
# Increase the maximum size of functions that will be optimized.
test -z "$GCC" && CFLAGS="$CFLAGS -O -Olimit 4000"
CFLAGS="$CFLAGS -DDSYS5"
;;
sco3.2v5*)
test $ac_cv_prog_gcc != yes && CC="cc -belf"
;;
sco*)
LIBS="$LIBS -lmalloc"
# It's a little late to do much, but try to warn user if he's using
# SCO's cc (which is reported to have broken const/volatile).
case "$CC" in #(vi
cc|*/cc)
AC_MSG_WARN(You should consider using gcc or rcc if available)
unset ac_cv_prog_CC
AC_CHECK_PROGS(CC,gcc rcc,$CC)
;;
esac
;;
sequent-ptx)
CFLAGS="$CFLAGS -DSVR4_BSDSELECT -DNO_IOCTL -DUSE_FCNTL"
;;
sequent-ptx2)
CFLAGS="$CFLAGS -DSVR4_BSDSELECT"
;;
sony-newsos*)
CFLAGS="$CFLAGS -I/usr/sony/include"
AC_CHECK_HEADERS(jcurses.h)
;;
svr4)
CFLAGS="$CFLAGS -DSVR4_BSDSELECT -DSVR4"
;;
sunos3*)
CFLAGS="$CFLAGS -DSUN"
;;
sunos4*)
CFLAGS="$CFLAGS -DSUN -DSUN4"
;;
ultrix*)
# Increase the maximum size of functions that will be optimized.
test -z "$GCC" && CFLAGS="$CFLAGS -O -Olimit 600 -G 7"
CFLAGS="$CFLAGS -DULTRIX"
AC_CHECK_HEADERS(cursesX.h, cf_cv_ncurses_header=cursesX.h)
;;
esac
AC_SUBST(PROG_EXT)
dnl Checks for programs.
dnl Checks for libraries.
dnl Checks for header files.
dnl Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
dnl Checks for library functions.
AC_OUTPUT(Makefile)