-
Notifications
You must be signed in to change notification settings - Fork 32
/
configure.in
137 lines (112 loc) · 3.94 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
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],[8.0],[[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 sets build, build_cpu, build_vendor, and build_os
AC_CANONICAL_BUILD
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 -d "$PVSPATH"; then
if test -f "$PVSPATH/pvs.in"; then
AC_MSG_RESULT(found "$PVSPATH/pvs.in")
else
AC_MSG_ERROR(Invalid pvspath: couldn't find "$PVSPATH/pvs.in")
fi
else
AC_MSG_ERROR(Invalid pvspath directory: "$PVSPATH")
fi
AC_SUBST(PVSPATH)
dnl Check for programs required to build PVS
AC_PROG_CC
AC_CHECK_PROG(LD,ld,ld,no)
if test "$LD" = no ; then
AC_MSG_ERROR(Cannot find ld)
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(GREP,grep,grep,no)
if test "$GREP" = no ; then
AC_MSG_ERROR(Cannot find grep)
fi
AC_CHECK_PROGS(ETAGS,etags etags-emacs etags.emacs,no)
if test "$ETAGS" = no ; then
AC_MSG_WARN(Cannot find etags)
fi
AC_CHECK_PROG(MKDIR,mkdir,mkdir,no)
if test "$MKDIR" = no ; then
AC_MSG_ERROR(Cannot find mkdir)
fi
AC_PROG_MKDIR_P
AC_CHECK_PROG(TAR,tar,tar,no)
if test "$TAR" = no ; then
AC_MSG_WARN(Cannot find tar)
fi
AC_CHECK_PROG(RM,rm,rm,no)
if test "$RM" = no ; then
AC_MSG_ERROR(Cannot find rm)
fi
AC_CHECK_PROG(CURL,curl,curl,no)
if test "$CURL" = no ; then
AC_MSG_ERROR(Cannot find curl)
fi
AC_CHECK_PROG(GIT,git,git,no)
if test "$GIT" = no ; then
AC_MSG_WARN(Cannot find git; probably not needed)
fi
AC_CHECK_PROG(SBCL,sbcl,sbcl,no)
if test "$SBCL" = no ; then
AC_MSG_WARN(Cannot find sbcl; install it or set SBCL_HOME or ALLEGRO_HOME to build pvs)
fi
dnl ~/.config/common-lisp/source-registry.conf.d/20-pvs.conf
# Finally create all the generated files
AC_CONFIG_FILES([Makefile pvs pvsio proveit provethem pvs-get-patches doc/api/Makefile doc/user-guide/Makefile doc/language/Makefile doc/language/pvs-doc.el doc/prover/Makefile lib/registry.conf])
AC_OUTPUT
chmod a+x pvs pvsio proveit provethem