#!/bin/sh
#
# FILE NAME:  sysv/makepros
#
# Script to make a System V interface program for Axis print servers
# using the PROS protocol.
#
# (C) Copyright 1993, Axis Communications AB, LUND, SWEDEN.
#
# Version 1.3 Jul 20, 1993, RW
#
#
# This script compiles the source code 'prossysv.c' to an interface program
# 'prossysv' in the default case. 
#
# 1. Change HOSTNAME to the name of the host you will install the
#    printer on.
#
HOSTNAME=some_host
#
# 2. Change BOXNAME to the name you have assigned your print server
#    in /etc/hosts.
#    
BOXNAME=some_print_server
#
# 3. Change LOGPR to the logical printer you wish to use on the print server.
#    'pr1' means that print jobs will be sent to the logical printer pr1
#    on the print server. This logical printer is by default associated with
#    the parallel port. Any logical printer 'pr1' to 'pr8' is valid for
#    LOGPR.
#
LOGPR=pr1
#
# 4. Most System V-type machines don't include BSD networking support
#    routines automatically. Also, different compilers may require
#    the link options in different places, as well as different library
#    names (for instance, you might have to specify -lnsl in addition to
#    -lsocket). Therefore, you may have to change L1_OPTIONS or L2_OPTIONS,
#    depending on where in the command line your compiler wants
#    the link options. You never have to set both L1_OPTIONS and L2_OPTIONS.
#
L1_OPTIONS=
L2_OPTIONS="-lsocket"
#
#    Example using both -lsocket and -lnsl:
#    L2_OPTIONS="-lsocket -lnsl"
#
# 5. If you are using more than one print-server-attached printer,
#    you must change INTERFACE_PROGRAM_NAME to a unique name for each printer.
#
INTERFACE_PROGRAM_NAME=prossysv
#
# -- end of instructions --
#
cc -o $INTERFACE_PROGRAM_NAME -DTRY_FOREVER -DHOSTNAME=\"$HOSTNAME\" -DBOXNAME=\"$BOXNAME\" -DPRINTERNAME=\"$LOGPR\" $L1_OPTIONS prossysv.c $L2_OPTIONS
