summaryrefslogtreecommitdiff
path: root/jni/iconv/m4/proto.m4
diff options
context:
space:
mode:
authorJari Vetoniemi <jari.vetoniemi@indooratlas.com>2020-03-16 18:49:26 +0900
committerJari Vetoniemi <jari.vetoniemi@indooratlas.com>2020-03-30 00:39:06 +0900
commitfcbf63e62c627deae76c1b8cb8c0876c536ed811 (patch)
tree64cb17de3f41a2b6fef2368028fbd00349946994 /jni/iconv/m4/proto.m4
Fresh start
Diffstat (limited to 'jni/iconv/m4/proto.m4')
-rw-r--r--jni/iconv/m4/proto.m444
1 files changed, 44 insertions, 0 deletions
diff --git a/jni/iconv/m4/proto.m4 b/jni/iconv/m4/proto.m4
new file mode 100644
index 0000000..ac6e866
--- /dev/null
+++ b/jni/iconv/m4/proto.m4
@@ -0,0 +1,44 @@
+dnl Copyright (C) 1993-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible, Marcus Daniels.
+
+AC_PREREQ(2.13)
+
+dnl CL_PROTO(IDENTIFIER, ACTION-IF-NOT-FOUND, FINAL-PROTOTYPE)
+AC_DEFUN([CL_PROTO],
+[AC_MSG_CHECKING([for $1 declaration])
+AC_CACHE_VAL(cl_cv_proto_[$1], [$2
+cl_cv_proto_$1="$3"])
+cl_cv_proto_$1=`echo "[$]cl_cv_proto_$1" | tr -s ' ' | sed -e 's/( /(/'`
+AC_MSG_RESULT([$]{ac_t:-
+ }[$]cl_cv_proto_$1)
+])
+
+dnl CL_PROTO_RET(INCLUDES, DECL, CACHE-ID, TYPE-IF-OK, TYPE-IF-FAILS)
+AC_DEFUN([CL_PROTO_RET],
+[AC_TRY_COMPILE([$1]
+AC_LANG_EXTERN[$2
+], [], $3="$4", $3="$5")
+])
+
+dnl CL_PROTO_TRY(INCLUDES, ANSI-DECL, TRAD-DECL, ACTION-IF-OK, ACTION-IF-FAILS)
+AC_DEFUN([CL_PROTO_TRY],
+[AC_TRY_COMPILE([$1]
+AC_LANG_EXTERN
+[#if defined(__STDC__) || defined(__cplusplus)
+$2
+#else
+$3
+#endif
+], [], [$4], [$5])
+])
+
+dnl CL_PROTO_CONST(INCLUDES, ANSI-DECL, TRAD-DECL, CACHE-ID)
+AC_DEFUN([CL_PROTO_CONST],
+[CL_PROTO_TRY([$1], [$2], [$3], $4="", $4="const")]
+)