1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
AC_PREREQ(2.68)
AC_INIT([ufed],[git],[https://bugs.gentoo.org/])
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_SRCDIR([ufed-curses.c])
AC_CONFIG_HEADERS([config.h])
AC_PROG_CC
AC_PROG_CC_C99
if test "$ac_cv_prog_cc_c99" != no
then
CFLAGS="$CFLAGS -Wall -Wextra -pedantic"
CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600"
else
AC_PROG_CC_C89
AC_C_INLINE
CFLAGS="$CFLAGS -Wall -W"
CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
fi
CFLAGS="${CFLAGS} -Wmissing-prototypes -Wstrict-prototypes"
PKG_PROG_PKG_CONFIG
AC_TYPE_SIZE_T
AC_CHECK_HEADER_STDBOOL
curses="default"
HAVE_CURSES=0
AC_ARG_WITH([curses],
[AS_HELP_STRING([--with-curses], [override default curses library (ncursesw ncurses curses)])],
[curses=$withval])
dnl try user option first
dnl ---------------------
AS_IF([test "x$curses" != "xdefault"], [
PKG_CHECK_MODULES([NCURSES], [$curses], [HAVE_CURSES=1])
])
dnl otherwise check the defaults
dnl ----------------------------
AS_IF([test "x$HAVE_CURSES" = "x0"], [
PKG_CHECK_MODULES([NCURSES], [ncursesw], [HAVE_CURSES=1], [
PKG_CHECK_MODULES([NCURSES], [ncurses], [HAVE_CURSES=1], [
PKG_CHECK_MODULES([NCURSES], [curses], [HAVE_CURSES=1], [
AC_MSG_ERROR([No valid ncurses installation found])])
])
])
])
AC_PATH_PROG([PERL], [perl], [])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
|