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 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192
|
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.13)
AC_INIT(src/gsint.h)
AM_INIT_AUTOMAKE(enscript, 1.6.3)
AM_CONFIG_HEADER(config.h)
AC_REVISION($Revision: 1.59 $)
AC_PROG_INSTALL
AC_ARG_WITH(cc,
[ --with-cc(=CC) use system's native compiler (or compiler CC)],
if test "X$withval" != "Xno"; then
if test "X$withval" = "Xyes"; then
CC='cc'
else
CC=$withval
fi
CFLAGS="$CFLAGS -I/usr/local/include"
LDFLAGS="$LDFLAGS -L/usr/local/lib"
echo "using compiler CC=$CC"
fi
)
if test "X$CC" = "X"; then
AC_PROG_CC
fi
AC_ISC_POSIX
AM_C_PROTOTYPES
AC_C_CONST
AC_FUNC_ALLOCA
AC_STDC_HEADERS
AC_HAVE_HEADERS(string.h stdlib.h unistd.h stdarg.h math.h pwd.h)
AC_HAVE_HEADERS(sys/types.h sys/stat.h)
dnl Check some functions.
AC_CHECK_FUNCS(strchr)
AC_CHECK_FUNC(strerror, AC_DEFINE(HAVE_STRERROR), [
LIBOBJS="$LIBOBJS strerror.o"
])
AC_CHECK_FUNC(memmove, AC_DEFINE(HAVE_MEMMOVE), [
LIBOBJS="$LIBOBJS memmove.o"
])
AC_CHECK_FUNC(memcpy, AC_DEFINE(HAVE_MEMCPY), [
LIBOBJS="$LIBOBJS memcpy.o"
])
AC_CHECK_FUNC(strtoul, AC_DEFINE(HAVE_STRTOUL), [
LIBOBJS="$LIBOBJS strtoul.o"
])
AC_CHECK_FUNC(getcwd, AC_DEFINE(HAVE_GETCWD), [
AC_CHECK_FUNC(getwd, AC_DEFINE(HAVE_GETWD))
])
AC_FUNC_VPRINTF
dnl -lsun is needed on IRIX-4.0 to get the user passwd entry through
dnl the yellow pages / NIS.
AC_CHECK_LIB(sun, main)
dnl Find out where the gethostname() is.
AC_CHECK_FUNC(gethostname, , [
AC_CHECK_LIB(nsl, gethostname, LIBS="$LIBS -lnsl", [
AC_CHECK_LIB(socket, gethostname)
])
])
AC_PROG_RANLIB
AC_PROG_YACC
AM_PROG_LEX
AC_ARG_ENABLE(debug,
[ --enable-debug enable debugging], [
echo enabling debugging
if test -n "$GCC"; then
CFLAGS="$CFLAGS -Wall"
fi
])
dnl Define the default output media.
AC_ARG_WITH(media,
[ --with-media(=MEDIA) use output media Letter (MEDIA), default is A4],
if test "X$withval" != "Xno"; then
if test "X$withval" = "Xyes"; then
ac_cv_value_media='Letter'
else
ac_cv_value_media=$withval
fi
else
ac_cv_value_media=${MEDIA-A4}
fi,
ac_cv_value_media=${MEDIA-A4}
)
MEDIA=$ac_cv_value_media
AC_SUBST(MEDIA)
dnl Find the printer spooler command.
AC_CHECK_PROG(SPOOLER, lpr, lpr)
AC_CHECK_PROG(SPOOLER, lp, lp)
dnl user can overwrite this
AC_ARG_WITH(spooler,
[ --with-spooler=SPOOLER set the printer spooler command],
if test "X$withval" != "Xno"; then
SPOOLER=$withval
fi
)
dnl If SPOOLER is still empty, set it to `lpr'. After this, we should
dnl be able to compile enscript on HURD.
if test "X$SPOOLER" = "X"; then
SPOOLER=lpr
fi
dnl The spooler queue param.
QUEUEPARAM="-P"
AC_ARG_WITH(queue-param,
[ --with-queue-param=PARAM specify the printer spooler queue parameter],
if test "X$withval" != "Xno"; then
QUEUEPARAM=$withval
fi
)
AC_SUBST(QUEUEPARAM)
dnl The PostScript language level.
PSLEVEL="2"
AC_ARG_WITH(ps-level,
[ --with-ps-level=LEVEL set the PostScript language level to LEVEL],
if test "X$withval" != "Xno"; then
PSLEVEL=$withval
fi
)
AC_SUBST(PSLEVEL)
dnl Internationalization.
ALL_LINGUAS="de es fi fr nl ru sl"
AM_GNU_GETTEXT
dnl Path separator character.
AC_DEFINE_UNQUOTED(PATH_SEPARATOR, ':')
AC_DEFINE_UNQUOTED(PATH_SEPARATOR_STR, ":")
dnl
dnl Scripts
dnl
dnl diffpp
AC_PATH_PROG(PERL, perl)
dnl substitutions
AC_SUBST(CFLAGS)
AC_SUBST(LDFLAGS)
AC_SUBST(LIBOBJS)
AC_OUTPUT([Makefile \
compat/Makefile \
afm/Makefile \
afmlib/Makefile \
src/Makefile \
src/tests/Makefile \
lib/Makefile \
scripts/Makefile \
intl/Makefile \
po/Makefile.in \
states/Makefile \
states/hl/Makefile \
states/tests/Makefile \
docs/Makefile \
w32/Makefile], [sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in >po/Makefile])
echo ""
echo "Enscript is now configured to your system with the following"
echo "user-definable options. Please, check that they are correct and"
echo "match to your system's properties."
echo ""
echo "Option Change with configure's option Current value"
echo "---------------------------------------------------------"
echo "Media --with-media=MEDIA $MEDIA"
echo "Spooler --with-spooler=SPOOLER $SPOOLER"
echo "PS level --with-ps-level=LEVEL $PSLEVEL"
echo "QueueParam --with-queue-param=PARAM $QUEUEPARAM"
echo ""
|