/[MITgcm]/MITgcm_contrib/mpack_src/mpack-1.6-4/cmulocal/util.m4
ViewVC logotype

Annotation of /MITgcm_contrib/mpack_src/mpack-1.6-4/cmulocal/util.m4

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Sat Feb 23 20:13:31 2008 UTC (17 years, 4 months ago) by jmc
Branch: MAIN
CVS Tags: HEAD
- get new version from: http://packages.qa.debian.org/m/mpack.html
  (files: mpack_1.6.orig.tar.gz, mpack_1.6-4.diff.gz, mpack_1.6-4.dsc)
  and apply patch 'mpack_1.6-4.diff' to original dir: mpack_1.6/
- this fix the MD5 coding on 64.bit platforms (well, seems to).
- added in Contrib to allow separate test (since building mpack seems fishy)

1 jmc 1.1 dnl util.m4--robutil macro
2     dnl Rob Earhart
3     dnl $Id: util.m4,v 1.9 2002/05/25 19:57:43 leg Exp $
4    
5     dnl robutil is a collection of stuff I (Rob Earhart) have found useful
6     dnl to have around when writing code; it's the stuff I wind up rewriting
7     dnl every time I start a project. This does the autoconf setup
8     dnl necessary for it.
9    
10     dnl This is a helper macro, here because there're times when I
11     dnl want to know if a type exists or not, but don't want to define
12     dnl it to something else (the way AC_CHECK_TYPE does).
13    
14     AC_DEFUN(CMU_CHECK_TYPE_EXISTS, [
15     changequote(<<, >>)
16     define(<<CMU_TYPE_NAME>>, translit(CMU_HAVE_$1, [a-z *], [A-Z_P]))
17     define(<<CMU_CV_NAME>>, translit(cmu_cv_type_$1, [ *], [_p]))
18     changequote([, ])
19     AC_REQUIRE([AC_HEADER_STDC])
20     AC_MSG_CHECKING(for $1)
21     AC_CACHE_VAL(CMU_CV_NAME, [
22     AC_EGREP_CPP([$1[[^a-zA-Z_0-9]]], [
23     #include <sys/types.h>
24     #if STDC_HEADERS
25     #include <stdlib.h>
26     #include <stddef.h>
27     #endif
28     ], CMU_CV_NAME=yes, CMU_CV_NAME=no)])
29     AC_MSG_RESULT($CMU_CV_NAME)
30     if test $CMU_CV_NAME = yes; then
31     AC_DEFINE(CMU_TYPE_NAME)
32     fi
33     ])
34    
35     AC_DEFUN(CMU_UTIL, [
36     AC_REQUIRE([AC_PROG_CC])
37     AC_REQUIRE([AM_PROG_CC_STDC])
38     AC_REQUIRE([AC_PROG_RANLIB])
39     AC_REQUIRE([CMU_NANA])
40     AC_REQUIRE([CMU_COMERR])
41     AC_REQUIRE([AC_HEADER_STDC])
42     AC_REQUIRE([AC_TYPE_MODE_T])
43     AC_REQUIRE([AC_C_CONST])
44     AC_CHECK_HEADERS(sys/sysmacros.h)
45     AC_CHECK_HEADER(inttypes.h, AC_DEFINE(HAVE_INTTYPES_H),
46     CMU_CHECK_TYPE_EXISTS(int8_t)
47     CMU_CHECK_TYPE_EXISTS(uint8_t)
48     CMU_CHECK_TYPE_EXISTS(u_int8_t)
49     CMU_CHECK_TYPE_EXISTS(int16_t)
50     CMU_CHECK_TYPE_EXISTS(uint16_t)
51     CMU_CHECK_TYPE_EXISTS(u_int16_t)
52     CMU_CHECK_TYPE_EXISTS(int32_t)
53     CMU_CHECK_TYPE_EXISTS(uint32_t)
54     CMU_CHECK_TYPE_EXISTS(u_int32_t)
55     )
56     dnl I'm not sure why autoconf gets so annoyed when these
57     dnl are embedded as part of the inttypes check, but, whatever,
58     dnl this works.
59     if test "$ac_cv_header_inttypes_h" = no; then
60     AC_CHECK_SIZEOF(short)
61     AC_CHECK_SIZEOF(int)
62     AC_CHECK_SIZEOF(long)
63     fi
64    
65     AC_CHECK_TYPE(ssize_t, signed)
66     THREADED_UTIL_OBJECTS=""
67     AC_SUBST(THREADED_UTIL_OBJECTS)
68     ])
69    
70     AC_DEFUN(CMU_THREAD_UTIL, [
71     AC_REQUIRE([CMU_UTIL])
72     THREADED_UTIL_OBJECTS="refcache.o rselock.o"
73     ])

  ViewVC Help
Powered by ViewVC 1.1.22