source: other-projects/trunk/protemix/src/recpt/configure.in@ 14162

Last change on this file since 14162 was 3162, checked in by sjboddie, 22 years ago

Initial revision

  • Property svn:keywords set to Author Date Id Revision
File size: 4.7 KB
Line 
1dnl Process this file with autoconf to produce a configure script.
2AC_INIT(ptmxmain.cpp)
3AC_CONFIG_HEADER(config.h)
4AC_ARG_PROGRAM
5
6PACKAGE=gsdl
7VERSION=2.38
8AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
9AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
10AC_SUBST(PACKAGE)
11AC_SUBST(VERSION)
12
13USE_FASTCGI=0
14if test USE_FASTCGI = 1; then
15AC_DEFINE(USE_FASTCGI)
16AC_SUBST(USE_FASTCGI)
17fi
18
19dnl Checks for programs.
20LDFLAGS=
21CFLAGS=-O2
22AC_SUBST(CFLAGS)
23
24AC_PROG_CC
25AC_PROG_CXX
26AC_PROG_AWK
27AC_PROG_YACC
28AC_PROG_INSTALL
29AC_PROG_LN_S
30AC_PROG_MAKE_SET
31AC_PROG_RANLIB
32
33
34dnl Checks for typedefs, structures, and compiler characteristics.
35AC_AIX
36AC_ISC_POSIX
37AC_MINIX
38fp_C_PROTOTYPES
39AC_C_CONST
40AC_TYPE_OFF_T
41AC_TYPE_SIZE_T
42AC_HEADER_TIME
43AC_STRUCT_TM
44
45dnl --- This should be in the stdc checking -----------------
46if test "$ac_cv_prog_cc_stdc" = '-Xc'; then
47dnl The Pyramids running SMP_DC.OSx on MIPS r3000 chips with
48dnl /usr/opt/cc3.11/bin/cc treat -Xc as full ANSI mode - no POSIX or
49dnl XOPEN extensions (like popen).
50dnl Unfortunately -D_{XOPEN,POSIX}_SOURCE can't provide all that mg
51dnl needs. So drop back to -Xa
52AC_TRY_COMPILE(
53[#include <stdio.h>
54], [ FILE *rubbish = popen("yes", "r"); ],,
55[CC="`echo $CC | sed 's/-Xc/-Xa/'`" ac_cv_prog_cc_stdc='-Xa'])
56fi
57dnl ----------------------
58
59
60dnl Checks for libraries.
61dnl Replace `main' with a function in -lg:
62AC_CHECK_LIB(g, main)
63dnl Replace `main' with a function in -lgdbm:
64AC_CHECK_LIB(gdbm, main)
65dnl Replace `main' with a function in -lm:
66AC_CHECK_LIB(m, main)
67dnl Replace `main' with a function in -lstdc++:
68AC_CHECK_LIB(stdc++, main)
69dnl Replace `main' with a function in -lcrypt:
70AC_CHECK_LIB(crypt, main)
71
72
73dnl Checks for header files.
74AC_HEADER_DIRENT
75AC_HEADER_STDC
76AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h unistd.h crypt.h string.h memory.h sys/procfs.h)
77AC_EGREP_HEADER(fread, stdio.h, AC_DEFINE(HAVE_FREAD_DECL))
78AC_EGREP_HEADER(fgetc, stdio.h, AC_DEFINE(HAVE_FGETC_DECL))
79AC_EGREP_HEADER(pr_brksize, sys/procfs.h, AC_DEFINE(HAVE_PR_BRKSIZE))
80
81dnl Checks for library functions.
82AC_FUNC_ALLOCA
83AC_PROG_GCC_TRADITIONAL
84AC_TYPE_SIGNAL
85AC_FUNC_VPRINTF
86AC_CHECK_FUNCS(ftime select strftime strtol getrusage times mallinfo setbuffer getpagesize strerror)
87AC_REPLACE_FUNCS(ftruncate strstr strcasecmp)
88
89
90# *** Custom checking (based on GNU tar configure.in) ***
91# ---------------------------------------------------------------------------
92AC_MSG_CHECKING(for HP-UX needing gmalloc)
93if test "`(uname -s) 2> /dev/null`" = 'HP-UX'; then
94 AC_MSG_RESULT(yes)
95 LIBOBJS="$LIBOBJS gmalloc.o"
96 AC_DEFINE(HAVE_VALLOC)
97else
98 AC_MSG_RESULT(no)
99 AC_CHECK_FUNCS(valloc)
100fi
101
102fp_WITH_DMALLOC
103fp_WITH_REGEX
104
105# ---------------------------------------------------------------------------
106if test "$ac_cv_func_alloca" = 'no'; then
107dnl support functions for alloca.c
108 LIBOBJS="$LIBOBJS xmalloc.o error.o"
109fi
110
111
112# ---------------------------------------------------------------------------
113
114dnl
115dnl Switch into C++
116dnl
117AC_LANG_CPLUSPLUS
118
119dnl
120dnl Check that the GDBM library is available
121dnl
122AC_MSG_CHECKING("that the GDBM library is available")
123AC_TRY_COMPILE(
124[#include <gdbm.h>
125],
126[],
127success=yes,
128success=no
129)
130AC_MSG_RESULT($success)
131if test $success = "no"; then
132AC_MSG_ERROR("GDBM Library not available - cannot install")
133fi
134
135dnl
136dnl Check if the STL library has any known faults;
137dnl In GCC 2.7.2.x series, some STL library headers are missing
138dnl a file called "new" which is referred to by other headers
139dnl (eg. vector/vector.h); if this applies, then all use of the
140dnl STL will cause a compile fail, so we'd better let the user
141dnl know now, before things really go wrong!
142dnl
143success=no
144AC_MSG_CHECKING("whether STL library has known faults")
145
146dnl - first shot, try simple good old vector on its own
147AC_TRY_COMPILE(
148[#include <vector>
149],
150[],
151success=yes,
152)
153
154dnl - try using the .h equivalent
155if test $success = "no"; then
156AC_TRY_COMPILE(
157[#include <vector.h>
158],
159[],
160success="yes",
161)
162fi
163
164dnl - now try for the objectspace headers
165if test $success = "no"; then
166AC_TRY_COMPILE(
167[#include <ospace\\std\\vector>
168],
169[],
170success="yes",
171)
172fi
173
174if test $success = yes; then
175AC_MSG_RESULT("no")
176else
177AC_MSG_RESULT("yes")
178AC_MSG_ERROR("STL Broken - Obtain newer version of GNU C Compiler")
179fi
180
181gsdlos=`uname | tr A-Z a-z`
182AC_SUBST(gsdlos)
183
184AC_MSG_CHECKING(for HP-UX needing gmalloc)
185if test "`(uname -s) 2> /dev/null`" = 'HP-UX'; then
186 AC_MSG_RESULT(yes)
187 LIBOBJS="$LIBOBJS gmalloc.o"
188 AC_DEFINE(HAVE_VALLOC)
189else
190 AC_MSG_RESULT(no)
191 AC_CHECK_FUNCS(valloc)
192fi
193
194fp_WITH_DMALLOC
195fp_WITH_REGEX
196
197# ---------------------------------------------------------------------------
198if test "$ac_cv_func_alloca" = 'no'; then
199dnl support functions for alloca.c
200 LIBOBJS="$LIBOBJS xmalloc.o error.o"
201fi
202
203
204# ---------------------------------------------------------------------------
205
206AC_OUTPUT(Makefile)
207
208
Note: See TracBrowser for help on using the repository browser.