root/tags/gsdl-2_30d-distribution/gsdl/configure.in @ 2308

Revision 1938, 6.7 KB (checked in by jrm21, 19 years ago)

z39.50 is no longer compiled by default. Use the --enable-z3950 option to
configure to include.

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