File: configure.in

package info (click to toggle)
mtr 0.28-0.2
  • links: PTS
  • area: main
  • in suites: slink
  • size: 404 kB
  • ctags: 368
  • sloc: ansic: 2,905; sh: 282; makefile: 60
file content (48 lines) | stat: -rw-r--r-- 1,259 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
AC_INIT(mtr.c)
AM_INIT_AUTOMAKE(mtr, 0.28)

AC_SUBST(GTK_OBJ)
AC_SUBST(CURSES_OBJ)

GTK_OBJ=gtk.o
CURSES_OBJ=curses.o

AC_PROG_CC

AC_CHECK_SIZEOF(unsigned char, 1)
AC_CHECK_SIZEOF(unsigned short, 2)
AC_CHECK_SIZEOF(unsigned int, 4)
AC_CHECK_SIZEOF(unsigned long, 4)

AC_CHECK_FUNC(initscr, , 
  AC_CHECK_LIB(ncurses, initscr, , 
    AC_CHECK_LIB(curses, initscr, , 
	AC_MSG_WARN(Building without curses display support)
	AC_DEFINE(NO_CURSES)
	CURSES_OBJ=)))
AC_CHECK_HEADERS(ncurses.h ncurses/curses.h curses.h)
AC_CHECK_HEADERS(sys/xti.h)

AC_CHECK_LIB(m, floor, , AC_MSG_ERROR(No math library found))

AM_PATH_GTK(1.0.0, CFLAGS="$CFLAGS $GTK_CFLAGS"
		   LIBS="$LIBS $GTK_LIBS",
		   AC_MSG_WARN(Building without GTK+ display support)
		   AC_DEFINE(NO_GTK)
		   GTK_OBJ=)

AC_CHECK_FUNC(socket, , 
  AC_CHECK_LIB(socket, socket, , AC_MSG_ERROR(No socket library found)))

AC_CHECK_FUNC(gethostbyname, ,
  AC_CHECK_LIB(nsl, gethostbyname, , AC_MSG_ERROR(No nameservice library found)))

AC_CHECK_FUNC(res_mkquery, , 
  AC_CHECK_LIB(resolv, res_mkquery, , AC_MSG_ERROR(No resolver library found)))

AC_CHECK_FUNC(herror, , AC_DEFINE(NO_HERROR))
AC_CHECK_FUNC(strerror, , AC_DEFINE(NO_STRERROR))

AM_CONFIG_HEADER(config.h)
AC_OUTPUT(Makefile img/Makefile)