[go: up one dir, main page]

File: configure.in

package info (click to toggle)
trueprint 5.3-1.1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,728 kB
  • ctags: 731
  • sloc: ansic: 8,296; sh: 1,089; makefile: 138
file content (67 lines) | stat: -rw-r--r-- 1,628 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
63
64
65
66
67
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/debug.c)
AC_CONFIG_AUX_DIR(config)

dnl Generate config.h
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(trueprint,5.3)

dnl Checks for programs.
AC_PROG_CC
AC_PROG_RANLIB

dnl Need this two-stage search for diff so we end
dnl up with either a defined variable with the value of the
dnl command or an undefined variable

AC_PATH_PROG(GOT_DIFF_CMD,diff)
if test -n "$GOT_DIFF_CMD" ; then
    AC_DEFINE_UNQUOTED(DIFF_CMD,"$GOT_DIFF_CMD")
else
    AC_MSG_WARN(Cannot find diff command - diff features will not be built)
fi

AC_PATH_PROGS(PRINT_CMD,lpr lp)

AC_DEFINE_UNQUOTED(PRINT_CMD,"$PRINT_CMD")

dnl Set the count flag depending on the variety of lp/lpr that we find
case "$PRINT_CMD" in
*/lp) 
	AC_DEFINE(PRINT_CMD_DEST_FLAG,"-d")
	AC_DEFINE(PRINT_CMD_COUNT_FLAG,"-n")
	;;
*/lpr)
	AC_DEFINE(PRINT_CMD_DEST_FLAG,"-P")
# Need to disable the m4 commenting stuff, otherwise it thinks the '#'
# is the start of a comment...
changecom
	AC_DEFINE(PRINT_CMD_COUNT_FLAG,"-#")
changecom()
	;;
*)
	AC_MSG_ERROR(Cannot find either an lpr command or an lp command)
	;;
esac

dnl Checks for libraries.

dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h libintl.h)

dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_STRUCT_TM

TRUEPRINT_VAR_SYS_ERRLIST

dnl Checks for library functions.
AC_FUNC_VPRINTF
AC_REPLACE_FUNCS(strerror strdup strtol gettext)

AC_OUTPUT(Makefile replace/Makefile src/Makefile doc/Makefile tests/Makefile)