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