summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDidier Raboud <didier@raboud.com>2010-05-22 22:10:37 +0200
committerDidier Raboud <didier@raboud.com>2010-05-22 22:10:37 +0200
commit9d70f1da8e673dff58e8eae08bdfd6c75bb9f6d0 (patch)
tree252de4be67316f2206649e52eb1d3a391b4d1d6f /configure.ac
parent6844c39134d7f98a0b22ac570c89e9cf8b2c311c (diff)
parentd2c0cf34bcd17f14f0e77b1df81bc993da8254e8 (diff)
Merge branch 'upstream'
Diffstat (limited to 'configure.ac')
-rwxr-xr-xconfigure.ac80
1 files changed, 80 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
new file mode 100755
index 0000000..d28b8fc
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,80 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_INIT(foomatic-rip.in)
+
+dnl If the user didn't specify the $sysconfdir on the command line, let it
+dnl be /etc, not /usr/local/etc or /usr/etc
+dnl if [[ x$sysconfdir = 'x${prefix}/etc' ]]; then
+dnl sysconfdir=/etc
+dnl fi
+
+dnl Checks for programs.
+AC_PROG_INSTALL
+AC_PROG_LN_S
+AC_PROG_MAKE_SET
+
+ETCSEARCHPATH=${prefix}/etc:/usr/etc:/usr/local/etc
+LIBSEARCHPATH=${prefix}/lib:/usr/lib:/usr/local/lib:${prefix}/libexec:/usr/libexec:/usr/local/libexec
+
+dnl Get the operating system and version number...
+uname=`uname`
+uversion=`uname -r | sed -e '1,$s/[[^0-9]]//g'`
+if test x$uname = xIRIX64; then
+ uname="IRIX"
+fi
+
+if test x$uname = xIRIX; then
+ ETCSEARCHPATH="/usr/freeware/etc:$ETCSEARCHPATH"
+ LIBSEARCHPATH="/usr/freeware/lib32:/usr/freeware/lib:$LIBSEARCHPATH"
+fi
+
+dnl Check for Perl
+AC_PATH_PROG(PERL,perl)
+
+if test -z "$PERL"; then
+ AC_MSG_ERROR([Perl 5 is required to build and run]);
+fi
+
+dnl Check for /etc/printcap
+AC_PATH_DIR(PRINTCAP,printcap,/etc/printcap,$ETCSEARCHPATH)
+
+dnl Check for /usr/lib/cups
+AC_PATH_DIR(CUPS,cups,/usr/lib/cups,$LIBSEARCHPATH)
+
+dnl Check for /usr/lib/cups/filter
+AC_PATH_DIR(CUPS_FILTERS,cups/filter,/usr/lib/cups/filter,$LIBSEARCHPATH)
+
+dnl Check for /usr/lib/cups/backend
+AC_PATH_DIR(CUPS_BACKENDS,cups/backend,/usr/lib/cups/backend,$LIBSEARCHPATH)
+
+dnl Check for /usr/lib/ppr
+AC_PATH_DIR(PPR,ppr,/usr/lib/ppr,$LIBSEARCHPATH)
+
+dnl Check for /usr/lib/ppr/interfaces
+AC_PATH_DIR(PPR_INTERFACES,ppr/interfaces,/usr/lib/ppr/interfaces,$LIBSEARCHPATH)
+
+dnl Check for /usr/lib/ppr/lib
+AC_PATH_DIR(PPR_LIB,ppr/lib,/usr/lib/ppr/lib,$LIBSEARCHPATH)
+
+AC_ARG_ENABLE(file-converter-check, [ --enable-file-converter-check check whether a file converter is installed [default=yes]],
+[if eval "test x${enableval} = xno"; then
+ NOCONVERTERCHECK=1
+ AC_MSG_WARN([Absence of a file converter is ignored, package will be built anyway])
+fi])
+
+dnl Check for a2ps, enscript, mpage
+AC_PATH_PROG(A2PS,a2ps)
+AC_PATH_PROG(ENSCRIPT,enscript)
+AC_PATH_PROG(MPAGE,mpage)
+AC_PATH_PROG(TEXTTOPS,texttops,,$CUPS_FILTERS)
+
+if test "${NOCONVERTERCHECK}" = "" -a "${A2PS}" = "" -a "${ENSCRIPT}" = "" -a "${MPAGE}" = "" -a "${TEXTTOPS}" = "" ; then
+ AC_MSG_ERROR([cannot find a2ps, enscript, mpage, or CUPS' texttops. You need to have at least one installed]);
+fi
+
+dnl AC_OUTPUT(Makefile src/Makefile)
+AC_OUTPUT(Makefile makeMan foomatic-gswrapper foomatic-rip beh)
+
+dnl Finished
+echo "Finished configuring."
+echo "Type 'make' to build the package"
+echo "then 'make install' to install it."