1dnl Process this file with autoconf to produce a configure script.
2AC_INIT([autocutsel], [0.10.0])
3AC_CONFIG_SRCDIR([autocutsel.c])
4AM_INIT_AUTOMAKE
5
6AC_CONFIG_MACRO_DIRS([m4])
7
8AM_CONFIG_HEADER(config.h)
9
10dnl Checks for programs.
11AC_PROG_CC
12AC_PROG_LIBTOOL
13AC_PATH_XTRA
14if test "$no_x" = "yes"
15then
16  AC_MSG_ERROR([Unable to find X libraries])
17fi
18AC_CHECK_LIB(Xext, main, LIBS="$LIBS -lXext", [], $X_PRE_LIB $X_LIBS $LIBS -lX11 $X_EXTRA_LIBS)
19
20LIBS="$X_PRE_LIBS $X_LIBS $LIBS -lX11 $X_EXTRA_LIBS"
21
22AC_CHECK_LIB(Xaw, main,
23  LIBS="$LIBS -lXaw",
24  AC_MSG_ERROR(Unable to find Xaw library),
25  $LIBS)
26
27AC_CHECK_LIB(Xt, XtDisplay,
28  LIBS="$LIBS -lXt",
29  AC_MSG_ERROR(Unable to find Xt library),
30  $LIBS)
31
32AC_CHECK_LIB(Xmu, XmuGetHostname,
33  LIBS="$LIBS -lXmu",
34  AC_MSG_ERROR(Unable to find Xmu library),
35  $LIBS)
36
37dnl Checks for libraries.
38
39dnl Checks for header files.
40
41dnl Checks for typedefs, structures, and compiler characteristics.
42AC_TYPE_SIGNAL
43
44dnl Checks for library functions.
45AC_FUNC_SETPGRP
46
47dnl Warnings
48AC_MSG_CHECKING([whether to enable -Wall])
49if test -n "$GCC"; then
50  AC_MSG_RESULT(adding -Wall to CFLAGS.)
51  CFLAGS="$CFLAGS -Wall"
52else
53  AC_MSG_RESULT(no)
54fi
55
56AC_OUTPUT(Makefile)
57