source: trunk/gsdl3/src/packages/mg/configure.in@ 10887

Last change on this file since 10887 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.2 KB
Line 
1dnl Process this file with autoconf to produce a configure script.
2AC_INIT(src/text/mgquery.c)
3AC_CONFIG_HEADER(config.h)
4AC_ARG_PROGRAM
5
6dnl
7PACKAGE=mg
8VERSION=1.2
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 -lm:
55AC_CHECK_LIB(m, main)
56
57dnl Checks for header files.
58AC_HEADER_DIRENT
59AC_HEADER_STDC
60AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h unistd.h string.h memory.h sys/procfs.h)
61AC_EGREP_HEADER(fread, stdio.h, AC_DEFINE(HAVE_FREAD_DECL))
62AC_EGREP_HEADER(fgetc, stdio.h, AC_DEFINE(HAVE_FGETC_DECL))
63AC_EGREP_HEADER(pr_brksize, sys/procfs.h, AC_DEFINE(HAVE_PR_BRKSIZE))
64
65dnl Checks for library functions.
66AC_FUNC_ALLOCA
67AC_PROG_GCC_TRADITIONAL
68AC_TYPE_SIGNAL
69AC_FUNC_VPRINTF
70AC_CHECK_FUNCS(ftime select strftime strtol getrusage times mallinfo setbuffer getpagesize)
71AC_REPLACE_FUNCS(ftruncate strstr strcasecmp)
72
73
74# *** Custom checking (based on GNU tar configure.in) ***
75# ---------------------------------------------------------------------------
76AC_MSG_CHECKING(for HP-UX needing gmalloc)
77if test "`(uname -s) 2> /dev/null`" = 'HP-UX'; then
78 AC_MSG_RESULT(yes)
79 AC_LIBOBJ(gmalloc)
80 AC_DEFINE(HAVE_VALLOC)
81else
82 AC_MSG_RESULT(no)
83 AC_CHECK_FUNCS(valloc)
84fi
85
86# we need to set an extended JNI path for Mac OS/Darwin, as jni.h is on
87# a non-standard Path
88AC_MSG_CHECKING(for Apple MacOS X/Darwin)
89if test "`(uname -s) 2> /dev/null`" = 'Darwin'; then
90 AC_MSG_RESULT(yes)
91 JNIINC="-I/System/Library/Frameworks/JavaVM.framework/Headers/ "
92 JNISUFFIX="jnilib"
93 JNIFLAGS="-dynamiclib -fno-common -single_module -framework JavaVM"
94else
95 AC_MSG_RESULT(no)
96 JNIINC=""
97 JNISUFFIX="so"
98 JNIFLAGS="-shared"
99fi
100AC_SUBST(JNIINC)
101AC_SUBST(JNISUFFIX)
102AC_SUBST(JNIFLAGS)
103
104fp_WITH_DMALLOC
105fp_WITH_REGEX
106
107# text for endianness
108AC_C_BIGENDIAN
109
110# ---------------------------------------------------------------------------
111if test "$ac_cv_func_alloca" = 'no'; then
112dnl support functions for alloca.c
113 AC_LIBOBJ(xmalloc)
114 AC_LIBOBJ(error)
115fi
116
117
118# ---------------------------------------------------------------------------
119
120AC_OUTPUT([Makefile src/text/Makefile src/images/Makefile
121 src/scripts/Makefile lib/Makefile
122 jni/Makefile java/org/greenstone/mg/Makefile ],
123[test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h])
Note: See TracBrowser for help on using the repository browser.