File: acinclude.m4

package info (click to toggle)
aide 0.16~a2.git20130520-3~bpo70+1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 2,940 kB
  • sloc: ansic: 13,177; sh: 5,737; lex: 646; yacc: 285; makefile: 104
file content (49 lines) | stat: -rw-r--r-- 1,364 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
dnl Local aide macros

dnl AIDE_LINK_FILES( SRC, DEST )
dnl same as AC_LINK_FILES, but collect the files to link in
dnl some special variables and do the link
dnl when AIDE_DO_LINK_FILES is called
dnl This is a workaround for AC_LINK_FILES, because it does not work
dnl correct when using a caching scheme
dnl
define(AIDE_LINK_FILES,
  [ if test "x$wk_link_files_src" = "x"; then
        wk_link_files_src="$1"
        wk_link_files_dst="$2"
    else
        wk_link_files_src="$wk_link_files_src $1"
        wk_link_files_dst="$wk_link_files_dst $2"
    fi
  ])

define(AIDE_DO_LINK_FILES,
  [ AC_LINK_FILES( $wk_link_files_src, $wk_link_files_dst )
  ])

dnl AIDE_MSG_PRINT(STRING)
dnl print a message
dnl
define(AIDE_MSG_PRINT,
  [ echo $ac_n "$1"" $ac_c" 1>&AC_FD_MSG
  ])

AC_DEFUN([AIDE_CHECK_READDIR_R_ARGS],[
# Check definition of readdir_r
AC_CACHE_CHECK(args to readdir_r, aide_cv_readdir_r,
AC_TRY_LINK(
[#ifndef SCO
#define _REENTRANT
#endif
#define _POSIX_PTHREAD_SEMANTICS
#include <pthread.h>
#include <dirent.h>],
[ int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
readdir_r((DIR *) NULL, (struct dirent *) NULL, (struct dirent **) NULL); ],
aide_cv_readdir_r=POSIX, aide_cv_readdir_r=other))
if test "$aide_cv_readdir_r" = "POSIX"
then
	AC_DEFINE(HAVE_READDIR_R,1,[Define to 1 if you have the `readdir_r' function.])
fi
])