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
|
dnl configure.in -- Process this file with autoconf to produce a configure script.
dnl Epson Inkjet Printer Driver (ESC/P-R) for Linux
dnl Copyright (C) 2006-2009 AVASYS CORPORATION.
dnl Copyright (C) Seiko Epson Corporation 2006-2012.
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.
dnl
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA.
AC_PREREQ(2.53)
AC_INIT([Epson Laser Printer Driver (ESC/Page) for Linux],
[1.0.1],
[Seiko Epson Corporation <linux-printer@epson.jp>],
[epson-laser-printer-escpage])
AC_SUBST(PACKAGE_RELEASE, [1])
AC_SUBST(LSB_VER, [3.2])
AC_SUBST(VENDOR_NAME, ["Seiko Epson Corporation"])
AC_CONFIG_HEADER([config.h])
AC_CONFIG_SRCDIR(src/filter.c)
LIBARCH=lib32
BUILD_MACHINE_ARCH=`uname -m`
if test "x$BUILD_MACHINE_ARCH" = "xx86_64"; then
LIBARCH=lib64
fi
AC_SUBST(LIBARCH)
AM_INIT_AUTOMAKE([gnu 1.7])
dnl Checks for programs.
AC_PROG_CC
AC_C_CONST
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_LIBTOOL
AM_PROG_CC_C_O
dnl Checks for argments.
AC_CHECK_PROG([have_cups_config], [cups-config], [yes], [no])
if test "xNONE" != "x${prefix}" ; then
cups_default_prefix="${prefix}"
else
cups_default_prefix="${ac_default_prefix}"
fi
AC_ARG_WITH([cupsfilterdir],
[AS_HELP_STRING([--with-cupsfilterdir=DIR],
[CUPS binary directory, where filters are stored.])],
[],
[with_cupsfilterdir=no])
if test "xno" = "x${with_cupsfilterdir}"; then
if test "xyes" = "x$have_cups_config" ; then
dnl `@<:@' , `@:>@' are replaced with `[' , `]'
CUPS_FILTER_DIR="${cups_default_prefix}`cups-config --serverbin | sed -e 's,^/@<:@^/@:>@@<:@^/@:>@*,,'`/filter"
else
CUPS_FILTER_DIR="${cups_default_prefix}/lib/cups/filter"
fi
else
CUPS_FILTER_DIR="${with_cupsfilterdir}"
fi
AC_ARG_WITH([cupsppddir],
[AS_HELP_STRING([--with-cupsppddir=DIR],
[CUPS ppd directory])],
[],
[with_cupsppddir=no])
if test "xno" = "x${with_cupsppddir}"; then
if test -d "${cups_default_prefix}/share/ppd" ; then
CUPS_PPD_DIR="${cups_default_prefix}/share/ppd"
elif test "xyes" = "x$have_cups_config" ; then
dnl `@<:@' , `@:>@' are replaced with `[' , `]'
CUPS_PPD_DIR="${cups_default_prefix}/`cups-config --datadir | sed -e 's,^/@<:@^/@:>@@<:@^/@:>@*,,'`/model"
else
CUPS_PPD_DIR="${cups_default_prefix}/share/cups/model"
fi
else
CUPS_PPD_DIR="${with_cupsppddir}"
fi
AC_SUBST(CUPS_FILTER_DIR)
AC_SUBST(CUPS_PPD_DIR)
dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_STAT
AC_HEADER_TIME
AC_STRUCT_TM
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_CHECK_HEADERS([\
cups/cups.h \
cups/ppd.h \
cups/raster.h \
])
AC_CHECK_HEADERS([\
ctype.h \
errno.h \
fcntl.h \
malloc.h \
signal.h \
stdarg.h \
stddef.h \
stdlib.h \
string.h \
sys/stat.h \
sys/types.h \
time.h \
unistd.h \
])
# Checks for libraries.
AC_CHECK_LIB([cups], [ppdOpenFile])
AC_CHECK_LIB([cupsimage], [cupsRasterOpen])
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_MEMCMP
AC_TYPE_SIGNAL
AC_CHECK_FUNCS([\
memset \
strcspn \
strerror \
strrchr \
])
AC_CONFIG_FILES([\
Makefile \
lib/Makefile \
epson-laser-printer-escpage.spec \
ppd/Makefile \
src/Makefile \
])
AC_OUTPUT
|