po: Update German scripts translation
[dpkg.git] / m4 / dpkg-types.m4
bloba17a34568e58da358c3a043b99dd40b3dec7fd8c
1 # serial 1
2 # Copyright © 2005 Scott James Remnant <scott@netsplit.com>
3 # Copyright © 2009-2011 Guillem Jover <guillem@debian.org>
5 # DPKG_TYPE_PTRDIFF_T
6 # -------------------
7 # Check for the ptrdiff_t type, defining to int if not defined
8 AC_DEFUN([DPKG_TYPE_PTRDIFF_T], [
9   AC_CHECK_TYPE([ptrdiff_t], [], [
10     AC_DEFINE_UNQUOTED([ptrdiff_t], [int],
11       [Define to 'int' if <malloc.h> does not define.])
12   ])
13 ])# DPKG_TYPE_PTRDIFF_T
15 # DPKG_DECL_SYS_SIGLIST
16 # ---------------------
17 # Check for the sys_siglist variable in either signal.h or unistd.h
18 AC_DEFUN([DPKG_DECL_SYS_SIGLIST], [
19   AC_CHECK_HEADERS([unistd.h])
20   AC_CHECK_DECLS([sys_siglist], [], [], [[
21 #include <signal.h>
22 /* NetBSD declares sys_siglist in unistd.h.  */
23 #if HAVE_UNISTD_H
24 #  include <unistd.h>
25 #endif
26   ]])
27 ])# DPKG_DECL_SYS_SIGLIST
29 # DPKG_DECL_SYS_ERRLIST
30 # ---------------------
31 # Check for the sys_errlist and sys_nerr variables in either errno.h or
32 # stdio.h
33 AC_DEFUN([DPKG_DECL_SYS_ERRLIST], [
34   AC_CHECK_DECLS([sys_errlist, sys_nerr], [], [], [[
35 #include <errno.h>
36 /* glibc declares sys_errlist in stdio.h.  */
37 #include <stdio.h>
38   ]])
39   AM_CONDITIONAL([HAVE_SYS_ERRLIST],
40     [test "x$ac_cv_have_decl_sys_errlist" = "xyes" && \
41      test "x$ac_cv_have_decl_sys_nerr" = "xyes"])
42 ])# DPKG_DECL_SYS_SIGLIST
44 # DPKG_CHECK_DECL([DECL], [HEADER])
45 # ---------------
46 # Define HAVE_DECL to 1 if declared in HEADER
47 AC_DEFUN([DPKG_CHECK_DECL], [
48   AC_CHECK_DECL([$1], [
49     AC_DEFINE(AS_TR_CPP([HAVE_$1]), [1],
50       [Define to 1 if ']$1[' is declared in <$2>])
51   ], [], [[#include <$2>]])
52 ])# DPKG_CHECK_DECL