1# Process this file with autoconf to produce a configure script.
2AC_INIT([xsel.c])
3AM_INIT_AUTOMAKE(xsel, 1.2.0)
4AC_CONFIG_SRCDIR([xsel.c])
5AM_CONFIG_HEADER(config.h)
6
7# Checks for programs.
8AC_ISC_POSIX
9AC_PROG_CC
10AC_PROG_CPP
11AC_PROG_INSTALL
12AC_PROG_MAKE_SET
13
14# Checks for libraries.
15AC_PATH_XTRA
16AC_SUBST(X_CFLAGS)
17AC_SUBST(X_LDFLAGS)
18AC_SUBST(X_LIBS)
19AC_SUBST(X_EXTRA_LIBS)
20
21AC_CHECK_LIB([X11], [XOpenDisplay])
22
23# Error out on compile warnings
24dnl Add some useful warnings if we have gcc.
25dnl changequote(,)dnl
26if test "x$ac_cv_prog_gcc" = xyes ; then
27  CFLAGS="$CFLAGS -fno-strict-aliasing -Wall  -g -std=gnu99 -Wdeclaration-after-statement -Wno-unused"
28fi
29dnl changequote([,])dnl
30
31# Checks for header files.
32AC_HEADER_STDC
33AC_CHECK_HEADERS([errno.h fcntl.h stdlib.h string.h sys/time.h unistd.h])
34
35# Checks for typedefs, structures, and compiler characteristics.
36AC_C_CONST
37AC_TYPE_PID_T
38AC_TYPE_SIZE_T
39AC_CHECK_MEMBERS([struct stat.st_blksize])
40AC_HEADER_TIME
41AC_TYPE_UID_T
42
43# Checks for library functions.
44AC_FUNC_FORK
45AC_FUNC_MALLOC
46AC_TYPE_SIGNAL
47AC_CHECK_FUNCS([dup2 select strdup strerror strtol])
48
49AC_CONFIG_FILES([Makefile])
50AC_OUTPUT
51