[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
local macro problem
From: |
Harlan Stenn |
Subject: |
local macro problem |
Date: |
Sun, 25 Aug 2002 03:33:04 -0400 |
User-agent: |
EMH/1.10.0 SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) XEmacs/21.1 (patch 14) (Cuyahoga Valley) (i386--freebsd) |
I'm looking for a way to define unsigned-long constants. I have to support
K&R and Ansi C compilers.
I have been using:
acconfig.h:
#undef ULONG_CONST
acinclude.m4:
AC_DEFUN(hs_ULONG_CONST,
[ AC_EGREP_CPP(Circus,
[#define ACAT(a,b)a ## b
ACAT(Cir,cus)
], AC_DEFINE([ULONG_CONST(a)], [a ## UL]),
AC_EGREP_CPP(Reiser,
[#define RCAT(a,b)a/**/b
RCAT(Rei,ser)
], AC_DEFINE([ULONG_CONST(a)], [a/**/L]),
AC_MSG_ERROR([How do we create an unsigned long constant?])))])
and I'm trying to lose the entry in acconfig.h and use the "template" form
of AC_DEFINE.
The bad news is that I apparently haven't gotten the quoting right.
If I just add the template to AC_DEFINE(ULONG_CONST...) autosomething goes
insane becuase it's under-quoted.
If I add [] around the AC_DEFINE(ULONG_CONST...) bit then auto* is happy but
the resulting entry in config.h.in is Wrong.
Anybody have something I can swipe, or ideas on what I'm doing wrong?
H
- local macro problem,
Harlan Stenn <=