1AC_INIT(mymoon.c)
2AC_HEADER_STDC
3AC_ARG_PROGRAM
4AC_PROG_INSTALL
5AC_CHECK_HEADERS(sys/types.h unistd.h time.h stdlib.h signal.h)
6PACKAGE=mymoon
7VERSION=1.0
8AC_CHECK_HEADERS(ncurses.h curses.h libnova.h math.h)
9LNOVA_LIB_NAME=""
10AC_CHECK_LIB(nova, get_ln_version, CURSES_LIB="-lnova" LNOVA_LIB_NAME=nova)
11
12CURSES_LIB_NAME=""
13AC_CHECK_LIB(ncurses, tgetent, CURSES_LIB="-lncurses" CURSES_LIB_NAME=ncurses)
14
15if eval "test x$CURSES_LIB_NAME = x"
16then
17    AC_CHECK_LIB(curses, tgetent, CURSES_LIB="-lcurses" CURSES_LIB_NAME=curses)
18fi
19
20if eval "test x$CURSES_LIB_NAME = x"
21then
22    AC_CHECK_LIB(termcap, tgetent, CURSES_LIB="-ltermcap" CURSES_LIB_NAME=termcap)
23fi
24
25if eval "test x$CURSES_LIB_NAME = x"
26then
27    AC_MSG_ERROR([
28*** No termcap lib available, consider getting the official ncurses
29*** distribution from ftp://ftp.gnu.org/pub/gnu/ncurses if you get
30*** errors compiling mymoon.])
31die
32else
33    AC_MSG_RESULT("Using $CURSES_LIB_NAME as the termcap library")
34fi
35
36
37
38
39if eval "test x$LNOVA_LIB_NAME = x"
40then
41    AC_MSG_ERROR([
42*** No libnova available, consider getting libnova
43*** from http://libnova.sourceforge.net if you get
44*** errors compiling mymoon.])
45else
46    AC_MSG_RESULT("Using $LNOVA_LIB_NAME for lunar functions")
47fi
48
49
50
51
52
53
54
55AC_OUTPUT(Makefile)
56