git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f3901f1
)
r25970: libreplace: fix AC_N_DEFINE() so that some appears in config.h
author
Stefan Metzmacher
<metze@samba.org>
Thu, 15 Nov 2007 13:46:47 +0000
(14:46 +0100)
committer
Stefan Metzmacher
<metze@samba.org>
Fri, 18 Jan 2008 16:02:10 +0000
(17:02 +0100)
metze
(cherry picked from commit
a07c983fde52607806745914bb41039afb5618cc
)
source/lib/replace/libreplace_macros.m4
patch
|
blob
|
history
diff --git
a/source/lib/replace/libreplace_macros.m4
b/source/lib/replace/libreplace_macros.m4
index 92fecd3db84aad32e3e2840e1a3e019b8a828ecb..54e6b7ac75479d17af2ec73fe1ef88cc64cc0607 100644
(file)
--- a/
source/lib/replace/libreplace_macros.m4
+++ b/
source/lib/replace/libreplace_macros.m4
@@
-248,11
+248,18
@@
m4_define([AH_CHECK_FUNC_EXT],
dnl Define an AC_DEFINE with ifndef guard.
dnl AC_N_DEFINE(VARIABLE [, VALUE])
-define(AC_N_DEFINE,
-[cat >> confdefs.h <<\EOF
-[#ifndef] $1
-[#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1)
-[#endif]
+AC_DEFUN([AC_N_DEFINE],
+[
+AH_VERBATIM([$1], [
+#ifndef $1
+# undef $1
+#endif
+])
+
+ cat >>confdefs.h <<\EOF
+#ifndef $1
+[#define] $1 m4_if($#, 1, 1, [$2])
+#endif
EOF
])