File: configure.in

package info (click to toggle)
ntaim 998020954-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 672 kB
  • ctags: 560
  • sloc: ansic: 7,976; sh: 2,651; makefile: 90
file content (72 lines) | stat: -rw-r--r-- 1,756 bytes parent folder | download
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
60
61
62
63
64
65
66
67
68
69
70
71
72
AC_INIT(src/ntaim.c)
PACKAGE=ntaim
VERSION=0.0.1
AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
AM_CONFIG_HEADER(src/config.h)

AC_PROG_CC
AC_CHECK_PROG(MAKE, gmake, "gmake", "make")
AC_PROG_RANLIB
AC_CHECK_PROG(AR, ar, "ar", "gar")
AM_PROG_CC_STDC
AC_PROG_INSTALL
AC_PROG_MAKE_SET

CFLAGS="-O3"

AC_ARG_ENABLE(debug, [  --enable-debug          turn on debugging [default=no]],
if eval "test x$enable_debug = xyes"; then
  CFLAGS="$CFLAGS -g -DDEBUG"
fi)
AC_ARG_ENABLE(static, [  --enable-static         build a static binary [default=no]],
if eval "test x$enable_static = xyes"; then
  LDFLAGS="$LDFLAGS -static"
fi)

ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"

if eval "test x$GCC = xyes"; then
  case " $CFLAGS " in
  *[\ \	]-Wall[\ \	]*) ;;
  *) CFLAGS="$CFLAGS -Wall" ;;
  esac
fi

AC_HEADER_STDC
AC_CHECK_HEADERS(stdarg.h ctype.h stdlib.h errno.h sys/errno.h sys/stat.h)
AC_CHECK_HEADERS(time.h sys/time.h)
AC_HEADER_TIME
AC_TYPE_SIGNAL

AC_CHECK_LIB(resolv, inet_aton)
AC_CHECK_LIB(socket, socket)
AC_CHECK_LIB(nsl, connect)
AC_CHECK_LIB(dns, gethostbyname)

AC_CHECK_HEADERS(ncurses.h)
if test "$ac_cv_header_ncurses_h" = "no"; then
	AC_CHECK_HEADERS(curses.h)
	if test "$ac_cv_header_curses_h" = "no"; then
		echo "unable to find curses headers, probably not installed"
		echo "nTAIM can not run without the cureses library"
	fi
fi

AC_CHECK_LIB(ncurses, initscr,
	CURSESLIB="-lncurses",
	AC_CHECK_LIB(curses, initscr,
		CURSESLIB="-lcurses",
		AC_MSG_WARN(unable to find a curses library -- FATAL);
		exit
	)
)

if test "$ac_cv_header_ncurses_h" = "yes"; then
	AC_CHECK_LIB(ncurses, resizeterm, 
	CFLAGS="$CFLAGS -DRESIZEABLE -DHASRESIZETERM",
	CFLAGS="$CFLAGS -DRESIZEABLE")
fi

AC_SUBST(CURSESLIB)

AC_OUTPUT([Makefile src/Makefile firetalk/Makefile])