Blame acinclude.m4

Packit 762fc5
dnl Local aide macros
Packit 762fc5
Packit 762fc5
dnl AIDE_LINK_FILES( SRC, DEST )
Packit 762fc5
dnl same as AC_LINK_FILES, but collect the files to link in
Packit 762fc5
dnl some special variables and do the link
Packit 762fc5
dnl when AIDE_DO_LINK_FILES is called
Packit 762fc5
dnl This is a workaround for AC_LINK_FILES, because it does not work
Packit 762fc5
dnl correct when using a caching scheme
Packit 762fc5
dnl
Packit 762fc5
define(AIDE_LINK_FILES,
Packit 762fc5
  [ if test "x$wk_link_files_src" = "x"; then
Packit 762fc5
        wk_link_files_src="$1"
Packit 762fc5
        wk_link_files_dst="$2"
Packit 762fc5
    else
Packit 762fc5
        wk_link_files_src="$wk_link_files_src $1"
Packit 762fc5
        wk_link_files_dst="$wk_link_files_dst $2"
Packit 762fc5
    fi
Packit 762fc5
  ])
Packit 762fc5
Packit 762fc5
define(AIDE_DO_LINK_FILES,
Packit 762fc5
  [ AC_LINK_FILES( $wk_link_files_src, $wk_link_files_dst )
Packit 762fc5
  ])
Packit 762fc5
Packit 762fc5
dnl AIDE_MSG_PRINT(STRING)
Packit 762fc5
dnl print a message
Packit 762fc5
dnl
Packit 762fc5
define(AIDE_MSG_PRINT,
Packit 762fc5
  [ echo $ac_n "$1"" $ac_c" 1>&AC_FD_MSG
Packit 762fc5
  ])
Packit 762fc5
Packit 762fc5
AC_DEFUN([AIDE_CHECK_READDIR_R_ARGS],[
Packit 762fc5
# Check definition of readdir_r
Packit 762fc5
AC_CACHE_CHECK(args to readdir_r, aide_cv_readdir_r,
Packit 762fc5
AC_TRY_LINK(
Packit 762fc5
[#ifndef SCO
Packit 762fc5
#define _REENTRANT
Packit 762fc5
#endif
Packit 762fc5
#define _POSIX_PTHREAD_SEMANTICS
Packit 762fc5
#include <pthread.h>
Packit 762fc5
#include <dirent.h>],
Packit 762fc5
[ int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
Packit 762fc5
readdir_r((DIR *) NULL, (struct dirent *) NULL, (struct dirent **) NULL); ],
Packit 762fc5
aide_cv_readdir_r=POSIX, aide_cv_readdir_r=other))
Packit 762fc5
if test "$aide_cv_readdir_r" = "POSIX"
Packit 762fc5
then
Packit 762fc5
	AC_DEFINE(HAVE_READDIR_R,1,[Define to 1 if you have the `readdir_r' function.])
Packit 762fc5
fi
Packit 762fc5
])
Packit 762fc5