#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.71])
AC_INIT([FULL-PACKAGE-NAME],[VERSION],[BUG-REPORT-ADDRESS])
AC_CONFIG_SRCDIR([wmwork.c])
AC_CONFIG_HEADERS([config.h])

# Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET

# Checks for libraries.

AC_PATH_XTRA
LDFLAGS="$LDFLAGS $X_LIBS"
AC_CHECK_LIB([X11],  [XNextEvent],,              [AC_MSG_ERROR(cannot find libX11.so)],  [$X_LIBS])
AC_CHECK_LIB([Xext], [XShapeCombineMask],,       [AC_MSG_ERROR(cannot find libXext.so)], [$X_LIBS])
AC_CHECK_LIB([Xpm],  [XpmCreatePixmapFromData],, [AC_MSG_ERROR(cannot find libXpm.so)],  [$X_LIBS])

# Checks for header files.
AC_PATH_X
AC_CHECK_HEADERS([fcntl.h strings.h sys/time.h unistd.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_PID_T

# Checks for library functions.
AC_FUNC_MALLOC
AC_CHECK_FUNCS([atexit gettimeofday mkdir strcspn strdup strerror strspn strstr strtol])

AC_CONFIG_FILES([Makefile wmwork.1])
AC_OUTPUT
