source: trunk/gsdl/packages/mg/configure.in@ 10852

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

changed LIBOBJS= to AC_LIBOBJ(), added in check for endianness

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