summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-10-11 13:36:37 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:20:57 -0500
commit2bdaccaa9c794f901ddd10b57b67b8aa21ef5285 (patch)
treeddba9dba2ced389d2683d09e4cc5535068983102
parentb6582987fe25ef3d54034f2f27a052664a298f3e (diff)
downloadsamba-2bdaccaa9c794f901ddd10b57b67b8aa21ef5285.tar.gz
samba-2bdaccaa9c794f901ddd10b57b67b8aa21ef5285.tar.bz2
samba-2bdaccaa9c794f901ddd10b57b67b8aa21ef5285.zip
r19245: mrege from samba3:
add AC_REMOVE_INCLUDE(), AC_REMOVE_DEFINE() macros metze (This used to be commit dc65a6625295a7316c2e9982ee09eb9607dbed70)
-rw-r--r--source4/lib/replace/libreplace_macros.m418
1 files changed, 18 insertions, 0 deletions
diff --git a/source4/lib/replace/libreplace_macros.m4 b/source4/lib/replace/libreplace_macros.m4
index 4a645ef81f..0669c10c2a 100644
--- a/source4/lib/replace/libreplace_macros.m4
+++ b/source4/lib/replace/libreplace_macros.m4
@@ -264,6 +264,24 @@ define(AC_ADD_INCLUDE,
EOF
])
+dnl remove an #include
+dnl AC_REMOVE_INCLUDE(VARIABLE)
+define(AC_REMOVE_INCLUDE,
+[
+grep -v '[#include] $1' confdefs.h >confdefs.h.tmp
+cat confdefs.h.tmp > confdefs.h
+rm confdefs.h.tmp
+])
+
+dnl remove an #define
+dnl AC_REMOVE_DEFINE(VARIABLE)
+define(AC_REMOVE_DEFINE,
+[
+grep -v '[#define] $1 ' confdefs.h |grep -v '[#define] $1[$]'>confdefs.h.tmp
+cat confdefs.h.tmp > confdefs.h
+rm confdefs.h.tmp
+])
+
dnl AS_HELP_STRING is not available in autoconf 2.57, and AC_HELP_STRING is deprecated
dnl in autoconf 2.59, so define AS_HELP_STRING to be AC_HELP_STRING unless it is already
dnl defined.