1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(cave, 1.0b, [Ben Kibbey <bjk@luxsci.net>])
3 AC_CONFIG_AUX_DIR(build)
5 AM_INIT_AUTOMAKE([foreign])
7 AC_CONFIG_SRCDIR([src/cave.c])
8 AM_CONFIG_HEADER([config.h])
12 LDFLAGS="$LDFLAGS -flat_namespace -L/sw/lib"
13 CPPFLAGS="$CPPFLAGS -I/sw/include -L/sw/lib"
19 dnl Checks for programs.
23 CFLAGS="$CFLAGS -D_GNU_SOURCE"
25 dnl Checks for library functions.
26 AC_CHECK_LIB(z, gzopen)
27 AC_CHECK_LIB(curses, initscr,, AC_CHECK_LIB(ncurses, initscr))
28 AC_CHECK_LIB(panel, new_panel)
30 dnl Checks for header files.
32 AC_CHECK_HEADERS(zlib.h limits.h sys/time.h unistd.h stdlib.h string.h)
33 AC_CHECK_HEADERS(curses.h ncurses.h panel.h getopt.h regex.h)
35 dnl Checks for typedefs, structures, and compiler characteristics.
40 dnl Checks for library functions.
44 AC_CHECK_FUNCS([bzero regcomp select strdup strerror strrchr vasprintf strsep])
46 AC_DEFINE_UNQUOTED([DEF_REGEX], ["^[[0-9]]+[[[:space:]]]*$"], [Default regular expression for the frame deliminator.])
47 AC_DEFINE([DEF_FPS], 15, [Default frames-per-second.])
48 AC_DEFINE([DEF_CUE], 7, [Default frame cue.])
49 AC_DEFINE([DEF_TIMEOUT], 30, [Default screensaver timeout for multiple files.])
50 AC_DEFINE([MAXFPS], 60, [Maximum frames-per-second.])
54 AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile])