| 1 |
# Autoconf macros for xdvik. |
| 2 |
# Copyright (C) 2012 Paul Vojta <[email protected]> |
| 3 |
# Adapted from xterm, Copyright 1997-2010,2011 by Thomas E. Dickey |
| 4 |
# |
| 5 |
# This file is free software; the copyright holder |
| 6 |
# gives unlimited permission to copy and/or distribute it, |
| 7 |
# with or without modifications, as long as this notice is preserved. |
| 8 |
|
| 9 |
# XDVI_FUNC_XKB_BELL |
| 10 |
# ------------------------- |
| 11 |
# Check for whether the XkbBell() extension is present in the X libraries. |
| 12 |
|
| 13 |
dnl ### Check for XkbBell() functionality. Adapted from xterm's version. |
| 14 |
AC_DEFUN([XDVI_FUNC_XKB_BELL],[ |
| 15 |
AC_CACHE_CHECK([for XKB Bell extension], xdvi_cv_func_xkb_bell, |
| 16 |
[xdvi_save_LIBS=$LIBS |
| 17 |
LIBS="$X_PRE_LIBS"$1" $LIBS $X_LIBS -lX11" |
| 18 |
AC_TRY_LINK([ |
| 19 |
#include <X11/X.h> |
| 20 |
#include <X11/XKBlib.h> /* has the prototype */ |
| 21 |
],[ |
| 22 |
Atom y; |
| 23 |
XkbBell((Display *)0, (Window)0, 0, y); |
| 24 |
],[xdvi_cv_func_xkb_bell=yes],[xdvi_cv_func_xkb_bell=no]) |
| 25 |
LIBS=$xdvi_save_LIBS]) |
| 26 |
if test "$xdvi_cv_func_xkb_bell" = yes; then |
| 27 |
X_PRE_LIBS="$X_PRE_LIBS"$1 |
| 28 |
AC_DEFINE([HAVE_XKB_BELL_EXT], 1, [Define if your system has XkbBell().]) |
| 29 |
fi]) |