1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(enscript, 1.6.4, mtr@iki.fi)
3 AC_CONFIG_SRCDIR([src/gsint.h])
8 AM_CONFIG_HEADER(config.h)
10 AC_REVISION($Revision: 1.1.1.1 $)
15 [ --with-cc(=CC) use system's native compiler (or compiler CC)],
16 if test "X$withval" != "Xno"; then
17 if test "X$withval" = "Xyes"; then
22 CFLAGS="$CFLAGS -I/usr/local/include"
23 LDFLAGS="$LDFLAGS -L/usr/local/lib"
24 echo "using compiler CC=$CC"
28 if test "X$CC" = "X"; then
39 AC_HAVE_HEADERS(string.h stdlib.h unistd.h stdarg.h math.h pwd.h)
40 AC_HAVE_HEADERS(sys/types.h sys/stat.h)
42 dnl Check some functions.
43 AC_CHECK_FUNCS(strchr getcwd)
44 AC_REPLACE_FUNCS(strerror memmove memcpy strtoul)
47 dnl -lsun is needed on IRIX-4.0 to get the user passwd entry through
48 dnl the yellow pages / NIS.
49 AC_CHECK_LIB(sun, main)
51 dnl Find out where the gethostname() is.
52 AC_CHECK_FUNC(gethostname, , [
53 AC_CHECK_LIB(nsl, gethostname, LIBS="$LIBS -lnsl", [
54 AC_CHECK_LIB(socket, gethostname)
63 [ --enable-debug enable debugging], [
64 echo enabling debugging
65 if test -n "$GCC"; then
66 CFLAGS="$CFLAGS -Wall"
70 dnl Define the default output media.
73 [ --with-media(=MEDIA) use output media Letter (MEDIA), default is A4],
74 if test "X$withval" != "Xno"; then
75 if test "X$withval" = "Xyes"; then
76 ac_cv_value_media='Letter'
78 ac_cv_value_media=$withval
81 ac_cv_value_media=${MEDIA-A4}
83 ac_cv_value_media=${MEDIA-A4}
85 MEDIA=$ac_cv_value_media
88 dnl Find the printer spooler command.
90 AC_CHECK_PROG(SPOOLER, lpr, lpr)
91 AC_CHECK_PROG(SPOOLER, lp, lp)
93 dnl user can overwrite this
95 [ --with-spooler=SPOOLER set the printer spooler command],
96 if test "X$withval" != "Xno"; then
101 dnl If SPOOLER is still empty, set it to `lpr'. After this, we should
102 dnl be able to compile enscript on HURD.
103 if test "X$SPOOLER" = "X"; then
107 dnl The PostScript language level.
109 AC_ARG_WITH(ps-level,
110 [ --with-ps-level=LEVEL set the PostScript language level to LEVEL],
111 if test "X$withval" != "Xno"; then
117 dnl Internationalization.
118 ALL_LINGUAS="de es fi fr nl ru sl"
121 dnl Path separator character.
122 AC_DEFINE_UNQUOTED(PATH_SEPARATOR, ':')
123 AC_DEFINE_UNQUOTED(PATH_SEPARATOR_STR, ":")
131 AC_PATH_PROG(PERL, perl)
138 AC_CONFIG_FILES([Makefile po/Makefile.in m4/Makefile intl/Makefile po/Makefile \
148 states/tests/Makefile \
151 AC_CONFIG_COMMANDS([default],[[ echo timestamp > stamp-h ]], [[]])
156 echo "Enscript is now configured to your system with the following"
157 echo "user-definable options. Please, check that they are correct and"
158 echo "match to your system's properties."
160 echo "Option Change with configure's option Current value"
161 echo "---------------------------------------------------------"
162 echo "Media --with-media=MEDIA $MEDIA"
163 echo "Spooler --with-spooler=SPOOLER $SPOOLER"
164 echo "PS level --with-ps-level=LEVEL $PSLEVEL"