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