]> andersk Git - splint.git/blame - configure.ac
Updated build to use automake files created by Tim Van Holder.
[splint.git] / configure.ac
CommitLineData
8fe44445 1dnl Process with autoconf to create a configure script -*- Autoconf -*-
2AC_PREREQ(2.50)
3AC_INIT([LCLint], [3.0.0.19], [lclint-bug@cs.virginia.edu], [lclint])
4
5dnl This MUST precede any other macro
6AC_CONFIG_AUX_DIR([config])
7
8dnl Set up the source directory
9AC_CONFIG_SRCDIR([src/lclinit.c])
10
11dnl Deduce host
12AC_CANONICAL_HOST
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 LCLint processing of config.h
19AH_TOP([/*@-constmacros@*/])
20AH_BOTTOM([/*@=constmacros@*/])
21
22dnl Checks for programs.
23AC_PROG_CXX
24AC_PROG_CC
25AC_PROG_CPP
26AM_PROG_LEX
27AC_PROG_INSTALL
28AC_PROG_MAKE_SET
29AC_PROG_LN_S
30AC_CHECK_PROG(BISON, bison, bison, no)
31AC_CHECK_PROG(GREP, grep, grep, grep-is-missing)
32AC_CHECK_PROG(DIFF, diff, diff, diff-is-missing)
33AC_CHECK_PROG(CAT, cat, cat, cat-is-missing)
34AC_CHECK_PROG(RM, rm, rm, rm-is-missing)
35AC_CHECK_PROG(MV, mv, mv, mv-is-missing)
36AC_CHECK_PROG(CP, cp, cp, cp-is-missing)
37
38dnl Checks for header files.
39dnl Currently all disable, as the source files don't care about the results
40dnl AC_HEADER_DIRENT
41dnl AC_HEADER_STDC
42dnl 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])
43
44dnl Checks for typedefs, structures, and compiler characteristics.
45dnl Currently all disable, as the source files don't care about the results
46dnl AC_C_CONST
47dnl AC_TYPE_UID_T
48dnl AC_TYPE_MODE_T
49dnl AC_TYPE_OFF_T
50dnl AC_TYPE_PID_T
51dnl AC_TYPE_SIZE_T
52dnl AC_STRUCT_ST_BLOCKS
53dnl AC_CHECK_MEMBERS([struct stat.st_rdev])
54dnl AC_DECL_SYS_SIGLIST
55dnl AC_HEADER_TIME
56dnl AC_STRUCT_TM
57dnl AC_CHECK_TYPES([ptrdiff_t])
58
59dnl Checks for library functions.
60dnl Currently all disable, as the source files don't care about the results
61dnl AC_FUNC_ALLOCA
62dnl AC_FUNC_CHOWN
63dnl AC_FUNC_GETPGRP
64dnl AC_PROG_GCC_TRADITIONAL
65dnl AC_FUNC_LSTAT
66dnl AC_FUNC_MALLOC
67dnl AC_FUNC_MEMCMP
68dnl AC_FUNC_MKTIME
69dnl AC_FUNC_MMAP
70dnl AC_FUNC_SETVBUF_REVERSED
71dnl AC_TYPE_SIGNAL
72dnl AC_FUNC_STAT
73dnl AC_FUNC_STRCOLL
74dnl AC_FUNC_STRERROR_R
75dnl AC_FUNC_VFORK
76dnl AC_FUNC_VPRINTF
77dnl AC_FUNC_WAIT3
78dnl 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])
79
80LCLOBJ='$(lcl_OBJECTS)'
81AC_ARG_WITH([lcl],
82 AC_HELP_STRING([--without-lcl],
83 [don't include support for LCL files]),
84 ac_cv_use_lcl=$withval,
85 AC_CACHE_CHECK([whether to include support for LCL files],
86 ac_cv_use_lcl, ac_cv_use_lcl=yes))
87if test x$ac_cv_use_lcl != xyes; then
88 LCLOBJ=
89 AC_DEFINE(NOLCL, 1, [Define to disable support LCL files])
90fi
91AC_SUBST(LCLOBJ)
92
93# Make sure we have an actual value for $prefix
94myprefix=$prefix
95test x$myprefix = xNONE && myprefix=$ac_default_prefix
96
97# cpplib.h defines 2 include dirs; one is $includedir, the other is gcc's
98# include dir. Not the most portable setup, but let's do our best.
99if test x$ac_cv_c_compiler_gnu = xyes; then
100 dnl Make sure to override NLS; this assumes gcc prints only
101 dnl Reading specs from blah
102 dnl gcc version blah
103 GCC_INCLUDE_DIR=`LANGUAGE= LANG= $CC -v 2>&1 | sed -e '/^gcc/ d' -e 's/.* \(.*\)specs/\1include/'`
104 AC_DEFINE_UNQUOTED(GCC_INCLUDE_DIR, "$GCC_INCLUDE_DIR",
105 [gcc's private include directory])
106fi
107AC_DEFINE_UNQUOTED(GCC_INCLUDE_DIR2, "$myprefix/include",
108 [the system's main include directory])
109
110# These used to be in local_constants.h
111AC_DEFINE_UNQUOTED(SYSTEM_LIBDIR, "$myprefix/include",
112 [The system's main include directory])
113AC_DEFINE_UNQUOTED(DEFAULT_LARCHPATH,
114 ".$PATH_SEPARATOR$myprefix/share/lclint/lib",
115 [The directory where LCLint's library files live])
116AC_DEFINE_UNQUOTED(DEFAULT_LCLIMPORTDIR, "$myprefix/share/lclint/imports",
117 [LCLint's imports directory])
118
119# These used to be in herald.h
120LCL_PARSE_VERSION="AC_PACKAGE_NAME AC_PACKAGE_VERSION"
121AC_DEFINE_UNQUOTED(LCL_VERSION,
122 "$LCL_PARSE_VERSION --- `cat $srcdir/src/DATE`",
123 [LCLint's version number and release date])
124AC_DEFINE_UNQUOTED(LCL_PARSE_VERSION, "$LCL_PARSE_VERSION",
125 [LCLint's version number])
126AC_DEFINE_UNQUOTED(LCL_COMPILE,
127 "Compiled using $CC $CFLAGS on `uname -a` by `whoami`",
128 [String describing who compiled this binary and how])
129
130
131dnl TODO: Use result AC_CANONICAL_HOST to figure out what to define
132AC_DEFINE(UNIX, 1, [Define if you're on a Unixy system])
133
134dnl AC_CONFIG_FILES([test/Makefile
135dnl test/ensuresclauses/Makefile
136dnl test/conditions/Makefile
137dnl test/db2/Makefile
138dnl test/warnuse/Makefile
139dnl test/tainted/Makefile
140dnl test/fileio/Makefile
141dnl test/tests2.4/Makefile
142dnl test/db3/Makefile
143dnl test/metastate/Makefile
144dnl test/mergestate/Makefile
145dnl test/tests2.5/Makefile
146dnl test/tests2.2/Makefile
147dnl test/db1/Makefile])
148
149AC_CONFIG_FILES([Makefile imports/Makefile lib/Makefile src/Makefile
150 test/Makefile])
151AC_OUTPUT
152
153
154
155
156
157
158
159
160
This page took 0.36774 seconds and 5 git commands to generate.