1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT([GNU Enscript],[1.6.4.91],[bug-enscript@gnu.org])
4 AC_CONFIG_SRCDIR([src/gsint.h])
5 AC_CONFIG_HEADERS([config.h])
13 AC_USE_SYSTEM_EXTENSIONS
20 AC_CHECK_HEADERS([string.h stdlib.h unistd.h stdarg.h math.h pwd.h])
21 AC_CHECK_HEADERS([sys/types.h sys/stat.h])
23 dnl Check some functions.
24 AC_CHECK_FUNCS(strchr getcwd)
25 AC_REPLACE_FUNCS(strerror memmove memcpy strtoul)
28 dnl -lsun is needed on IRIX-4.0 to get the user passwd entry through
29 dnl the yellow pages / NIS.
30 AC_CHECK_LIB(sun, main)
32 dnl Find out where the gethostname() is.
33 AC_CHECK_FUNC(gethostname, , [
34 AC_CHECK_LIB(nsl, gethostname, LIBS="$LIBS -lnsl", [
35 AC_CHECK_LIB(socket, gethostname)
44 [ --enable-debug enable debugging], [
45 echo enabling debugging
46 if test -n "$GCC"; then
47 CFLAGS="$CFLAGS -Wall"
51 dnl Define the default output media.
54 [ --with-media(=MEDIA) use output media Letter (MEDIA), default is A4],
55 if test "X$withval" != "Xno"; then
56 if test "X$withval" = "Xyes"; then
57 ac_cv_value_media='Letter'
59 ac_cv_value_media=$withval
62 ac_cv_value_media=${MEDIA-A4}
64 ac_cv_value_media=${MEDIA-A4}
66 MEDIA=$ac_cv_value_media
69 dnl Find the printer spooler command.
71 AC_CHECK_PROG(SPOOLER, lpr, lpr)
72 AC_CHECK_PROG(SPOOLER, lp, lp)
74 dnl user can overwrite this
76 [ --with-spooler=SPOOLER set the printer spooler command],
77 if test "X$withval" != "Xno"; then
82 dnl If SPOOLER is still empty, set it to `lpr'. After this, we should
83 dnl be able to compile enscript on HURD.
84 if test "X$SPOOLER" = "X"; then
88 dnl The PostScript language level.
91 [ --with-ps-level=LEVEL set the PostScript language level to LEVEL],
92 if test "X$withval" != "Xno"; then
98 dnl Internationalization.
100 AM_GNU_GETTEXT_VERSION([0.17])
102 dnl Path separator character.
103 AC_DEFINE_UNQUOTED([PATH_SEPARATOR], [':'],
104 [Character used to separate path components.])
105 AC_DEFINE_UNQUOTED([PATH_SEPARATOR_STR], [":"],
106 [Character used to separate path components, as string.])
114 AC_PATH_PROG(PERL, perl)
121 AC_CONFIG_FILES([Makefile po/Makefile.in intl/Makefile po/Makefile \
131 states/tests/Makefile \
139 echo "Enscript is now configured to your system with the following"
140 echo "user-definable options. Please, check that they are correct and"
141 echo "match to your system's properties."
143 echo "Option Change with configure's option Current value"
144 echo "---------------------------------------------------------"
145 echo "Media --with-media=MEDIA $MEDIA"
146 echo "Spooler --with-spooler=SPOOLER $SPOOLER"
147 echo "PS level --with-ps-level=LEVEL $PSLEVEL"