Split off gc-random from gc, and only warn on missing devices.
[gnulib.git] / m4 / gc.m4
1 # gc.m4 serial 2
2 dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved.
6
7 AC_DEFUN([gl_GC],
8 [
9   AC_LIBSOURCES([gc.h, gc-gnulib.c, gc-libgcrypt.c])
10   AC_ARG_WITH(libgcrypt,
11     AS_HELP_STRING([--with-libgcrypt], [use libgcrypt for low-level crypto]),
12     libgcrypt=$withval, libgcrypt=no)
13   if test "$libgcrypt" != no; then
14     AC_LIB_HAVE_LINKFLAGS([gcrypt], [], [#include <gcrypt.h>])
15   fi
16   if test "$ac_cv_libgcrypt" = yes; then
17     AC_LIBOBJ([gc-libgcrypt])
18   else
19     AC_LIBOBJ([gc-gnulib])
20   fi
21 ])
22
23 # Prerequisites of lib/gc.h
24 AC_DEFUN([gl_PREREQ_GC], [:])