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

Last change on this file since 8059 was 8059, checked in by kjdon, 20 years ago

added in some new library checks to match the things that were added to config.h.in

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 3.2 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 Checks for programs.
18AC_PROG_CXX
19AC_PROG_AWK
20AC_PROG_YACC
21AC_PROG_CC
22AC_PROG_INSTALL
23AC_PROG_LN_S
24AC_PROG_MAKE_SET
25AC_PROG_RANLIB
26
27dnl Checks for typedefs, structures, and compiler characteristics.
28AC_AIX
29AC_ISC_POSIX
30AC_MINIX
31fp_C_PROTOTYPES
32AC_C_CONST
33AC_TYPE_OFF_T
34AC_TYPE_SIZE_T
35AC_HEADER_TIME
36AC_STRUCT_TM
37
38dnl --- This should be in the stdc checking -----------------
39if test "$ac_cv_prog_cc_stdc" = '-Xc'; then
40dnl The Pyramids running SMP_DC.OSx on MIPS r3000 chips with
41dnl /usr/opt/cc3.11/bin/cc treat -Xc as full ANSI mode - no POSIX or
42dnl XOPEN extensions (like popen).
43dnl Unfortunately -D_{XOPEN,POSIX}_SOURCE can't provide all that mg
44dnl needs. So drop back to -Xa
45AC_TRY_COMPILE(
46[#include <stdio.h>
47], [ FILE *rubbish = popen("yes", "r"); ],,
48[CC="`echo $CC | sed 's/-Xc/-Xa/'`" ac_cv_prog_cc_stdc='-Xa'])
49fi
50dnl ----------------------
51
52
53dnl Checks for libraries.
54dnl Replace `main' with a function in -lg:
55AC_CHECK_LIB(g, main)
56dnl Replace `main' with a function in -lm:
57AC_CHECK_LIB(m, main)
58dnl Replace `main' with a function in -lstdc++:
59AC_CHECK_LIB(stdc++, main)
60dnl Replace `main' with a function in -lcrypt:
61AC_CHECK_LIB(crypt, main)
62
63dnl Checks for header files.
64AC_HEADER_DIRENT
65AC_HEADER_STDC
66AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h unistd.h crypt.h string.h memory.h sys/procfs.h)
67AC_EGREP_HEADER(fread, stdio.h, AC_DEFINE(HAVE_FREAD_DECL))
68AC_EGREP_HEADER(fgetc, stdio.h, AC_DEFINE(HAVE_FGETC_DECL))
69AC_EGREP_HEADER(pr_brksize, sys/procfs.h, AC_DEFINE(HAVE_PR_BRKSIZE))
70
71dnl Checks for library functions.
72AC_FUNC_ALLOCA
73AC_PROG_GCC_TRADITIONAL
74AC_TYPE_SIGNAL
75AC_FUNC_VPRINTF
76AC_CHECK_FUNCS(ftime select strftime strtol getrusage times mallinfo setbuffer getpagesize strerror)
77AC_REPLACE_FUNCS(ftruncate strstr strcasecmp)
78
79
80dnl see if gettext is in libc. (try the textdomain() function).
81AC_CHECK_FUNC( textdomain , AC_DEFINE(ENABLE_NLS ,1) )
82
83# *** Custom checking (based on GNU tar configure.in) ***
84# ---------------------------------------------------------------------------
85AC_MSG_CHECKING(for HP-UX needing gmalloc)
86if test "`(uname -s) 2> /dev/null`" = 'HP-UX'; then
87 AC_MSG_RESULT(yes)
88 LIBOBJS="$LIBOBJS gmalloc.o"
89 AC_DEFINE(HAVE_VALLOC)
90else
91 AC_MSG_RESULT(no)
92 AC_CHECK_FUNCS(valloc)
93fi
94
95fp_WITH_DMALLOC
96fp_WITH_REGEX
97fp_WITH_GNU_READLINE
98
99# ---------------------------------------------------------------------------
100if test "$ac_cv_func_alloca" = 'no'; then
101dnl support functions for alloca.c
102 LIBOBJS="$LIBOBJS xmalloc.o error.o"
103fi
104
105
106# ---------------------------------------------------------------------------
107# see if the user wants to override use of long long
108AC_ARG_ENABLE(override-longlong,
109[ --enable-override-longlong
110 overide use of long long with GCC],
111 AC_DEFINE(DISABLE_LONG_LONG))
112
113# ---------------------------------------------------------------------------
114
115AC_OUTPUT([Makefile text/Makefile lib/Makefile
116 jni/Makefile java/org/greenstone/mgpp/Makefile],
117[test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h])
Note: See TracBrowser for help on using the repository browser.