1 dnl Process this file with autoconf to produce a configure script.
3 AC_CONFIG_AUX_DIR(config)
4 AM_CONFIG_HEADER(config.h)
7 AM_CONFIG_HEADER(config.h)
8 AM_INIT_AUTOMAKE(trueprint,5.3.1b)
10 dnl Checks for programs.
14 dnl Need this two-stage search for diff so we end
15 dnl up with either a defined variable with the value of the
16 dnl command or an undefined variable
18 AC_PATH_PROG(GOT_DIFF_CMD,diff)
19 if test -n "$GOT_DIFF_CMD" ; then
20 AC_DEFINE_UNQUOTED(DIFF_CMD,"$GOT_DIFF_CMD")
22 AC_MSG_WARN(Cannot find diff command - diff features will not be built)
25 AC_PATH_PROGS(PRINT_CMD,lpr lp)
27 AC_DEFINE_UNQUOTED(PRINT_CMD,"$PRINT_CMD")
29 dnl Set the count flag depending on the variety of lp/lpr that we find
32 AC_DEFINE(PRINT_CMD_DEST_FLAG,"-d")
33 AC_DEFINE(PRINT_CMD_COUNT_FLAG,"-n")
36 AC_DEFINE(PRINT_CMD_DEST_FLAG,"-P")
37 # Need to disable the m4 commenting stuff, otherwise it thinks the '#'
38 # is the start of a comment...
40 AC_DEFINE(PRINT_CMD_COUNT_FLAG,"-#")
44 AC_MSG_ERROR(Cannot find either an lpr command or an lp command)
48 dnl Checks for libraries.
50 AC_CHECK_LIB(intl,gettext)
52 dnl Checks for header files.
55 AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h libintl.h)
57 dnl Checks for typedefs, structures, and compiler characteristics.
64 TRUEPRINT_VAR_SYS_ERRLIST
66 dnl Checks for library functions.
68 AC_REPLACE_FUNCS(strerror strdup strtol gettext)
70 AC_OUTPUT(Makefile replace/Makefile src/Makefile doc/Makefile tests/Makefile)