X-Git-Url: http://www.dolda2000.com/gitweb/?p=ashd.git;a=blobdiff_plain;f=configure.in;h=1ddf1730b37e02a26f3752dd5f954a1bb8a73835;hp=1242e84cac8c6c61d62931515725a29379cf0ace;hb=2a619a21d4af6cbc5033f987b2aa25ef2b749600;hpb=945d02f51b66c1ca7b8ae959cd06b4f9ebbd0954 diff --git a/configure.in b/configure.in index 1242e84..1ddf173 100644 --- a/configure.in +++ b/configure.in @@ -22,15 +22,21 @@ if test "$HAS_MAGIC" = no; then fi AH_TEMPLATE(HAVE_GLIBC_STDIO, [define to indicate system support for glibc cookie streams]) +AH_TEMPLATE(HAVE_BSD_STDIO, [define to indicate system support for BSD-style funopen streams]) HAS_FOPENCOOKIE=yes AC_CHECK_FUNC(fopencookie, [], [HAS_FOPENCOOKIE=no]) AC_CHECK_MEMBER([cookie_io_functions_t.read], [], [HAS_FOPENCOOKIE=no]) +HAS_FUNOPEN=yes +AC_CHECK_FUNC(funopen, [], [HAS_FUNOPEN=no]) + if test "$HAS_FOPENCOOKIE" = yes; then - AC_DEFINE(HAVE_GLIBC_STDIO) + AC_DEFINE(HAVE_GLIBC_STDIO) +elif test "$HAS_FUNOPEN" = yes; then + AC_DEFINE(HAVE_BSD_STDIO) else - AC_MSG_ERROR([*** libc support for custom stdio streams is required]) + AC_MSG_ERROR([*** libc support for custom stdio streams is required]) fi AH_TEMPLATE(HAVE_VALGRIND, [define to include debugging support for Valgrind])