source: trunk/gsdl/configure.in@ 1927

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

Included CORBA branch for first time

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