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