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