More Solaris build fixes from Steve Christensen <steve AT
[cave.git] / configure.ac
blobc732768b4e4d17f859e8e92db798f9fe6f7db717
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)
4 AC_CANONICAL_TARGET
5 AM_INIT_AUTOMAKE([foreign])
6 AC_PROG_MAKE_SET
7 AC_CONFIG_SRCDIR([src/cave.c])
8 AM_CONFIG_HEADER([config.h])
10 case "$target_os" in
11     darwin*)
12         LDFLAGS="$LDFLAGS -flat_namespace -L/sw/lib"
13         CPPFLAGS="$CPPFLAGS -I/sw/include -L/sw/lib"
14         ;;
15     *)
16         ;;
17 esac
19 dnl Checks for programs.
20 AC_PROG_CC
21 AC_PROG_INSTALL
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.
31 AC_HEADER_STDC
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.
36 AC_C_CONST
37 AC_TYPE_SIZE_T
38 AC_HEADER_TIME
40 dnl Checks for library functions.
41 AC_FUNC_MALLOC
42 AC_TYPE_SIGNAL
43 AC_FUNC_STAT
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.])
52 AM_WITH_DMALLOC
54 AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile])
55 AC_OUTPUT