1#                                               -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ(2.62)
5AC_INIT([xprintidle], [2.1])
6AM_INIT_AUTOMAKE([dist-bzip2 -Wall])
7AC_CONFIG_SRCDIR([xprintidle.c])
8
9# Checks for programs.
10AC_PROG_CC
11AC_PROG_INSTALL
12# Checks for header files.
13AC_PATH_X
14if test "$no_x" = yes; then
15  AC_MSG_ERROR([X not found])
16fi
17AC_SUBST([x_includes])
18AC_SUBST([x_libraries])
19
20LIBS="$LIBS -lX11 -lXss -lXext"
21
22# Checks for libraries.
23user_LIBS=$LIBS
24if test $x_libraries; then
25  LIBS="$LIBS -L$x_libraries"
26fi
27AC_CHECK_LIB([X11], [XOpenDisplay], , [AC_MSG_ERROR([libX11 not found])])
28AC_CHECK_LIB([Xss], [XScreenSaverQueryExtension], , [AC_MSG_ERROR([libXss not found])])
29LIBS=$user_LIBS
30
31AC_CONFIG_FILES([Makefile])
32AC_OUTPUT
33