summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2006-06-27 18:44:44 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2006-06-27 18:44:44 +0000
commit6a4be40e01252fe8b2911a98d6dc1767328ccb67 (patch)
tree7b401bbb82739356234fe7d8eb61116d069a0654 /m4
parent13c0d7dd68d3daacfc874ce717442d74b889d5d4 (diff)
downloadmailutils-6a4be40e01252fe8b2911a98d6dc1767328ccb67.tar.gz
mailutils-6a4be40e01252fe8b2911a98d6dc1767328ccb67.tar.bz2
Added to the repository by gnulib-sync
Diffstat (limited to 'm4')
-rw-r--r--m4/full-header-path.m441
-rw-r--r--m4/sha1.m415
-rw-r--r--m4/unistd_h.m418
3 files changed, 74 insertions, 0 deletions
diff --git a/m4/full-header-path.m4 b/m4/full-header-path.m4
new file mode 100644
index 000000000..b54e1b39c
--- /dev/null
+++ b/m4/full-header-path.m4
@@ -0,0 +1,41 @@
+# full-header-path.m4 serial 2
+dnl Copyright (C) 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Derek Price.
+
+# gl_FULL_HEADER_PATH(HEADER1 HEADER2 ...)
+# ----------------------------------------
+# Find the full path to a header file, assuming the header exists.
+# If the header were sys/inttypes.h, this macro would define
+# FULL_PATH_SYS_INTTYPES_H to the `<>' quoted full path to sys/inttypes.h
+# in config.h
+# (e.g. `#define FULL_PATH_SYS_INTTYPES_H </usr/include/sys/inttypes.h>').
+AC_DEFUN([gl_FULL_HEADER_PATH],
+[AC_LANG_PREPROC_REQUIRE()dnl
+AC_FOREACH([gl_HEADER_NAME], [$1],
+ [AS_VAR_PUSHDEF([gl_full_header_path],
+ [gl_cv_full_path_]m4_quote(m4_defn([gl_HEADER_NAME])))dnl
+ AC_CACHE_CHECK([full path to <]m4_quote(m4_defn([gl_HEADER_NAME]))[>],
+ m4_quote(m4_defn([gl_full_header_path])),
+ [AS_VAR_PUSHDEF([ac_header_exists],
+ [ac_cv_header_]m4_quote(m4_defn([gl_HEADER_NAME])))dnl
+ AC_CHECK_HEADERS_ONCE(m4_quote(m4_defn([gl_HEADER_NAME])))dnl
+ if test AS_VAR_GET(ac_header_exists) = yes; then
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]])])
+dnl eval is necessary to expand ac_cpp.
+dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
+ AS_VAR_SET(gl_full_header_path,
+[`(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
+sed -n '\#/]m4_quote(m4_defn([gl_HEADER_NAME]))[#{s#.*"\(.*/]m4_quote(m4_defn([gl_HEADER_NAME]))[\)".*#\1#;p;q;}'`])
+ fi
+ AS_VAR_POPDEF([ac_header_exists])dnl
+ ])dnl
+ AC_DEFINE_UNQUOTED(AS_TR_CPP([FULL_PATH_]m4_quote(m4_defn([gl_HEADER_NAME]))),
+ [<AS_VAR_GET(gl_full_header_path)>],
+ [Define this to the full path to <]m4_quote(m4_defn([gl_HEADER_NAME]))[>.])
+ AS_VAR_POPDEF([gl_full_header_path])dnl
+])dnl
+])# gl_FULL_HEADER_PATH
diff --git a/m4/sha1.m4 b/m4/sha1.m4
new file mode 100644
index 000000000..dd3a69c5e
--- /dev/null
+++ b/m4/sha1.m4
@@ -0,0 +1,15 @@
+# sha1.m4 serial 6
+dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_SHA1],
+[
+ MU_LIBSOURCES([sha1.c, sha1.h])
+ MU_LIBOBJ([sha1])
+
+ dnl Prerequisites of lib/sha1.c.
+ AC_REQUIRE([AC_C_BIGENDIAN])
+ :
+])
diff --git a/m4/unistd_h.m4 b/m4/unistd_h.m4
new file mode 100644
index 000000000..9c77f9bd0
--- /dev/null
+++ b/m4/unistd_h.m4
@@ -0,0 +1,18 @@
+# unistd_h.m4 serial 2
+dnl Copyright (C) 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Simon Josefsson
+
+AC_DEFUN([gl_HEADER_UNISTD],
+[
+ dnl Prerequisites of lib/unistd.h.
+ AC_CHECK_HEADERS([unistd.h], [
+ UNISTD_H=''
+ ], [
+ UNISTD_H='unistd.h'
+ ])
+ AC_SUBST(UNISTD_H)
+])

Return to:

Send suggestions and report system problems to the System administrator.