source: main/tags/3.01/mgpp/configure.in

Last change on this file was 10887, checked in by kjdon, 18 years ago

moved '-framework JavaVM' from LDFLAGS to JNIFLAGS - we don't want to link against the Java framework for all the c/c++ programs

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 3.8 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
84# we need to set an extended JNI path for Mac OS/Darwin, as jni.h is on
85# a non-standard Path
86AC_MSG_CHECKING(for Apple MacOS X/Darwin)
87if test "`(uname -s) 2> /dev/null`" = 'Darwin'; then
88 AC_MSG_RESULT(yes)
89 JNIINC="-I/System/Library/Frameworks/JavaVM.framework/Headers/ "
90 JNISUFFIX="jnilib"
91 JNIFLAGS="-dynamiclib -fno-common -framework JavaVM"
92else
93 AC_MSG_RESULT(no)
94 JNIINC=""
95 JNISUFFIX="so"
96 JNIFLAGS="-shared"
97fi
98AC_SUBST(JNIINC)
99AC_SUBST(JNISUFFIX)
100AC_SUBST(JNIFLAGS)
101
102# *** Custom checking (based on GNU tar configure.in) ***
103# ---------------------------------------------------------------------------
104AC_MSG_CHECKING(for HP-UX needing gmalloc)
105if test "`(uname -s) 2> /dev/null`" = 'HP-UX'; then
106 AC_MSG_RESULT(yes)
107 AC_LIBOBJ(gmalloc)
108 AC_DEFINE(HAVE_VALLOC)
109else
110 AC_MSG_RESULT(no)
111 AC_CHECK_FUNCS(valloc)
112fi
113
114fp_WITH_DMALLOC
115fp_WITH_REGEX
116fp_WITH_GNU_READLINE
117
118# text for endianness
119AC_C_BIGENDIAN
120
121# ---------------------------------------------------------------------------
122if test "$ac_cv_func_alloca" = 'no'; then
123dnl support functions for alloca.c
124 AC_LIBOBJ(xmalloc)
125 AC_LIBOBJ(error)
126fi
127
128
129# ---------------------------------------------------------------------------
130# see if the user wants to override use of long long
131AC_ARG_ENABLE(override-longlong,
132[ --enable-override-longlong
133 overide use of long long with GCC],
134 AC_DEFINE(DISABLE_LONG_LONG))
135
136
137# ---------------------------------------------------------------------------
138
139AC_OUTPUT([Makefile text/Makefile lib/Makefile
140 jni/Makefile java/org/greenstone/mgpp/Makefile],
141[test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h])
Note: See TracBrowser for help on using the repository browser.