source: trunk/third/enscript/configure.in @ 17620

Revision 17620, 3.8 KB checked in by ghudson, 22 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r17619, which included commits to RCS files with non-trunk default branches.
RevLine 
[17619]1dnl Process this file with autoconf to produce a configure script.
2
3AC_PREREQ(2.12)
4
5AC_INIT(src/gsint.h)
6AM_INIT_AUTOMAKE(enscript, 1.6.1)
7AM_CONFIG_HEADER(config.h)
8
9AC_REVISION($Revision: 1.1.1.1 $)
10
11AM_PROG_INSTALL
12
13AC_ARG_WITH(cc,
14[  --with-cc(=CC)         use system's native compiler (or compiler CC)],
15  if test "X$withval" != "Xno"; then
16    if test "X$withval" = "Xyes"; then
17      CC='cc'
18    else
19      CC=$withval
20    fi
21    CFLAGS="$CFLAGS -I/usr/local/include"
22    LDFLAGS="$LDFLAGS -L/usr/local/lib"
23    echo "using compiler CC=$CC"
24  fi
25)
26
27if test "X$CC" = "X"; then
28  AC_PROG_CC
29fi
30
31AC_ISC_POSIX
32AM_C_PROTOTYPES
33
34AC_C_CONST
35AC_FUNC_ALLOCA
36
37AC_STDC_HEADERS
38AC_HAVE_HEADERS(string.h stdlib.h unistd.h stdarg.h math.h pwd.h)
39
40dnl Check some functions.
41AC_CHECK_FUNCS(strchr)
42AC_CHECK_FUNC(strerror, AC_DEFINE(HAVE_STRERROR), [
43  LIBOBJS="$LIBOBJS strerror.o"
44])
45AC_CHECK_FUNC(memmove, AC_DEFINE(HAVE_MEMMOVE), [
46  LIBOBJS="$LIBOBJS memmove.o"
47])
48AC_CHECK_FUNC(memcpy, AC_DEFINE(HAVE_MEMCPY), [
49  LIBOBJS="$LIBOBJS memcpy.o"
50])
51AC_CHECK_FUNC(strtoul, AC_DEFINE(HAVE_STRTOUL), [
52  LIBOBJS="$LIBOBJS strtoul.o"
53])
54
55AC_CHECK_FUNC(getcwd, AC_DEFINE(HAVE_GETCWD), [
56  AC_CHECK_FUNC(getwd, AC_DEFINE(HAVE_GETWD))
57])
58
59AC_FUNC_VPRINTF
60
61dnl -lsun is needed on IRIX-4.0 to get the user passwd entry through
62dnl the yellow pages / NIS.
63AC_CHECK_LIB(sun, main)
64
65dnl Find out where the gethostname() is.
66AC_CHECK_FUNC(gethostname, , AC_CHECK_LIB(nsl, main))
67
68AC_PROG_RANLIB
69AC_PROG_YACC
70AM_PROG_LEX
71
72AC_ARG_ENABLE(debug,
73[  --enable-debug         enable debugging], [
74  echo enabling debugging
75  if test -n "$GCC"; then
76    CFLAGS="$CFLAGS -Wall"
77  fi
78])
79
80dnl Define the default output media.
81
82AC_ARG_WITH(media,
83[  --with-media(=MEDIA)   use output media Letter (MEDIA), default is A4],
84  if test "X$withval" != "Xno"; then
85    if test "X$withval" = "Xyes"; then
86      ac_cv_value_media='Letter'
87    else
88      ac_cv_value_media=$withval
89    fi
90  else
91    ac_cv_value_media=${MEDIA-A4}
92  fi,
93  ac_cv_value_media=${MEDIA-A4}
94)
95MEDIA=$ac_cv_value_media
96AC_SUBST(MEDIA)
97
98dnl Find the printer spooler command.
99
100AC_CHECK_PROG(SPOOLER, lpr, lpr)
101AC_CHECK_PROG(SPOOLER, lp, lp)
102
103dnl user can overwrite this
104AC_ARG_WITH(spooler,
105[  --with-spooler=SPOOLER  set the printer spooler command],
106  if test "X$withval" != "Xno"; then
107    SPOOLER=$withval
108  fi
109)
110
111dnl If SPOOLER is still empty, set it to `lpr'.  After this, we should
112dnl be able to compile enscript on HURD.
113if test "X$SPOOLER" = "X"; then
114  SPOOLER=lpr
115fi
116
117dnl The PostScript language level.
118PSLEVEL="2"
119AC_ARG_WITH(ps-level,
120[  --with-ps-level=LEVEL   set the PostScript language level to LEVEL],
121  if test "X$withval" != "Xno"; then
122    PSLEVEL=$withval
123  fi
124)
125AC_SUBST(PSLEVEL)
126
127dnl Internationalization.
128ALL_LINGUAS="de es fi fr nl sl"
129AM_GNU_GETTEXT
130AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
131
132dnl Path separator character.
133AC_DEFINE_UNQUOTED(PATH_SEPARATOR, ':')
134
135dnl
136dnl Scripts
137dnl
138
139dnl diffpp
140
141AC_PATH_PROG(PERL, perl)
142
143dnl substitutions
144
145AC_SUBST(CFLAGS)
146AC_SUBST(LDFLAGS)
147AC_SUBST(LIBOBJS)
148
149AC_OUTPUT([Makefile enscript.1 compat/Makefile afm/Makefile afmlib/Makefile src/Makefile lib/Makefile scripts/Makefile intl/Makefile po/Makefile.in states/Makefile states/states.1 states/tests/Makefile tests/Makefile], [sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in >po/Makefile])
150
151echo ""
152
153echo "Enscript is now configured to your system with the following"
154echo "user-definable options.  Please, check that they are correct and"
155echo "match to your system's properties."
156echo ""
157echo "Option     Change with configure's option   Current value"
158echo "---------------------------------------------------------"
159echo "Media      --with-media=MEDIA               $MEDIA"
160echo "Spooler    --with-spooler=SPOOLER           $SPOOLER"
161echo "PS level   --with-ps-level=LEVEL            $PSLEVEL"
162echo ""
Note: See TracBrowser for help on using the repository browser.