mirror of
https://gitlab.xiph.org/xiph/ezstream.git
synced 2024-12-04 14:46:31 -05:00
9acbffc2dd
There are a few benefits to this, but the main reason is consistency and me completely understanding what's going on. Regressions are not expected, but wouldn't surprise either ... this needs lots of testing. git-svn-id: https://svn.xiph.org/trunk/ezstream@15776 0101bb08-14d6-0310-b084-bc0e0c8e3800
57 lines
1.7 KiB
Plaintext
57 lines
1.7 KiB
Plaintext
dnl $Id: tree.m4 719 2008-10-29 09:08:42Z mgrimm $
|
|
|
|
dnl Check for sys/tree.h and if it is recent enough by looking at a certain
|
|
dnl macro. Defines HAVE_SYS_TREE_H if all conditions are met.
|
|
|
|
dnl Copyright (c) 2008 Moritz Grimm <mgrimm@mrsserver.net>
|
|
dnl
|
|
dnl Permission to use, copy, modify, and distribute this software for any
|
|
dnl purpose with or without fee is hereby granted, provided that the above
|
|
dnl copyright notice and this permission notice appear in all copies.
|
|
dnl
|
|
dnl THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
dnl WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
dnl MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
dnl ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
dnl WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
dnl ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
dnl OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
dnl AX_HEADER_TREE([REQUIRED-MACRO], [ACTION-IF-FOUND],
|
|
dnl [ACTION-IF-NOT-FOUND])
|
|
|
|
AC_DEFUN([AX_HEADER_TREE],
|
|
[
|
|
if test x"$1" = "x"; then
|
|
_tree_macro="RB_INIT"
|
|
else
|
|
_tree_macro=$1
|
|
fi
|
|
AC_MSG_CHECKING([for ${_tree_macro} in sys/tree.h])
|
|
AC_CACHE_VAL([local_cv_header_sys_tree_h],
|
|
[
|
|
AC_COMPILE_IFELSE(
|
|
[AC_LANG_PROGRAM(
|
|
[[
|
|
#include <sys/tree.h>
|
|
#if !defined(${_tree_macro})
|
|
# error Required tree macro missing
|
|
#endif /* !${_tree_macro} */
|
|
]],
|
|
[[]])],
|
|
[local_cv_header_sys_tree_h=yes],
|
|
[local_cv_header_sys_tree_h=no])
|
|
])
|
|
if test x"${local_cv_header_sys_tree_h}" = "xyes"; then
|
|
AC_MSG_RESULT([yes])
|
|
AC_DEFINE([HAVE_SYS_TREE_H], [1],
|
|
[Define to 1 if you have a sufficiently recent <sys/tree.h> header.])
|
|
:
|
|
$2
|
|
else
|
|
AC_MSG_RESULT([no])
|
|
:
|
|
$3
|
|
fi
|
|
])
|