source: trunk/indexers/mgpp/configure.in@ 13482

Last change on this file since 13482 was 13482, checked in by shaoqun, 17 years ago

added the supports for accentfolding

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 4.4 KB
Line 
1dnl Process this file with autoconf to produce a configure script.
2AC_INIT(text/MGQuery.cpp)
3AC_CONFIG_HEADER(config.h)
4AC_ARG_PROGRAM
5
6dnl
7PACKAGE=mgpp
8VERSION=1.3
9
10LDFLAGS=
11
12AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
13AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
14AC_SUBST(PACKAGE)
15AC_SUBST(VERSION)
16
17dnl
18dnl disable compilation of accent folding stuff for mgpp (and one day mg)
19dnl
20AC_ARG_ENABLE(accentfold, [ --disable-accentfold Disable Accent Folding for MGPP], ENABLE_ACCENTFOLD=0, ENABLE_ACCENTFOLD=1)
21AC_DEFINE(ENABLE_ACCENTFOLD, $ENABLE_ACCENTFOLD)
22AC_SUBST(ENABLE_ACCENTFOLD)
23
24dnl Checks for programs.
25AC_PROG_CXX
26AC_PROG_AWK
27AC_PROG_YACC
28AC_PROG_CC
29AC_PROG_INSTALL
30AC_PROG_LN_S
31AC_PROG_MAKE_SET
32AC_PROG_RANLIB
33
34dnl Checks for typedefs, structures, and compiler characteristics.
35AC_AIX
36AC_ISC_POSIX
37AC_MINIX
38fp_C_PROTOTYPES
39AC_C_CONST
40AC_TYPE_OFF_T
41AC_TYPE_SIZE_T
42AC_HEADER_TIME
43AC_STRUCT_TM
44
45dnl --- This should be in the stdc checking -----------------
46if test "$ac_cv_prog_cc_stdc" = '-Xc'; then
47dnl The Pyramids running SMP_DC.OSx on MIPS r3000 chips with
48dnl /usr/opt/cc3.11/bin/cc treat -Xc as full ANSI mode - no POSIX or
49dnl XOPEN extensions (like popen).
50dnl Unfortunately -D_{XOPEN,POSIX}_SOURCE can't provide all that mg
51dnl needs. So drop back to -Xa
52AC_TRY_COMPILE(
53[#include <stdio.h>
54], [ FILE *rubbish = popen("yes", "r"); ],,
55[CC="`echo $CC | sed 's/-Xc/-Xa/'`" ac_cv_prog_cc_stdc='-Xa'])
56fi
57dnl ----------------------
58
59
60dnl Checks for libraries.
61dnl Replace `main' with a function in -lg:
62AC_CHECK_LIB(g, main)
63dnl Replace `main' with a function in -lm:
64AC_CHECK_LIB(m, main)
65dnl Replace `main' with a function in -lstdc++:
66AC_CHECK_LIB(stdc++, main)
67dnl Replace `main' with a function in -lcrypt:
68AC_CHECK_LIB(crypt, main)
69if test $ENABLE_ACCENTFOLD = 1; then
70AC_HAVE_LIBRARY(ICONV)
71fi
72
73
74dnl Checks for header files.
75AC_HEADER_DIRENT
76AC_HEADER_STDC
77AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h unistd.h crypt.h string.h memory.h sys/procfs.h)
78AC_EGREP_HEADER(fread, stdio.h, AC_DEFINE(HAVE_FREAD_DECL))
79AC_EGREP_HEADER(fgetc, stdio.h, AC_DEFINE(HAVE_FGETC_DECL))
80AC_EGREP_HEADER(pr_brksize, sys/procfs.h, AC_DEFINE(HAVE_PR_BRKSIZE))
81
82dnl Checks for library functions.
83AC_FUNC_ALLOCA
84AC_PROG_GCC_TRADITIONAL
85AC_TYPE_SIGNAL
86AC_FUNC_VPRINTF
87AC_CHECK_FUNCS(ftime select strftime strtol getrusage times mallinfo setbuffer getpagesize strerror)
88AC_REPLACE_FUNCS(ftruncate strstr strcasecmp)
89
90
91dnl see if gettext is in libc. (try the textdomain() function).
92AC_CHECK_FUNC(textdomain, AC_DEFINE(ENABLE_NLS ,1) )
93
94# we need to set an extended JNI path for Mac OS/Darwin, as jni.h is on
95# a non-standard Path
96# is there a better way to do this??
97AC_MSG_CHECKING(for OS to set JNI options)
98# set defaults
99JNIINC=""
100JNISUFFIX="so"
101JNIFLAGS="-shared"
102
103if test "`(uname -s) 2> /dev/null`" = 'Darwin'; then
104 AC_MSG_RESULT(Darwin)
105 JNIINC="-I/System/Library/Frameworks/JavaVM.framework/Headers/ "
106 JNISUFFIX="jnilib"
107 JNIFLAGS="-dynamiclib -fno-common -single_module -framework JavaVM"
108fi
109if test "`(uname -s) 2> /dev/null`" = 'SunOS'; then
110 AC_MSG_RESULT(Solaris)
111 JNIINC="-I\$(JAVA_HOME)/include/solaris "
112fi
113if test "`(uname -s) 2> /dev/null`" = 'Linux'; then
114 AC_MSG_RESULT(Linux)
115 JNIINC="-I\$(JAVA_HOME)/include/linux "
116fi
117
118AC_SUBST(JNIINC)
119AC_SUBST(JNISUFFIX)
120AC_SUBST(JNIFLAGS)
121
122# *** Custom checking (based on GNU tar configure.in) ***
123# ---------------------------------------------------------------------------
124AC_MSG_CHECKING(for HP-UX needing gmalloc)
125if test "`(uname -s) 2> /dev/null`" = 'HP-UX'; then
126 AC_MSG_RESULT(yes)
127 AC_LIBOBJ(gmalloc)
128 AC_DEFINE(HAVE_VALLOC)
129else
130 AC_MSG_RESULT(no)
131 AC_CHECK_FUNCS(valloc)
132fi
133
134fp_WITH_DMALLOC
135fp_WITH_REGEX
136fp_WITH_GNU_READLINE
137
138# text for endianness
139AC_C_BIGENDIAN
140
141# ---------------------------------------------------------------------------
142if test "$ac_cv_func_alloca" = 'no'; then
143dnl support functions for alloca.c
144 AC_LIBOBJ(xmalloc)
145 AC_LIBOBJ(error)
146fi
147
148
149# ---------------------------------------------------------------------------
150# see if the user wants to override use of long long
151AC_ARG_ENABLE(override-longlong,
152[ --enable-override-longlong
153 overide use of long long with GCC],
154 AC_DEFINE(DISABLE_LONG_LONG))
155
156
157# ---------------------------------------------------------------------------
158
159AC_OUTPUT([Makefile text/Makefile lib/Makefile
160 jni/Makefile java/org/greenstone/mgpp/Makefile],
161[test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h])
Note: See TracBrowser for help on using the repository browser.