summaryrefslogtreecommitdiff
path: root/source3/lib/replace/libreplace_macros.m4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-10-18 10:54:37 +0200
committerStefan Metzmacher <metze@samba.org>2007-10-18 10:54:37 +0200
commitdf50ee886fe22ffbdd8b9aaad9f82df84001ac5e (patch)
tree65fb39653ce93283090d58d1eb3235efabd8bada /source3/lib/replace/libreplace_macros.m4
parent7ed90852c5aae0f3dc71b07f22a5f983985c2086 (diff)
downloadsamba-df50ee886fe22ffbdd8b9aaad9f82df84001ac5e.tar.gz
samba-df50ee886fe22ffbdd8b9aaad9f82df84001ac5e.tar.bz2
samba-df50ee886fe22ffbdd8b9aaad9f82df84001ac5e.zip
[libreplace] fix the standalone build of libreplace
all configure results which are used in replace.h or any system/*.h should be in the in the libreplace *.m4 files! metze (This used to be commit 1eefa0264bb1a304a30ec4c7c6e2392c627ee6a3)
Diffstat (limited to 'source3/lib/replace/libreplace_macros.m4')
-rw-r--r--source3/lib/replace/libreplace_macros.m423
1 files changed, 22 insertions, 1 deletions
diff --git a/source3/lib/replace/libreplace_macros.m4 b/source3/lib/replace/libreplace_macros.m4
index f262b9b6eb..da46f6734f 100644
--- a/source3/lib/replace/libreplace_macros.m4
+++ b/source3/lib/replace/libreplace_macros.m4
@@ -314,4 +314,25 @@ AC_DEFUN(LIBREPLACE_PROVIDE_HEADER,
)
])
-
+dnl AC_HAVE_TYPE(TYPE,INCLUDES)
+AC_DEFUN([AC_HAVE_TYPE], [
+AC_REQUIRE([AC_HEADER_STDC])
+cv=`echo "$1" | sed 'y%./+- %__p__%'`
+AC_MSG_CHECKING(for $1)
+AC_CACHE_VAL([ac_cv_type_$cv],
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+AC_INCLUDES_DEFAULT
+$2]],
+[[$1 foo;]])],
+[eval "ac_cv_type_$cv=yes"],
+[eval "ac_cv_type_$cv=no"]))dnl
+ac_foo=`eval echo \\$ac_cv_type_$cv`
+AC_MSG_RESULT($ac_foo)
+if test "$ac_foo" = yes; then
+ ac_tr_hdr=HAVE_`echo $1 | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
+if false; then
+ AC_CHECK_TYPES($1)
+fi
+ AC_DEFINE_UNQUOTED($ac_tr_hdr, 1, [Define if you have type `$1'])
+fi
+])