/*
 *   module:  depend.h
 *   System dependencies of the PASCAL-XSC Development system
 *
{*  last modification:	24.02.92  14:02   }

 * uli 30.08.91: i860 added.
 * uli 05.09.91 : filename and on_debug added, exefnam moved from sysutil.h.
 * uli 06.09.91 : libinit and p88_lib and cfg_name added.
 * uli 12.09.91 : ZORTECH added.
 * uli 13.09.91 : binpath added.
 * uli 06.12.91 : UNIX_ANSI_C added.
 * uli 24.02.92 : PATHchar is checked now.
 *dima 09.04.92 : BORLAND_C added.
 * PJ  06.04.95 : SUN_SOLARIS_C added
                  os_print_check, on_print_check added
*/


				/* ANSI Standard C Compiler on UNIX */
#define UNIX_ANSI_C     1
                                /* TURBO C compiler for ATARI   */
#define ATARI_TURBO_C   0
                                /* CONVEX compiler for CONVEX C1*/
#define CONVEX1_UNIX_C  0
                                /* CONVEX compiler for CONVEX C2*/
#define CONVEX2_UNIX_C  0
                                /* HP C compiler for HP9000     */
#define HP_9000_C       0
                                /* IBM C compiler for System/370*/
#define IBM_370_C       0
                                /* MS C compiler for IBM AT     */
#define IBM_AT_MS_C     0
				/* Zortech C V3.0r2 compiler*/
#define ZORTECH_C       0
				/* WATCOM C compiler for IBM AT */
#define IBM_AT_WATCOM_C 0
				/* Metaware High C compiler for IBM AT */
#define IBM_AT_HIGH_C   0
				/* GNU C compiler for IBM 386   */
#define GNU_386_C       0
				/* TURBO C compiler for IBM AT  */
#define IBM_AT_TURBO_C  0
            			/* BORLAND C compiler for IBM AT  */
#define IBM_AT_BORLAND_C  0
				/* IBM C compiler for IBM AIX PS2 */
#define IBM_PS2_C       0
                                /* IBM C compiler for IBM RT    */
#define IBM_RT_C        0
                                /* OS4 C compiler for SUN4      */
#define SUN4_OS4_C      0
                                /* HELIOS C compiler for T800   */
#define T800_HELIOS_C   0
				/* Megaware High C compiler for Intel i860 */
#define i860_HIGH_C     0
				/* VMS C compiler for VAX       */
#define VAX_VMS_C       0
                                /* SUN C++ compiler */
#define SUN_SOLARIS_C   0


#define UNIXsys UNIX_ANSI_C+CONVEX1_UNIX_C+CONVEX2_UNIX_C+HP_9000_C+\
		IBM_PS2_C+IBM_RT_C+SUN4_OS4_C+T800_HELIOS_C+i860_HIGH_C\
                +SUN_SOLARIS_C

#define DOSsys  IBM_AT_MS_C+IBM_AT_TURBO_C+IBM_AT_BORLAND_C+ATARI_TURBO_C+\
		IBM_AT_WATCOM_C+GNU_386_C+IBM_AT_HIGH_C+ZORTECH_C

#define OWN_SYSTEM  DOSsys - ATARI_TURBO_C
	     /* replaces system call by spawn */

                                /* use indirection file in link command */
#define INDIRECT  DOSsys + VAX_VMS_C

#if UNIX_ANSI_C+ATARI_TURBO_C+IBM_370_C+IBM_AT_MS_C+IBM_AT_TURBO_C+IBM_PS2_C+\
    IBM_AT_WATCOM_C+GNU_386_C+IBM_AT_HIGH_C+T800_HELIOS_C+i860_HIGH_C+ZORTECH_C\
    +IBM_AT_BORLAND_C+SUN_SOLARIS_C
                               /* define LINT_ARGS, if the C-Compiler supports */
                               /* new-style prototype declarations. */
#ifndef LINT_ARGS
  Error!  Check setting of LINT_ARGS in defs.h
#endif
#else
#ifdef LINT_ARGS
  /* Error!  Check setting of LINT_ARGS in defs.h -- Done ! */
#endif
#endif

#if UNIXsys
#if PATHchar - '/'
  Error!  Check setting of PATHchar in defs.h
#endif
#endif

#if DOSsys
#if PATHchar - '\\'
  Error!  Check setting of PATHchar in defs.h
#endif
#endif

#if VAX_VMS_C
#if PATHchar - ']'
  Error!  Check setting of PATHchar in defs.h
#endif
#endif

/*****  variable declaration  *********/

extern char *  filename ;       /* current filename */
extern char *  p88_lib  ;       /* library specification */
extern char *  binpath  ;       /* directory of pxsc executables */
extern boolean on_debug ;       /* test output */
extern boolean verbose ;        /* program reports what it's doing */
extern boolean ok_retc  ;       /* is true, if call of system(p) returns */
				/* the exit value of called program 'p'  */

                                 /* string to clear screen */
extern char * clearstr ;

                                 /* system command to clear screen */
extern char * clearcmd ;


extern char * p88_name ;       /* p88 : executable file with path */
extern char * cfg_name ;       /* cfg : executable file with path */

extern char * ed_name ;        /* NULL indicates: use envir. var. P88EDIT */

extern char * setenvcmd ;     /* system command to set an environment var. */
extern char * setenvdelim ;   /* delimiter for envir.variable and envir.value */
extern char * profile ;       /* name of the login profile or autoexec.bat */

extern char * c_command ;       /* system command for C-compiler */
extern char * pre_c_opt ;       /* prefix compiler options */
extern char * inc_c_opt ;       /* Here the compiler must look for include files */
				/* P88SYS or sysdir will be added*/
extern char * post_c_opt;       /* postfix compiler options */

extern char * l_command ;       /* system command for Linker */
extern char * exe_l_opt ;       /* select this, if not required */
extern char * pre_l_opt ;       /* prefix Linker options */
extern char * post_l_opt;       /* postfix Linker options */

extern char * e88_name ;      /* system command for short Listing Generator */
extern char * lister ;        /* system command for long */
extern char * pr_command ;    /* system command for print */
extern char * r_command ;     /* system command for run pascal */
extern char * l2p_command;    /* system command for listing to pascal */
extern char * sh_command ;    /* system command for system entry */
extern char * t_command ;     /* system command for Type file */
extern char * sysreturn ;     /* command to return from shell, informal */
                                 /* string for user help */

extern char   linkinfo[  ] ;  /* may be patched */
extern char    batname[  ] ;  /* "   "  "       */
#if INDIRECT
extern char   loptname[  ] ;  /* "   "  "       */
#endif
			/* filename extensions */
extern char * noofext ;  /* indicates: do not link this object */
extern char * lnkfext ;
extern char * savfext ;  /* backup of source file */


#if OWN_SYSTEM
#define system msc_system
#ifdef LINT_ARGS
extern int msc_system (const char * s) ;
#else
extern int msc_system ( ) ;
#endif
#endif

#ifdef LINT_ARGS
extern  char*   exefnam (void);       /* name of executable file (linker) */
extern  int     exist   (char *, char *);
extern  void    libinit (void);
extern  char *  linkstring(char*prgname);
#else
extern  char*   exefnam    ( );
extern  int     exist   ( );
extern  void    libinit ( );
extern  char *  linkstring();
#endif


   /*------------------------------------------*/
   /*  variables from option.h of pxsc         */
   /*  used by sysutil.c, defined in depend.c  */

extern boolean     /*          Compiler flags, set per user option
  os_ variables specify, whether the option was set by a command line option,
  on_ variables indicate the current state of the compiler flag,
  user specified   on or off
 +--------------+---------------+---------------------- */
  os_verbose    ,  on_verbose , /* verbose compiler     */
  os_list       ,  on_list    , /* listing to file      */
  os_warning    ,  on_warning , /* report warnings      */
  os_merge      ,  on_merge   , /* merge source in code */
  os_code       ,  on_code    , /* code generation      */
  os_rename     ,  on_rename  , /* rename Pascal idents */
  os_index      ,  on_index   , /* index check          */
  os_number     ,  on_number  , /* linenumbers in code  */
  os_include    ,  on_include , /* include "filename"   */
  os_terminal   ,  on_terminal, /* code to terminal     */
  os_handling   ,  on_handling, /* explain error handling */
  os_dump       ,  on_dump    , /* structab dump        */
		   on_srcdir  , /* output to source-dir or current-dir */
		   on_remove  , /* remove all output files in case of error */
		   on_prototyp, /* new-style prototype declarations */
		   on_stdmodule,/* compiling standard module */
		   on_reverse , /* link modules in reverse order */
  os_print_check,  on_print_check, /* print check error messages */
  /* . . . . . to be continued */
  os_dummy      ;

extern  char
  *ov_real ,              /* filename specified by real option */
  *ov_include ;           /* filename specified by include option */

extern  int
   ov_idlength ;          /* identifier length accepted by linker */
