File: configure.ac

package info (click to toggle)
qstat 2.11-3
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 2,128 kB
  • ctags: 2,545
  • sloc: ansic: 18,287; sh: 3,372; makefile: 40
file content (62 lines) | stat: -rw-r--r-- 1,296 bytes parent folder | download | duplicates (2)
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
AC_INIT([qstat],[2.11],[qstat-users@yahoogroups.com])
AC_CONFIG_SRCDIR([qstat.c])
AM_CONFIG_HEADER([gnuconfig.h])

AC_PREREQ(2.53)
AC_CANONICAL_HOST
AM_INIT_AUTOMAKE([1.6 foreign])

dnl Checks for programs.
AC_PROG_CC

dnl Checks for header files.
AC_HEADER_STDC

AC_CHECK_HEADER(sys/mman.h, [have_mman_h=yes])

case $host in
	*mingw32*)
		AC_MSG_NOTICE([compiling for $host, adding -lwsock32])
		LIBS="$LIBS -lwsock32"
	;;
esac

dnl check if user wants debug
AC_MSG_CHECKING([whether to enable debug output])
AC_ARG_ENABLE(debug,[  --disable-debug         turn off debugging code])
if test x$enable_debug != xno; then
	CPPFLAGS="$CPPFLAGS -DDEBUG"
	AC_MSG_RESULT([yes])
else
	AC_MSG_RESULT([no])
fi

AC_MSG_CHECKING([whether to enable packet dumps])
AC_ARG_ENABLE(dump,[  --enable-dump           enable packet dumps])
if test x$enable_dump != xno; then
	if test x$have_mman_h = xyes; then
		CPPFLAGS="$CPPFLAGS -DENABLE_DUMP"
		AC_MSG_RESULT([yes])
	else
		AC_MSG_RESULT([no, sys/mman.h missing])
	fi
else
	AC_MSG_RESULT([no])
fi

dnl Use -Wall if we have gcc.
changequote(,)dnl
if test "x$GCC" = "xyes"; then
  case " $CFLAGS " in
  *[\ \	]-Wall[\ \	]*) ;;
  *) CFLAGS="$CFLAGS -Wall" ;;
  esac
fi
changequote([,])dnl

AC_CONFIG_FILES([
	Makefile
	template/Makefile
	info/Makefile
])
AC_OUTPUT