]> andersk Git - splint.git/blame - configure.binary.ac
noexpand always false.
[splint.git] / configure.binary.ac
CommitLineData
363a5c93 1dnl Process with autoconf to create a configure script -*- Autoconf -*-
2AC_PREREQ(2.50)
36ba812d 3
4AC_INIT([Splint], [3.1.1], [splint-bug@splint.org], [splint])
363a5c93 5
6dnl This MUST precede any other macro
7AC_CONFIG_AUX_DIR([config])
8
9dnl Set up the source directory
00e1df75 10#NO source directory in the binary release so this must be commented out
11#AC_CONFIG_SRCDIR([src/lclinit.c])
363a5c93 12
13dnl Deduce host
14AC_CANONICAL_SYSTEM
15
16dnl Set up automake & the configuration header
17AM_INIT_AUTOMAKE(AC_PACKAGE_TARNAME, AC_PACKAGE_VERSION, AC_PACKAGE_BUGREPORT)
18AM_CONFIG_HEADER([config.h:config.hin])
19
20dnl Prepare for Splint processing of config.h
21AH_TOP([/*@-constmacros@*/])
22AH_BOTTOM([/*@=constmacros@*/])
23
24dnl Checks for programs.
25#drl 12-19-2001 commented out so Splint won't depend on C++
26#AC_PROG_CXX
27AC_PROG_CC
28AC_PROG_CPP
29dnl This produces a warning. See http://mail.gnu.org/pipermail/bug-automake/2001-August/000213.html
30AM_PROG_LEX
31AC_PROG_INSTALL
32AC_PROG_MAKE_SET
33AC_PROG_LN_S
34AC_CHECK_PROG(BISON, bison, bison, no)
35AC_CHECK_PROG(GREP, grep, grep, grep-is-missing)
36AC_CHECK_PROG(DIFF, diff, diff, diff-is-missing)
37AC_CHECK_PROG(CAT, cat, cat, cat-is-missing)
38AC_CHECK_PROG(RM, rm, rm, rm-is-missing)
39AC_CHECK_PROG(MV, mv, mv, mv-is-missing)
40AC_CHECK_PROG(CP, cp, cp, cp-is-missing)
36ba812d 41AC_CHECK_PROG(SED, sed, sed, sed-is-missing)
363a5c93 42
43dnl Checks for header files.
44dnl Currently all disable, as the source files don't care about the results
45dnl AC_HEADER_DIRENT
46dnl AC_HEADER_STDC
47dnl AC_CHECK_HEADERS([alloca.h errno.h fcntl.h float.h limits.h locale.h malloc.h stddef.h stdlib.h string.h strings.h sys/time.h unistd.h])
48
49dnl Checks for typedefs, structures, and compiler characteristics.
50dnl Currently all disable, as the source files don't care about the results
51dnl AC_C_CONST
52dnl AC_TYPE_UID_T
53dnl AC_TYPE_MODE_T
54dnl AC_TYPE_OFF_T
55dnl AC_TYPE_PID_T
56dnl AC_TYPE_SIZE_T
57dnl AC_STRUCT_ST_BLOCKS
58dnl AC_CHECK_MEMBERS([struct stat.st_rdev])
59dnl AC_DECL_SYS_SIGLIST
60dnl AC_HEADER_TIME
61dnl AC_STRUCT_TM
62dnl AC_CHECK_TYPES([ptrdiff_t])
63
64dnl Checks for library functions.
65dnl Currently all disable, as the source files don't care about the results
66dnl AC_FUNC_ALLOCA
67dnl AC_FUNC_CHOWN
68dnl AC_FUNC_GETPGRP
69dnl AC_PROG_GCC_TRADITIONAL
70dnl AC_FUNC_LSTAT
71dnl AC_FUNC_MALLOC
72dnl AC_FUNC_MEMCMP
73dnl AC_FUNC_MKTIME
74dnl AC_FUNC_MMAP
75dnl AC_FUNC_SETVBUF_REVERSED
76dnl AC_TYPE_SIGNAL
77dnl AC_FUNC_STAT
78dnl AC_FUNC_STRCOLL
79dnl AC_FUNC_STRERROR_R
80dnl AC_FUNC_VFORK
81dnl AC_FUNC_VPRINTF
82dnl AC_FUNC_WAIT3
83dnl AC_CHECK_FUNCS([alarm atexit btowc bzero dup2 endgrent endpwent fchdir floor ftruncate getcwd getgroups gethostname gettimeofday isascii iswprint lchown localeconv mblen mbrlen mbrtowc memchr memmove memset mkdir mkfifo modf munmap pathconf pow putenv realpath regcomp rint rmdir rpmatch select setenv socket sqrt strcasecmp strchr strcspn strdup strerror strftime strncasecmp strpbrk strrchr strspn strstr strtod strtol strtoul strtoull tzset uname utime vprintf])
84
85dnl This was provided by Nelson Beebe for dealing with problems on IBM
86dnl AIX 4.3 with defining mode_t.
87
88dnl Checks for _ALL_SOURCE (IBM RS/6000 c89 needs this)
89AC_MSG_CHECKING(whether we need _ALL_SOURCE to expose mode_t)
90all=no
91AC_TRY_COMPILE([
92#include <stdio.h>
93mode_t x;
94], , , all=maybe)
95if test $all = maybe ; then
96AC_TRY_COMPILE([
97#define _ALL_SOURCE
98#include <stdio.h>
99mode_t x;
100], , AC_DEFINE(_ALL_SOURCE) all=yes)
101fi
102if test $all = maybe ; then all=no ; fi
103AC_MSG_RESULT($all)
36ba812d 104AH_TEMPLATE([_ALL_SOURCE], [needed to expose mode_t on some machines])
363a5c93 105
106LCLOBJ='$(lcl_OBJECTS)'
107AC_ARG_WITH([lcl],
108 AC_HELP_STRING([--without-lcl],
109 [don't include support for LCL files]),
110 ac_cv_use_lcl=$withval,
111 AC_CACHE_CHECK([whether to include support for LCL files],
112 ac_cv_use_lcl, ac_cv_use_lcl=yes))
113if test x$ac_cv_use_lcl != xyes; then
114 LCLOBJ=
115 AC_DEFINE(NOLCL, 1, [Define to disable support LCL files])
116fi
117AC_SUBST(LCLOBJ)
118
119# Make sure we have an actual value for $prefix
120myprefix=$prefix
121test x$myprefix = xNONE && myprefix=$ac_default_prefix
122
36ba812d 123
124### Yuck! This is really kludgey, but I don't understand autoconf well
125### enough to do something simple that always works. Hopefully this does.
126
363a5c93 127# cpplib.h defines 2 include dirs; one is $includedir, the other is gcc's
128# include dir. Not the most portable setup, but let's do our best.
36ba812d 129
130if test x$GCC = xyes; then
363a5c93 131 dnl Make sure to override NLS; this assumes gcc prints only
132 dnl Reading specs from blah
133 dnl gcc version blah
134
135# This breaks on gcc-3.0 on redhat fixing drl 11-15-2001
136# GCC_INCLUDE_DIR=`LANGUAGE= LANG= $CC -v 2>&1 | sed -e '/^gcc/ d' -e 's/.* \(.*\)specs/\1include/'`
137GCC_INCLUDE_DIR=/usr/include
138# was /usr/lib/gcc-lib/i386-linux/2.7.2.1/include
139# GCC_INCLUDE_DIR=`LANGUAGE= LANG= $CC -v 2>&1 | sed -n -e '/^gcc/ d' -e 's/.* \(.*\)specs/\1include/p'`
140 AC_DEFINE_UNQUOTED(GCC_INCLUDE_DIR, "$GCC_INCLUDE_DIR",
141 [system include directory])
36ba812d 142else
143GCC_INCLUDE_DIR=/usr/include
144AC_DEFINE_UNQUOTED(GCC_INCLUDE_DIR, "$GCC_INCLUDE_DIR", [system include directory])
363a5c93 145fi
36ba812d 146
363a5c93 147AC_DEFINE_UNQUOTED(GCC_INCLUDE_DIR2, "$myprefix/include",
148 [alternate include directory])
149
150# These used to be in local_constants.h
151AC_DEFINE_UNQUOTED(SYSTEM_LIBDIR, "$myprefix/include",
152 [The system's main include directory])
153AC_DEFINE_UNQUOTED(DEFAULT_LARCHPATH,
154 ".$PATH_SEPARATOR$myprefix/share/splint/lib$PATH_SEPARATOR`pwd`/lib$PATH_SEPARATOR",
155 [The directory where Splint's library files live])
156AC_DEFINE_UNQUOTED(DEFAULT_LCLIMPORTDIR, ".$PATH_SEPARATOR$myprefix/share/splint/imports$PATH_SEPARATOR`pwd`/imports",
157 [Splint's imports directory])
158
159# These used to be in herald.h
160LCL_PARSE_VERSION="AC_PACKAGE_NAME AC_PACKAGE_VERSION"
161AC_DEFINE_UNQUOTED(SPLINT_VERSION,
162 "$LCL_PARSE_VERSION --- `date +"%d %b %Y"`",
163 [Splint's version number and configure/build date])
164AC_DEFINE_UNQUOTED(LCL_PARSE_VERSION, "$LCL_PARSE_VERSION",
165 [Splint's version number])
166AC_DEFINE_UNQUOTED(LCL_COMPILE,
167 "Compiled using $CC $CFLAGS on `uname -a` by `whoami`",
168 [String describing who compiled this binary and how])
169
170dnl TODO: Use result AC_CANONICAL_SYSTEM to figure out what to define
171
172AC_DEFINE(UNIX, 1, [Define if you're on a Unixy system])
173
174#just define some Header constants for now...
175
176UNAME=`uname`
36ba812d 177AC_DEFINE_UNQUOTED(UNAME, "${UNAME}", uname output)
363a5c93 178
36ba812d 179AC_DEFINE_UNQUOTED(BUILD, "${build}", build)
180AC_DEFINE_UNQUOTED(HOST, "${host}", host)
181AC_DEFINE_UNQUOTED(TARGET, "${target}", target)
363a5c93 182
36ba812d 183AC_DEFINE_UNQUOTED(BUILD_ALIAS, "${build_alias}", build_alias)
184AC_DEFINE_UNQUOTED(HOST_ALIAS, "${host_alias}", host_alias)
185AC_DEFINE_UNQUOTED(TARGET_ALIAS, "${TARGET_ALIAS}", target_alias)
363a5c93 186
36ba812d 187AC_DEFINE_UNQUOTED(BUILD_CPU, "${build_cpu}", build_cpu)
188AC_DEFINE_UNQUOTED(HOST_CPU, "$host_cpu", host_cpu)
189AC_DEFINE_UNQUOTED(TARGET_CPU, "${target_cpu}", target_cpu)
363a5c93 190
36ba812d 191AC_DEFINE_UNQUOTED(BUILD_VENDOR, "${build_vendor}", build_vendor)
192AC_DEFINE_UNQUOTED(HOST_VENDOR, "${host_vendor}", host_vendor)
193AC_DEFINE_UNQUOTED(TARGET_VENDOR, "${target_vendor}", target_vendor)
363a5c93 194
36ba812d 195AC_DEFINE_UNQUOTED(BUILD_OS, "${build_os}", build_os)
196AC_DEFINE_UNQUOTED(HOST_OS, "${host_os}", host_os)
197AC_DEFINE_UNQUOTED(TARGET_OS,"${target_os}", target_os)
363a5c93 198
199
200
201dnl AC_CONFIG_FILES([
202dnl test/ensuresclauses/Makefile
203dnl test/conditions/Makefile
204dnl test/db2/Makefile
205dnl test/warnuse/Makefile
206dnl test/tainted/Makefile
207dnl test/fileio/Makefile
208dnl test/tests2.4/Makefile
209dnl test/db3/Makefile
210dnl test/metastate/Makefile
211dnl test/mergestate/Makefile
212dnl test/tests2.5/Makefile
213dnl test/tests2.2/Makefile
214dnl test/db1/Makefile])
215
216AC_CONFIG_FILES([Makefile imports/Makefile lib/Makefile
fc97bef4 217 doc/Makefile bin/Makefile])
363a5c93 218AC_OUTPUT
219
220
221
222
223
224
225
226
227
This page took 0.109259 seconds and 5 git commands to generate.