source: trunk/gsdl/configure.in@ 2173

Last change on this file since 2173 was 2173, checked in by cs025, 23 years ago

Improvements to configure scripts in their support of various MICO
environment considerations, particularly when MICO is on the system
paths.

Fixed CORBA version of ping to correspond with parameters etc. of the
native form.

Finally, improved PING action to be more than a simple call to
the HASCOLLECTION action in the null protocol.

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