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

Last change on this file since 13750 was 13698, checked in by kjdon, 17 years ago

now provides a --with-unac arg, default is ../packages/unac

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 4.7 KB
RevLine 
[3365]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
[7882]10LDFLAGS=
11
[3365]12AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
13AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
14AC_SUBST(PACKAGE)
15AC_SUBST(VERSION)
16
[13482]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
[3365]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
[13698]45dnl
46dnl look for unac package if not in standard location
47dnl
48dnl is it ok to use `pwd` like this??
49AC_ARG_WITH(unac, [ --with-unac=dir Use local unac library and headers], UNAC_DIR=$withval, UNAC_DIR="`pwd`/../packages/unac")
50AC_DEFINE_UNQUOTED(UNAC_DIR, "$UNAC_DIR")
51AC_SUBST(UNAC_DIR)
52
53
[3365]54dnl --- This should be in the stdc checking -----------------
55if test "$ac_cv_prog_cc_stdc" = '-Xc'; then
56dnl The Pyramids running SMP_DC.OSx on MIPS r3000 chips with
57dnl /usr/opt/cc3.11/bin/cc treat -Xc as full ANSI mode - no POSIX or
58dnl XOPEN extensions (like popen).
59dnl Unfortunately -D_{XOPEN,POSIX}_SOURCE can't provide all that mg
60dnl needs. So drop back to -Xa
61AC_TRY_COMPILE(
62[#include <stdio.h>
63], [ FILE *rubbish = popen("yes", "r"); ],,
64[CC="`echo $CC | sed 's/-Xc/-Xa/'`" ac_cv_prog_cc_stdc='-Xa'])
65fi
66dnl ----------------------
67
68
69dnl Checks for libraries.
[8059]70dnl Replace `main' with a function in -lg:
71AC_CHECK_LIB(g, main)
[3365]72dnl Replace `main' with a function in -lm:
73AC_CHECK_LIB(m, main)
[8059]74dnl Replace `main' with a function in -lstdc++:
75AC_CHECK_LIB(stdc++, main)
76dnl Replace `main' with a function in -lcrypt:
77AC_CHECK_LIB(crypt, main)
[13482]78if test $ENABLE_ACCENTFOLD = 1; then
79AC_HAVE_LIBRARY(ICONV)
80fi
[3365]81
[13482]82
[3365]83dnl Checks for header files.
84AC_HEADER_DIRENT
85AC_HEADER_STDC
[8059]86AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h unistd.h crypt.h string.h memory.h sys/procfs.h)
[3365]87AC_EGREP_HEADER(fread, stdio.h, AC_DEFINE(HAVE_FREAD_DECL))
88AC_EGREP_HEADER(fgetc, stdio.h, AC_DEFINE(HAVE_FGETC_DECL))
89AC_EGREP_HEADER(pr_brksize, sys/procfs.h, AC_DEFINE(HAVE_PR_BRKSIZE))
90
91dnl Checks for library functions.
92AC_FUNC_ALLOCA
93AC_PROG_GCC_TRADITIONAL
94AC_TYPE_SIGNAL
95AC_FUNC_VPRINTF
96AC_CHECK_FUNCS(ftime select strftime strtol getrusage times mallinfo setbuffer getpagesize strerror)
97AC_REPLACE_FUNCS(ftruncate strstr strcasecmp)
98
99
[8059]100dnl see if gettext is in libc. (try the textdomain() function).
[8063]101AC_CHECK_FUNC(textdomain, AC_DEFINE(ENABLE_NLS ,1) )
[8059]102
[10014]103# we need to set an extended JNI path for Mac OS/Darwin, as jni.h is on
104# a non-standard Path
[10917]105# is there a better way to do this??
106AC_MSG_CHECKING(for OS to set JNI options)
107# set defaults
108JNIINC=""
109JNISUFFIX="so"
110JNIFLAGS="-shared"
111
[10014]112if test "`(uname -s) 2> /dev/null`" = 'Darwin'; then
[10917]113 AC_MSG_RESULT(Darwin)
[10014]114 JNIINC="-I/System/Library/Frameworks/JavaVM.framework/Headers/ "
[10192]115 JNISUFFIX="jnilib"
[10917]116 JNIFLAGS="-dynamiclib -fno-common -single_module -framework JavaVM"
[10014]117fi
[10917]118if test "`(uname -s) 2> /dev/null`" = 'SunOS'; then
119 AC_MSG_RESULT(Solaris)
120 JNIINC="-I\$(JAVA_HOME)/include/solaris "
121fi
122if test "`(uname -s) 2> /dev/null`" = 'Linux'; then
123 AC_MSG_RESULT(Linux)
124 JNIINC="-I\$(JAVA_HOME)/include/linux "
125fi
126
[10014]127AC_SUBST(JNIINC)
[10192]128AC_SUBST(JNISUFFIX)
129AC_SUBST(JNIFLAGS)
[10014]130
[3365]131# *** Custom checking (based on GNU tar configure.in) ***
132# ---------------------------------------------------------------------------
133AC_MSG_CHECKING(for HP-UX needing gmalloc)
134if test "`(uname -s) 2> /dev/null`" = 'HP-UX'; then
135 AC_MSG_RESULT(yes)
[10192]136 AC_LIBOBJ(gmalloc)
[3365]137 AC_DEFINE(HAVE_VALLOC)
138else
139 AC_MSG_RESULT(no)
140 AC_CHECK_FUNCS(valloc)
141fi
142
143fp_WITH_DMALLOC
144fp_WITH_REGEX
145fp_WITH_GNU_READLINE
146
[10848]147# text for endianness
148AC_C_BIGENDIAN
149
[3365]150# ---------------------------------------------------------------------------
151if test "$ac_cv_func_alloca" = 'no'; then
152dnl support functions for alloca.c
[10192]153 AC_LIBOBJ(xmalloc)
154 AC_LIBOBJ(error)
[3365]155fi
156
157
158# ---------------------------------------------------------------------------
159# see if the user wants to override use of long long
160AC_ARG_ENABLE(override-longlong,
161[ --enable-override-longlong
162 overide use of long long with GCC],
163 AC_DEFINE(DISABLE_LONG_LONG))
164
[10848]165
[3365]166# ---------------------------------------------------------------------------
167
168AC_OUTPUT([Makefile text/Makefile lib/Makefile
169 jni/Makefile java/org/greenstone/mgpp/Makefile],
170[test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h])
Note: See TracBrowser for help on using the repository browser.