# ***************************************************************************
#     REXX_DIRS.msvc (!INCLUDE ed by "makefile-dllmod.msvc")
# --------------------------------------------------------------------------
# (C) Copyright Enrico Sorichetti, 2012
#
# based on the previous REXX_DIR.msvc (C) Copyright Roger Bowler, 2010-2011
#
# --------------------------------------------------------------------------
#
#  Check to see if the directories created by the installation of the only
#  two supported REXX packages (Open Object Rexx (OORexx) and Regina Rexx)
#  contain the expected header file(s) for the respective package.
#
#  If either the 'REXX_HOME' or 'REGINA_LANG_DIR' (or both) environment
#  variables are defined (which are the environment variable names that
#  each package automatically defines when it is installed), then support
#  for REXX will be generated. Installing both packages causes bimodal
#  support to be generated wherein both packages are then supported.
#
#  The standard/default OORexx installation installs everything into
#
#       <program files directory>\ooRexx
#
#  with the headers being located in
#
#       <program files directory>\ooRexx\api
#
#  The standard/default Regina Rexx installation will offer to install in
#
#       C:\Regina
#
#  which is very silly IMNSHO. Rather, for symmetry, I suggest using the
#  OORexx approach instead: when Regina asks for a install directory,
#  instead of clicking Next to accept its default, OVERRIDE the directory
#  to specify the following directory instead:
#
#       <program files directory>\Regina
#
#  The headers will then be located in:
#
#       <program files directory>\Regina\include
#
#  NOTE: Both installations will update the PATH environment variable,
#  so make sure that the OORexx path comes first. I'll let the
#  happy crowd discover the reason why by himself/herself. :)
#
#  If somebody has the skills to use a non standard installation, then
#  he/she should be able to find out everything else by himself/herself.
#
# ***************************************************************************

!IFDEF REXX_HOME

OBJECT_REXX_HDR_DIR = $(REXX_HOME)\api
OBJECT_REXX_HEADER1 = $(OBJECT_REXX_HDR_DIR)\rexx.h
OBJECT_REXX_HEADER2 = $(OBJECT_REXX_HDR_DIR)\oorexxapi.h

!IF EXISTS("$(OBJECT_REXX_HEADER1)") && EXISTS("$(OBJECT_REXX_HEADER2)")
!MESSAGE OORexx support will be included from "$(REXX_HOME)"
!ELSE
!MESSAGE OORexx headers not found. Support will not be generated.
!UNDEF OBJECT_REXX_HDR_DIR
!UNDEF OBJECT_REXX_HEADER1
!UNDEF OBJECT_REXX_HEADER2
!ENDIF

!ENDIF

# --------------------------------------------------------------------------

!IFDEF REGINA_LANG_DIR

REGINA_REXX_HDR_DIR = $(REGINA_LANG_DIR)\include
REGINA_REXX_HEADER1 = $(REGINA_REXX_HDR_DIR)\rexxsaa.h

!IF EXIST("$(REGINA_REXX_HEADER1)")
!MESSAGE Regina Rexx support will be included from "$(REGINA_LANG_DIR)"
!ELSE
!MESSAGE Regina Rexx headers not found. Support will not be generated.
!UNDEF REGINA_REXX_HDR_DIR
!UNDEF REGINA_REXX_HEADER1
!ENDIF

!ENDIF

# --------------------------------------------------------------------------

# End of Rexx Dirs for REXX support
