source: gsdl/branches/corba/gsdl/configure.in@ 14162

Last change on this file since 14162 was 1067, checked in by cs025, 24 years ago

Corba first commit

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