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