forked from SRI-CSL/PVS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.in
151 lines (127 loc) · 4.78 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
dnl PVS autoconf input
dnl davesc Feb 2001
dnl --------------------------------------------------------------------
dnl PVS
dnl Copyright (C) 2006, SRI International. All Rights Reserved.
dnl This program is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU General Public License
dnl as published by the Free Software Foundation; either version 2
dnl of the License, or (at your option) any later version.
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
dnl --------------------------------------------------------------------
dnl make sure we are using a recent autoconf version
AC_PREREQ(2.59)
AC_INIT([pvs],[4.2],[[email protected]])
dnl If it doesn't look like GNU Make is being used, give a friendly warning
tem=`make --version -f /dev/null 2>&1 | grep GNU`
if test "x$tem" = "x"; then
AC_MSG_WARN([You need to use GNU Make when compiling])
fi
dnl This file must exist for configure to run
AC_CONFIG_SRCDIR([src/pvs.lisp])
dnl This sets build, build_cpu, build_vendor, and build_os
AC_CANONICAL_BUILD
dnl No longer look for lisp within configure, as it is possible to
dnl build with several lisps. Checks have been moved into the Makefile
dnl Giving pvspath is optional
AC_MSG_CHECKING(pvspath)
AC_ARG_WITH(pvspath, AS_HELP_STRING([--with-pvspath=path],
[path=current directory if automounted]))
if test "x$with_pvspath" = "x"; then
PVSPATH=`pwd`
else
PVSPATH=$with_pvspath
fi
if test -f $PVSPATH/pvs.in; then
AC_MSG_RESULT(found $PVSPATH/pvs.in)
else
AC_MSG_ERROR(Invalid pvspath)
fi
AC_SUBST(PVSPATH)
dnl Check for programs required to build PVS
AC_PROG_CC
if test "$GCC" != yes ; then
AC_MSG_ERROR(Cannot find gcc)
fi
AC_MSG_CHECKING(for $CC version >= 2.95)
gcc_version=`$CC --version | head -n 1 | sed -e 's,[[^0-9.]],,g'`
maj_gcc_version=`echo $gcc_version | cut -d. -f 1`
min_gcc_version=`echo $gcc_version | cut -d. -f 2`
if test $maj_gcc_version -lt 2 -o \( $maj_gcc_version -eq 2 -a $min_gcc_version -lt 95 \); then
AC_MSG_ERROR(found $gcc_version)
else
AC_MSG_RESULT(found $gcc_version)
fi
AC_CHECK_PROG(LD,ld,ld,no)
if test "$LD" = no ; then
AC_MSG_ERROR(Cannot find ld)
fi
AC_MSG_CHECKING(for $LD version >= 2.11)
ld_version=`$LD --version | head -n 1 | sed -e 's,[[^0-9.]],,g'`
maj_ld_version=`echo $ld_version | cut -d. -f 1`
min_ld_version=`echo $ld_version | cut -d. -f 2`
if test $maj_ld_version -lt 2 -o \( $maj_ld_version -eq 2 -a $min_ld_version -lt 11 \); then
AC_MSG_ERROR(found $ld_version)
else
AC_MSG_RESULT(found $ld_version)
fi
AC_CHECK_PROG(AR,ar,ar,no)
if test "$AR" = no ; then
AC_MSG_ERROR(Cannot find ar)
fi
AC_PROG_RANLIB
AC_CHECK_PROG(EMACS,emacs,emacs,no)
AC_CHECK_PROG(XEMACS,xemacs,xemacs,no)
if test \( "$EMACS" = no \) -a \( "$XEMACS" = no \); then
AC_MSG_ERROR(Cannot find emacs or xemacs)
fi
if test "$EMACS" != no; then
AC_MSG_CHECKING(for $EMACS version >= 19)
emacs_version=`$EMACS --version | head -n 1 | sed -e 's,[[^0-9.]],,g'`
maj_emacs_version=`echo $emacs_version | cut -d. -f 1`
min_emacs_version=`echo $emacs_version | cut -d. -f 2`
if test $maj_emacs_version -lt 19; then
AC_MSG_ERROR(found $emacs_version)
else
AC_MSG_RESULT(found $emacs_version)
fi
fi
dnl Don't need to check the xemacs version
AC_CHECK_PROG(ETAGS,etags,etags,no)
if test "$ETAGS" = no ; then
AC_MSG_ERROR(Cannot find etags)
fi
AC_CHECK_PROG(MKDIR,mkdir,mkdir,no)
if test "$MKDIR" = no ; then
AC_MSG_ERROR(Cannot find mkdir)
fi
AC_CHECK_PROG(TAR,tar,tar,no)
if test "$TAR" = no ; then
AC_MSG_ERROR(Cannot find tar)
fi
AC_MSG_CHECKING(for GNU $TAR version >= 1.11)
tar_version=`$TAR --version | head -n 1 | grep GNU | sed -e 's,[[^0-9.]],,g'`
maj_tar_version=`echo $tar_version | cut -d. -f 1`
min_tar_version=`echo $tar_version | cut -d. -f 2`
if test \( "x$tar_version" != "x" \) -a \( $maj_tar_version -lt 1 -o \( $maj_tar_version -eq 1 -a $min_tar_version -lt 12 \) \); then
AC_MSG_ERROR(found $tar_version)
else
AC_MSG_RESULT(found $tar_version)
fi
AC_CHECK_PROG(RM,rm,rm,no)
if test "$RM" = no ; then
AC_MSG_ERROR(Cannot find rm)
fi
dnl Get the platform to determine relevant Makefiles to update
PLATFORM=`./bin/pvs-platform`
export PLATFORM
# Finally create all the generated files
AC_CONFIG_FILES([Makefile pvs pvsio proveit provethem doc/api/Makefile doc/user-guide/Makefile doc/language/Makefile doc/language/pvs-doc.el doc/prover/Makefile])
AC_OUTPUT
chmod a+x pvs pvsio proveit provethem