source: trunk/gsdl3/configure.in@ 7326

Last change on this file since 7326 was 6480, checked in by nzdl, 20 years ago

undoing a mistake I made last time

  • Property svn:keywords set to Author Date Id Revision
File size: 4.3 KB
Line 
1dnl Process this file with autoconf to produce a configure script.
2AC_INIT(src/java/org/greenstone/gsdl3/Library1.java)
3AC_CONFIG_HEADER(config.h)
4
5PACKAGE=gsdl3
6VERSION=0.1
7AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
8AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
9AC_SUBST(PACKAGE)
10AC_SUBST(VERSION)
11
12
13dnl Checks for programs.
14LDFLAGS=
15dnl only set CFLAGS if not already set in environment
16if test -z "$CFLAGS"; then
17CFLAGS=-O2
18fi
19AC_SUBST(CFLAGS)
20
21AC_PROG_CC
22AC_PROG_CXX
23AC_PROG_AWK
24AC_PROG_YACC
25dnl get $target_cpu, $target_vendor, and $target_os
26dnl (as well as host_*)
27AC_CANONICAL_SYSTEM
28dnl do we actually want this? It adds a prefix based on host, system etc
29dnl AC_ARG_PROGRAM
30AC_PROG_INSTALL
31AC_PROG_LN_S
32AC_PROG_MAKE_SET
33AC_PROG_RANLIB
34
35dnl Checks for typedefs, structures, and compiler characteristics.
36AC_AIX
37AC_ISC_POSIX
38AC_MINIX
39fp_C_PROTOTYPES
40AC_C_CONST
41AC_TYPE_OFF_T
42AC_TYPE_SIZE_T
43AC_HEADER_TIME
44AC_STRUCT_TM
45
46dnl --- This should be in the stdc checking -----------------
47if test "$ac_cv_prog_cc_stdc" = '-Xc'; then
48dnl The Pyramids running SMP_DC.OSx on MIPS r3000 chips with
49dnl /usr/opt/cc3.11/bin/cc treat -Xc as full ANSI mode - no POSIX or
50dnl XOPEN extensions (like popen).
51dnl Unfortunately -D_{XOPEN,POSIX}_SOURCE can't provide all that mg
52dnl needs. So drop back to -Xa
53AC_TRY_COMPILE(
54[#include <stdio.h>
55], [ FILE *rubbish = popen("yes", "r"); ],,
56[CC="`echo $CC | sed 's/-Xc/-Xa/'`" ac_cv_prog_cc_stdc='-Xa'])
57fi
58dnl ----------------------
59
60
61dnl Checks for libraries.
62dnl Replace `main' with a function in -lg:
63AC_CHECK_LIB(g, main)
64dnl Replace `main' with a function in -lm:
65AC_CHECK_LIB(m, main)
66dnl Replace `main' with a function in -lstdc++:
67AC_CHECK_LIB(stdc++, main)
68dnl Replace `main' with a function in -lcrypt:
69AC_CHECK_LIB(crypt, main)
70
71dnl Checks for header files.
72AC_HEADER_DIRENT
73AC_HEADER_STDC
74AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h unistd.h crypt.h string.h memory.h sys/procfs.h)
75AC_EGREP_HEADER(fread, stdio.h, AC_DEFINE(HAVE_FREAD_DECL))
76AC_EGREP_HEADER(fgetc, stdio.h, AC_DEFINE(HAVE_FGETC_DECL))
77AC_EGREP_HEADER(pr_brksize, sys/procfs.h, AC_DEFINE(HAVE_PR_BRKSIZE))
78
79dnl Checks for library functions.
80AC_FUNC_ALLOCA
81AC_PROG_GCC_TRADITIONAL
82AC_TYPE_SIGNAL
83AC_FUNC_VPRINTF
84AC_CHECK_FUNCS(ftime select strftime strtol getrusage times mallinfo setbuffer getpagesize strerror)
85AC_REPLACE_FUNCS(ftruncate strstr strcasecmp)
86
87dnl see if gettext is in libc. (try the textdomain() function).
88AC_CHECK_FUNC( textdomain , AC_DEFINE(ENABLE_NLS ,1) )
89
90dnl
91dnl Switch into C++
92dnl
93AC_LANG_CPLUSPLUS
94
95dnl
96dnl Check if the STL library has any known faults;
97dnl In GCC 2.7.2.x series, some STL library headers are missing
98dnl a file called "new" which is referred to by other headers
99dnl (eg. vector/vector.h); if this applies, then all use of the
100dnl STL will cause a compile fail, so we'd better let the user
101dnl know now, before things really go wrong!
102dnl
103success=no
104AC_MSG_CHECKING("whether STL library has known faults")
105
106dnl - first shot, try simple good old vector on its own
107AC_TRY_COMPILE(
108[#include <vector>
109],
110[],
111success=yes,
112)
113
114dnl - try using the .h equivalent
115if test $success = "no"; then
116AC_TRY_COMPILE(
117[#include <vector.h>
118],
119[],
120success="yes",
121)
122fi
123
124dnl - now try for the objectspace headers
125if test $success = "no"; then
126AC_TRY_COMPILE(
127[#include <ospace\\std\\vector>
128],
129[],
130success="yes",
131)
132fi
133
134if test $success = yes; then
135AC_MSG_RESULT("no")
136else
137AC_MSG_RESULT("yes")
138AC_MSG_ERROR("STL Broken - Obtain newer version of GNU C Compiler")
139fi
140
141gsdlos=`uname | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
142# check for running bash under cygwin
143 if test "`echo $gsdlos | sed 's/cygwin//'`" != "$gsdlos" ;
144 then
145 gsdlos=windows
146 fi
147AC_SUBST(gsdlos)
148
149# ---------------------------------------------------------------------------
150dnl for Darwin, as our packages don't (yet) correctly guess our system type.
151ac_configure_args="$ac_configure_args --host=$host --target=$target"
152AC_CONFIG_SUBDIRS(packages)
153
154# the list of folders in the src folder
155#srclist="packages/mgpp/lib/Makefile packages/mgpp/text/Makefile packages/mgpp/Makefile packages/mg/Makefile packages/mg/src/text/Makefile packages/mg/src/images/Makefile packages/mg/src/scripts/Makefile packages/mg/lib/Makefile"
156
157AC_OUTPUT(packages/Makefile Makefile $srclist)
158
159echo "-------------------------------------"
160echo "Greenstone 3 successfully configured."
161echo ""
Note: See TracBrowser for help on using the repository browser.