~ubuntu-branches/ubuntu/saucy/urlview/saucy

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
56
57
58
59
AC_INIT(urlview.c)
AM_INIT_AUTOMAKE(urlview, 0.9)
dnl AM_CONFIG_HEADER(config.h)
AM_PROG_CC_STDC
CFLAGS="$CFLAGS -DURLVIEW -Dunix"
AC_ARG_WITH(slang, [  --with-slang[=DIR]      use S-Lang instead of curses],
	[AC_DEFINE(USE_SLANG)
	if test $withval = yes -a -d ../slang; then
		withval=../slang
	fi
	if test $withval != yes; then
		if test $withval/include; then
			CPPFLAGS="$CPPFLAGS -I$withval/include"
			LIBS="$LIBS -L$withval/lib -lslang -lm"
		else
			CPPFLAGS="$CPPFLAGS -I$withval/src"
			LIBS="$LIBS $withval/src/objs/libslang.a -lm"
		fi
	else
		if test -d /usr/include/slang; then
			CPPFLAGS="$CPPFLAGS -I/usr/include/slang"
		fi
		LIBS="$LIBS -lslang -lm"
	fi],

	[AC_CHECK_LIB(ncurses, initscr, [LIBS="$LIBS -lncurses"], [LIBS="$LIBS -lcurses"])
	AC_CHECK_FUNCS(curs_set)
	AC_CHECK_HEADERS(ncurses.h)
	AC_CHECK_HEADER(ncurses/curses.h, [CPPFLAGS="$CPPFLAGS -I/usr/include/ncurses"])])

AC_REPLACE_FUNCS(snprintf)

AC_ARG_WITH(rx, [  --with-rx=DIR           where to find librx],
[if test $withval != yes; then
	CPPFLAGS="$CPPFLAGS -I$withval"
	if test -d $withval/include; then
		CPPFLAGS=$CPPFLAGS/include
	fi

	if test -d $withval/lib; then
		LIBS="$LIBS $withval/lib/librx.a"
	else
		LIBS="$LIBS $withval/librx.a"
	fi
fi],
[AC_CHECK_FUNC(regcomp, [], [AC_CHECK_LIB(rx, regcomp, [LIBS="$LIBS -lrx"],
	[AC_MSG_ERROR(you must install GNU librx)])])
AC_CHECK_HEADERS(regex.h)
])

AC_CHECK_HEADERS(stdarg.h)
AC_CHECK_HEADERS(varargs.h)

AC_ARG_ENABLE(warnings, [  --enable-warnings       turn on compiler warnings],
[if test $enableval = yes; then
	CFLAGS="$CFLAGS -pedantic -ansi -Wall"
fi])

AC_OUTPUT(Makefile)