#  @(#) $Id: setupathos,v 1.6 2005/12/06 13:55:22 andy Exp $
#  ****************************************************************************
#  * COPYRIGHT , 1996-2001,                                                  *
#  * Bothe, Hans-Joachim  hans.bothe@highqsoft.de                             *
#  * Hofmann, Andreas     andreas.hofmann@highqsoft.de                        *
#  * Schaap, Karst        karst.schaap@highqsoft.de                           *
#  * Schlossborner Weg 6b, D-61479 Glashtten/Taunus, Germany                 *
#  * Phone: +49 6174 62915, Fax: +49 6174 62935, Internet: www.highqsoft.com  *
#  ****************************************************************************
#  *                                                                          *
#  * All Rights Reserved.                                                     *
#  *                                                                          *
#  * This software is the confidential and proprietary information of         *
#  * the authors. It may be freely copied and distributed with the            *
#  * following stipulations:                                                  *
#  *                                                                          *
#  *      o No fee except to recover costs of media and delivery may          *
#  *        be charged for the use or possession of this software.            *
#  *      o Sources to this utility must be made available in machine-        *
#  *        readable form along with the executable form.                     *
#  *      o No portion of this program may be used in any program sold        *
#  *        for a fee or for production purposes.                             *
#  *      o This copyright notice must not be removed.                        *
#  *                                                                          *
#  * All brand names and product names used in this software are trademarks,  *
#  * registered trademarks, or trade names of their respective holders.       *
#  * The authors of this software are not associated with any product or      *
#  * vendor mentioned in the code or documentation.                           *
#  *                                                                          *
#  ****************************************************************************
# 
#  BEGIN DOCUMENTATION
#  ----------------------------------------------------------------------------
# 
#  NAME:
#       setupathos
# 
#  PURPOSE:
#       This command procedure does the setup for the Athos system
#	in Bourne Shells. Operating system dependent directories
#	are automatically created if they do not exist. This is
#	especially very handy when porting Athos to a new operating
#	system.
#
#  INDEX KEYWORDS:
#       <athos setup>, <setup>, <Bourne Shell>
# 
#  PACKAGE:
#       ATHOS
# 
#  CALLING SEQUENCE:
#       source setupathos
# 
#  ARGUMENTS:
#       None
# 
#  KNOWN RESTRICTIONS AND SIDE EFFECTS:
#       Bourne Shell specific.
#
#  SEE ALSO:
#	setupathos.bat for MS-DOS setup.
#	setupathos.com for VAX/VMS setup.
#	setupathos.csh for C Shell setup.
#	setupathos.ksh for Korn Shell setup.
# 
#  MODIFICATION HISTORY:
#	$Log: setupathos,v $
#	Revision 1.6  2005/12/06 13:55:22  andy
#	Don't export any environment that influence the search of the dynamic libraries.
#
#	Revision 1.5  2004/05/13 07:33:44  andy
#	Remove the Linux directory under the include directory.
#	It is required for MS Windows only.
#	
#	Revision 1.4  2004/04/29 11:53:48  karst
#	Set the environment variables athos and aop3server_ini.
#	
#	Revision 1.3  2004/04/29 08:12:24  andy
#	Correct after testing with PTHREAD on Linux.
#	
#	Revision 1.2  2003/07/25 08:35:26  karst
#	Correct the new directory.
#	
#	Revision 1.1  2003/07/25 08:23:32  karst
#	Initial version 3.0.
#	
#	Revision 2.18  2002/04/08 14:55:49  karst
#	Don't generated MULTITHREADED definitions.
#	
#	Revision 2.17  2002/03/25 07:52:42  karst
#	Prepare multithreaded with PTHREAD.
#	
#	Revision 2.16  2001/08/22 13:01:44  hans
#	Copyright updated.
#	
#	Revision 2.15  2001/04/23 11:28:15  karst
#	Added allias for hpbuild.
#	
#	Revision 2.14  2001/02/09 15:48:55  karst
#	Activate warnings.
#	
#	Revision 2.13  2000/01/11 12:26:11  karst
#	Changed copyright to current.
#	
#	Revision 2.12  1999/02/10 08:18:35  karst
#	Change copyright to current.
#	
#	Revision 2.11  1998-12-29 14:49:09+01  karst
#	Change copyright notice to current.
#
#	Revision 2.10  1998-09-28 17:06:45+02  karst
#	Set the environment variable LD_RUN_PATH and LD_LIBRARY_PATH.
#	Suppress the alias of ascoba.
#
#	Revision 2.9  1998-09-28 15:25:50+02  karst
#	Create also the generall directories and not only the system dependent
#	directories.
#
#	Revision 2.8  1998-09-28 11:54:05+02  hans
#	Insert definition of LD_RUN_PATH needed for the linker to get directory
#	location independent code.
#
#	Revision 2.7  1998-09-23 18:20:02+02  hans
#	Exported PATH.
#
#	Revision 2.6  1998-09-23 13:56:48+02  hans
#	Ascoba alias was wrong. OSTYPE was missing. fixed.
#
#	Revision 2.5  1998-09-18 17:10:35+02  hans
#	Moved abuild to etc directory.
#
#	Revision 2.4  1998-09-18 17:01:50+02  hans
#	Redesigned version.
#
#  ----------------------------------------------------------------------------
#  END DOCUMENTATION

# Set root directory, operating system type and path name.
export ATHOS_ROOT=`pwd`
export OSTYPE=`uname -s`
export PATH=$PATH:$ATHOS_ROOT/bin/$OSTYPE

# Create all generall directories if they do not exist.
if [ ! -d log ];          then mkdir log; fi
if [ ! -d bin ];          then mkdir bin; fi
if [ ! -d lib ];          then mkdir lib; fi
if [ ! -d obj ];          then mkdir obj; fi

# Remove the CVS Linux directory, it is used under Windows only.
if [ -d include/Linux ];  then rm -rf include/Linux; fi

# Create all operating system dependent directories if they do not exist.
if [ ! -d bin/$OSTYPE ];          then mkdir bin/$OSTYPE; fi
if [ ! -d etc/$OSTYPE ];          then mkdir etc/$OSTYPE; fi
if [ ! -d lib/$OSTYPE ];          then mkdir lib/$OSTYPE; fi
if [ ! -d obj/$OSTYPE ];          then mkdir obj/$OSTYPE; fi
if [ ! -d drivers/old/avl2/$OSTYPE ]; then mkdir drivers/old/avl2/$OSTYPE; fi
if [ ! -d drivers/avl3/$OSTYPE ]; then mkdir drivers/avl3/$OSTYPE; fi
if [ ! -d aop3server/$OSTYPE ];   then mkdir aop3server/$OSTYPE; fi

# Set alias for build procedure.
alias abuild=$ATHOS_ROOT/etc/abuild
chmod +x $ATHOS_ROOT/etc/abuild
alias hpbuild=$ATHOS_ROOT/etc/hpbuild
chmod +x $ATHOS_ROOT/etc/hpbuild
export ATHOS_INI=$ATHOS_ROOT/etc/athos.ini

# Set alias for Ascoba application.
export ASCOBA_INI=$ATHOS_ROOT/ascoba/ascoba.ini
#alias ascoba=$ATHOS_ROOT/bin/$OSTYPE/ascoba

# Set environment variable for aop3server
export AOP3SERVER_INI=$ATHOS_ROOT/etc/athos.ini

# Define some global Athos symbols.
export ATHOS_MEMCHECK=no
export ATHOS_DEBUG=no
export ATHOS_WARNINGS=yes
export ATHOS_MULTITHREADED=yes
export ATHOS_MAKEFLAGS="-rs"

# Define linker search path.
#export LD_RUN_PATH=$LD_RUN_PATH:$ATHOS_ROOT/bin/$OSTYPE/
#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ATHOS_ROOT/bin/$OSTYPE/
#export SEARCH_DIR=$ATHOS_ROOT/bin/$OSTYPE/
