launchConfigureParser.py \
showNS.py \
addToKillList.py \
- NSparam.py
+ NSparam.py \
+ setenv.py \
+ launchSalome.py \
+ nameserver.py \
+ server.py
+
EXTRA_DIST = appliskel
# --- find omniORB configuration relative to current session if any
-myhost=`hostname`
-fileOmniConfig=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg
+fileOmniConfig=${HOME}/${APPLI}/.omniORB_last.cfg
if [ -f $fileOmniConfig ]; then
- OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg
+ OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_last.cfg
export OMNIORB_CONFIG
fi
. ${HOME}/${APPLI}/envd ${HOME}/${APPLI}
-# --- define port for CORBA naming service
-
-. ${HOME}/${APPLI}/searchFreePort.sh
-searchFreePort
-
# --- if mpi lam, start lam (seems safe to be done several times)
-# arret manuel avec lamhalt
+# (manual stop with lamhalt)
if [ "$LAMBHOST" ]; then
lamboot
fi
# --- run SALOME
-# (default arguments defined in local salome.launch could be completed
+# (default arguments defined in local SalomeApp.xml could be completed
# by arguments to this command)
if [ $# -ne 0 ] ; then
# --- set omniORB configuration to current session if any
-myhost=`hostname`
-fileOmniConfig=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg
+fileOmniConfig=${HOME}/${APPLI}/.omniORB_last.cfg
if [ -f $fileOmniConfig ]; then
- OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg
+ OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_last.cfg
export OMNIORB_CONFIG
# --- set environment variables for port and hostname of NamingService
local initref="NameService=corbaname::"`hostname`":$NSPORT"
#echo "ORBInitRef $initref" > $OMNIORB_CONFIG
echo "InitRef = $initref" > $OMNIORB_CONFIG
- LAST_RUNNING_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg
+ LAST_RUNNING_CONFIG=${HOME}/${APPLI}/.omniORB_last.cfg
export LAST_RUNNING_CONFIG
rm ${LAST_RUNNING_CONFIG}
ln -s ${OMNIORB_CONFIG} ${LAST_RUNNING_CONFIG}
import os
import sys
+import setenv
kernel_root=os.getenv("KERNEL_ROOT_DIR")
sys.path[:0]=[kernel_root+"/bin/salome"]
-import runSalome
+#import runSalome
argv=sys.argv[1:]
sys.argv=[]
-args, modules_list, modules_root_dir = runSalome.get_config()
-runSalome.set_env(args, modules_list, modules_root_dir)
+args, modules_list, modules_root_dir = setenv.get_config()
+#runSalome.set_env(args, modules_list, modules_root_dir)
+setenv.main();
os.execvp(argv[0],argv)
def getPiDict(port,appname='salome',full=True):
from Utils_Identity import getShortHostName
- host = os.getenv("HOSTNAME")
+ # get hostname by special function in all cases to
+ # have always same result in lower case at win32
+ host = getShortHostName()
if not host:
- host = os.getenv("HOST")
+ host = os.getenv("HOSTNAME")
if not host:
- host = getShortHostName()
+ host = os.getenv("HOST")
filedict = []
filedict.append( os.getenv('USER') ) # user name
"""
remove omniorb config files related to the port in SALOME application:
- ${HOME}/${APPLI}/.omniORB_${HOSTNAME}_${NSPORT}.cfg
- - ${HOME}/${APPLI}/.omniORB_${HOSTNAME}_last.cfg
+ - ${HOME}/${APPLI}/.omniORB_last.cfg
the last is removed only if the link points to the first file.
"""
from Utils_Identity import getShortHostName
home='%s/%s'%(home,appli)
hostname=getShortHostName()
omniorb_config = '%s/.omniORB_%s_%s.cfg'%(home,hostname, str(port))
- last_running_config = '%s/.omniORB_%s_last.cfg'%(home, hostname)
+ last_running_config = '%s/.omniORB_last.cfg'%(home)
if os.access(last_running_config,os.F_OK):
pointedPath = os.readlink(last_running_config)
if pointedPath[0] != '/':
pass
if found:
- cmd = 'pid=`ps -eo pid,command | egrep "[0-9] omniNames -start '+str(port)+'"` ; echo $pid > /tmp/logs/'+os.getenv('USER')+"/_"+port+'_Pid_omniNames.log'
- a = os.system(cmd)
+ if not sys.platform == 'win32':
+ cmd = 'pid=`ps -eo pid,command | egrep "[0-9] omniNames -start '+str(port)+'"` ; echo $pid > /tmp/logs/'+os.getenv('USER')+"/_"+port+'_Pid_omniNames.log'
+ a = os.system(cmd)
try:
fpidomniNames=open('/tmp/logs/'+os.getenv('USER')+"/_"+port+'_Pid_omniNames.log')
prc = fpidomniNames.read()
if field == "omniNames" :
if pidfield != "egrep" :
print 'stop process '+pidfield+' : omniNames'
- os.system('kill -9 '+pidfield)
+ if sys.platform == "win32":
+ import win32pm
+ win32pm.killpid(int(pidfield),0)
+ else:
+ os.system('kill -9 '+pidfield)
pidfield = field
except:
pass
for pid, cmd in process_id.items():
print "stop process %s : %s"% (pid, cmd[0])
try:
- os.kill(int(pid),signal.SIGKILL)
+ if sys.platform == "win32":
+ import win32pm
+ win32pm.killpid(int(pid),0)
+ else:
+ os.kill(int(pid),signal.SIGKILL)
except:
print " ------------------ process %s : %s not found"% (pid, cmd[0])
pass
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
import os, glob, string, sys, re
import xml.sax
# certain values in XML configuration file ("launch" section)
lanch_nam = "launch"
+help_nam = "help"
gui_nam = "gui"
splash_nam = "splash"
logger_nam = "logger"
standalone_nam = "standalone"
containers_nam = "containers"
key_nam = "key"
+terminal_nam = "terminal"
interp_nam = "interp"
except_nam = "noexcepthandler"
+terminal_nam = "terminal"
+case_nam = "test"
# values in XML configuration file giving specific module parameters (<module_name> section)
# which are stored in opts with key <module_name>_<parameter> (eg SMESH_plugins)
# values of list type
listKeys = ( containers_nam, embedded_nam, key_nam, modules_nam, standalone_nam, plugins_nam )
-# return application version (uses GUI_ROOT_DIR (or KERNEL_ROOT_DIR in batch mode) +/bin/salome/VERSION)
+###
+# Get the application version
+# Uses GUI_ROOT_DIR (or KERNEL_ROOT_DIR in batch mode) +/bin/salome/VERSION file
+###
def version():
- root_dir = os.environ.get( 'KERNEL_ROOT_DIR', '' ) # KERNEL_ROOT_DIR or "" if not found
- root_dir = os.environ.get( 'GUI_ROOT_DIR', root_dir ) # GUI_ROOT_DIR or KERNEL_ROOT_DIR or "" if both not found
- filename = root_dir+'/bin/salome/VERSION'
- str = open( filename, "r" ).readline() # str = "THIS IS SALOME - SALOMEGUI VERSION: 3.0.0"
- match = re.search( r':\s+([a-zA-Z0-9.]+)\s*$', str )
- if match :
- return match.group( 1 )
+ try:
+ filename = None
+ root_dir = os.environ.get( 'KERNEL_ROOT_DIR', '' ) # KERNEL_ROOT_DIR or "" if not found
+ if root_dir and os.path.exists( root_dir + "/bin/salome/VERSION" ):
+ filename = root_dir + "/bin/salome/VERSION"
+ root_dir = os.environ.get( 'GUI_ROOT_DIR', '' ) # GUI_ROOT_DIR "" if not found
+ if root_dir and os.path.exists( root_dir + "/bin/salome/VERSION" ):
+ filename = root_dir + "/bin/salome/VERSION"
+ if filename:
+ str = open( filename, "r" ).readline() # str = "THIS IS SALOME - SALOMEGUI VERSION: 3.0.0"
+ match = re.search( r':\s+([a-zA-Z0-9.]+)\s*$', str )
+ if match :
+ return match.group( 1 )
+ except:
+ pass
return ''
-# calculate and return configuration file id in order to unically identify it
-# for example: for 3.1.0a1 the id is 301000101
+###
+# Calculate and return configuration file unique ID
+# For example: for SALOME version 3.1.0a1 the id is 300999701
+###
def version_id( fname ):
vers = fname.split(".")
major = int(vers[0])
if dev > 0: ver = ver - 10000 + dev
return ver
-# get user configuration file name
+###
+# Get user configuration file name
+###
def userFile():
v = version()
if not v:
return "" # not unknown version
- filename = "%s/.%src.%s" % (os.environ['HOME'], appname, v)
+ if sys.platform == "win32":
+ filename = "%s\%s.xml.%s" % (os.environ['HOME'], appname, v)
+ else:
+ filename = "%s/.%src.%s" % (os.environ['HOME'], appname, v)
if os.path.exists(filename):
return filename # user preferences file for the current version exists
# initial id
id0 = version_id( v )
# get all existing user preferences files
- files = glob.glob( os.environ['HOME'] + "/." + appname + "rc.*" )
+ if sys.platform == "win32":
+ files = glob.glob( os.environ['HOME'] + "\." + appname + ".xml.*" )
+ else:
+ files = glob.glob( os.environ['HOME'] + "/." + appname + "rc.*" )
f2v = {}
for file in files:
match = re.search( r'\.%src\.([a-zA-Z0-9.]+)$'%appname, file )
# -----------------------------------------------------------------------------
-### xml reader for launch configuration file usage
+###
+# XML reader for launch configuration file usage
+###
section_to_skip = ""
# -----------------------------------------------------------------------------
-### searching for launch configuration files
-# the rule:
-# - environment variable {'appname'+'Config'} (SalomeAppConfig) contains list of directories (';' as devider)
-# - these directories contain 'appname'+'.xml' (SalomeApp.xml) configuration files
-# - these files are analyzed beginning with the last one (last directory in the list)
-# - if a key is found in next analyzed cofiguration file - it will be replaced
-# - the last configuration file to be analyzed - ~/.'appname'+'rc' (~/SalomeApprc) (if it exists)
-# - but anyway, if user specifies a certain option in a command line - it will replace the values
-# - specified in configuration file(s)
-# - once again the order of settings (next setting replaces the previous ones):
-# - SalomeApp.xml files in directories specified by SalomeAppConfig env variable
-# - .SalomeApprc file in user's catalogue
-# - command line
-
-config_var = appname+'Config'
-# set resources variables if not yet set
-dirs = []
-if os.getenv(config_var):
- dirs += re.split('[;|:]', os.getenv(config_var))
-if os.getenv("GUI_ROOT_DIR"):
- dirs += [os.getenv("GUI_ROOT_DIR") + "/share/salome/resources/gui"]
-os.environ[config_var] = ":".join(dirs)
-
-dirs.reverse() # reverse order, like in "path" variable - FILO-style processing
-
-_opts = {} # assiciative array of options to be filled
-
-# SalomeApp.xml files in directories specified by SalomeAppConfig env variable
-for dir in dirs:
- filename = dir+'/'+appname+'.xml'
- if not os.path.exists(filename):
- print "Configure parser: Warning : could not find configuration file %s" % filename
- else:
- try:
- p = xml_parser(filename, _opts)
- _opts = p.opts
- except:
- print "Configure parser: Error : can not read configuration file %s" % filename
- pass
-
-# SalomeApprc file in user's catalogue
-filename = userFile()
-if not filename or not os.path.exists(filename):
- print "Configure parser: Warning : could not find user configuration file"
-else:
- try:
- p = xml_parser(filename, _opts)
- _opts = p.opts
- except:
- print 'Configure parser: Error : can not read user configuration file'
-
-args = _opts
-
-# --- setting default values of keys if they were NOT set in config files ---
-for aKey in listKeys:
- if not args.has_key( aKey ):
- args[aKey]=[]
-
-for aKey in boolKeys:
- if not args.has_key( aKey ):
- args[aKey]=0
-
-if args[file_nam]:
- afile=args[file_nam]
- args[file_nam]=[afile]
-
-args[appname_nam] = appname
-
-### searching for my port
-
-my_port = 2809
-try:
- file = open(os.environ["OMNIORB_CONFIG"], "r")
- s = file.read()
- while len(s):
- l = string.split(s, ":")
- if string.split(l[0], " ")[0] == "ORBInitRef" or string.split(l[0], " ")[0] == "InitRef" :
- my_port = int(l[len(l)-1])
- pass
- s = file.read()
- pass
-except:
- pass
-
-args[port_nam] = my_port
-
-# -----------------------------------------------------------------------------
-
-### command line options reader
-
+###
+# Command line options parser
+###
def options_parser(line):
source = line
list = []
if source[i][0] != '-':
key = None
elif source[i][1] == '-':
- key = source[i][2]
+ key = source[i][2:]
else:
- key = source[i][1]
+ key = source[i][1:]
pass
+ if key is None and not result:
+ raise Exception()
result[key] = []
if key:
i += 1
# -----------------------------------------------------------------------------
-### read command-line options : each arg given in command line supersedes arg from xml config file
-cmd_opts = {}
-try:
- cmd_opts = options_parser(sys.argv[1:])
- kernel_root_dir=os.environ["KERNEL_ROOT_DIR"]
-except:
- cmd_opts["h"] = 1
- pass
+###
+# Get the environment
+###
+
+# this attribute is obsolete
+args = {}
+def get_env():
+ ###
+ # Collect launch configuration files:
+ # - The environment variable "<appname>Config" (SalomeAppConfig) which can
+ # define a list of directories (separated by ':' or ';' symbol) is checked
+ # - If the environment variable "<appname>Config" is not set, only
+ # ${GUI_ROOT_DIR}/share/salome/resources/gui is inspected
+ # - ${GUI_ROOT_DIR}/share/salome/resources/gui directory is always inspected
+ # so it is not necessary to put it in the "<appname>Config" variable
+ # - The directories which are inspected are checked for files "<appname>.xml"
+ # (SalomeApp.xml) which define SALOME configuration
+ # - These directories are analyzed beginning from the last one in the list,
+ # so the first directory listed in "<appname>Config" environment variable
+ # has higher priority: it means that if some configuration options
+ # is found in the next analyzed cofiguration file - it will be replaced
+ # - The last configuration file which is parsed is user configuration file
+ # situated in the home directory: "~/.<appname>rc[.<version>]" (~/SalomeApprc.3.2.0)
+ # (if it exists)
+ # - Command line options have the highest priority and replace options
+ # specified in configuration file(s)
+ ###
+
+ global args
+ config_var = appname+'Config'
+
+ separator = ":"
+ if os.sys.platform == 'win32':
+ separator = ";"
+
+
+ # set resources variable SaloemAppConfig if it is not set yet
+ dirs = []
+ if os.getenv(config_var):
+ if sys.platform == 'win32':
+ dirs += re.split(';', os.getenv(config_var))
+ else:
+ dirs += re.split('[;|:]', os.getenv(config_var))
+
+ if os.getenv("GUI_ROOT_DIR") and os.path.isdir( os.getenv("GUI_ROOT_DIR") + "/share/salome/resources/gui" ):
+ dirs += [os.getenv("GUI_ROOT_DIR") + "/share/salome/resources/gui"]
+ os.environ[config_var] = separator.join(dirs)
-### check all options are right
-
-opterror=0
-for opt in cmd_opts:
- if not opt in ("h","g","l","f","x","m","e","s","c","p","k","t","i","r"):
- print "Configure parser: Error : command line error : -%s" % opt
- opterror=1
-
-if opterror == 1:
- cmd_opts["h"] = 1
-
-if cmd_opts.has_key("h"):
- print """USAGE: runSalome.py [options]
- [command line options] :
- --help or -h : print this help
- --gui or -g : launching with GUI
- --terminal -t : launching without gui (to deny --gui)
- or -t=PythonScript[,...]
- : import of PythonScript(s)
- --logger or -l : redirect messages in a CORBA collector
- --file=filename or -f=filename: redirect messages in a log file
- --xterm or -x : execute servers in xterm console (messages appear in xterm windows)
- --modules=module1,module2,... : salome module list (modulen is the name of Salome module to load)
- or -m=module1,module2,...
- --embedded=registry,study,moduleCatalog,cppContainer
- or -e=registry,study,moduleCatalog,cppContainer
- : embedded CORBA servers (default: registry,study,moduleCatalog,cppContainer)
- : (logger,pyContainer,supervContainer can't be embedded
- --standalone=registry,study,moduleCatalog,cppContainer,pyContainer,supervContainer
- or -s=registry,study,moduleCatalog,cppContainer,pyContainer,supervContainer
- : standalone CORBA servers (default: pyContainer,supervContainer)
- --containers=cpp,python,superv: (obsolete) launching of containers cpp, python and supervision
- or -c=cpp,python,superv : = get default from -e and -s
- --portkill or -p : kill the salome with current port
- --killall or -k : kill all salome sessions
- --interp=n or -i=n : number of additional xterm to open, with session environment
- -z : display splash screen
- -r : disable centralized exception handling mechanism
-
- For each Salome module, the environment variable <modulen>_ROOT_DIR must be set.
- The module name (<modulen>) must be uppercase.
- KERNEL_ROOT_DIR is mandatory.
- """
- sys.exit(1)
- pass
+ dirs.reverse() # reverse order, like in "path" variable - FILO-style processing
+
+ _opts = {} # associative array of options to be filled
-### apply command-line options to the arguments
-for opt in cmd_opts:
- if opt == 'g':
- args[gui_nam] = 1
- elif opt == 'z':
- args[splash_nam] = 1
- elif opt == 'r':
- args[except_nam] = 1
- elif opt == 'l':
- args[logger_nam] = 1
- elif opt == 'f':
- args[file_nam] = cmd_opts['f']
- elif opt == 'x':
- args[xterm_nam] = 1
- elif opt == 'i':
- args[interp_nam] = cmd_opts['i']
- elif opt == 'm':
- args[modules_nam] = cmd_opts['m']
- elif opt == 'e':
- args[embedded_nam] = cmd_opts['e']
- elif opt == 's':
- args[standalone_nam] = cmd_opts['s']
- elif opt == 'c':
- args[containers_nam] = cmd_opts['c']
- elif opt == 'p':
- args[portkill_nam] = 1
- elif opt == 'k':
- args[killall_nam] = 1
+ # parse SalomeApp.xml files in directories specified by SalomeAppConfig env variable
+ for dir in dirs:
+ filename = dir+'/'+appname+'.xml'
+ if not os.path.exists(filename):
+ print "Configure parser: Warning : could not find configuration file %s" % filename
+ else:
+ try:
+ p = xml_parser(filename, _opts)
+ _opts = p.opts
+ except:
+ print "Configure parser: Error : can not read configuration file %s" % filename
+ pass
+
+ # parse .SalomeApprc.<version> file in user's home directory if it exists
+ # if user file for the current version is not found the nearest to it is used
+ filename = userFile()
+ if not filename or not os.path.exists(filename):
+ print "Configure parser: Warning : could not find user configuration file"
+ else:
+ try:
+ p = xml_parser(filename, _opts)
+ _opts = p.opts
+ except:
+ print 'Configure parser: Error : can not read user configuration file'
+
+ args = _opts
+
+ # set default values for options which are NOT set in config files
+ for aKey in listKeys:
+ if not args.has_key( aKey ):
+ args[aKey]=[]
+
+ for aKey in boolKeys:
+ if not args.has_key( aKey ):
+ args[aKey]=0
+
+ if args[file_nam]:
+ afile=args[file_nam]
+ args[file_nam]=[afile]
+
+ args[appname_nam] = appname
+
+ # get the port number
+ my_port = 2809
+ try:
+ file = open(os.environ["OMNIORB_CONFIG"], "r")
+ s = file.read()
+ while len(s):
+ l = string.split(s, ":")
+ if string.split(l[0], " ")[0] == "ORBInitRef" or string.split(l[0], " ")[0] == "InitRef" :
+ my_port = int(l[len(l)-1])
+ pass
+ s = file.read()
pass
- pass
+ except:
+ pass
-# if --modules (-m) command line option is not given
-# try SALOME_MODULES environment variable
-if not cmd_opts.has_key( "m" ) and os.getenv( "SALOME_MODULES" ):
- args[modules_nam] = re.split( "[:;,]", os.getenv( "SALOME_MODULES" ) )
- pass
+ args[port_nam] = my_port
-# 'terminal' must be processed in the end: to deny any 'gui' options
-args[script_nam] = []
-if 't' in cmd_opts:
- args[gui_nam] = 0
- args[script_nam] = cmd_opts['t']
- pass
+ # read command-line options
+ # each option given in command line overrides the option from xml config file
+ cmd_opts = {}
+ try:
+ cmd_opts = options_parser(sys.argv[1:])
+ kernel_root_dir=os.environ["KERNEL_ROOT_DIR"]
+ except:
+ cmd_opts["h"] = 1
+ pass
-if args[except_nam] == 1:
- os.environ["DISABLE_FPE"] = "1"
- pass
+ # check if all command line options are correct
+ short_opts = ("h","g","l","f","x","m","e","s","c","p","k","t","i","r","z")
+ long_opts = (help_nam,gui_nam,logger_nam,file_nam,xterm_nam,modules_nam,
+ embedded_nam,standalone_nam,containers_nam,portkill_nam,
+ killall_nam,terminal_nam,interp_nam,except_nam,splash_nam,
+ case_nam)
+ opterror=0
+ for opt in cmd_opts:
+ if opt not in short_opts and opt not in long_opts:
+ print "Configure parser: Error : command line error : -%s" % opt
+ opterror=1
+
+ if opterror == 1:
+ cmd_opts["h"] = 1
+
+ if cmd_opts.has_key("h") or cmd_opts.has_key(help_nam):
+ print """
+ USAGE: runSalome.py [options]
+
+ Command line options:
+
+ --gui (-g) Launch in GUI mode [default].
+ --terminal (-t) Launching without GUI (in the terminal mode).
+ --terminal=<python_script>[,...] Launching without GUI (in the terminal mode) and
+ (-t=<python_script>[,...]) additionally import python script(s).
+ --logger (-l) Redirect messages to the CORBA collector.
+ --file=<file> (-f=<file>) Redirect messages to the log file.
+ --xterm (-x) Launch each SALOME server in own xterm console.
+ --modules=<module1>,<module2>,... SALOME module list (where <module1>, <module2>
+ (-m=<module1>,<module2>,...) are the names of SALOME modules which should be
+ available in the SALOME session).
+ --embedded=<server1>,<server2>,... CORBA servers to be launched in the Session
+ (-e=<server1>,<server2>,...) embedded mode.
+ Valid values for <serverN>: registry, study,
+ moduleCatalog, cppContainer
+ [default: all mentioned].
+ --standalone=<server1>,<server2>,... CORBA servers to be launched in the standalone
+ (-s=<server1>,<server2>,...) mode (as separate processes).
+ Valid values for <serverN>: registry, study,
+ moduleCatalog, cppContainer, pyContainer,
+ supervContainer
+ [default: pyContainer,supervContainer].
+ --containers=<container1>,... [obsolete] SALOME containers to be launched.
+ (-c=<container1>,...) Valid values: cpp, python, superv
+ [default: use --embedded and --standalone
+ parameters].
+ --portkill (-p) Kill SALOME with the current port.
+ --killall (-k) Kill all running SALOME sessions.
+ --interp=<N> (-i=<N>) The number of additional xterm sessions to open.
+ In each xterm session SALOME environment is set
+ properly.
+ --splash (-z) Display splash screen.
+ --noexcepthandler (-r) Disable centralized exception handling
+ mechanism.
+ --test=<hdf_file_andor_python_scripts> HDF file to be opened on GUI starting and/or
+ Python script(s) to be imported in the GUI
+ study. The files can appear in arbitrary order.
+ If the HDF file is given it is opened, otherwise
+ the new empty study is created.
+ Python scripts are imported in the order of
+ their appearance.
+ This option is avaiable only in GUI mode,
+ for batch mode use --terminal(-t) option.
+ --help (-h) Print this help info
+
+ For each SALOME module, the environment variable <moduleN>_ROOT_DIR must be set.
+ KERNEL_ROOT_DIR is mandatory.
+ """
+ sys.exit(1)
+ pass
-# now modify SalomeAppConfig environment variable
-dirs = re.split('[;|:]', os.environ[config_var] )
-
-for m in args[modules_nam]:
- if m not in ["KERNEL", "GUI", ""] and os.getenv("%s_ROOT_DIR"%m):
- d1 = os.getenv("%s_ROOT_DIR"%m) + "/share/salome/resources/" + m.lower()
- d2 = os.getenv("%s_ROOT_DIR"%m) + "/share/salome/resources"
- if os.path.exists( "%s/%s.xml"%(d1, appname) ):
- dirs.append( d1 )
- elif os.path.exists( "%s/%s.xml"%(d2, appname) ):
- dirs.append( d2 )
-os.environ[config_var] = ":".join(dirs)
+ # apply command-line options to the arguments
+ BATCHMODE_FORCED = False
+ NO_SPLASH_FORCED = False
+ args[script_nam] = []
+ for opt in cmd_opts:
+ if opt in [ 'g', gui_nam ] :
+ if not BATCHMODE_FORCED: args[gui_nam] = 1
+ if cmd_opts[opt] == ['0']:
+ args["session_gui"] = 0
+ NO_SPLASH_FORCED = True
+ pass
+ elif opt in [ 't', terminal_nam ] :
+ args[gui_nam] = 0
+ args[script_nam] = cmd_opts[opt]
+ BATCHMODE_FORCED = True
+ elif opt in [ 'z', splash_nam ] :
+ if not NO_SPLASH_FORCED:
+ args[splash_nam] = 1
+ if cmd_opts[opt] == ['0']:
+ args[splash_nam] = 0
+ pass
+ pass
+ pass
+ elif opt in [ 'r', except_nam ] :
+ args[except_nam] = 1
+ elif opt in [ 'l', logger_nam ] :
+ args[logger_nam] = 1
+ elif opt in [ 'f', file_nam ] :
+ args[file_nam] = cmd_opts[opt]
+ elif opt in [ 'x', xterm_nam ] :
+ args[xterm_nam] = 1
+ elif opt in [ 'i', interp_nam ] :
+ args[interp_nam] = cmd_opts[opt]
+ elif opt in [ 'm', modules_nam ] :
+ args[modules_nam] = cmd_opts[opt]
+ elif opt in [ 'e', embedded_nam ] :
+ args[embedded_nam] = cmd_opts[opt]
+ elif opt in [ 's', standalone_nam ] :
+ args[standalone_nam] = cmd_opts[opt]
+ elif opt in [ 'c', containers_nam ] :
+ args[containers_nam] = cmd_opts[opt]
+ elif opt in [ 'p', portkill_nam ] :
+ args[portkill_nam] = 1
+ elif opt in [ 'k', killall_nam ] :
+ args[killall_nam] = 1
+ elif opt in [ case_nam ] :
+ args[case_nam] = cmd_opts[opt]
+ pass
+
+ # if --modules (-m) command line option is not given
+ # try SALOME_MODULES environment variable
+ if not cmd_opts.has_key( "m" ) and \
+ not cmd_opts.has_key( modules_nam ) and \
+ os.getenv( "SALOME_MODULES" ):
+ args[modules_nam] = re.split( "[:;,]", os.getenv( "SALOME_MODULES" ) )
+ pass
+
+ # disable signals handling
+ if args[except_nam] == 1:
+ os.environ["NOT_INTERCEPT_SIGNALS"] = "1"
+ pass
+
+ # now modify SalomeAppConfig environment variable
+ # to take into account the SALOME modules
+ if os.sys.platform == 'win32':
+ dirs = re.split('[;]', os.environ[config_var] )
+ else:
+ dirs = re.split('[;|:]', os.environ[config_var] )
+ for m in args[modules_nam]:
+ if m not in ["KERNEL", "GUI", ""] and os.getenv("%s_ROOT_DIR"%m):
+ d1 = os.getenv("%s_ROOT_DIR"%m) + "/share/salome/resources/" + m.lower()
+ d2 = os.getenv("%s_ROOT_DIR"%m) + "/share/salome/resources"
+ if os.path.exists( "%s/%s.xml"%(d1, appname) ):
+ dirs.append( d1 )
+ elif os.path.exists( "%s/%s.xml"%(d2, appname) ):
+ dirs.append( d2 )
+
+ # return arguments
+ os.environ[config_var] = separator.join(dirs)
+ return args
--- /dev/null
+#!/usr/bin/env python
+
+import socket
+import os
+import sys
+import shutil
+
+#####################################################################
+def findFreePort(startPort, step) :
+
+ currentPort = startPort;
+ if step < 1:
+ step = 1;
+
+ serversocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM);
+
+ portFound = 0;
+ while (portFound != 1 and currentPort < 65536):
+ try :
+ serversocket.bind((socket.gethostname(), currentPort));
+ portFound = 1;
+ print str(currentPort) + ": " + "OK";
+# serversocket.shutdown(0);
+# serversocket.close();
+ except Exception, inst:
+ print str(currentPort) + ": " + str(inst.args);
+ currentPort = currentPort+step;
+
+
+
+
+ if (portFound != 1) :
+ currentPort = -1;
+ return currentPort;
+#####################################################################
+
+
+
+## 1. Generate config file for omniORB:
+# content:
+# InitRef = NameService=corbaname::[HOST_NAME]:[PORT_NUMBER]
+
+freePort = findFreePort(2810, 1);
+hostName = socket.gethostname();
+
+if (len(sys.argv) > 1) and sys.argv[1] == "-nothing" :
+ print "port:" + str(freePort);
+ sys.exit(0)
+
+
+
+
+if freePort < 0 :
+ print
+ print "Can't find a free port to launch omniNames"
+ print "Try to kill the running servers and then launch SALOME again."
+ print
+ sys.exit(0)
+
+else :
+ omniCfgFileContent = "InitRef = NameService=corbaname::" + str(hostName) + ":" + str(freePort);
+ omniCfgFilePath = os.environ.get('HOME') + "/" + ".omniORB_" + str(hostName) + "_" + str(freePort) + ".cfg";
+
+ omni_file = file(omniCfgFilePath,'w+');
+ omni_file.write(omniCfgFileContent);
+ omni_file.write("\n");
+ omni_file.close();
+
+ if (len(sys.argv) > 1) and sys.argv[1] == "--save-config" :
+ omniCfgCurrent = os.environ.get('HOME') + "/.omniORB_current.cfg";
+ if os.name == "posix" :
+ #make a symbolic link
+ symlink(omniCfgFilePath, omniCfgCurrent);
+ else :
+ #copy the file
+ shutil.copy(omniCfgFilePath, omniCfgCurrent);
+
+ omniCfgFilePath = omniCfgCurrent;
+
+
+
+
+ ## 2. Set the OMNIORB_CONFIG environment variable
+ os.environ['OMNIORB_CONFIG']=omniCfgFilePath;
+
+
+ ## 3. execute the file runSalome.py
+ runSalomePyFilePath = os.environ.get('KERNEL_ROOT_DIR') + "/bin/salome/runSalome.py";
+
+ if os.path.isfile(runSalomePyFilePath) :
+ execfile(runSalomePyFilePath);
+
--- /dev/null
+#!/usr/bin/env python
+
+import sys, os, re, socket
+#import commands
+from server import *
+from Utils_Identity import getShortHostName
+
+# -----------------------------------------------------------------------------
+
+class NamingServer(Server):
+ XTERM=""
+ USER=os.getenv('USER')
+ if USER is None:
+ USER='anonymous'
+ #os.system("mkdir -m 777 -p /tmp/logs")
+ LOGDIR="/tmp/logs/" + USER
+
+ def initNSArgs(self):
+ if sys.platform == "win32":
+ # temporarily using home directory for Namning Service logs
+ # to be replaced with TEMP later...
+ os.environ["BaseDir"]=os.environ["HOME"]
+ else:
+ os.environ["BaseDir"]="/tmp"
+
+ try:
+ os.mkdir(os.environ["BaseDir"] + "/logs")
+ except:
+ #print "Can't create " + os.environ["BaseDir"] + "/logs"
+ pass
+
+ upath = os.environ["BaseDir"] + "/logs/";
+ if sys.platform == "win32":
+ upath += os.environ["Username"];
+ else:
+ upath += os.environ["USER"];
+
+ try:
+ os.mkdir(upath)
+ except:
+ #print "Can't create " + upath
+ pass
+
+ #os.system("touch " + upath + "/dummy")
+ for fname in os.listdir(upath):
+ try:
+ os.remove(upath + "/" + fname)
+ except:
+ pass
+ #os.system("rm -f " + upath + "/omninames* " + upath + "/dummy " + upath + "/*.log")
+
+ print "Name Service... "
+ #hname=os.environ["HOST"] #commands.getoutput("hostname")
+ if sys.platform == "win32":
+ hname=getShortHostName();
+ else:
+ hname = socket.gethostname();
+
+ print "hname=",hname
+
+ f=open(os.environ["OMNIORB_CONFIG"])
+ ss=re.findall("NameService=corbaname::" + hname + ":\d+", f.read())
+ print "ss = ", ss
+ f.close()
+ sl=ss[0]
+ ll = sl.split(':')
+ aPort = ll[-1]
+ #aPort=(ss.join().split(':'))[2];
+ #aPort=re.findall("\d+", ss[0])[0]
+
+ #aSedCommand="s/.*NameService=corbaname::" + hname + ":\([[:digit:]]*\)/\1/"
+ #print "sed command = ", aSedCommand
+ #aPort = commands.getoutput("sed -e\"" + aSedCommand + "\"" + os.environ["OMNIORB_CONFIG"])
+ print "port=", aPort
+ if sys.platform == "win32":
+ #print "start omniNames -start " + aPort + " -logdir " + upath
+ self.CMD=['omniNames -start ' , aPort , ' -logdir ' , '\"' + upath + '\"']
+ #os.system("start omniNames -start " + aPort + " -logdir " + upath)
+ else:
+ #self.CMD=['omniNames -start ' , aPort , ' -logdir ' , upath , ' &']
+ self.CMD=['omniNames','-start' , aPort, '-logdir' , upath ]
+ #os.system("omniNames -start " + aPort + " -logdir " + upath + " &")
+
+ print "ok"
+ print "to list contexts and objects bound int the context with the specified name : showNS "
+
+
+ def initArgs(self):
+ Server.initArgs(self)
+ if sys.platform == "win32":
+ env_ld_library_path=['env', 'LD_LIBRARY_PATH=' + os.getenv("PATH")]
+ else:
+ env_ld_library_path=['env', 'LD_LIBRARY_PATH=' + os.getenv("LD_LIBRARY_PATH")]
+ self.CMD=['xterm', '-e']+ env_ld_library_path + ['python']
+ self.initNSArgs()
+
+
+# In LifeCycleCORBA, FactoryServer is started with rsh on the requested
+# computer if this Container does not exist. Default is localhost.
+# Others Containers are started with start_impl method of FactoryServer Container.
+# For using rsh it is necessary to have in the ${HOME} directory a .rhosts file
+# Warning : on RedHat the file /etc/hosts contains by default a line like :
+# 127.0.0.1 bordolex bordolex.paris1.matra-dtv.fr localhost.localdomain localhost
+# (bordolex is the station name). omniNames on bordolex will be accessible from other
+# computers only if the computer name is removed on that line like :
+# 127.0.0.1 bordolex.paris1.matra-dtv.fr localhost.localdomain localhost
+
+# To start dynamically Containers on several computers you need to
+# put in the ${OMNIORB_CONFIG} file a computer name instead of "localhost"
+# example : ORBInitRef NameService=corbaname::dm2s0017
+
+# If you need to use several omniNames running on the same computer, you have to :
+#1. put in your ${OMNIORB_CONFIG} file a computer name and port number
+# example : ORBInitRef NameService=corbaname::dm2s0017:1515
+#2. start omninames with this port number like in orbmodile.py
+# example : omniNames -start 1515 -logdir ${BaseDir}/logs/${Username} &
#
import sys,os,time
import string
+from nameserver import *
from omniORB import CORBA
# Import the stubs for the Naming service
import CosNaming
-
-# -----------------------------------------------------------------------------
-
-class Server:
- XTERM="/usr/bin/X11/xterm -iconic -e "
- CMD=""
-
- def run(self):
- commande=self.XTERM+self.CMD
- print commande
- ier=os.system(commande)
- if ier:print "Commande failed"
-
-# -----------------------------------------------------------------------------
-
-class NamingServer(Server):
- XTERM=""
- USER=os.getenv('USER')
- if USER is None:
- USER='anonymous'
- os.system("mkdir -m 777 -p /tmp/logs")
- LOGDIR="/tmp/logs/" + USER
- os.system("mkdir -m 777 -p " + LOGDIR)
- CMD="runNS.sh > " + LOGDIR + "/salomeNS.log 2>&1"
+#from runNS import *
# -----------------------------------------------------------------------------
class client:
- def __init__(self):
+ def __init__(self,args=None):
#set GIOP message size for bug 10560: impossible to get field values in TUI mode
sys.argv.extend(["-ORBgiopMaxMsgSize", "104857600"]) ## = 100 * 1024 * 1024
# Initialise the ORB
self.orb=CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
# Initialise the Naming Service
- self.initNS()
+ print "Obtain a reference to the root naming context"
+ print args
+ self.initNS(args)
# --------------------------------------------------------------------------
- def initNS(self):
+ def initNS(self,args):
+ print "Obtain a reference to the root naming context"
# Obtain a reference to the root naming context
obj = self.orb.resolve_initial_references("NameService")
try:
print "Lancement du Naming Service",
# On lance le Naming Server (doit etre dans le PATH)
- NamingServer().run()
+ NamingServer(args).run()
print "Searching Naming Service ",
ncount=0
delta=0.1
if nobj is None:
print "%s exists but is not a %s" % (name,typobj)
return nobj
- def waitNSPID(self, theName, thePID, theTypObj = None):
+
+ if sys.platform != "win32":
+ def waitNSPID(self, theName, thePID, theTypObj = None):
aCount = 0
aDelta = 0.5
anObj = None
--- /dev/null
+#!/usr/bin/env python
+
+#log files localization
+
+import os, commands, sys, re, string, socket
+from Utils_Identity import getShortHostName
+
+if sys.platform == "win32":
+ # temporarily using home directory for Namning Service logs
+ # to be replaced with TEMP later...
+ os.environ["BaseDir"]=os.environ["HOME"]
+else:
+ os.environ["BaseDir"]="/tmp"
+
+os.environ["Username"]=os.environ["USER"]
+
+# kill OmniNames if exists
+
+#killall -q -9 omniNames
+
+# clear log files
+
+def startOmni():
+ try:
+ os.mkdir(os.environ["BaseDir"] + "/logs")
+ except:
+ #print "Can't create " + os.environ["BaseDir"] + "/logs"
+ pass
+
+ upath = os.environ["BaseDir"] + "/logs/" + os.environ["Username"]
+
+ try:
+ os.mkdir(upath)
+ except:
+ #print "Can't create " + upath
+ pass
+
+ #os.system("touch " + upath + "/dummy")
+ for fname in os.listdir(upath):
+ try:
+ os.remove(upath + "/" + fname)
+ except:
+ pass
+ #os.system("rm -f " + upath + "/omninames* " + upath + "/dummy " + upath + "/*.log")
+
+ print "Name Service... "
+ #hname=os.environ["HOST"] #commands.getoutput("hostname")
+ if sys.platform == "win32":
+ hname=getShortHostName()
+ else:
+ hname=socket.gethostname()
+
+ print "hname=",hname
+
+ f=open(os.environ["OMNIORB_CONFIG"])
+ ss=re.findall("NameService=corbaname::" + hname + ":\d+", f.read())
+ print "ss = ", ss
+ f.close()
+ aPort=re.findall("\d+", ss[0])[0]
+
+ #aSedCommand="s/.*NameService=corbaname::" + hname + ":\([[:digit:]]*\)/\1/"
+ #print "sed command = ", aSedCommand
+ #aPort = commands.getoutput("sed -e\"" + aSedCommand + "\"" + os.environ["OMNIORB_CONFIG"])
+ global process_id
+ print "port=", aPort
+ if sys.platform == "win32":
+ #import win32pm
+ #command = ['omniNames -start ' , aPort , ' -logdir ' , '\"' + upath + '\"']
+ #os.system("start omniNames -start " + aPort + " -logdir " + "\"" + upath + "\"" )
+ command = "start omniNames -start " + aPort + " -logdir " + "\"" + upath + "\""
+ #print command
+ pid = win32pm.spawnpid( string.join(command, " "), -nc )
+ process_id[pid]=command
+ else:
+ os.system("omniNames -start " + aPort + " -logdir " + upath + " &")
+
+ print "ok"
+ print "to list contexts and objects bound int the context with the specified name : showNS "
+
+# In LifeCycleCORBA, FactoryServer is started with rsh on the requested
+# computer if this Container does not exist. Default is localhost.
+# Others Containers are started with start_impl method of FactoryServer Container.
+# For using rsh it is necessary to have in the ${HOME} directory a .rhosts file
+# Warning : on RedHat the file /etc/hosts contains by default a line like :
+# 127.0.0.1 bordolex bordolex.paris1.matra-dtv.fr localhost.localdomain localhost
+# (bordolex is the station name). omniNames on bordolex will be accessible from other
+# computers only if the computer name is removed on that line like :
+# 127.0.0.1 bordolex.paris1.matra-dtv.fr localhost.localdomain localhost
+
+# To start dynamically Containers on several computers you need to
+# put in the ${OMNIORB_CONFIG} file a computer name instead of "localhost"
+# example : ORBInitRef NameService=corbaname::dm2s0017
+
+# If you need to use several omniNames running on the same computer, you have to :
+#1. put in your ${OMNIORB_CONFIG} file a computer name and port number
+# example : ORBInitRef NameService=corbaname::dm2s0017:1515
+#2. start omninames with this port number in runNS.sh
+# example : omniNames -start 1515 -logdir ${BaseDir}/logs/${Username} &
#!/bin/bash
-save_config=$1
-
-searchFreePort() {
- echo -n "Searching for a free port for naming service: "
- export NSPORT=2810
- local limit=$NSPORT
- let limit=limit+100
- while [ 1 ]
- do
- aRes=`netstat -ltn | grep -E :${NSPORT}`
- if [ -z "$aRes" ]; then
- echo ${NSPORT} - Ok
- local myhost=`hostname`
- export OMNIORB_CONFIG=${HOME}/.omniORB_${myhost}_${NSPORT}.cfg
- local initref="NameService=corbaname::"`hostname`":$NSPORT"
- export NSPORT
- if [[ `python -c "import CORBA; print CORBA.ORB_ID"` == "omniORB4" ]]; then
- echo "InitRef = $initref" > $OMNIORB_CONFIG
- else
- echo "ORBInitRef $initref" > $OMNIORB_CONFIG
- fi
- if [[ "$save_config" == "--save-config" ]] ; then
- ln -sf $OMNIORB_CONFIG ${HOME}/.omniORB_current.cfg
- export OMNIORB_CONFIG=${HOME}/.omniORB_current.cfg
- fi
- break
- fi
- echo -n "${NSPORT} "
- if [[ $NSPORT -eq $limit ]] ; then
- echo
- echo "Can't find a free port to launch omniNames"
- echo "Try to kill the running servers and then launch SALOME again."
- exit
- fi
- let NSPORT=NSPORT+1
- done
-}
-
-searchFreePort
-
-if [[ "$*" == "-nothing" ]]; then
- echo "port:$NSPORT"
-elif [ $# -ne 0 ] ; then
+if [ $# -ne 0 ] ; then
python -i ${KERNEL_ROOT_DIR}/bin/salome/runSalome.py $*
else
python ${KERNEL_ROOT_DIR}/bin/salome/runSalome.py
import sys, os, string, glob, time, pickle
import orbmodule
-
-process_id = {}
-
-# salome_subdir variable is used for composing paths like $KERNEL_ROOT_DIR/share/salome/resources/kernel, etc.
-# before moving to SUIT-based gui, instead of salome_subdir there was args['appname'] used.
-# but after - 'appname' = "SalomeApp", so using it in making the subdirectory is an error.
-salome_subdir = "salome"
-
-# -----------------------------------------------------------------------------
-
-def add_path(directory, variable_name):
- """Function helper to add environment variables"""
- if not os.environ.has_key(variable_name):
- os.environ[variable_name] = ""
- pass
- if os.path.exists(directory):
- newpath=[]
- for _dir in os.environ[variable_name].split(":"):
- if os.path.exists(_dir):
- if not os.path.samefile(_dir, directory):
- newpath.append(_dir)
- else:
- if os.path.abspath(_dir) != os.path.abspath(directory):
- newpath.append(_dir)
- pass
- import string
- newpath[:0] = [ directory ]
- newpath = string.join(newpath,":")
- os.environ[variable_name] = newpath
- if variable_name == "PYTHONPATH":
- sys.path[:0] = [directory]
-
-# -----------------------------------------------------------------------------
-
-__lib__dir__ = None
-def get_lib_dir():
- global __lib__dir__
- if __lib__dir__: return __lib__dir__
- import platform
- if platform.architecture()[0] == "64bit":
- __lib__dir__ = "lib64"
- else:
- __lib__dir__ = "lib"
- return get_lib_dir()
-
-# -----------------------------------------------------------------------------
-
-def get_config():
- """
- Get list of modules, paths.
-
- Read args from launch configure xml file and command line options.
- Check variables <module>_ROOT_DIR and set list of used modules.
- Return args, modules_list, modules_root_dir
- """
-
- # read args from launch configure xml file and command line options
-
- import launchConfigureParser
- args = launchConfigureParser.args
-
- # Check variables <module>_ROOT_DIR
- # and set list of used modules (without KERNEL)
-
- modules_list = []
- if args.has_key("modules"):
- modules_list += args["modules"]
- # KERNEL must be last in the list to locate it at the first place in PATH
- if args["gui"] :
- modules_list[:0] = ["GUI"]
- modules_list[:0] = ["KERNEL"]
- modules_list.reverse()
-
- modules_root_dir = {}
-
- to_remove_list=[]
- for module in modules_list :
- module_variable=module+"_ROOT_DIR"
- if not os.environ.has_key(module_variable):
- print "*******************************************************"
- print "*"
- print "* Environment variable",module_variable,"must be set"
- print "* Module", module, "will be not available"
- print "*"
- print "********************************************************"
- to_remove_list.append(module)
- continue
- pass
- module_root_dir = os.environ[module_variable]
- modules_root_dir[module]=module_root_dir
-
- for to_remove in to_remove_list:
- modules_list.remove(to_remove)
-
- while "KERNEL" in modules_list:
- modules_list.remove("KERNEL")
- pass
-
- while "GUI" in modules_list:
- modules_list.remove("GUI")
- pass
-
- if "SUPERV" in modules_list and not 'superv' in args['standalone']:
- args['standalone'].append("superv")
- pass
-
- return args, modules_list, modules_root_dir
-
-# -----------------------------------------------------------------------------
-
-def set_env(args, modules_list, modules_root_dir):
- """Add to the PATH-variables modules specific paths"""
-
- python_version="python%d.%d" % sys.version_info[0:2]
- modules_root_dir_list = []
- if args["gui"] :
- modules_list = modules_list[:] + ["GUI"]
- modules_list = modules_list[:] + ["KERNEL"]
- for module in modules_list :
- if modules_root_dir.has_key(module):
- module_root_dir = modules_root_dir[module]
- modules_root_dir_list[:0] = [module_root_dir]
- add_path(os.path.join(module_root_dir,get_lib_dir(),salome_subdir),
- "LD_LIBRARY_PATH")
- add_path(os.path.join(module_root_dir,"bin",salome_subdir),
- "PATH")
- if os.path.exists(module_root_dir + "/examples") :
- add_path(os.path.join(module_root_dir,"examples"),
- "PYTHONPATH")
- pass
- add_path(os.path.join(module_root_dir,"bin",salome_subdir),
- "PYTHONPATH")
- add_path(os.path.join(module_root_dir,get_lib_dir(),
- python_version,"site-packages",
- salome_subdir),
- "PYTHONPATH")
- add_path(os.path.join(module_root_dir,get_lib_dir(),salome_subdir),
- "PYTHONPATH")
- add_path(os.path.join(module_root_dir,get_lib_dir(),
- python_version,"site-packages",
- salome_subdir,
- "shared_modules"),
- "PYTHONPATH")
- pass
- pass
-
-
- os.environ["SALOMEPATH"]=":".join(modules_root_dir_list)
-
- # set trace environment variable
-
- if not os.environ.has_key("SALOME_trace"):
- os.environ["SALOME_trace"]="local"
- if args['file']:
- os.environ["SALOME_trace"]="file:"+args['file'][0]
- if args['logger']:
- os.environ["SALOME_trace"]="with_logger"
-
- # set environment for SMESH plugins
-
- if "SMESH" in modules_list:
- os.environ["SMESH_MeshersList"]="StdMeshers"
- if not os.environ.has_key("SALOME_StdMeshersResources"):
- os.environ["SALOME_StdMeshersResources"] \
- = modules_root_dir["SMESH"]+"/share/"+args["appname"]+"/resources/smesh"
- pass
- if args.has_key("SMESH_plugins"):
- for plugin in args["SMESH_plugins"]:
- plugin_root = ""
- if os.environ.has_key(plugin+"_ROOT_DIR"):
- plugin_root = os.environ[plugin+"_ROOT_DIR"]
- else:
- # workaround to avoid modifications of existing environment
- if os.environ.has_key(plugin.upper()+"_ROOT_DIR"):
- plugin_root = os.environ[plugin.upper()+"_ROOT_DIR"]
- pass
- pass
- if plugin_root != "":
- os.environ["SMESH_MeshersList"] \
- = os.environ["SMESH_MeshersList"]+":"+plugin
- if not os.environ.has_key("SALOME_"+plugin+"Resources"):
- os.environ["SALOME_"+plugin+"Resources"] \
- = plugin_root+"/share/"+args["appname"]+"/resources/"+plugin.lower()
- add_path(os.path.join(plugin_root,get_lib_dir(),python_version,
- "site-packages",salome_subdir),
- "PYTHONPATH")
- add_path(os.path.join(plugin_root,get_lib_dir(),salome_subdir),
- "PYTHONPATH")
- add_path(os.path.join(plugin_root,get_lib_dir(),salome_subdir),
- "LD_LIBRARY_PATH")
- add_path(os.path.join(plugin_root,"bin",salome_subdir),
- "PYTHONPATH")
- add_path(os.path.join(plugin_root,"bin",salome_subdir),
- "PATH")
- pass
- pass
-
- # set environment for SUPERV module
- os.environ["ENABLE_MACRO_NODE"]="1"
- # set resources variables if not yet set
- # Done now by launchConfigureParser.py
- #if os.getenv("GUI_ROOT_DIR"):
- #if not os.getenv("SalomeAppConfig"): os.environ["SalomeAppConfig"] = os.getenv("GUI_ROOT_DIR") + "/share/salome/resources/gui"
-
- # set CSF_PluginDefaults variable only if it is not customized
- # by the user
- if not os.getenv("CSF_PluginDefaults"):
- os.environ["CSF_PluginDefaults"] \
- = os.path.join(modules_root_dir["KERNEL"],"share",
- salome_subdir,"resources","kernel")
- os.environ["CSF_SALOMEDS_ResourcesDefaults"] \
- = os.path.join(modules_root_dir["KERNEL"],"share",
- salome_subdir,"resources","kernel")
-
- if "GEOM" in modules_list:
- print "GEOM OCAF Resources"
- os.environ["CSF_GEOMDS_ResourcesDefaults"] \
- = os.path.join(modules_root_dir["GEOM"],"share",
- salome_subdir,"resources","geom")
- print "GEOM Shape Healing Resources"
- os.environ["CSF_ShHealingDefaults"] \
- = os.path.join(modules_root_dir["GEOM"],"share",
- salome_subdir,"resources","geom")
+import setenv
+from server import *
+#process_id = {} move to server.py
# -----------------------------------------------------------------------------
killAllPorts()
elif args['portkill']:
givenPortKill(str(args['port']))
-
+
# -----------------------------------------------------------------------------
#
# Definition des classes d'objets pour le lancement des Server CORBA
#
-class Server:
- """Generic class for CORBA server launch"""
-
- def initArgs(self):
- self.PID=None
- self.CMD=[]
- self.ARGS=[]
- if self.args['xterm']:
- self.ARGS=['xterm', '-iconic', '-sb', '-sl', '500', '-hold']
-
- def __init__(self,args):
- self.args=args
- self.initArgs()
-
-
- def run(self):
- global process_id
- myargs=self.ARGS
- if self.args['xterm']:
- # (Debian) send LD_LIBRARY_PATH to children shells (xterm)
- env_ld_library_path=['env', 'LD_LIBRARY_PATH='
- + os.getenv("LD_LIBRARY_PATH")]
- myargs = myargs +['-T']+self.CMD[:1]+['-e'] + env_ld_library_path
- command = myargs + self.CMD
- print "command = ", command
- pid = os.spawnvp(os.P_NOWAIT, command[0], command)
- process_id[pid]=self.CMD
- self.PID = pid
-
-
class InterpServer(Server):
def __init__(self,args):
self.args=args
def run(self):
global process_id
command = self.CMD
- #print "command = ", command
- pid = os.spawnvp(os.P_NOWAIT, command[0], command)
+ print "INTERPSERVER::command = ", command
+ if sys.platform == "win32":
+ import win32pm
+ pid = win32pm.spawnpid( string.join(command, " "),'-nc' )
+ else:
+ pid = os.spawnvp(os.P_NOWAIT, command[0], command)
process_id[pid]=self.CMD
self.PID = pid
def __init__(self,args):
self.args=args
self.initArgs()
+ #if sys.platform == "win32":
+ # self.SCMD1=[os.environ["KERNEL_ROOT_DIR"] + "/win32/" + os.environ["BIN_ENV"] + "/" + 'SALOME_ModuleCatalog_Server' + ".exe",'-common']
+ #else:
self.SCMD1=['SALOME_ModuleCatalog_Server','-common']
self.SCMD2=[]
home_dir=os.getenv('HOME')
module_cata=module+"Catalog.xml"
#print " ", module_cata
if os.path.exists(os.path.join(module_root_dir,
- "share",salome_subdir,
+ "share",setenv.salome_subdir,
"resources",module.lower(),
module_cata)):
cata_path.extend(
glob.glob(os.path.join(module_root_dir,
- "share",salome_subdir,
+ "share",setenv.salome_subdir,
"resources",module.lower(),
module_cata)))
else:
cata_path.extend(
glob.glob(os.path.join(module_root_dir,
- "share",salome_subdir,
+ "share",setenv.salome_subdir,
"resources",
module_cata)))
pass
pass
- self.CMD=self.SCMD1 + [string.join(cata_path,':')] + self.SCMD2
+ #self.CMD=self.SCMD1 + ['\"']+[string.join(cata_path,'\"::\"')] + ['\"'] + self.SCMD2
+ self.CMD=self.SCMD1 + ['\"' + string.join(cata_path,'\"::\"') + '\"'] + self.SCMD2
# ---
def __init__(self,args):
self.args=args
self.initArgs()
- self.CMD=['SALOME_ContainerPy.py','FactoryServerPy']
+ if sys.platform == "win32":
+ self.CMD=[os.environ["PYTHONBIN"], '\"'+os.environ["KERNEL_ROOT_DIR"] + '/bin/salome/SALOME_ContainerPy.py'+'\"','FactoryServerPy']
+ else:
+ self.CMD=['SALOME_ContainerPy.py','FactoryServerPy']
# ---
def __init__(self,args):
self.args=args
self.initArgs()
+# if sys.platform == "win32":
+# self.CMD=[os.environ["KERNEL_ROOT_DIR"] + "/win32/" + os.environ["BIN_ENV"] + "/" + 'SALOME_Container' + ".exe",'SuperVisionContainer']
+# else:
self.CMD=['SALOME_Container','SuperVisionContainer']
# ---
def __init__(self,args):
self.args=args
self.initArgs()
- self.CMD=['SALOME_Logger_Server', 'logger.log']
+ if sys.platform == "win32":
+ self.CMD=['SALOME_Logger_Server', os.environ["HOME"] + "/logger.log"];
+ else:
+ self.CMD=['SALOME_Logger_Server', 'logger.log']
# ---
#
self.initArgs()
self.SCMD1=['SALOME_Session_Server']
+
self.SCMD2=[]
if 'registry' in self.args['embedded']:
self.SCMD1+=['--with','Registry',
if 'supervContainer' in self.args['containers'] or 'supervContainer' in self.args['standalone']:
self.SCMD2+=['SUPERV']
if self.args['gui']:
- self.SCMD2+=['GUI']
+ try:
+ session_gui = self.args['session_gui']
+ except KeyError:
+ session_gui = 1
+ pass
+ if session_gui:
+ self.SCMD2+=['GUI']
+ pass
+ pass
if self.args['splash'] and self.args['gui']:
self.SCMD2+=['SPLASH']
if self.args['noexcepthandler']:
self.SCMD2+=['noexcepthandler']
if self.args.has_key('modules'):
- self.SCMD2+=['--modules (']
- for mod in self.args['modules']:
- self.SCMD2+=[mod + ':']
- self.SCMD2+=[')']
+ self.SCMD2+=['--modules (%s)'%":".join(self.args['modules'])]
+ if self.args.has_key('test') and len(args['test']) > 0:
+ self.SCMD2+=['--test=%s'%(",".join(args['test']))]
def setpath(self,modules_list,modules_root_dir):
cata_path=[]
module_cata=module+"Catalog.xml"
#print " ", module_cata
if os.path.exists(os.path.join(module_root_dir,
- "share",salome_subdir,
+ "share",setenv.salome_subdir,
"resources",module.lower(),
module_cata)):
cata_path.extend(
glob.glob(os.path.join(module_root_dir,"share",
- salome_subdir,"resources",
+ setenv.salome_subdir,"resources",
module.lower(),module_cata)))
else:
cata_path.extend(
glob.glob(os.path.join(module_root_dir,"share",
- salome_subdir,"resources",
+ setenv.salome_subdir,"resources",
module_cata)))
pass
if (self.args["gui"]) & ('moduleCatalog' in self.args['embedded']):
- self.CMD=self.SCMD1 + [string.join(cata_path,':')] + self.SCMD2
+ #Use '::' instead ":" because drive path with "D:\" is invalid on windows platform
+ #self.CMD=self.SCMD1 + ['\"']+[string.join(cata_path,'\"::\"')] + ['\"'] + self.SCMD2
+ self.CMD=self.SCMD1 + ['\"' + string.join(cata_path,'\"::\"') + '\"'] + self.SCMD2
else:
self.CMD=self.SCMD1 + self.SCMD2
module_cata=module+"Catalog.xml"
#print " ", module_cata
if os.path.exists(os.path.join(module_root_dir,
- "share",salome_subdir,
+ "share",setenv.salome_subdir,
"resources",module.lower(),
module_cata)):
cata_path.extend(
# Initialisation ORB et Naming Service
#
- clt=orbmodule.client()
+ clt=orbmodule.client(args)
# (non obligatoire) Lancement Logger Server
# et attente de sa disponibilite dans le naming service
# Notify Server launch
#
- print "Notify Server to launch"
- myServer=NotifyServer(args,modules_root_dir)
- myServer.run()
+ if sys.platform != "win32":
+ print "Notify Server to launch"
+
+ myServer=NotifyServer(args,modules_root_dir)
+ myServer.run()
# Lancement Session Server (to show splash ASAP)
#
if ('registry' not in args['embedded']) | (args["gui"] == 0) :
myServer=RegistryServer(args)
myServer.run()
- clt.waitNSPID("/Registry",myServer.PID)
+ if sys.platform == "win32":
+ clt.waitNS("/Registry")
+ else:
+ clt.waitNSPID("/Registry",myServer.PID)
#
# Lancement Catalog Server,
cataServer.setpath(modules_list,modules_root_dir)
cataServer.run()
import SALOME_ModuleCatalog
- clt.waitNSPID("/Kernel/ModulCatalog",cataServer.PID,SALOME_ModuleCatalog.ModuleCatalog)
+ if sys.platform == "win32":
+ clt.waitNS("/Kernel/ModulCatalog",SALOME_ModuleCatalog.ModuleCatalog)
+ else:
+ clt.waitNSPID("/Kernel/ModulCatalog",cataServer.PID,SALOME_ModuleCatalog.ModuleCatalog)
#
# Lancement SalomeDS Server,
print "RunStudy"
myServer=SalomeDSServer(args)
myServer.run()
- clt.waitNSPID("/myStudyManager",myServer.PID)
+ if sys.platform == "win32":
+ clt.waitNS("/myStudyManager")
+ else:
+ clt.waitNSPID("/myStudyManager",myServer.PID)
#
# Lancement ContainerManagerServer
if 'cppContainer' in args['standalone']:
myServer=ContainerCPPServer(args)
myServer.run()
- clt.waitNSPID("/Containers/" + theComputer + "/FactoryServer",myServer.PID)
+ if sys.platform == "win32":
+ clt.waitNS("/Containers/" + theComputer + "/FactoryServer")
+ else:
+ clt.waitNSPID("/Containers/" + theComputer + "/FactoryServer",myServer.PID)
#
# Lancement Container Python local,
if 'pyContainer' in args['standalone']:
myServer=ContainerPYServer(args)
myServer.run()
- clt.waitNSPID("/Containers/" + theComputer + "/FactoryServerPy",myServer.PID)
+ if sys.platform == "win32":
+ clt.waitNS("/Containers/" + theComputer + "/FactoryServerPy")
+ else:
+ clt.waitNSPID("/Containers/" + theComputer + "/FactoryServerPy",myServer.PID)
#
# Lancement Container Supervision local,
if 'supervContainer' in args['standalone']:
myServer=ContainerSUPERVServer(args)
myServer.run()
- clt.waitNSPID("/Containers/" + theComputer + "/SuperVisionContainer",myServer.PID)
-
+ if sys.platform == "win32":
+ clt.waitNS("/Containers/" + theComputer + "/SuperVisionContainer")
+ else:
+ clt.waitNSPID("/Containers/" + theComputer + "/SuperVisionContainer",myServer.PID)
+
#
# Attente de la disponibilite du Session Server dans le Naming Service
#
reload(SALOME)
reload(SALOMEDS)
import SALOME_Session_idl
- session=clt.waitNSPID("/Kernel/Session",mySessionServ.PID,SALOME.Session)
-
+ if sys.platform == "win32":
+ session=clt.waitNS("/Kernel/Session",SALOME.Session)
+ else:
+ session=clt.waitNSPID("/Kernel/Session",mySessionServ.PID,SALOME.Session)
end_time = os.times()
print
print "Start SALOME, elapsed time : %5.1f seconds"% (end_time[4]
save list of process, give info to user,
show registered objects in Naming Service.
"""
+ global process_id
clt=None
try:
i = 0
while i < len( toimport ) :
if toimport[ i ] == 'killall':
- print "killall : option disabled"
- #killAllPorts()
+ killAllPorts()
+ import sys
+ sys.exit(0)
else:
print 'importing',toimport[ i ]
doimport = 'import ' + toimport[ i ]
exec doimport
- i = i + 1
+ i = i + 1
return clt
Register args, modules_list, modules_root_dir in a file
for further use, when SALOME is launched embedded in an other application.
"""
- fileEnv = '/tmp/' + os.getenv('USER') + "_" + str(args['port']) \
+ if sys.platform == "win32":
+ fileEnv = os.getenv('TEMP')
+ else:
+ fileEnv = '/tmp/'
+
+ fileEnv += os.getenv('USER') + "_" + str(args['port']) \
+ '_' + args['appname'].upper() + '_env'
fenv=open(fileEnv,'w')
pickle.dump((args, modules_list, modules_root_dir),fenv)
# -----------------------------------------------------------------------------
+def searchFreePort(args, save_config=1):
+ print "Searching for a free port for naming service:",
+ NSPORT=2810
+ limit=NSPORT
+ limit=limit+10
+ while 1:
+ import os
+ status = os.system("netstat -ltn | grep -E :%s > /dev/null 2>&1"%(NSPORT))
+ if status:
+ print "%s - OK"%(NSPORT)
+ #
+ from os import getpid
+ if sys.platform == "win32":
+ tmp_file = os.getenv('TEMP');
+ else:
+ tmp_file = '/tmp/'
+ tmp_file += 'hostname_%s'%(getpid())
+ #tmp_file = '/tmp/hostname_%s'%(getpid())
+ from os import system
+ system('hostname > %s'%(tmp_file))
+ f = open(tmp_file)
+ myhost = f.read()
+ myhost = myhost[:-1]
+ f.close()
+ system('rm -f %s'%(tmp_file))
+ #
+ home = os.environ['HOME']
+ appli=os.environ.get("APPLI")
+ if appli is not None:
+ home='%s/%s'%(home,appli)
+ pass
+ #
+ os.environ['OMNIORB_CONFIG'] = '%s/.omniORB_%s_%s.cfg'%(home, myhost, NSPORT)
+ initref = "NameService=corbaname::%s:%s"%(myhost, NSPORT)
+ os.environ['NSPORT'] = "%s"%(NSPORT)
+ os.environ['NSHOST'] = "%s"%(myhost)
+ f = open(os.environ['OMNIORB_CONFIG'], "w")
+ import CORBA
+ if CORBA.ORB_ID == "omniORB4":
+ f.write("InitRef = %s\n"%(initref))
+ else:
+ f.write("ORBInitRef %s\n"%(initref))
+ pass
+ f.close()
+ args['port'] = os.environ['NSPORT']
+ #
+ if save_config:
+ from os import system
+ system('ln -sf %s %s/.omniORB_last.cfg'%(os.environ['OMNIORB_CONFIG'], home))
+ pass
+ #
+ break
+ print "%s"%(NSPORT),
+ if NSPORT == limit:
+ msg = "\n"
+ msg += "Can't find a free port to launch omniNames\n"
+ msg += "Try to kill the running servers and then launch SALOME again.\n"
+ raise msg
+ NSPORT=NSPORT+1
+ pass
+ return
+
+# -----------------------------------------------------------------------------
+
def no_main():
"""Salome Launch, when embedded in other application"""
fileEnv = os.environ["SALOME_LAUNCH_CONFIG"]
args, modules_list, modules_root_dir = pickle.load(fenv)
fenv.close()
kill_salome(args)
+ searchFreePort(args, 0)
clt = useSalome(args, modules_list, modules_root_dir)
return clt
def main():
"""Salome launch as a main application"""
- args, modules_list, modules_root_dir = get_config()
+ import sys
+ if len(sys.argv) == 2:
+ if sys.argv[1] == "-nothing":
+ searchFreePort({})
+ import os
+ print "port:%s"%(os.environ['NSPORT'])
+ import sys
+ sys.exit(0)
+ pass
+ pass
+ save_config = 1
+ import sys
+ if len(sys.argv) > 1:
+ if sys.argv[1] == "--nosave-config":
+ save_config = 0
+ sys.argv[1:2] = []
+ pass
+ pass
+ #
+ args, modules_list, modules_root_dir = setenv.get_config()
kill_salome(args)
- set_env(args, modules_list, modules_root_dir)
+ searchFreePort(args, save_config)
+ setenv.main()
clt = useSalome(args, modules_list, modules_root_dir)
return clt,args
#sys.argv=sys.argv+['-ORBInitRef','NameService=IOR:010000000100000000000000010000000000000023000000010100000a0000006c6f63616c686f737400fa0a0b0000004e616d6553657276696365']
class client(orbmodule.client):
- def initNS(self):
+ def initNS(self,args):
# Obtain a reference to the root naming context
obj = self.orb.resolve_initial_references("NameService")
try:
f = open(omniorb_config, "w")
f.write("ORBInitRef NameService=corbaname::%s:%s\n"%(hostname, NSPORT))
f.close()
- last_running_config = '%s/.omniORB_%s_last.cfg'%(home, hostname)
+ last_running_config = '%s/.omniORB_last.cfg'%(home, hostname)
os.environ['LAST_RUNNING_CONFIG'] = last_running_config
if os.access(last_running_config,os.F_OK):
os.unlink(last_running_config)
--- /dev/null
+#!/usr/bin/env python
+
+import os, sys, string
+process_id = {}
+
+# -----------------------------------------------------------------------------
+#
+# Definition des classes d'objets pour le lancement des Server CORBA
+#
+
+class Server:
+ """Generic class for CORBA server launch"""
+
+ def initArgs(self):
+ self.PID=None
+ self.CMD=[]
+ self.ARGS=[]
+ if self.args['xterm']:
+ self.ARGS=['xterm', '-iconic', '-sb', '-sl', '500', '-hold']
+
+ def __init__(self,args):
+ self.args=args
+ self.initArgs()
+
+
+ def run(self):
+ global process_id
+ myargs=self.ARGS
+ if self.args['xterm']:
+ # (Debian) send LD_LIBRARY_PATH to children shells (xterm)
+ env_ld_library_path=['env', 'LD_LIBRARY_PATH='
+ + os.getenv("LD_LIBRARY_PATH")]
+ myargs = myargs +['-T']+self.CMD[:1]+['-e'] + env_ld_library_path
+ command = myargs + self.CMD
+ print "command = ", command
+ if sys.platform == "win32":
+ import win32pm
+ #cmd_str = "\"" + string.join(command, " ") + "\""
+ #print cmd_str
+ #pid = win32pm.spawnpid( cmd_str )
+ pid = win32pm.spawnpid( string.join(command, " "), '-nc' )
+ #pid = win32pm.spawnpid( string.join(command, " ") )
+ else:
+ pid = os.spawnvp(os.P_NOWAIT, command[0], command)
+ process_id[pid]=self.CMD
+ self.PID = pid
--- /dev/null
+#!/usr/bin/env python
+
+import sys, os, string, glob, time, pickle
+
+# this file is extraction of set_env from runSalome.py
+# for reusage in automated tests
+
+# salome_subdir variable is used for composing paths like $KERNEL_ROOT_DIR/share/salome/resources, etc.
+# before moving to SUIT-based gui, instead of salome_subdir there was args['appname'] used.
+# but after - 'appname' = "SalomeApp", so using it in making the subdirectory is an error.
+salome_subdir = "salome"
+
+
+# -----------------------------------------------------------------------------
+
+def add_path(directory, variable_name):
+ """Function helper to add environment variables"""
+ if sys.platform == "win32":
+ splitsym = ";"
+ else:
+ splitsym = ":"
+ if not os.environ.has_key(variable_name):
+ os.environ[variable_name] = ""
+ pass
+ if os.path.exists(directory):
+ newpath=[]
+ for _dir in os.environ[variable_name].split(splitsym):
+ if os.path.exists(_dir):
+ try:
+ if not os.path.samefile(_dir, directory):
+ newpath.append(_dir)
+ except:
+ if _dir != directory:
+ newpath.append(_dir)
+
+ else:
+ if os.path.abspath(_dir) != os.path.abspath(directory):
+ newpath.append(_dir)
+
+ pass
+ import string
+ newpath[:0] = [ directory ]
+ newpath = string.join(newpath, splitsym)
+ os.environ[variable_name] = newpath
+ if variable_name == "PYTHONPATH":
+ sys.path[:0] = [directory]
+
+# -----------------------------------------------------------------------------
+__lib__dir__ = None
+def get_lib_dir():
+ global __lib__dir__
+ if __lib__dir__: return __lib__dir__
+ import platform
+ if platform.architecture()[0] == "64bit":
+ __lib__dir__ = "lib64"
+ else:
+ __lib__dir__ = "lib"
+ return get_lib_dir()
+
+# -----------------------------------------------------------------------------
+
+def get_config():
+ """
+ Get list of modules, paths.
+
+ Read args from launch configure xml file and command line options.
+ Check variables <module>_ROOT_DIR and set list of used modules.
+ Return args, modules_list, modules_root_dir
+ """
+
+ # read args from launch configure xml file and command line options
+
+ import launchConfigureParser
+ args = launchConfigureParser.get_env()
+
+ # Check variables <module>_ROOT_DIR
+ # and set list of used modules (without KERNEL)
+
+ modules_list = []
+ if args.has_key("modules"):
+ modules_list += args["modules"]
+ # KERNEL must be last in the list to locate it at the first place in PATH
+ if args["gui"] :
+ modules_list[:0] = ["GUI"]
+ modules_list[:0] = ["KERNEL"]
+ modules_list.reverse()
+
+ modules_root_dir = {}
+
+ to_remove_list=[]
+ for module in modules_list :
+ module_variable=module.upper()+"_ROOT_DIR"
+ if not os.environ.has_key(module_variable):
+ print "*******************************************************"
+ print "*"
+ print "* Environment variable",module_variable,"must be set"
+ print "* Module", module, "will be not available"
+ print "*"
+ print "********************************************************"
+ to_remove_list.append(module)
+ continue
+ pass
+ module_root_dir = os.environ[module_variable]
+ modules_root_dir[module]=module_root_dir
+
+ for to_remove in to_remove_list:
+ modules_list.remove(to_remove)
+
+ while "KERNEL" in modules_list:
+ modules_list.remove("KERNEL")
+ pass
+
+ while "GUI" in modules_list:
+ modules_list.remove("GUI")
+ pass
+
+ if "SUPERV" in modules_list and not 'superv' in args['standalone']:
+ args['standalone'].append("superv")
+ pass
+
+ return args, modules_list, modules_root_dir
+
+# -----------------------------------------------------------------------------
+
+def set_env(args, modules_list, modules_root_dir):
+ """Add to the PATH-variables modules specific paths"""
+
+ python_version="python%d.%d" % sys.version_info[0:2]
+ modules_root_dir_list = []
+ if args["gui"] :
+ modules_list = modules_list[:] + ["GUI"]
+ modules_list = modules_list[:] + ["KERNEL"]
+ for module in modules_list :
+ if modules_root_dir.has_key(module):
+ module_root_dir = modules_root_dir[module]
+ modules_root_dir_list[:0] = [module_root_dir]
+ if sys.platform == "win32":
+ add_path(os.path.join(module_root_dir,"lib",salome_subdir),
+ "PATH")
+ else:
+ add_path(os.path.join(module_root_dir,"lib",salome_subdir),
+ "LD_LIBRARY_PATH")
+ add_path(os.path.join(module_root_dir,"bin",salome_subdir),
+ "PATH")
+ if os.path.exists(module_root_dir + "/examples") :
+ add_path(os.path.join(module_root_dir,"examples"),
+ "PYTHONPATH")
+ pass
+ add_path(os.path.join(module_root_dir,"bin",salome_subdir),
+ "PYTHONPATH")
+ # add lib before site-packages to load script instead of dll if any (win32 platform)
+ add_path(os.path.join(module_root_dir,"lib",salome_subdir),
+ "PYTHONPATH")
+ add_path(os.path.join(module_root_dir,"lib",
+ python_version,"site-packages",
+ salome_subdir),
+ "PYTHONPATH")
+ add_path(os.path.join(module_root_dir,"lib",
+ python_version,"site-packages",
+ salome_subdir,
+ "shared_modules"),
+ "PYTHONPATH")
+ pass
+ pass
+
+ if sys.platform == 'win32':
+ os.environ["SALOMEPATH"]=";".join(modules_root_dir_list)
+ else:
+ os.environ["SALOMEPATH"]=":".join(modules_root_dir_list)
+
+ # set trace environment variable
+
+ if not os.environ.has_key("SALOME_trace"):
+ os.environ["SALOME_trace"]="local"
+ if args['file']:
+ os.environ["SALOME_trace"]="file:"+args['file'][0]
+ if args['logger']:
+ os.environ["SALOME_trace"]="with_logger"
+
+ # set environment for SMESH plugins
+
+ if "SMESH" in modules_list:
+ os.environ["SMESH_MeshersList"]="StdMeshers"
+ if not os.environ.has_key("SALOME_StdMeshersResources"):
+ os.environ["SALOME_StdMeshersResources"] \
+ = modules_root_dir["SMESH"]+"/share/"+args["appname"]+"/resources/smesh"
+ pass
+ if args.has_key("SMESH_plugins"):
+ for plugin in args["SMESH_plugins"]:
+ plugin_root = ""
+ if os.environ.has_key(plugin+"_ROOT_DIR"):
+ plugin_root = os.environ[plugin+"_ROOT_DIR"]
+ else:
+ # workaround to avoid modifications of existing environment
+ if os.environ.has_key(plugin.upper()+"_ROOT_DIR"):
+ plugin_root = os.environ[plugin.upper()+"_ROOT_DIR"]
+ pass
+ pass
+ if plugin_root != "":
+ os.environ["SMESH_MeshersList"] \
+ = os.environ["SMESH_MeshersList"]+":"+plugin
+ if not os.environ.has_key("SALOME_"+plugin+"Resources"):
+ os.environ["SALOME_"+plugin+"Resources"] \
+ = plugin_root+"/share/"+args["appname"]+"/resources/"+plugin.lower()
+ add_path(os.path.join(plugin_root,get_lib_dir(),python_version,
+ "site-packages",salome_subdir),
+ "PYTHONPATH")
+ add_path(os.path.join(plugin_root,get_lib_dir(),salome_subdir),
+ "PYTHONPATH")
+
+
+ if sys.platform == "win32":
+ add_path(os.path.join(plugin_root,get_lib_dir(),salome_subdir),
+ "PATH")
+ else:
+ add_path(os.path.join(plugin_root,get_lib_dir(),salome_subdir),
+ "LD_LIBRARY_PATH")
+ add_path(os.path.join(plugin_root,"bin",salome_subdir),
+ "PYTHONPATH")
+ add_path(os.path.join(plugin_root,"bin",salome_subdir),
+ "PATH")
+ pass
+ pass
+
+ # set environment for SUPERV module
+ os.environ["ENABLE_MACRO_NODE"]="1"
+ # set resources variables if not yet set
+ # Done now by launchConfigureParser.py
+ #if os.getenv("GUI_ROOT_DIR"):
+ #if not os.getenv("SUITRoot"): os.environ["SUITRoot"] = os.getenv("GUI_ROOT_DIR") + "/share/salome"
+ #if not os.getenv("SalomeAppConfig"): os.environ["SalomeAppConfig"] = os.getenv("GUI_ROOT_DIR") + "/share/salome/resources"
+
+ # set CSF_PluginDefaults variable only if it is not customized
+ # by the user
+ if not os.getenv("CSF_PluginDefaults"):
+ os.environ["CSF_PluginDefaults"] \
+ = os.path.join(modules_root_dir["KERNEL"],"share",
+ salome_subdir,"resources","kernel")
+ os.environ["CSF_SALOMEDS_ResourcesDefaults"] \
+ = os.path.join(modules_root_dir["KERNEL"],"share",
+ salome_subdir,"resources","kernel")
+
+ if "GEOM" in modules_list:
+ print "GEOM OCAF Resources"
+ os.environ["CSF_GEOMDS_ResourcesDefaults"] \
+ = os.path.join(modules_root_dir["GEOM"],"share",
+ salome_subdir,"resources","geom")
+ print "GEOM Shape Healing Resources"
+ os.environ["CSF_ShHealingDefaults"] \
+ = os.path.join(modules_root_dir["GEOM"],"share",
+ salome_subdir,"resources","geom")
+
+# -----------------------------------------------------------------------------
+
+def main():
+ args, modules_list, modules_root_dir = get_config()
+ set_env(args, modules_list, modules_root_dir)
+ return args
+
+# -----------------------------------------------------------------------------
+
+if __name__ == "__main__":
+ import user
+ args = main()
import sys, os, optparse, shutil,glob,fnmatch
py_version = 'python%s.%s' % (sys.version_info[0], sys.version_info[1])
+verbose=0
+
# -----------------------------------------------------------------------------
def mkdir(path):
# -----------------------------------------------------------------------------
def link_module(options):
- global verbose
if not options.module:
print "Option module is mandatory"
return
- module_dir=options.module
+ module_dir=os.path.abspath(options.module)
if not os.path.exists(module_dir):
print "Module %s does not exist" % module_dir
return
#
#AC_PREREQ(2.59)
#AC_INIT(src)
-AC_INIT([Salome2 Project], [3.2.2], [gboulant@CS], [salome])
+AC_INIT([Salome2 Project], [3.2.4], [gboulant@CS], [salome])
# AC_CONFIG_AUX_DIR defines an alternative directory where to find the auxiliary
# scripts such as config.guess, install-sh, ...
PACKAGE=salome
AC_SUBST(PACKAGE)
-VERSION=3.2.2
-XVERSION=0x030202
+VERSION=3.2.4
+XVERSION=0x030204
AC_SUBST(VERSION)
AC_SUBST(XVERSION)
(versions given here are from Debian Sarge, except OpenCascade, VTK and MED,
which are not Debian packages):
-=================== ===================================================
CAS-5.2.4 OpenCascade (try binaries,a source patch is needed)
VTK-4.2.6 VTK 3D-viewer
PyQt-3.13 Python-Qt Wrapper
qt-x11-free-3.3.3 Qt library
qwt-4.2 Graph components for Qt
sip4-4.1.1 langage binding software
-=================== ===================================================
And, in order to build the documentation:
-=================== ===================================================
doxygen-1.4.2
graphviz-2.2.1
-=================== ===================================================
Additionnal software may be installed for optional features:
-=================== ===================================================
netgen4.3 + patch
tix8.1.4
openpbs-2.3.16
lsf-???
-=================== ===================================================
See SALOME_Application_ for detailed instructions to launch a Python
interpreter with full acces to the SALOME environment and services.
-.. _SALOME_Application: ./SALOME_Application.html
+.. _SALOME_Application: ./SALOME_Application.txt
You can use the embedded Python interpreter in Grahic User Interface, or an
external interpreter, with::
.. _FileTransferCORBA: ./tui/KERNEL/classSALOME__FileTransferCORBA.html
-The following example shows how to transfer a file from a remote host to the
+The following example shows how to tranfer a file from a remote host to the
client computer. Remote hostname is 'cli76cc', we would like to copy
'tkcvs_8_0_3.tar.gz' from remote to local computer. A full pathname is
required. A container is created on remote computer if it does not exist,
-<!DOCTYPE doctype PUBLIC "-//w3c//dtd html 4.0 transitional//en">\r
-<html>\r
-<head>\r
- \r
- <meta http-equiv="Content-Type"\r
- content="text/html; charset=iso-8859-1">\r
- \r
- <meta name="GENERATOR"\r
- content="Mozilla/4.73 [en] (WinNT; I) [Netscape]">\r
- <title>Main Page</title>\r
- \r
- <link href="doxygen.css" rel="stylesheet" type="text/css">\r
-</head>\r
- <body>\r
- \r
-<center>\r
-<table width="96%">\r
- <tbody>\r
- <tr>\r
- <td><a href="http://www.opencascade.com"><img\r
- src="sources/logocorp.gif" border="0" height="46" width="122">\r
- </a></td>\r
- <td> \r
- <div align="right"><a href="http://www.opencascade.org/SALOME/"><img\r
- src="sources/application.gif" border="0" height="46" width="108">\r
- </a></div>\r
- </td>\r
- </tr>\r
- \r
- </tbody>\r
-</table>\r
-</center>\r
- \r
-<h1><a name="page2">Examples</a> </h1>\r
- <font color="#3333ff">//There is a CXX example of LifeCycleCORBA using<br>\r
-</font><br>\r
-#include CORBA_CLIENT_HEADER(TestComponent)<br>\r
-#include "SALOME_NamingService.hxx"<br>\r
-#include "SALOME_LifeCycleCORBA.hxx"<br>\r
-<br>\r
-int main (int argc, char * argv[]){<br>\r
- try {<br>\r
-<font color="#3333ff"> // Initializing omniORB<br>\r
-</font> CORBA::ORB_var orb = CORBA::ORB_init(argc,\r
-argv);<br>\r
- <br>\r
-<font color="#3333ff"> // Obtain a reference\r
-to the root POA<br>\r
-</font> CORBA::Object_var obj = orb->resolve_initial_references("RootPOA")\r
-;<br>\r
- PortableServer::POA_var poa = PortableServer::POA::_narrow(obj)\r
-;<br>\r
- <br>\r
- SALOME_NamingService _NS(orb) ;<br>\r
-<br>\r
- SALOME_LifeCycleCORBA _LCC(&_NS) ;<br>\r
-<br>\r
- Engines::Component_var myComponent = _LCC.FindOrLoad_Component("FactoryServerPy","TestComponentPy");<br>\r
- if(!CORBA::is_nil(myComponent)){<br>\r
- Engines::TestComponent_var\r
-myConcreateComponent = TestComponent::_narrow(myComponent);<br>\r
-<font color="#3333ff"> //do something\r
-what you like with the interface<br>\r
- ...<br>\r
-</font> return 0;<br>\r
- }<br>\r
- }<br>\r
- catch(CORBA::COMM_FAILURE& ex){<br>\r
- cout<<"Caught system exception COMM_FAILURE\r
--- unable to contact the object.\n";<br>\r
- }catch(CORBA::SystemException&){<br>\r
- cout<<"Caught a CORBA::SystemException.\n";<br>\r
- }catch(CORBA::Exception&){<br>\r
- cout<<"Caught CORBA::Exception.\n";<br>\r
- }catch(...){<br>\r
- cout<<"Caught unknown exception.\n";<br>\r
- }<br>\r
- return 1;<br>\r
-}<br>\r
-<br>\r
-<font color="#3333ff">#The example may be rewritten on Python like this:<br>\r
-</font><br>\r
-from omniORB import CORBA<br>\r
-from SALOME_TestComponent import *<br>\r
-from SALOME_NamingServicePy import *<br>\r
-from LifeCycleCORBA import *<br>\r
-<br>\r
-try:<br>\r
- orb = CORBA.ORB_init(sys.argv,CORBA.ORB_ID)<br>\r
- _NS = SALOME_NamingService(orb)<br>\r
- _LCC = SALOME_LifeCycleCORBA(orb)<br>\r
-<br>\r
- myComponent = _LCC.FindOrLoadComponent("FactoryServerPy","TestComponentPy");<br>\r
- myConcreatComponent = myComponent._narrow(TestComponent)<br>\r
- if myConcreatComponent is not None :<font\r
- color="#3333ff"><br>\r
- //do something what you like with the\r
-interface<br>\r
- ...<br>\r
- </font> return 0<br>\r
- }<br>\r
-except CosNaming.NamingContext.NotFound, e :<br>\r
- print "Caught exception: Naming Service can't found Logger"<br>\r
-except CORBA.COMM_FAILURE, e:<br>\r
- print "Caught CORBA::SystemException CommFailure"<br>\r
-except CORBA.SystemException, e:<br>\r
- print "Caught CORBA::SystemException."<br>\r
-except CORBA.Exception, e:<br>\r
- print "Caught CORBA::Exception."<br>\r
-except Exception, e:<br>\r
- print "Caught unknown exception."<br>\r
- <br>\r
-<br>\r
-<br>\r
-</body>\r
-</html>\r
+<!DOCTYPE doctype PUBLIC "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+
+ <meta http-equiv="Content-Type"
+ content="text/html; charset=iso-8859-1">
+
+ <meta name="GENERATOR"
+ content="Mozilla/4.73 [en] (WinNT; I) [Netscape]">
+ <title>Main Page</title>
+
+ <link href="doxygen.css" rel="stylesheet" type="text/css">
+</head>
+ <body>
+
+<center>
+<table width="96%">
+ <tbody>
+ <tr>
+ <td><a href="http://www.opencascade.com"><img
+ src="sources/logocorp.gif" border="0" height="46" width="122">
+ </a></td>
+ <td>
+ <div align="right"><a href="http://www.opencascade.org/SALOME/"><img
+ src="sources/application.gif" border="0" height="46" width="108">
+ </a></div>
+ </td>
+ </tr>
+
+ </tbody>
+</table>
+</center>
+
+<h1><a name="page2">Examples</a> </h1>
+ <font color="#3333ff">//There is a CXX example of LifeCycleCORBA using<br>
+</font><br>
+#include CORBA_CLIENT_HEADER(TestComponent)<br>
+#include "SALOME_NamingService.hxx"<br>
+#include "SALOME_LifeCycleCORBA.hxx"<br>
+<br>
+int main (int argc, char * argv[]){<br>
+ try {<br>
+<font color="#3333ff"> // Initializing omniORB<br>
+</font> CORBA::ORB_var orb = CORBA::ORB_init(argc,
+argv);<br>
+ <br>
+<font color="#3333ff"> // Obtain a reference
+to the root POA<br>
+</font> CORBA::Object_var obj = orb->resolve_initial_references("RootPOA")
+;<br>
+ PortableServer::POA_var poa = PortableServer::POA::_narrow(obj)
+;<br>
+ <br>
+ SALOME_NamingService _NS(orb) ;<br>
+<br>
+ SALOME_LifeCycleCORBA _LCC(&_NS) ;<br>
+<br>
+ Engines::Component_var myComponent = _LCC.FindOrLoad_Component("FactoryServerPy","TestComponentPy");<br>
+ if(!CORBA::is_nil(myComponent)){<br>
+ Engines::TestComponent_var
+myConcreateComponent = TestComponent::_narrow(myComponent);<br>
+<font color="#3333ff"> //do something
+what you like with the interface<br>
+ ...<br>
+</font> return 0;<br>
+ }<br>
+ }<br>
+ catch(CORBA::COMM_FAILURE& ex){<br>
+ cout<<"Caught system exception COMM_FAILURE
+-- unable to contact the object.\n";<br>
+ }catch(CORBA::SystemException&){<br>
+ cout<<"Caught a CORBA::SystemException.\n";<br>
+ }catch(CORBA::Exception&){<br>
+ cout<<"Caught CORBA::Exception.\n";<br>
+ }catch(...){<br>
+ cout<<"Caught unknown exception.\n";<br>
+ }<br>
+ return 1;<br>
+}<br>
+<br>
+<font color="#3333ff">#The example may be rewritten on Python like this:<br>
+</font><br>
+from omniORB import CORBA<br>
+from SALOME_TestComponent import *<br>
+from SALOME_NamingServicePy import *<br>
+from LifeCycleCORBA import *<br>
+<br>
+try:<br>
+ orb = CORBA.ORB_init(sys.argv,CORBA.ORB_ID)<br>
+ _NS = SALOME_NamingService(orb)<br>
+ _LCC = SALOME_LifeCycleCORBA(orb)<br>
+<br>
+ myComponent = _LCC.FindOrLoadComponent("FactoryServerPy","TestComponentPy");<br>
+ myConcreatComponent = myComponent._narrow(TestComponent)<br>
+ if myConcreatComponent is not None :<font
+ color="#3333ff"><br>
+ //do something what you like with the
+interface<br>
+ ...<br>
+ </font> return 0<br>
+ }<br>
+except CosNaming.NamingContext.NotFound, e :<br>
+ print "Caught exception: Naming Service can't found Logger"<br>
+except CORBA.COMM_FAILURE, e:<br>
+ print "Caught CORBA::SystemException CommFailure"<br>
+except CORBA.SystemException, e:<br>
+ print "Caught CORBA::SystemException."<br>
+except CORBA.Exception, e:<br>
+ print "Caught CORBA::Exception."<br>
+except Exception, e:<br>
+ print "Caught unknown exception."<br>
+ <br>
+<br>
+<br>
+</body>
+</html>
-<!DOCTYPE doctype PUBLIC "-//w3c//dtd html 4.0 transitional//en">\r
-<html>\r
-<head>\r
- \r
- <meta http-equiv="Content-Type"\r
- content="text/html; charset=iso-8859-1">\r
- \r
- <meta name="GENERATOR"\r
- content="Mozilla/4.73 [en] (WinNT; I) [Netscape]">\r
- <title>Main Page</title>\r
- \r
- <link href="doxygen.css" rel="stylesheet" type="text/css">\r
-</head>\r
- <body>\r
- \r
-<center> \r
-<table width="96%">\r
- <tbody>\r
- <tr>\r
- <td><a href="http://www.opencascade.com"><img src="sources/ogocorp.gif"\r
- border="0" height="46" width="122">\r
- </a></td>\r
- <td> \r
- <div align="right"><a href="http://www.opencascade.org/SALOME/"><img\r
- src="sources/application.gif" border="0" height="46" width="108">\r
- </a></div>\r
- </td>\r
- </tr>\r
- \r
- </tbody> \r
-</table>\r
- </center>\r
- \r
-<h1><a name="page2">Examples</a> </h1>\r
- <br>\r
- <br>\r
- \r
-<div align="justify"> <big><b><i> <small>Interfaces:</small></i></b></big><br>\r
- <br>\r
- <a href="#SALOMEDS::Study_impl">SALOMEDS::Study</a><br>\r
- <a href="#SALOMEDS::StudyBuilder_impl">SALOMEDS::StudyBuilder</a><br>\r
- <a href="#SALOMEDS::StudyManager_impl">SALOMEDS::StudyManager</a><br>\r
- <a href="#SALOMEDS::SObject_impl">SALOMEDS::SObject</a><br>\r
- <a href="#SALOMEDS::SComponent_impl">SALOMEDS::SComponent</a><br>\r
- <a href="#SALOMEDS::SComponentIterator_impl">SALOMEDS::SComponentIterator</a><br>\r
- <a href="#SALOMEDS::ChildIterator_impl">SALOMEDS::ChildIterator<br>\r
- </a> <a href="#SALOMEDS::AttributeComment_impl"> SALOMEDS::AttributeComment</a><br>\r
- <br>\r
- </div>\r
- <br>\r
- <br>\r
- <br>\r
- \r
-<div align="center"> <small><small><u><big><big><a\r
- name="SALOMEDS::Study_impl"></a><font color="#000000"\r
- face="Helvetica, Arial, sans-serif"><big><big><b>SALOMEDS::Study interface</b></big></big></font></big></big></u></small></small><br>\r
- <br>\r
- \r
-<div align="left"> <big><br>\r
- </big></div>\r
- <big><br>\r
- </big> \r
-<div align="left"><b><big><a class="el"\r
- href="interfaceSALOMEDS_1_1SComponent.html">SComponent</a> FindComponent(\r
-in string <i>aComponentName </i>)</big></b><br>\r
- <i><br>\r
- <u>Find GEOMETRY component in the opened study by its name:</u></i><br>\r
- <br>\r
- str= os.getenv("TmpDir")<br>\r
- if str == None:<br>\r
- str = "/tmp"<br>\r
- file = str+"/test.hdf"<br>\r
- <br>\r
- openedStudy=batchmode_geompy.myStudyManager.Open(file)<br>\r
- <br>\r
- father = openedStudy.FindComponent("GEOM")<br>\r
- if father is None:<br>\r
- raise RuntimeError, "Geom\r
- component is not found! Wrong study is opened." <br>\r
- <br>\r
- <br>\r
- </div>\r
- \r
-<div align="left"><b><big><a class="el"\r
- href="interfaceSALOMEDS_1_1SObject.html">SObject</a> FindObject ( in string\r
-<em>anObjectName </em>)</big></b><br>\r
- <br>\r
- <u><i>Find the SObject of the box by its NameAttribute "box":</i></u><br>\r
- </div>\r
- \r
-<div align="left"><br>\r
- </div>\r
- \r
-<div align="left">box = openedStudy.FindObject("box")<br>\r
- if box is None :<br>\r
- raise RuntimeError, "box was not found! Wrong\r
-study is opened."<br>\r
- <br>\r
- <br>\r
- <small><big><big><a class="el"\r
- href="interfaceSALOMEDS_1_1SObject.html">SObject</a></big></big><b><big><big> FindObjectID\r
- ( in</big> <big><a class="el" href="namespaceSALOMEDS.html#a1">ID</a> </big><em><big>aObjectID\r
-)</big><br>\r
- #result: "/User data/Case1". <br>\r
- </em><big><em></em></big><big><em></em></big></big></b></small><u><i>Find\r
- the SObject of the box by its ID </i>"</u><u>0:1:1:2"<i>:</i></u><br>\r
- <br>\r
- </div>\r
- \r
-<div align="left">box =openedStudy.FindObjectID("0:1:1:2")<br>\r
- </div>\r
- \r
-<div align="left">if box is None :<br>\r
- raise RuntimeError, "box was not found! Wrong \r
-ID is used."<br>\r
- <br>\r
- <br>\r
- <small><big><big><a class="el"\r
- href="interfaceSALOMEDS_1_1SObject.html">SObject</a></big></big></small><big><b> FindObjectIOR\r
- ( in <a class="el" href="namespaceSALOMEDS.html#a1">ID</a> <em>aObjectIOR</em>\r
-)</b></big><br>\r
- <br>\r
- <u><i>Find the SObject </i></u><u><i>of the result on imported MED file \r
-by it's IOR:</i></u><br>\r
- <br>\r
- theResult = myVisu.ImportFile(medFile)<br>\r
- aSObj = myStudy.FindObjectIOR(theResult.GetID())<br>\r
- <br>\r
- <br>\r
- <big><b><a class="el" href="interfaceSALOMEDS_1_1SObject.html">SObject</a>\r
- FindObjectByPath ( in string <i>thePath</i> )</b></big><br>\r
- <br>\r
- <u><i>Find SObject by path to it:</i></u><br>\r
- <i><br>\r
- # create new auxiliary componen</i>t<br>\r
- aComponent = myStudyBuilder.NewComponent("Virtual Component")<br>\r
- <br>\r
- # create auxiliary subtree<br>\r
- aPath = "/Virtual Component/Case1"<br>\r
- myStudyBuilder.AddDirectory(aPath)<br>\r
- <br>\r
- aSObj = myStudy.FindObjectByPath(aPath)<br>\r
- <br>\r
- <br>\r
- <big><b>void SetContext ( in string <i>thePath</i>)</b> </big><b><big><big>/</big>\r
- string GetContext ()</big></b><br>\r
- <br>\r
- <u><i>Set context of the study to the created case and get it for printing:</i></u><br>\r
- <br>\r
- aComponent = myStudyBuilder.NewComponent("User data")<br>\r
- anAttr = aBuilder.FindOrCreateAttribute(aComponent, "AttributeName")<br>\r
- anAttrName = anAttr._narrow(SALOMEDS.AttributeName) <br>\r
- anAttrName.SetValue("User data")<br>\r
- <br>\r
- #Add a new case 'Case1' to the component 'User data'<br>\r
- aBuilder.AddDirectory("/User data/Case1")<br>\r
- <br>\r
- #Set a study context to '/User data/Case1'<br>\r
- aStudy.SetContext("/User data/Case1")<br>\r
- <br>\r
- #Print the current study context<br>\r
- print aStudy.GetContext()<br>\r
- <u><small><br>\r
- </small><i>#result: "/User data/Case1".</i></u><br>\r
- <br>\r
- <br>\r
- <big><b><a class="el" href="interfaceSALOMEDS_1_1ChildIterator.html">ChildIterator</a>\r
- NewChildIterator ( in <a class="el"\r
- href="interfaceSALOMEDS_1_1SObject.html">SObject</a> aSO ) </b></big><br>\r
- <br>\r
- <u><i>Import med file and print all mesh names that this file includes\r
-(mesh is a child of the result of imported file):</i></u><br>\r
- <br>\r
- <i># define file name</i><br>\r
- aFileName = datadir + "fra.med"<br>\r
- <br>\r
- <i># import file in visu module and get result</i><br>\r
- theVisu = batchmode_visu.myVisu<br>\r
- aResult = theVisu.ImportFile(aFileName)<br>\r
- if aResult is None : raise RuntimeError, "Error"<br>\r
- else : print "OK"<br>\r
- <br>\r
- <i># get current study and its' SObject </i> \r
- <br>\r
- myLocalStudy = theVisu.GetCurrentStudy()<br>\r
- aSObj = myLocalStudy.FindObjectIOR(aResult.GetID())<br>\r
- if aSObj is None : raise RuntimeError, "Error"<br>\r
- else : print "OK"<br>\r
- <br>\r
- <i># create iterator by SObject of the current study</i><br>\r
- aMeshIter = myLocalStudy.NewChildIterator(aSObj);<br>\r
- <br>\r
- <i># iterating in the current study (with the help of created iterator) \r
-to find all mesh names</i> <br>\r
- while aMeshIter.More() :<br>\r
- aMeshSObj = aMeshIter.Value()<br>\r
- aMeshIter.Next()<br>\r
- anAttr = aMeshSObj.FindAttribute("AttributeName")[1]<br>\r
- if anAttr is None :<br>\r
- aMeshSObj\r
- = aMeshIter.Value()<br>\r
- aMeshIter.Next()<br>\r
- anAttr\r
- = aMeshSObj.FindAttribute("AttributeName")[1]<br>\r
- anAttr = anAttr._narrow(SALOMEDS.AttributeName);<br>\r
- aMeshName = anAttr.Value()<br>\r
- print " ", aMeshName<br>\r
- <br>\r
- <br>\r
- <big><b><a class="el"\r
- href="interfaceSALOMEDS_1_1SComponentIterator.html">SComponentIterator</a> \r
-NewComponentIterator ()</b></big><br>\r
- <br>\r
- <u><i>Find the number an names of all components in the study:</i></u><br>\r
- <br>\r
- aCompItr = myStudy.NewComponentIterator()<br>\r
- <br>\r
- compNb = 0<br>\r
- while aCompItr.More():<br>\r
- aComp = aCompItr.Value()<br>\r
- aName = aComp.ComponentDataType()<br>\r
- print "Component name = ", aName<br>\r
- compNb += 1<br>\r
- aCompItr.Next()<br>\r
- <br>\r
- <br>\r
- <big><b><a class="el" href="interfaceSALOMEDS_1_1StudyBuilder.html">StudyBuilder</a> \r
-NewBuilder ()</b></big><br>\r
- </div>\r
- </div>\r
- <br>\r
- <i><u>Create a new StudyBuilder (uses to add or modify an object in the\r
-study ):</u></i><br>\r
- <br>\r
- myBuilder = myStudy.NewBuilder() <br>\r
- <br>\r
- <br>\r
- <big><b><a class="el"\r
- href="interfaceSALOMEDS_1_1AttributeStudyProperties.html">AttributeStudyProperties</a> \r
-GetProperties ()</b></big><br>\r
- <br>\r
- <i><u>Get the attribute, which contains the properties of the study, and \r
-change properties of the study </u></i><u>by changing it</u>: <br>\r
- <br>\r
- aProperties = myStudy.GetProperties()<br>\r
- if aProperties == None :<br>\r
- raise RuntimeError, "Can't create AttributeStudyProperties \r
-attribute"<br>\r
- aProperties = aProperties._narrow(SALOMEDS.AttributeStudyProperties)<br>\r
- <br>\r
- A = aProperties<br>\r
- <br>\r
- <i># print stydy properties</i><br>\r
- print "A.GetUserName()= ", A.GetUserName()<br>\r
- res,mm,hh,dd,mnth,yy=A.GetCreationDate()<br>\r
- print "A.GetCreationDate() = ", mm,hh,dd,mnth,yy<br>\r
- print "A.GetCreationMode() = ", A.GetCreationMode()<br>\r
- print "A.IsModified() = ", A.IsModified()<br>\r
- print "A.IsLocked() = ", A.IsLocked()<br>\r
- <br>\r
- <i># change the properties of the study</i><br>\r
- if A.IsLocked() == 0 :<br>\r
- A.SetUserName("tester"); print 'A.SetUserName("tester"), \r
-A.GetUserName() = ', A.GetUserName()<br>\r
- A.SetCreationDate(11,11,11,11,2002); print 'A.SetCreationDate(11,11,11,11,2002), \r
-A.GetCreationDate() =', A.GetCreationDate()<br>\r
- print "A.IsModified() = ", A.IsModified()<br>\r
- A.SetLocked(1)<br>\r
- <br>\r
- <br>\r
- <big><b>boolean IsModified ()</b></big><br>\r
- <br>\r
- <u><i>Find if study is modified:</i></u><br>\r
- <br>\r
- IsModified = myStudy.IsModified()<br>\r
- <br>\r
- if IsModified == 1:<br>\r
- print "The study is modified and not saved"<br>\r
- <br>\r
- <br>\r
- <big><b>boolean IsEmpty ()</b></big><br>\r
- <br>\r
- <u><i>Find if study is empty:</i></u><br>\r
- <br>\r
- IsEmpty = myStudy.IsEmpty()<br>\r
- <br>\r
- if IsEmpty == 1:<br>\r
- print "The study is empty"<br>\r
- <br>\r
- <br>\r
- <br>\r
- <br>\r
- \r
-<div align="center"><small><small><u><big><big><a\r
- name="SALOMEDS::StudyBuilder_impl"></a><font color="#000000"\r
- face="Helvetica, Arial, sans-serif"><big><big><b>SALOMEDS::StudyBuilder\r
-interface</b></big></big></font></big></big></u></small></small><br>\r
- </div>\r
- <br>\r
- <br>\r
- <br>\r
- <big><b><a class="el" href="interfaceSALOMEDS_1_1SComponent.html">SComponent</a> \r
-NewComponent ( in string <i>ComponentDataType</i> )</b></big><br>\r
- <br>\r
- <u><i>Create Geometry SComponent:</i></u><br>\r
- <br>\r
- myBuilder = myStudy.NewBuilder()<br>\r
- father = myBuilder.NewComponent("GEOM")<br>\r
- <br>\r
- <big><b><br>\r
- void DefineComponentInstance ( in <a class="el"\r
- href="interfaceSALOMEDS_1_1SComponent.html">SComponent</a> <i>aComponent</i>,\r
-in Object <i>ComponentIOR</i> )</b></big><br>\r
- <br>\r
- <u><i>Define the instance to the created geometry component:</i></u><br>\r
- <br>\r
- <i># find geom component</i><br>\r
- myLCC = batchmode_salome.lcc<br>\r
- geom = myLCC.FindOrLoadComponent("FactoryServer", "Geometry")<br>\r
- geom = geom._narrow(GEOM.GEOM_Gen)<br>\r
- geom.GetCurrentStudy(myStudyId)<br>\r
- <br>\r
- myBuilder = myStudy.NewBuilder()<br>\r
- <br>\r
- father = myBuilder.NewComponent("GEOM")<br>\r
- myBuilder.DefineComponentInstance(father,geom)<br>\r
- <br>\r
- <br>\r
- <big><b><a class="el" href="interfaceSALOMEDS_1_1SObject.html">SObject</a> \r
-NewObject ( in <a class="el"\r
- href="interfaceSALOMEDS_1_1SObject.html">SObject</a> <i>theFatherObject</i>\r
-)</b></big><br>\r
- <br>\r
- <u><i>Create box and add it to study:</i></u><br>\r
- <br>\r
- from batchmode_geompy import *<br>\r
- <br>\r
- <i># create a box</i><br>\r
- box = geom.MakeBox(0,0,0,100,100,150)<br>\r
- <br>\r
- ior = orb.object_to_string(box)<br>\r
- box._set_Name(ior) <br>\r
- <br>\r
- <i># create Geometry SComponent</i><br>\r
- father = myBuilder.NewComponent("GEOM")<br>\r
- A1 = myBuilder.FindOrCreateAttribute(father, "AttributeName");<br>\r
- FName = A1._narrow(SALOMEDS.AttributeName)<br>\r
- FName.SetValue("Geometry")<br>\r
- myBuilder.DefineComponentInstance(father,geom)<br>\r
- <br>\r
- <i># add box to Study</i><br>\r
- myBuilder.NewCommand()<br>\r
- newObj = myBuilder.NewObject(father)<br>\r
- A1 = myBuilder.FindOrCreateAttribute(newObj, "AttributeIOR");<br>\r
- ObjIOR = A1._narrow(SALOMEDS.AttributeIOR)<br>\r
- ObjIOR.SetValue(ior)<br>\r
- A2 = myBuilder.FindOrCreateAttribute(newObj, "AttributeName");<br>\r
- ObjName = A2._narrow(SALOMEDS.AttributeName)<br>\r
- ObjName.SetValue("Common_operation")<br>\r
- id = newObj.GetID()<br>\r
- box._set_StudyShapeId(id)<br>\r
- myBuilder.CommitCommand()<br>\r
- <br>\r
- <br>\r
- <b><big>void RemoveObject ( in <a class="el"\r
- href="interfaceSALOMEDS_1_1SObject.html">SObject</a> <i>anObject</i> )</big></b><br>\r
- <br>\r
- <u><i># Remove CutPlanes SObject from the StudyBuilder (delete cutplanes):</i></u><br>\r
- <br>\r
- SObj=myStudy.FindObjectIOR(cutplanes.GetID())<br>\r
- myBuilder = newStudy.NewBuilder()<br>\r
- myBuilder.RemoveObject(SObj)<br>\r
- <br>\r
- <b><big><br>\r
- void LoadWith ( in <a class="el"\r
- href="interfaceSALOMEDS_1_1SComponent.html">SComponent</a><i> sco</i>, in\r
-<a class="el" href="interfaceSALOMEDS_1_1Driver.html">Driver</a> <i>Engine</i>\r
-) raises (<a class="el" href="exceptionSALOME_1_1SALOME__Exception.html">SALOME::SALOME_Exception</a>)</big></b><br>\r
- <br>\r
- <i><u># Load Visu component:</u></i><br>\r
- <br>\r
- myBuilder = openedStudy.NewBuilder()<br>\r
- SCom=openedStudy.FindComponent("VISU")<br>\r
- myBuilder.LoadWith(SCom ,myVisu)<br>\r
- <br>\r
- <br>\r
- <big><b><a class="el" href="interfaceSALOMEDS_1_1GenericAttribute.html">GenericAttribute</a> \r
-FindOrCreateAttribute ( in <a class="el"\r
- href="interfaceSALOMEDS_1_1SObject.html">SObject</a> <i>anObject</i>, \r
-in string <i>aTypeOfAttribute</i>)</b></big><br>\r
- <br>\r
- <u><i>Create AttributeName attribute for created component an set value\r
-to it:</i></u><br>\r
- <br>\r
- myBuilder = myStudy.NewBuilder()<br>\r
- aComponent = myBuilder.NewComponent("User data")<br>\r
- <br>\r
- anAttr = myBuilder.FindOrCreateAttribute(aComponent, "AttributeName")<br>\r
- <br>\r
- anAttrName = anAttr._narrow(SALOMEDS.AttributeName) <br>\r
- anAttrName.SetValue("User data")<br>\r
- <br>\r
- <br>\r
- <big><b>boolean FindAttribute ( in <a class="el"\r
- href="interfaceSALOMEDS_1_1SObject.html">SObject</a> <i>anObject,</i> out<i> </i><a\r
- class="el" href="interfaceSALOMEDS_1_1GenericAttribute.html">GenericAttribute</a><i> \r
-anAttribute</i>, in string <i>aTypeOfAttribute</i> )</b></big><br>\r
- <big><b><br>\r
- </b></big><i><u>Find AttributeName attribute of the field and print the\r
-field name:</u></i><br>\r
- <br>\r
- aFieldSObj = myStudy.FindObject("Head, -")<br>\r
- <br>\r
- myStudyBuilder.FindAttribute( aFieldSObj, anAttr, "AttributeName")<br>\r
- if res == 0:<br>\r
- raise RuntimeError, "Error: Attribute not \r
-found"<br>\r
- <br>\r
- anAttr = anAttr._narrow(SALOMEDS.AttributeName);<br>\r
- aFieldName = anAttr.Value()<br>\r
- print " ", aFieldName<br>\r
- <br>\r
- <br>\r
- <b><big>void RemoveAttribute ( in <a class="el"\r
- href="interfaceSALOMEDS_1_1SObject.html">SObject</a> <i>anObject</i>, in\r
-string <i>aTypeOfAttribute</i> )</big></b><br>\r
- <big><b><br>\r
- </b><u><i><small>Remove AttributeSelectable attribute of the field SObject:</small></i></u><br>\r
- <b><br>\r
- </b></big>aFieldSObj = myStudy.FindObject("Head, -")<br>\r
- <br>\r
- myStudyBuilder.RemoveAttribute( aFieldSObj, "AttributeSelectable")<br>\r
- <big><b><br>\r
- <br>\r
- </b><b>void Addreference ( in <big> <small><a class="el"\r
- href="interfaceSALOMEDS_1_1SObject.html">SObject</a></small></big><small> \r
-</small><i>anObject</i>, in </b><b> <a class="el"\r
- href="interfaceSALOMEDS_1_1SObject.html">SObject</a> <i>theReferencedObject</i>\r
-)</b></big><br>\r
- <br>\r
- <u><i>Create a reference between created SObject and the existing field:</i></u><br>\r
- <br>\r
- aFieldSObj = myStudy.FindObject("Head, -")<br>\r
- aNewSObj = myBuilder.NewObject(myVisu)<br>\r
- <br>\r
- myBuilder.Addreference(aFieldSObj, aNewSObj)<br>\r
- <big><b><br>\r
- <br>\r
- </b></big><big><small><i><u><a name="NewCommand_ex"></a></u></i></small></big><big><small><b><big>void \r
-NewCommand ()<br>\r
- <br>\r
- </big></b><i><u>Create new command wich containes actions for changing the \r
-properties of the study:</u></i><b><big><br>\r
- <br>\r
- </big></b></small></big>A = myStudy.GetProperties()<br>\r
- A = aProperties._narrow(SALOMEDS.AttributeStudyProperties)<br>\r
- <br>\r
- myBuilder = myStudy.NewBuilder()<br>\r
- <br>\r
- myBuilder.NewCommand() <i> # creates a new command</i><br>\r
- <br>\r
- <i># change the properties of the study</i><br>\r
- if A.IsLocked() == 0 :<br>\r
- A.SetUserName("tester"); print 'A.SetUserName("tester"), \r
-A.GetUserName() = ', A.GetUserName()<br>\r
- A.SetCreationDate(11,11,11,11,2002); print 'A.SetCreationDate(11,11,11,11,2002), \r
-A.GetCreationDate() =', A.GetCreationDate()<br>\r
- print "A.IsModified() = ", A.IsModified()<br>\r
- A.SetLocked(1)<br>\r
- <big><small><br>\r
- </small></big>myBuilder.CommitCommand() <i># commits all actions declared \r
-within the created command</i><big><br>\r
- <b><br>\r
- <br>\r
- void CommitCommand()<br>\r
- </b><small><br>\r
- </small><i><small>See the end of the <a href="#NewCommand_ex">previous example</a></small></i><b><br>\r
- <br>\r
- <br>\r
- void AbortCommand ()</b></big><br>\r
- <br>\r
- <big><small><i><u>Create new command wich containes actions for changing \r
-the properties of the study, cancel all declared actions:</u></i></small></big><br>\r
- <br>\r
- A = myStudy.GetProperties()<br>\r
- A = aProperties._narrow(SALOMEDS.AttributeStudyProperties)<br>\r
- <br>\r
- myBuilder = myStudy.NewBuilder()<br>\r
- <br>\r
- myBuilder.NewCommand() <i> # creates a new command</i><br>\r
- <br>\r
- <i># change the properties of the study</i><br>\r
- if A.IsLocked() == 0 :<br>\r
- A.SetUserName("tester"); print 'A.SetUserName("tester"), \r
-A.GetUserName() = ', A.GetUserName()<br>\r
- A.SetCreationDate(11,11,11,11,2002); print 'A.SetCreationDate(11,11,11,11,2002), \r
-A.GetCreationDate() =', A.GetCreationDate()<br>\r
- print "A.IsModified() = ", A.IsModified()<br>\r
- A.SetLocked(1)<br>\r
- <big><small><br>\r
- </small></big>myBuilder.AbortCommand() <i># abort all actions declared\r
-within the created command</i><br>\r
- <br>\r
- <br>\r
- <big><b>void Undo () raises (<a class="el"\r
- href="exceptionSALOMEDS_1_1StudyBuilder_1_1LockProtection.html">LockProtection</a>)</b><b> \r
-<small>, </small></b></big><br>\r
- <big><b>void Redo ()</b></big> <big><b>raises (<a class="el"\r
- href="exceptionSALOMEDS_1_1StudyBuilder_1_1LockProtection.html">LockProtection</a>)</b></big><br>\r
- <br>\r
- <big><small><i><u>Create new command wich containes actions for changing \r
-the properties of the study, <br>\r
- cancel all declared actions and then redo it with the help of undo/redo\r
-mechanism:</u></i></small></big><br>\r
- <br>\r
- A = myStudy.GetProperties()<br>\r
- A = aProperties._narrow(SALOMEDS.AttributeStudyProperties)<br>\r
- <br>\r
- myBuilder = myStudy.NewBuilder()<br>\r
- <br>\r
- myBuilder.NewCommand() <i> # creates a new command</i><br>\r
- <br>\r
- <i># change the properties of the study</i><br>\r
- if A.IsLocked() == 0 :<br>\r
- A.SetUserName("tester"); print 'A.SetUserName("tester"), \r
-A.GetUserName() = ', A.GetUserName()<br>\r
- A.SetCreationDate(11,11,11,11,2002); print 'A.SetCreationDate(11,11,11,11,2002), \r
-A.GetCreationDate() =', A.GetCreationDate()<br>\r
- print "A.IsModified() = ", A.IsModified()<br>\r
- A.SetLocked(1)<br>\r
- <big><small><br>\r
- </small></big>myBuilder.CommitCommand() <i># commits all actions declared \r
-within the created command</i><br>\r
- <big><small><br>\r
- </small></big>myBuilder.Undo() <i># cancels all actions of the command<br>\r
- <br>\r
- </i>myBuilder.Redo() <i># redoes all actions of the command</i><br>\r
- <i><br>\r
- <br>\r
- <br>\r
- </i> \r
-<div align="center"><small><small><u><big><big><a\r
- name="SALOMEDS::StudyManager_impl"></a><font color="#000000"\r
- face="Helvetica, Arial, sans-serif"><big><big><b>SALOMEDS::StudyManager\r
-interface</b></big></big></font></big></big></u></small></small><br>\r
- </div>\r
- <i><br>\r
- <br>\r
- <br>\r
- </i><big><b><a class="el" href="interfaceSALOMEDS_1_1Study.html">Study</a> \r
-NewStudy ( in string <i>study_name</i> )</b></big><br>\r
- <i><br>\r
- <u>Create the study with the name "Test_Study":</u></i><br>\r
- <br>\r
- myNewStudy = myStudyManager.NewStudy("Test_Study")<br>\r
- <br>\r
- <br>\r
- <big><b><a class="el" href="interfaceSALOMEDS_1_1Study.html">Study</a> Open\r
-( in </b></big><a class="el" href="namespaceSALOMEDS.html#a0">URL</a><big><b> \r
-<i>aStudyUrl</i> ) raises </b></big>(<a class="el"\r
- href="exceptionSALOME_1_1SALOME__Exception.html">SALOME::SALOME_Exception</a>)<br>\r
- <br>\r
- <i><u>Open the study saved in the HDF file:</u></i><br>\r
- <br>\r
- file = 'saved_study.hdf'<br>\r
- <br>\r
- openedStudy=myStudyManager.Open(file)<br>\r
- <br>\r
- if openedStudy == None:<br>\r
- raise RuntimeError, "Can't open saved study!"<br>\r
- <br>\r
- <br>\r
- <big><b>void Save (in <a class="el"\r
- href="interfaceSALOMEDS_1_1Study.html">Study</a> <i>aStudy</i>, in boolean\r
-<i>theMultifile</i> )</b></big><big><b><br>\r
- <br>\r
- </b><small><u><i>Open study, import med file into it and save with the old \r
-path and filename:</i></u></small><b><br>\r
- <br>\r
- </b></big>file = "saved_study.hdf"<br>\r
- myMedFile ="medfile.med"<br>\r
- <br>\r
- openedStudy=myStudyManager.Open(file)<br>\r
- <br>\r
- myVisu.SetCurrentStudy(openedStudy)<br>\r
- myResult = myVisu.ImportFile(myMedFile)<br>\r
- <br>\r
- myStudyManager.Save(openedStudy, 0)<br>\r
- <br>\r
- <big><b><br>\r
- void SaveAs ( in <small><a class="el" href="namespaceSALOMEDS.html#a0">URL</a></small> \r
-<i>aUrl</i>, in <small> <a class="el"\r
- href="interfaceSALOMEDS_1_1Study.html">Study</a> </small><i>aStudy</i>,\r
- <small><em></em></small></b></big><big><b>in boolean <i>theMultifile\r
-</i>)</b><br>\r
- <br>\r
- <small><u><i>Open study from the file and resave it in several files (using \r
-Multifile option while saving)</i></u></small><br>\r
- <br>\r
- </big>file = "saved_study.hdf"<br>\r
- newfile = "resaved_study.hdf"<br>\r
- <br>\r
- openedStudy=myStudyManager.Open(file)<br>\r
- myStudyManager.SaveAs(newfile, openedStudy, 1)<br>\r
- <big><br>\r
- <br>\r
- void Close ( in <a class="el"\r
- href="interfaceSALOMEDS_1_1Study.html">Study</a> aStudy )</big><br>\r
- <br>\r
- <u><i>Close just opened study:</i></u><br>\r
- <br>\r
- file = "saved_study.hdf"<br>\r
- <br>\r
- openedStudy=myStudyManager.Open(file)<br>\r
- myStudyManager.Close(openedStudy)<br>\r
- <br>\r
- <br>\r
- <br>\r
- \r
-<div align="center"><small><small><u><big><big><a\r
- name="SALOMEDS::SObject_impl"></a><font color="#000000"\r
- face="Helvetica, Arial, sans-serif"><big><big><b>SALOMEDS::SObject interface</b></big></big></font></big></big></u></small></small><br>\r
- </div>\r
- <br>\r
- <br>\r
- <br>\r
- <big><b><a class="el" href="namespaceSALOMEDS.html#a1">ID</a> GetID ()</b></big><br>\r
- <br>\r
- <u><i>Create new SObject and get its ID:</i></u><br>\r
- <br>\r
- mySObj = myBuilder.NewObject(myFather)<br>\r
- <br>\r
- myID = mySObj.GetID()<br>\r
- <br>\r
- <br>\r
- <big><b><a class="el" href="interfaceSALOMEDS_1_1SComponent.html">SComponent</a> \r
-GetFatherComponent ()</b></big><br>\r
- <br>\r
- <u><i>Get father component of the SObject:</i></u><br>\r
- <br>\r
- myFather = mySObj.GetFatherComponent();<br>\r
- <br>\r
- <br>\r
- <big><b>boolean FindAttribute ( out <a class="el"\r
- href="interfaceSALOMEDS_1_1GenericAttribute.html">GenericAttribute</a> <i>anAttribute</i>,\r
-in string <i>aTypeOfAttribute </i>)</b></big><br>\r
- <br>\r
- <u><i>Find the AttributeName attribute of the field:</i></u><br>\r
- <br>\r
- aFieldSObj = myStudy.FindObject("Head, -")<br>\r
- <br>\r
- res = aFieldSObj.FindAttribute( anAttr, "AttributeName")<br>\r
- if res == 0:<br>\r
- raise RuntimeError, "Error: Attribute not \r
-found"<br>\r
- <br>\r
- <br>\r
- <big><b><a class="el" href="namespaceSALOMEDS.html#a9">ListOfAttributes</a> \r
-GetAllAttributes ()</b></big><br>\r
- <br>\r
- <i><u>Get list of all attributes of the SObject, find the number of attributes:</u></i><br>\r
- <br>\r
- attrs = mySObj.GetAllAttributes()<br>\r
- aLen = len(attrs) <i># number of attributes</i><br>\r
- <br>\r
- <br>\r
- <br>\r
- <br>\r
- \r
-<div align="center"><small><small><u><big><big><a\r
- name="SALOMEDS::SComponent_impl"></a><font color="#000000"\r
- face="Helvetica, Arial, sans-serif"><big><big><b>SALOMEDS::SComponent interface</b></big></big></font></big></big></u></small></small><br>\r
- </div>\r
- <br>\r
- <br>\r
- <br>\r
- <big><b>string ComponentDataType ()</b></big><br>\r
- <br>\r
- <i><u><a name="ComponentIterator_ex"></a>Print names of all components wich \r
-the study contains:</u></i><br>\r
- <br>\r
- aCompItr = myStudy.NewComponentIterator() <br>\r
- <br>\r
- while aCompItr.More():<br>\r
- aComp = aCompItr.Value()<br>\r
- aName = aComp.ComponentDataType()<br>\r
- print "Component name = ", aName<br>\r
- aCompItr.Next()<br>\r
- <br>\r
- <br>\r
- <i><b>Other methods are inherited.</b></i><br>\r
- <br>\r
- <br>\r
- <br>\r
- <br>\r
- \r
-<div align="center"><small><small><u><big><big><a\r
- name="SALOMEDS::SComponentIterator_impl"></a><font color="#000000"\r
- face="Helvetica, Arial, sans-serif"><big><big><b>SALOMEDS::SComponentIterator\r
- interface</b></big></big></font></big></big></u></small></small><br>\r
- </div>\r
- <br>\r
- <br>\r
- <br>\r
- <big><b>boolean More (), </b><b>void Next (), </b></big><big><b><a\r
- class="el" href="interfaceSALOMEDS_1_1SComponent.html">SComponent</a> Value\r
-()</b></big><br>\r
- <br>\r
- <big><i><small>See <a href="examples_Study.html#ComponentIterator_ex">another \r
-example</a></small></i></big><br>\r
- <br>\r
- <br>\r
- <br>\r
- \r
-<div align="center"><small><small><u><big><big><a\r
- name="SALOMEDS::ChildIterator_impl"></a><font color="#000000"\r
- face="Helvetica, Arial, sans-serif"><big><big><b>SALOMEDS::ChildIterator\r
- interface</b></big></big></font></big></big></u></small></small><br>\r
- </div>\r
- <br>\r
- <br>\r
- <br>\r
- <big><b>boolean More () , void Next (), <a class="el"\r
- href="interfaceSALOMEDS_1_1SObject.html">SObject</a> Value ()</b></big><br>\r
- <br>\r
- <u><i>Print all mesh names of imported MED file with the help of ChildIterator:</i></u><br>\r
- <br>\r
- aResult = myVisu.ImportFile("MedFile.med")<br>\r
- <br>\r
- myStudy = theVisu.GetCurrentStudy()<br>\r
- aSObj = myLocalStudy.FindObjectIOR(aResult.GetID())<br>\r
- <br>\r
- aMeshIter = myLocalStudy.NewChildIterator(aSObj); <i> # creating new \r
-child iterator</i><br>\r
- <br>\r
- while aMeshIter.More() : \r
- \r
- <i># check if one more\r
-child level exists. </i><br>\r
- aMeshSObj = aMeshIter.Value() \r
- \r
- # <i>returns the SObject corresponding \r
-to the current object found by the iterator. </i> <br>\r
- aMeshIter.Next() <i> \r
- \r
- \r
- # passes the iterator to the next level. </i><br>\r
- anAttr = aMeshSObj.FindAttribute("AttributeName")[1]<br>\r
- if anAttr is None :<br>\r
- \r
-aMeshSObj = aMeshIter.Value()<br>\r
- \r
- aMeshIter.Next()<br>\r
- \r
-anAttr = aMeshSObj.FindAttribute("AttributeName")[1]<br>\r
- anAttr = anAttr._narrow(SALOMEDS.AttributeName);<br>\r
- aMeshName = anAttr.Value()<br>\r
- print " ", aMeshName<br>\r
- <br>\r
- <br>\r
- <br>\r
- \r
-<div align="center"><small><small><u><big><big><a\r
- name="SALOMEDS::AttributeComment_impl"\r
- href="#SALOMEDS::AttributeComment_impl"></a><font color="#000000"\r
- face="Helvetica, Arial, sans-serif"><big><big><b>SALOMEDS::AttributeComment\r
- interface</b></big></big></font></big></big></u></small></small><br>\r
- </div>\r
- <br>\r
- <br>\r
- <big><b>string Value (), void SetValue ( in string <i>value </i>)</b></big><br>\r
- <br>\r
- <u><i>Find the AttributeComment attribute of the "Head" field in the study, \r
-print it, then change it to "My Comment" string:</i></u><br>\r
- <br>\r
- aFieldSObj = myStudy.FindObject("Head, -")<br>\r
- anAttr = aFieldSObj.FindAttribute("AttributeComment")[1]<br>\r
- \r
-anAttr = anAttr._narrow(SALOMEDS.AttributeComment);<br>\r
- \r
-aFieldComment = anAttr.Value()<br>\r
- <br>\r
- print "AttributeComment", anAttr<br>\r
- <br>\r
- anAttr.SetValue ("My Comment")<br>\r
- \r
-<pre></pre>\r
- <br>\r
-</body>\r
-</html>\r
+<!DOCTYPE doctype PUBLIC "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+
+ <meta http-equiv="Content-Type"
+ content="text/html; charset=iso-8859-1">
+
+ <meta name="GENERATOR"
+ content="Mozilla/4.73 [en] (WinNT; I) [Netscape]">
+ <title>Main Page</title>
+
+ <link href="doxygen.css" rel="stylesheet" type="text/css">
+</head>
+ <body>
+
+<center>
+<table width="96%">
+ <tbody>
+ <tr>
+ <td><a href="http://www.opencascade.com"><img src="sources/ogocorp.gif"
+ border="0" height="46" width="122">
+ </a></td>
+ <td>
+ <div align="right"><a href="http://www.opencascade.org/SALOME/"><img
+ src="sources/application.gif" border="0" height="46" width="108">
+ </a></div>
+ </td>
+ </tr>
+
+ </tbody>
+</table>
+ </center>
+
+<h1><a name="page2">Examples</a> </h1>
+ <br>
+ <br>
+
+<div align="justify"> <big><b><i> <small>Interfaces:</small></i></b></big><br>
+ <br>
+ <a href="#SALOMEDS::Study_impl">SALOMEDS::Study</a><br>
+ <a href="#SALOMEDS::StudyBuilder_impl">SALOMEDS::StudyBuilder</a><br>
+ <a href="#SALOMEDS::StudyManager_impl">SALOMEDS::StudyManager</a><br>
+ <a href="#SALOMEDS::SObject_impl">SALOMEDS::SObject</a><br>
+ <a href="#SALOMEDS::SComponent_impl">SALOMEDS::SComponent</a><br>
+ <a href="#SALOMEDS::SComponentIterator_impl">SALOMEDS::SComponentIterator</a><br>
+ <a href="#SALOMEDS::ChildIterator_impl">SALOMEDS::ChildIterator<br>
+ </a> <a href="#SALOMEDS::AttributeComment_impl"> SALOMEDS::AttributeComment</a><br>
+ <br>
+ </div>
+ <br>
+ <br>
+ <br>
+
+<div align="center"> <small><small><u><big><big><a
+ name="SALOMEDS::Study_impl"></a><font color="#000000"
+ face="Helvetica, Arial, sans-serif"><big><big><b>SALOMEDS::Study interface</b></big></big></font></big></big></u></small></small><br>
+ <br>
+
+<div align="left"> <big><br>
+ </big></div>
+ <big><br>
+ </big>
+<div align="left"><b><big><a class="el"
+ href="interfaceSALOMEDS_1_1SComponent.html">SComponent</a> FindComponent(
+in string <i>aComponentName </i>)</big></b><br>
+ <i><br>
+ <u>Find GEOMETRY component in the opened study by its name:</u></i><br>
+ <br>
+ str= os.getenv("TmpDir")<br>
+ if str == None:<br>
+ str = "/tmp"<br>
+ file = str+"/test.hdf"<br>
+ <br>
+ openedStudy=batchmode_geompy.myStudyManager.Open(file)<br>
+ <br>
+ father = openedStudy.FindComponent("GEOM")<br>
+ if father is None:<br>
+ raise RuntimeError, "Geom
+ component is not found! Wrong study is opened." <br>
+ <br>
+ <br>
+ </div>
+
+<div align="left"><b><big><a class="el"
+ href="interfaceSALOMEDS_1_1SObject.html">SObject</a> FindObject ( in string
+<em>anObjectName </em>)</big></b><br>
+ <br>
+ <u><i>Find the SObject of the box by its NameAttribute "box":</i></u><br>
+ </div>
+
+<div align="left"><br>
+ </div>
+
+<div align="left">box = openedStudy.FindObject("box")<br>
+ if box is None :<br>
+ raise RuntimeError, "box was not found! Wrong
+study is opened."<br>
+ <br>
+ <br>
+ <small><big><big><a class="el"
+ href="interfaceSALOMEDS_1_1SObject.html">SObject</a></big></big><b><big><big> FindObjectID
+ ( in</big> <big><a class="el" href="namespaceSALOMEDS.html#a1">ID</a> </big><em><big>aObjectID
+)</big><br>
+ #result: "/User data/Case1". <br>
+ </em><big><em></em></big><big><em></em></big></big></b></small><u><i>Find
+ the SObject of the box by its ID </i>"</u><u>0:1:1:2"<i>:</i></u><br>
+ <br>
+ </div>
+
+<div align="left">box =openedStudy.FindObjectID("0:1:1:2")<br>
+ </div>
+
+<div align="left">if box is None :<br>
+ raise RuntimeError, "box was not found! Wrong
+ID is used."<br>
+ <br>
+ <br>
+ <small><big><big><a class="el"
+ href="interfaceSALOMEDS_1_1SObject.html">SObject</a></big></big></small><big><b> FindObjectIOR
+ ( in <a class="el" href="namespaceSALOMEDS.html#a1">ID</a> <em>aObjectIOR</em>
+)</b></big><br>
+ <br>
+ <u><i>Find the SObject </i></u><u><i>of the result on imported MED file
+by it's IOR:</i></u><br>
+ <br>
+ theResult = myVisu.ImportFile(medFile)<br>
+ aSObj = myStudy.FindObjectIOR(theResult.GetID())<br>
+ <br>
+ <br>
+ <big><b><a class="el" href="interfaceSALOMEDS_1_1SObject.html">SObject</a>
+ FindObjectByPath ( in string <i>thePath</i> )</b></big><br>
+ <br>
+ <u><i>Find SObject by path to it:</i></u><br>
+ <i><br>
+ # create new auxiliary componen</i>t<br>
+ aComponent = myStudyBuilder.NewComponent("Virtual Component")<br>
+ <br>
+ # create auxiliary subtree<br>
+ aPath = "/Virtual Component/Case1"<br>
+ myStudyBuilder.AddDirectory(aPath)<br>
+ <br>
+ aSObj = myStudy.FindObjectByPath(aPath)<br>
+ <br>
+ <br>
+ <big><b>void SetContext ( in string <i>thePath</i>)</b> </big><b><big><big>/</big>
+ string GetContext ()</big></b><br>
+ <br>
+ <u><i>Set context of the study to the created case and get it for printing:</i></u><br>
+ <br>
+ aComponent = myStudyBuilder.NewComponent("User data")<br>
+ anAttr = aBuilder.FindOrCreateAttribute(aComponent, "AttributeName")<br>
+ anAttrName = anAttr._narrow(SALOMEDS.AttributeName) <br>
+ anAttrName.SetValue("User data")<br>
+ <br>
+ #Add a new case 'Case1' to the component 'User data'<br>
+ aBuilder.AddDirectory("/User data/Case1")<br>
+ <br>
+ #Set a study context to '/User data/Case1'<br>
+ aStudy.SetContext("/User data/Case1")<br>
+ <br>
+ #Print the current study context<br>
+ print aStudy.GetContext()<br>
+ <u><small><br>
+ </small><i>#result: "/User data/Case1".</i></u><br>
+ <br>
+ <br>
+ <big><b><a class="el" href="interfaceSALOMEDS_1_1ChildIterator.html">ChildIterator</a>
+ NewChildIterator ( in <a class="el"
+ href="interfaceSALOMEDS_1_1SObject.html">SObject</a> aSO ) </b></big><br>
+ <br>
+ <u><i>Import med file and print all mesh names that this file includes
+(mesh is a child of the result of imported file):</i></u><br>
+ <br>
+ <i># define file name</i><br>
+ aFileName = datadir + "fra.med"<br>
+ <br>
+ <i># import file in visu module and get result</i><br>
+ theVisu = batchmode_visu.myVisu<br>
+ aResult = theVisu.ImportFile(aFileName)<br>
+ if aResult is None : raise RuntimeError, "Error"<br>
+ else : print "OK"<br>
+ <br>
+ <i># get current study and its' SObject </i>
+ <br>
+ myLocalStudy = theVisu.GetCurrentStudy()<br>
+ aSObj = myLocalStudy.FindObjectIOR(aResult.GetID())<br>
+ if aSObj is None : raise RuntimeError, "Error"<br>
+ else : print "OK"<br>
+ <br>
+ <i># create iterator by SObject of the current study</i><br>
+ aMeshIter = myLocalStudy.NewChildIterator(aSObj);<br>
+ <br>
+ <i># iterating in the current study (with the help of created iterator)
+to find all mesh names</i> <br>
+ while aMeshIter.More() :<br>
+ aMeshSObj = aMeshIter.Value()<br>
+ aMeshIter.Next()<br>
+ anAttr = aMeshSObj.FindAttribute("AttributeName")[1]<br>
+ if anAttr is None :<br>
+ aMeshSObj
+ = aMeshIter.Value()<br>
+ aMeshIter.Next()<br>
+ anAttr
+ = aMeshSObj.FindAttribute("AttributeName")[1]<br>
+ anAttr = anAttr._narrow(SALOMEDS.AttributeName);<br>
+ aMeshName = anAttr.Value()<br>
+ print " ", aMeshName<br>
+ <br>
+ <br>
+ <big><b><a class="el"
+ href="interfaceSALOMEDS_1_1SComponentIterator.html">SComponentIterator</a>
+NewComponentIterator ()</b></big><br>
+ <br>
+ <u><i>Find the number an names of all components in the study:</i></u><br>
+ <br>
+ aCompItr = myStudy.NewComponentIterator()<br>
+ <br>
+ compNb = 0<br>
+ while aCompItr.More():<br>
+ aComp = aCompItr.Value()<br>
+ aName = aComp.ComponentDataType()<br>
+ print "Component name = ", aName<br>
+ compNb += 1<br>
+ aCompItr.Next()<br>
+ <br>
+ <br>
+ <big><b><a class="el" href="interfaceSALOMEDS_1_1StudyBuilder.html">StudyBuilder</a>
+NewBuilder ()</b></big><br>
+ </div>
+ </div>
+ <br>
+ <i><u>Create a new StudyBuilder (uses to add or modify an object in the
+study ):</u></i><br>
+ <br>
+ myBuilder = myStudy.NewBuilder() <br>
+ <br>
+ <br>
+ <big><b><a class="el"
+ href="interfaceSALOMEDS_1_1AttributeStudyProperties.html">AttributeStudyProperties</a>
+GetProperties ()</b></big><br>
+ <br>
+ <i><u>Get the attribute, which contains the properties of the study, and
+change properties of the study </u></i><u>by changing it</u>: <br>
+ <br>
+ aProperties = myStudy.GetProperties()<br>
+ if aProperties == None :<br>
+ raise RuntimeError, "Can't create AttributeStudyProperties
+attribute"<br>
+ aProperties = aProperties._narrow(SALOMEDS.AttributeStudyProperties)<br>
+ <br>
+ A = aProperties<br>
+ <br>
+ <i># print stydy properties</i><br>
+ print "A.GetUserName()= ", A.GetUserName()<br>
+ res,mm,hh,dd,mnth,yy=A.GetCreationDate()<br>
+ print "A.GetCreationDate() = ", mm,hh,dd,mnth,yy<br>
+ print "A.GetCreationMode() = ", A.GetCreationMode()<br>
+ print "A.IsModified() = ", A.IsModified()<br>
+ print "A.IsLocked() = ", A.IsLocked()<br>
+ <br>
+ <i># change the properties of the study</i><br>
+ if A.IsLocked() == 0 :<br>
+ A.SetUserName("tester"); print 'A.SetUserName("tester"),
+A.GetUserName() = ', A.GetUserName()<br>
+ A.SetCreationDate(11,11,11,11,2002); print 'A.SetCreationDate(11,11,11,11,2002),
+A.GetCreationDate() =', A.GetCreationDate()<br>
+ print "A.IsModified() = ", A.IsModified()<br>
+ A.SetLocked(1)<br>
+ <br>
+ <br>
+ <big><b>boolean IsModified ()</b></big><br>
+ <br>
+ <u><i>Find if study is modified:</i></u><br>
+ <br>
+ IsModified = myStudy.IsModified()<br>
+ <br>
+ if IsModified == 1:<br>
+ print "The study is modified and not saved"<br>
+ <br>
+ <br>
+ <big><b>boolean IsEmpty ()</b></big><br>
+ <br>
+ <u><i>Find if study is empty:</i></u><br>
+ <br>
+ IsEmpty = myStudy.IsEmpty()<br>
+ <br>
+ if IsEmpty == 1:<br>
+ print "The study is empty"<br>
+ <br>
+ <br>
+ <br>
+ <br>
+
+<div align="center"><small><small><u><big><big><a
+ name="SALOMEDS::StudyBuilder_impl"></a><font color="#000000"
+ face="Helvetica, Arial, sans-serif"><big><big><b>SALOMEDS::StudyBuilder
+interface</b></big></big></font></big></big></u></small></small><br>
+ </div>
+ <br>
+ <br>
+ <br>
+ <big><b><a class="el" href="interfaceSALOMEDS_1_1SComponent.html">SComponent</a>
+NewComponent ( in string <i>ComponentDataType</i> )</b></big><br>
+ <br>
+ <u><i>Create Geometry SComponent:</i></u><br>
+ <br>
+ myBuilder = myStudy.NewBuilder()<br>
+ father = myBuilder.NewComponent("GEOM")<br>
+ <br>
+ <big><b><br>
+ void DefineComponentInstance ( in <a class="el"
+ href="interfaceSALOMEDS_1_1SComponent.html">SComponent</a> <i>aComponent</i>,
+in Object <i>ComponentIOR</i> )</b></big><br>
+ <br>
+ <u><i>Define the instance to the created geometry component:</i></u><br>
+ <br>
+ <i># find geom component</i><br>
+ myLCC = batchmode_salome.lcc<br>
+ geom = myLCC.FindOrLoadComponent("FactoryServer", "Geometry")<br>
+ geom = geom._narrow(GEOM.GEOM_Gen)<br>
+ geom.GetCurrentStudy(myStudyId)<br>
+ <br>
+ myBuilder = myStudy.NewBuilder()<br>
+ <br>
+ father = myBuilder.NewComponent("GEOM")<br>
+ myBuilder.DefineComponentInstance(father,geom)<br>
+ <br>
+ <br>
+ <big><b><a class="el" href="interfaceSALOMEDS_1_1SObject.html">SObject</a>
+NewObject ( in <a class="el"
+ href="interfaceSALOMEDS_1_1SObject.html">SObject</a> <i>theFatherObject</i>
+)</b></big><br>
+ <br>
+ <u><i>Create box and add it to study:</i></u><br>
+ <br>
+ from batchmode_geompy import *<br>
+ <br>
+ <i># create a box</i><br>
+ box = geom.MakeBox(0,0,0,100,100,150)<br>
+ <br>
+ ior = orb.object_to_string(box)<br>
+ box._set_Name(ior) <br>
+ <br>
+ <i># create Geometry SComponent</i><br>
+ father = myBuilder.NewComponent("GEOM")<br>
+ A1 = myBuilder.FindOrCreateAttribute(father, "AttributeName");<br>
+ FName = A1._narrow(SALOMEDS.AttributeName)<br>
+ FName.SetValue("Geometry")<br>
+ myBuilder.DefineComponentInstance(father,geom)<br>
+ <br>
+ <i># add box to Study</i><br>
+ myBuilder.NewCommand()<br>
+ newObj = myBuilder.NewObject(father)<br>
+ A1 = myBuilder.FindOrCreateAttribute(newObj, "AttributeIOR");<br>
+ ObjIOR = A1._narrow(SALOMEDS.AttributeIOR)<br>
+ ObjIOR.SetValue(ior)<br>
+ A2 = myBuilder.FindOrCreateAttribute(newObj, "AttributeName");<br>
+ ObjName = A2._narrow(SALOMEDS.AttributeName)<br>
+ ObjName.SetValue("Common_operation")<br>
+ id = newObj.GetID()<br>
+ box._set_StudyShapeId(id)<br>
+ myBuilder.CommitCommand()<br>
+ <br>
+ <br>
+ <b><big>void RemoveObject ( in <a class="el"
+ href="interfaceSALOMEDS_1_1SObject.html">SObject</a> <i>anObject</i> )</big></b><br>
+ <br>
+ <u><i># Remove CutPlanes SObject from the StudyBuilder (delete cutplanes):</i></u><br>
+ <br>
+ SObj=myStudy.FindObjectIOR(cutplanes.GetID())<br>
+ myBuilder = newStudy.NewBuilder()<br>
+ myBuilder.RemoveObject(SObj)<br>
+ <br>
+ <b><big><br>
+ void LoadWith ( in <a class="el"
+ href="interfaceSALOMEDS_1_1SComponent.html">SComponent</a><i> sco</i>, in
+<a class="el" href="interfaceSALOMEDS_1_1Driver.html">Driver</a> <i>Engine</i>
+) raises (<a class="el" href="exceptionSALOME_1_1SALOME__Exception.html">SALOME::SALOME_Exception</a>)</big></b><br>
+ <br>
+ <i><u># Load Visu component:</u></i><br>
+ <br>
+ myBuilder = openedStudy.NewBuilder()<br>
+ SCom=openedStudy.FindComponent("VISU")<br>
+ myBuilder.LoadWith(SCom ,myVisu)<br>
+ <br>
+ <br>
+ <big><b><a class="el" href="interfaceSALOMEDS_1_1GenericAttribute.html">GenericAttribute</a>
+FindOrCreateAttribute ( in <a class="el"
+ href="interfaceSALOMEDS_1_1SObject.html">SObject</a> <i>anObject</i>,
+in string <i>aTypeOfAttribute</i>)</b></big><br>
+ <br>
+ <u><i>Create AttributeName attribute for created component an set value
+to it:</i></u><br>
+ <br>
+ myBuilder = myStudy.NewBuilder()<br>
+ aComponent = myBuilder.NewComponent("User data")<br>
+ <br>
+ anAttr = myBuilder.FindOrCreateAttribute(aComponent, "AttributeName")<br>
+ <br>
+ anAttrName = anAttr._narrow(SALOMEDS.AttributeName) <br>
+ anAttrName.SetValue("User data")<br>
+ <br>
+ <br>
+ <big><b>boolean FindAttribute ( in <a class="el"
+ href="interfaceSALOMEDS_1_1SObject.html">SObject</a> <i>anObject,</i> out<i> </i><a
+ class="el" href="interfaceSALOMEDS_1_1GenericAttribute.html">GenericAttribute</a><i>
+anAttribute</i>, in string <i>aTypeOfAttribute</i> )</b></big><br>
+ <big><b><br>
+ </b></big><i><u>Find AttributeName attribute of the field and print the
+field name:</u></i><br>
+ <br>
+ aFieldSObj = myStudy.FindObject("Head, -")<br>
+ <br>
+ myStudyBuilder.FindAttribute( aFieldSObj, anAttr, "AttributeName")<br>
+ if res == 0:<br>
+ raise RuntimeError, "Error: Attribute not
+found"<br>
+ <br>
+ anAttr = anAttr._narrow(SALOMEDS.AttributeName);<br>
+ aFieldName = anAttr.Value()<br>
+ print " ", aFieldName<br>
+ <br>
+ <br>
+ <b><big>void RemoveAttribute ( in <a class="el"
+ href="interfaceSALOMEDS_1_1SObject.html">SObject</a> <i>anObject</i>, in
+string <i>aTypeOfAttribute</i> )</big></b><br>
+ <big><b><br>
+ </b><u><i><small>Remove AttributeSelectable attribute of the field SObject:</small></i></u><br>
+ <b><br>
+ </b></big>aFieldSObj = myStudy.FindObject("Head, -")<br>
+ <br>
+ myStudyBuilder.RemoveAttribute( aFieldSObj, "AttributeSelectable")<br>
+ <big><b><br>
+ <br>
+ </b><b>void Addreference ( in <big> <small><a class="el"
+ href="interfaceSALOMEDS_1_1SObject.html">SObject</a></small></big><small>
+</small><i>anObject</i>, in </b><b> <a class="el"
+ href="interfaceSALOMEDS_1_1SObject.html">SObject</a> <i>theReferencedObject</i>
+)</b></big><br>
+ <br>
+ <u><i>Create a reference between created SObject and the existing field:</i></u><br>
+ <br>
+ aFieldSObj = myStudy.FindObject("Head, -")<br>
+ aNewSObj = myBuilder.NewObject(myVisu)<br>
+ <br>
+ myBuilder.Addreference(aFieldSObj, aNewSObj)<br>
+ <big><b><br>
+ <br>
+ </b></big><big><small><i><u><a name="NewCommand_ex"></a></u></i></small></big><big><small><b><big>void
+NewCommand ()<br>
+ <br>
+ </big></b><i><u>Create new command wich containes actions for changing the
+properties of the study:</u></i><b><big><br>
+ <br>
+ </big></b></small></big>A = myStudy.GetProperties()<br>
+ A = aProperties._narrow(SALOMEDS.AttributeStudyProperties)<br>
+ <br>
+ myBuilder = myStudy.NewBuilder()<br>
+ <br>
+ myBuilder.NewCommand() <i> # creates a new command</i><br>
+ <br>
+ <i># change the properties of the study</i><br>
+ if A.IsLocked() == 0 :<br>
+ A.SetUserName("tester"); print 'A.SetUserName("tester"),
+A.GetUserName() = ', A.GetUserName()<br>
+ A.SetCreationDate(11,11,11,11,2002); print 'A.SetCreationDate(11,11,11,11,2002),
+A.GetCreationDate() =', A.GetCreationDate()<br>
+ print "A.IsModified() = ", A.IsModified()<br>
+ A.SetLocked(1)<br>
+ <big><small><br>
+ </small></big>myBuilder.CommitCommand() <i># commits all actions declared
+within the created command</i><big><br>
+ <b><br>
+ <br>
+ void CommitCommand()<br>
+ </b><small><br>
+ </small><i><small>See the end of the <a href="#NewCommand_ex">previous example</a></small></i><b><br>
+ <br>
+ <br>
+ void AbortCommand ()</b></big><br>
+ <br>
+ <big><small><i><u>Create new command wich containes actions for changing
+the properties of the study, cancel all declared actions:</u></i></small></big><br>
+ <br>
+ A = myStudy.GetProperties()<br>
+ A = aProperties._narrow(SALOMEDS.AttributeStudyProperties)<br>
+ <br>
+ myBuilder = myStudy.NewBuilder()<br>
+ <br>
+ myBuilder.NewCommand() <i> # creates a new command</i><br>
+ <br>
+ <i># change the properties of the study</i><br>
+ if A.IsLocked() == 0 :<br>
+ A.SetUserName("tester"); print 'A.SetUserName("tester"),
+A.GetUserName() = ', A.GetUserName()<br>
+ A.SetCreationDate(11,11,11,11,2002); print 'A.SetCreationDate(11,11,11,11,2002),
+A.GetCreationDate() =', A.GetCreationDate()<br>
+ print "A.IsModified() = ", A.IsModified()<br>
+ A.SetLocked(1)<br>
+ <big><small><br>
+ </small></big>myBuilder.AbortCommand() <i># abort all actions declared
+within the created command</i><br>
+ <br>
+ <br>
+ <big><b>void Undo () raises (<a class="el"
+ href="exceptionSALOMEDS_1_1StudyBuilder_1_1LockProtection.html">LockProtection</a>)</b><b>
+<small>, </small></b></big><br>
+ <big><b>void Redo ()</b></big> <big><b>raises (<a class="el"
+ href="exceptionSALOMEDS_1_1StudyBuilder_1_1LockProtection.html">LockProtection</a>)</b></big><br>
+ <br>
+ <big><small><i><u>Create new command wich containes actions for changing
+the properties of the study, <br>
+ cancel all declared actions and then redo it with the help of undo/redo
+mechanism:</u></i></small></big><br>
+ <br>
+ A = myStudy.GetProperties()<br>
+ A = aProperties._narrow(SALOMEDS.AttributeStudyProperties)<br>
+ <br>
+ myBuilder = myStudy.NewBuilder()<br>
+ <br>
+ myBuilder.NewCommand() <i> # creates a new command</i><br>
+ <br>
+ <i># change the properties of the study</i><br>
+ if A.IsLocked() == 0 :<br>
+ A.SetUserName("tester"); print 'A.SetUserName("tester"),
+A.GetUserName() = ', A.GetUserName()<br>
+ A.SetCreationDate(11,11,11,11,2002); print 'A.SetCreationDate(11,11,11,11,2002),
+A.GetCreationDate() =', A.GetCreationDate()<br>
+ print "A.IsModified() = ", A.IsModified()<br>
+ A.SetLocked(1)<br>
+ <big><small><br>
+ </small></big>myBuilder.CommitCommand() <i># commits all actions declared
+within the created command</i><br>
+ <big><small><br>
+ </small></big>myBuilder.Undo() <i># cancels all actions of the command<br>
+ <br>
+ </i>myBuilder.Redo() <i># redoes all actions of the command</i><br>
+ <i><br>
+ <br>
+ <br>
+ </i>
+<div align="center"><small><small><u><big><big><a
+ name="SALOMEDS::StudyManager_impl"></a><font color="#000000"
+ face="Helvetica, Arial, sans-serif"><big><big><b>SALOMEDS::StudyManager
+interface</b></big></big></font></big></big></u></small></small><br>
+ </div>
+ <i><br>
+ <br>
+ <br>
+ </i><big><b><a class="el" href="interfaceSALOMEDS_1_1Study.html">Study</a>
+NewStudy ( in string <i>study_name</i> )</b></big><br>
+ <i><br>
+ <u>Create the study with the name "Test_Study":</u></i><br>
+ <br>
+ myNewStudy = myStudyManager.NewStudy("Test_Study")<br>
+ <br>
+ <br>
+ <big><b><a class="el" href="interfaceSALOMEDS_1_1Study.html">Study</a> Open
+( in </b></big><a class="el" href="namespaceSALOMEDS.html#a0">URL</a><big><b>
+<i>aStudyUrl</i> ) raises </b></big>(<a class="el"
+ href="exceptionSALOME_1_1SALOME__Exception.html">SALOME::SALOME_Exception</a>)<br>
+ <br>
+ <i><u>Open the study saved in the HDF file:</u></i><br>
+ <br>
+ file = 'saved_study.hdf'<br>
+ <br>
+ openedStudy=myStudyManager.Open(file)<br>
+ <br>
+ if openedStudy == None:<br>
+ raise RuntimeError, "Can't open saved study!"<br>
+ <br>
+ <br>
+ <big><b>void Save (in <a class="el"
+ href="interfaceSALOMEDS_1_1Study.html">Study</a> <i>aStudy</i>, in boolean
+<i>theMultifile</i> )</b></big><big><b><br>
+ <br>
+ </b><small><u><i>Open study, import med file into it and save with the old
+path and filename:</i></u></small><b><br>
+ <br>
+ </b></big>file = "saved_study.hdf"<br>
+ myMedFile ="medfile.med"<br>
+ <br>
+ openedStudy=myStudyManager.Open(file)<br>
+ <br>
+ myVisu.SetCurrentStudy(openedStudy)<br>
+ myResult = myVisu.ImportFile(myMedFile)<br>
+ <br>
+ myStudyManager.Save(openedStudy, 0)<br>
+ <br>
+ <big><b><br>
+ void SaveAs ( in <small><a class="el" href="namespaceSALOMEDS.html#a0">URL</a></small>
+<i>aUrl</i>, in <small> <a class="el"
+ href="interfaceSALOMEDS_1_1Study.html">Study</a> </small><i>aStudy</i>,
+ <small><em></em></small></b></big><big><b>in boolean <i>theMultifile
+</i>)</b><br>
+ <br>
+ <small><u><i>Open study from the file and resave it in several files (using
+Multifile option while saving)</i></u></small><br>
+ <br>
+ </big>file = "saved_study.hdf"<br>
+ newfile = "resaved_study.hdf"<br>
+ <br>
+ openedStudy=myStudyManager.Open(file)<br>
+ myStudyManager.SaveAs(newfile, openedStudy, 1)<br>
+ <big><br>
+ <br>
+ void Close ( in <a class="el"
+ href="interfaceSALOMEDS_1_1Study.html">Study</a> aStudy )</big><br>
+ <br>
+ <u><i>Close just opened study:</i></u><br>
+ <br>
+ file = "saved_study.hdf"<br>
+ <br>
+ openedStudy=myStudyManager.Open(file)<br>
+ myStudyManager.Close(openedStudy)<br>
+ <br>
+ <br>
+ <br>
+
+<div align="center"><small><small><u><big><big><a
+ name="SALOMEDS::SObject_impl"></a><font color="#000000"
+ face="Helvetica, Arial, sans-serif"><big><big><b>SALOMEDS::SObject interface</b></big></big></font></big></big></u></small></small><br>
+ </div>
+ <br>
+ <br>
+ <br>
+ <big><b><a class="el" href="namespaceSALOMEDS.html#a1">ID</a> GetID ()</b></big><br>
+ <br>
+ <u><i>Create new SObject and get its ID:</i></u><br>
+ <br>
+ mySObj = myBuilder.NewObject(myFather)<br>
+ <br>
+ myID = mySObj.GetID()<br>
+ <br>
+ <br>
+ <big><b><a class="el" href="interfaceSALOMEDS_1_1SComponent.html">SComponent</a>
+GetFatherComponent ()</b></big><br>
+ <br>
+ <u><i>Get father component of the SObject:</i></u><br>
+ <br>
+ myFather = mySObj.GetFatherComponent();<br>
+ <br>
+ <br>
+ <big><b>boolean FindAttribute ( out <a class="el"
+ href="interfaceSALOMEDS_1_1GenericAttribute.html">GenericAttribute</a> <i>anAttribute</i>,
+in string <i>aTypeOfAttribute </i>)</b></big><br>
+ <br>
+ <u><i>Find the AttributeName attribute of the field:</i></u><br>
+ <br>
+ aFieldSObj = myStudy.FindObject("Head, -")<br>
+ <br>
+ res = aFieldSObj.FindAttribute( anAttr, "AttributeName")<br>
+ if res == 0:<br>
+ raise RuntimeError, "Error: Attribute not
+found"<br>
+ <br>
+ <br>
+ <big><b><a class="el" href="namespaceSALOMEDS.html#a9">ListOfAttributes</a>
+GetAllAttributes ()</b></big><br>
+ <br>
+ <i><u>Get list of all attributes of the SObject, find the number of attributes:</u></i><br>
+ <br>
+ attrs = mySObj.GetAllAttributes()<br>
+ aLen = len(attrs) <i># number of attributes</i><br>
+ <br>
+ <br>
+ <br>
+ <br>
+
+<div align="center"><small><small><u><big><big><a
+ name="SALOMEDS::SComponent_impl"></a><font color="#000000"
+ face="Helvetica, Arial, sans-serif"><big><big><b>SALOMEDS::SComponent interface</b></big></big></font></big></big></u></small></small><br>
+ </div>
+ <br>
+ <br>
+ <br>
+ <big><b>string ComponentDataType ()</b></big><br>
+ <br>
+ <i><u><a name="ComponentIterator_ex"></a>Print names of all components wich
+the study contains:</u></i><br>
+ <br>
+ aCompItr = myStudy.NewComponentIterator() <br>
+ <br>
+ while aCompItr.More():<br>
+ aComp = aCompItr.Value()<br>
+ aName = aComp.ComponentDataType()<br>
+ print "Component name = ", aName<br>
+ aCompItr.Next()<br>
+ <br>
+ <br>
+ <i><b>Other methods are inherited.</b></i><br>
+ <br>
+ <br>
+ <br>
+ <br>
+
+<div align="center"><small><small><u><big><big><a
+ name="SALOMEDS::SComponentIterator_impl"></a><font color="#000000"
+ face="Helvetica, Arial, sans-serif"><big><big><b>SALOMEDS::SComponentIterator
+ interface</b></big></big></font></big></big></u></small></small><br>
+ </div>
+ <br>
+ <br>
+ <br>
+ <big><b>boolean More (), </b><b>void Next (), </b></big><big><b><a
+ class="el" href="interfaceSALOMEDS_1_1SComponent.html">SComponent</a> Value
+()</b></big><br>
+ <br>
+ <big><i><small>See <a href="examples_Study.html#ComponentIterator_ex">another
+example</a></small></i></big><br>
+ <br>
+ <br>
+ <br>
+
+<div align="center"><small><small><u><big><big><a
+ name="SALOMEDS::ChildIterator_impl"></a><font color="#000000"
+ face="Helvetica, Arial, sans-serif"><big><big><b>SALOMEDS::ChildIterator
+ interface</b></big></big></font></big></big></u></small></small><br>
+ </div>
+ <br>
+ <br>
+ <br>
+ <big><b>boolean More () , void Next (), <a class="el"
+ href="interfaceSALOMEDS_1_1SObject.html">SObject</a> Value ()</b></big><br>
+ <br>
+ <u><i>Print all mesh names of imported MED file with the help of ChildIterator:</i></u><br>
+ <br>
+ aResult = myVisu.ImportFile("MedFile.med")<br>
+ <br>
+ myStudy = theVisu.GetCurrentStudy()<br>
+ aSObj = myLocalStudy.FindObjectIOR(aResult.GetID())<br>
+ <br>
+ aMeshIter = myLocalStudy.NewChildIterator(aSObj); <i> # creating new
+child iterator</i><br>
+ <br>
+ while aMeshIter.More() :
+
+ <i># check if one more
+child level exists. </i><br>
+ aMeshSObj = aMeshIter.Value()
+
+ # <i>returns the SObject corresponding
+to the current object found by the iterator. </i> <br>
+ aMeshIter.Next() <i>
+
+
+ # passes the iterator to the next level. </i><br>
+ anAttr = aMeshSObj.FindAttribute("AttributeName")[1]<br>
+ if anAttr is None :<br>
+
+aMeshSObj = aMeshIter.Value()<br>
+
+ aMeshIter.Next()<br>
+
+anAttr = aMeshSObj.FindAttribute("AttributeName")[1]<br>
+ anAttr = anAttr._narrow(SALOMEDS.AttributeName);<br>
+ aMeshName = anAttr.Value()<br>
+ print " ", aMeshName<br>
+ <br>
+ <br>
+ <br>
+
+<div align="center"><small><small><u><big><big><a
+ name="SALOMEDS::AttributeComment_impl"
+ href="#SALOMEDS::AttributeComment_impl"></a><font color="#000000"
+ face="Helvetica, Arial, sans-serif"><big><big><b>SALOMEDS::AttributeComment
+ interface</b></big></big></font></big></big></u></small></small><br>
+ </div>
+ <br>
+ <br>
+ <big><b>string Value (), void SetValue ( in string <i>value </i>)</b></big><br>
+ <br>
+ <u><i>Find the AttributeComment attribute of the "Head" field in the study,
+print it, then change it to "My Comment" string:</i></u><br>
+ <br>
+ aFieldSObj = myStudy.FindObject("Head, -")<br>
+ anAttr = aFieldSObj.FindAttribute("AttributeComment")[1]<br>
+
+anAttr = anAttr._narrow(SALOMEDS.AttributeComment);<br>
+
+aFieldComment = anAttr.Value()<br>
+ <br>
+ print "AttributeComment", anAttr<br>
+ <br>
+ anAttr.SetValue ("My Comment")<br>
+
+<pre></pre>
+ <br>
+</body>
+</html>
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">\r
-<html>\r
-<head>\r
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\r
- <meta name="GENERATOR" content="Mozilla/4.73 [en] (WinNT; I) [Netscape]">\r
- <title>Main Page</title>\r
-<link href="doxygen.css" rel="stylesheet" type="text/css">\r
-</head>\r
-<body>\r
- \r
-<center><table WIDTH="96%" >\r
-<tr>\r
-<td><a href="http://www.opencascade.com"><img SRC="sources/logocorp.gif" BORDER=0 height=46 width=122></a></td>\r
-\r
-<td>\r
-<div align=right><a href="http://www.opencascade.org/SALOME/"><img SRC="sources/application.gif" BORDER=0 height=46 width=108></a></div>\r
-</td>\r
-</tr>\r
-</table></center>\r
-<a NAME="page1"></a>\r
-<h2>\r
-Mapping of IDL definitions to Python language.</h2>\r
-<a NAME="Intro"></a>\r
-<h2>\r
-Introduction</h2>\r
-SALOME is a distributed client/server application using the Common\r
-Object Request Broker Architecture (CORBA). CORBA architecture uses the\r
-Interface Definition Language (IDL), which specifies interfaces between\r
-CORBA objects. So with help of IDL CORBA's language independence is ensured\r
-. Because interfaces described in IDL can be mapped to the most of currently\r
-used programming languages, CORBA applications and components are thus\r
-independent of the language(s) used to implement them. In other words,\r
-a client written in C++ can communicate with a server written in Java,\r
-which in turn can communicate with another server written in COBOL, and\r
-so forth.\r
-<p>One important thing to remember about IDL is that it is not an implementation\r
-language. That is, applications can't be written in IDL. The sole purpose\r
-of IDL is to define interfaces; providing implementations for these interfaces\r
-is performed using some other language.\r
-<p>This page contains an abridged reference manual for mapping of IDL definitions\r
-to Python language. It will be useful for Python programmers who are not\r
-familiar with IDL language. All examples are taken from SALOME source\r
-files. The complete version of Python Language Mapping Specification can\r
-be found <a href="http://www.omg.org" target="top">here.</a>\r
-<br> \r
-<p><a NAME="contents"></a><b>CONTENTS:</b>\r
-<ul> \r
-<li>\r
-<a href="#subsection1">Using Scoped Names</a></li>\r
-\r
-<li>\r
-<a href="#subsection2">Mapping for Template and Array Types</a></li>\r
-\r
-<li>\r
-<a href="#subsection3">Mapping for Objects and Operations</a></li>\r
-\r
-<li>\r
-<a href="#subsection4">Narrowing Object References</a></li>\r
-\r
-<li>\r
-<a href="#subsection5">Mapping for Exceptions</a></li>\r
-\r
-<li>\r
-<a href="#subsection6">Mapping for Enumeration Types</a></li>\r
-\r
-<li>\r
-<a href="#subsection7">Mapping for Structured Types</a></li>\r
-</ul>\r
-<br>\r
-<a NAME="subsection1"></a>\r
-<h3>\r
-Using Scoped Names</h3>\r
-Python implements a module concept that is similar to the IDL scoping mechanisms,\r
-except that it does not allow for nested modules. In addition, Python requires\r
-each object to be implemented in a module; globally visible objects are\r
-not supported.\r
-<p>Because of these constraints, scoped names are translated into Python\r
-using the following rules:\r
-<p>\95 An IDL module mapped into a Python module. Modules containing modules\r
-are mapped to packages (i.e., directories with an <b>__init__</b> module\r
-containing all definitions excluding the nested modules). An implementation\r
-can chose to map toplevel definitions (including the module CORBA) to modules\r
-in an implementationdefined package, to allow concurrent installations\r
-of different CORBA runtime libraries. In that case, the implementation\r
-must provide additional modules so that toplevel modules can be used without\r
-importing them from a package.\r
-<p>\95 For all other scopes, a Python class is introduced that contains all\r
-the definitions inside this scope.\r
-<p>\95 Other global definitions (except modules) appear in a module whose\r
-name is implementation dependent. Implementations are encouraged to use\r
-the name of the IDL file when defining the name of that module.\r
-<p>For instance,\r
-<div class="fragment">\r
-<pre>module SALOMEDS {\r
- interface StudyManager {\r
- void Close(in Study aStudy);\r
- };\r
-};</pre>\r
-</div>\r
-would introduce a module SALOMEDS.py, which contains the following definitions:\r
-<div class="fragment">\r
-<pre># module SALOMEDS.py\r
-class StudyManager:\r
- def _Close(self,aStudy):\r
- pass #interfaces are discussed later</pre>\r
-</div>\r
-To avoid conflicts, IDL names that are also Python identifiers are prefixed\r
-with an underscore (\91_\92).\r
-<p><b><i><a href="#contents">Back to the contents</a></i></b><b><i></i></b>\r
-<p><a NAME="subsection2"></a>\r
-<h3>\r
-Mapping for Template and Array Types</h3>\r
-Both the bounded and the unbounded string type of IDL are mapped to the\r
-Python string type. Wide strings are represented by an implementation-defined\r
-type with the following properties:\r
-<p>\95 For the wide string X and the integer n, X[n] returns the nth character,\r
-which is a wide string of length 1.\r
-<p>\95 len(X) returns the number of characters of wide string X.\r
-<p>\95 CORBA.wstr(c) returns a wide character with the code point c in an\r
-implementation-defined encoding.\r
-<p>\95 X+Y returns the concatenation of wide strings X and Y.\r
-<p>\95 CORBA.word(CORBA.wstr(c)) == c\r
-<p>The sequence template is mapped to sequence objects (e.g., tuples or\r
-lists). Applications should not assume that values of a sequence type are\r
-mutable. Sequences and arrays of octets and characters are mapped to the\r
-string type for efficiency reasons.\r
-<p>For example, given the IDL definitions\r
-<div class="fragment">\r
-<pre>module SALOMEDS {\r
- typedef sequence <string> StringSeq;\r
- \r
- interface AttributeTableOfInteger : GenericAttribute {\r
-\r
- void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);\r
- };\r
-};</pre>\r
-</div>\r
-a client could invoke the operation\r
-<div class="fragment">\r
-<pre>print My_AttributeTableOfInteger.SetRowTitles(["X","F"])</pre>\r
-</div>\r
-Array types are mapped like sequence templates. The application in this\r
-example also expects an IncorrectArgumentLength exception if it passes\r
-sequences that violate the bounds constraint or arrays of wrong size.\r
-<p>Another example with arrays. The following IDL definition\r
-<div class="fragment">\r
-<pre>module SALOMEDS {\r
- typedef sequence<GenericAttribute> ListOfAttributes;\r
- interface SObject {\r
- ListOfAttributes GetAllAttributes();\r
- };\r
-};</pre>\r
-</div>\r
-is equal to\r
-<div class="fragment">\r
-<pre>import SALOMEDS\r
-\r
-attributes=[]\r
- \r
-attributes = My_SObject.GetAllAttributes()\r
-\r
-length = len(attributes)\r
-\r
-print "Attributes number = ", length\r
-print attributes</pre>\r
-</div>\r
-<b><i><a href="#contents">Back to the contents</a></i></b>\r
-<p><a NAME="subsection3"></a>\r
-<h3>\r
-Mapping for Objects and Operations</h3>\r
-A CORBA object reference is represented as a Python object at run-time.\r
-This object provides all the operations that are available on the interface\r
-of the object. Although this specification does not mandate the use of\r
-classes for stub objects, the following discussion uses classes to indicate\r
-the interface.\r
-<p>The nil object is represented by <b>None</b>.\r
-<p>If an operation expects parameters of the IDL Object type, any Python\r
-object representing an object reference might be passed as actual argument.\r
-<p>If an operation expects a parameter of an abstract interface, either\r
-an object implementing that interface, or a value supporting this interface\r
-may be passed as actual argument. The semantics of abstract values then\r
-define whether the argument is passed by value or by reference.\r
-<p>Operations of an interface map to methods available on the object references.\r
-Parameters with a parameter attribute of <b>in</b> or <b>inout</b> are\r
-passed from left to right tothe method, skipping <b>out</b> parameters.\r
-The return value of a method depends on the number of <b>out</b> parameters\r
-and the return type. If the operation returns a value, this value forms\r
-the first <i>result value</i>. All <b>inout</b> or <b>out</b> parameters\r
-form consecutive <i>result values</i>. The method result depends then on\r
-the number of <i>result values</i>:\r
-<p>\95 If there is no <i>result value</i>, the method returns None.\r
-<p>\95 If there is exactly one <i>result value</i>, it is returned as a single\r
-value.\r
-<p>\95 If there is more than one <i>result value</i>, all of them are packed\r
-into a tuple, and this tuple is returned.\r
-<p>Assuming the IDL definition\r
-<div class="fragment">\r
-<pre>module SALOMEDS{\r
- interface StudyBuilder{\r
- boolean FindAttribute ( in SObject anObject, \r
- out GenericAttribute anAttribute, \r
- in string aTypeOfAttribute );\r
- };\r
-};</pre>\r
-</div>\r
-a client could write\r
-<div class="fragment">\r
-<pre>from SALOMEDS import StudyBuilder;\r
-my_StudyBuilder=...\r
- \r
- res,A=my_StudyBuilder.FindAttribute(Sobj, "AttributeSequenceOfReal")</pre>\r
-</div>\r
-In this example <b>A</b> corresponds to the return value <b>anAttribute</b>\r
-and <b>res</b> to the <b>boolean</b> return value.\r
-<p>If an interface defines an <b>attribute name</b>, for example, the attribute\r
-is mapped into an operation <b>_get_name</b>. If the attribute is not <b>readonly</b>,\r
-there is an additional operation <b>_set_name</b>.\r
-<p>The IDL definition\r
-<div class="fragment">\r
-<pre>module SALOMEDS{\r
- interface Study{\r
- attribute string Name;\r
- };\r
-};</pre>\r
-</div>\r
-is equal to the following\r
-<div class="fragment">\r
-<pre>from SALOMEDS import Study\r
-My_Study=...\r
- Name=My_Study._get_name();\r
- Name=My_Study._set_name();</pre>\r
-</div>\r
-<b><i><a href="#contents">Back to the contents</a></i></b><b><i><a href="#contents"></a></i></b>\r
-<p><a NAME="subsection4"></a>\r
-<h3>\r
-Narrowing Object References</h3>\r
-Python objects returned from CORBA operations or pseudo-operations (such\r
-as string_to_object) might have a dynamic type, which is more specific\r
-than the static type as defined in the operation signature.\r
-<p>Since there is no efficient and reliable way of automatically creating\r
-the most specific type, explicit narrowing is necessary. To narrow an object\r
-reference <b>A</b> to an interface class <b>AttributeSequenceOfReal</b>,\r
-the client can use the following operation\r
-<div class="fragment">\r
-<pre>A = A._narrow(SALOMEDS.AttributeSequenceOfReal)</pre>\r
-</div>\r
-<b><i><a href="#contents">Back to the contents</a></i></b><b><i><a href="#contents"></a></i></b>\r
-<p><a NAME="subsection5"></a>\r
-<h3>\r
-Mapping for Exceptions</h3>\r
-An IDL exception is translated into a Python class derived from CORBA.UserException.\r
-System exceptions are derived from CORBA.SystemException. Both base classes\r
-are derived from CORBA.Exception. The parameters of the exception are mapped\r
-in the same way as the fields of a struct definition. When raising an exception,\r
-a new instance of the class is created; the constructor expects the exception\r
-parameters. For example, the definition\r
-<div class="fragment">\r
-<pre>module SALOMEDS{\r
- interface StudyBuilder{\r
- exception LockProtection {};\r
- void CommitCommand() raises(LockProtection);\r
- };\r
-};</pre>\r
-</div>\r
-could be used caught as\r
-<div class="fragment">\r
-<pre>from SALOMEDS import StudyBuilder;\r
-my_StudyBuilder=...\r
-try:\r
- my_StudyBuilder.CommitCommand();\r
-except StudyBuilder.LockProtection,value:\r
- print "Error! Study is locked for modifications"</pre>\r
-</div>\r
-\r
-<p><br><b><i><a href="#contents">Back to the contents</a></i></b><b><i><a href="#contents"></a></i></b>\r
-<p><a NAME="subsection6"></a>\r
-<h3>\r
-Mapping for Enumeration Types</h3>\r
-An enumeration is mapped into a number of constant objects in the name\r
-space where the enumeration is defined. An application may only test for\r
-equivalence of two enumeration values, and not assume that they behave\r
-like numbers. For example, the definition\r
-<div class="fragment">\r
-<pre>module VISU {\r
- interface PrsObject{\r
- \r
- enum PrsObjType{ TCURVE, TTABLE, TMESH, TCONTAINER,\r
- TSCALARMAP, TISOSURFACE, TDEFORMEDSHAPE,\r
- TCUTPLANES, TVECTORS };\r
- };\r
-};</pre>\r
-</div>\r
-introduces the objects\r
-<div class="fragment">\r
-<pre>from VISU import PrsObject\r
-VISU.PrsObjType.TCURVE,VISU.PrsObjType.TTABLE,VISU.PrsObjType.TMESH,VISU.PrsObjType.TCONTAINER,\r
-VISU.PrsObjType.TSCALARMAP,VISU.PrsObjType.TISOSURFACE,VISU.PrsObjType.TDEFORMEDSHAPE,VISU.PrsObjType.TCUTPLANES,\r
-VISU.PrsObjType.TVECTORS</pre>\r
-</div>\r
-<b><i><a href="#contents">Back to the contents</a></i></b>\r
-<p><a NAME="subsection7"></a>\r
-<h3>\r
-Mapping for Structured Types</h3>\r
-An IDL struct definition is mapped into a Python class or type. For each\r
-field in the struct, there is a corresponding attribute in the class with\r
-the same name as the field. The constructor of the class expects the field\r
-values, from left to right. For example, the IDL definition\r
-<div class="fragment">\r
-<pre>struct SDate {\r
- short Second;\r
- short Minute;\r
- short Hour;\r
- short Day;\r
- short Month;\r
- short Year;\r
- };</pre>\r
-</div>\r
-could be used in the Python statements\r
-<div class="fragment">\r
-<pre>Date=SDate(30, 12, 15, 26, 1, 79)\r
-print Date.Second,Date.Minute,Date.Hour,Date.Day,Date.Month,Date.Year</pre>\r
-</div>\r
-\r
-<address>\r
-<b><i><a href="#contents">Back to the contents</a></i></b></address>\r
-\r
-</body>\r
-<!-- Generated by Doxygen 1.2.14 -->\r
-</html>\r
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.73 [en] (WinNT; I) [Netscape]">
+ <title>Main Page</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head>
+<body>
+
+<center><table WIDTH="96%" >
+<tr>
+<td><a href="http://www.opencascade.com"><img SRC="sources/logocorp.gif" BORDER=0 height=46 width=122></a></td>
+
+<td>
+<div align=right><a href="http://www.opencascade.org/SALOME/"><img SRC="sources/application.gif" BORDER=0 height=46 width=108></a></div>
+</td>
+</tr>
+</table></center>
+<a NAME="page1"></a>
+<h2>
+Mapping of IDL definitions to Python language.</h2>
+<a NAME="Intro"></a>
+<h2>
+Introduction</h2>
+SALOME is a distributed client/server application using the Common
+Object Request Broker Architecture (CORBA). CORBA architecture uses the
+Interface Definition Language (IDL), which specifies interfaces between
+CORBA objects. So with help of IDL CORBA's language independence is ensured
+. Because interfaces described in IDL can be mapped to the most of currently
+used programming languages, CORBA applications and components are thus
+independent of the language(s) used to implement them. In other words,
+a client written in C++ can communicate with a server written in Java,
+which in turn can communicate with another server written in COBOL, and
+so forth.
+<p>One important thing to remember about IDL is that it is not an implementation
+language. That is, applications can't be written in IDL. The sole purpose
+of IDL is to define interfaces; providing implementations for these interfaces
+is performed using some other language.
+<p>This page contains an abridged reference manual for mapping of IDL definitions
+to Python language. It will be useful for Python programmers who are not
+familiar with IDL language. All examples are taken from SALOME source
+files. The complete version of Python Language Mapping Specification can
+be found <a href="http://www.omg.org" target="top">here.</a>
+<br>
+<p><a NAME="contents"></a><b>CONTENTS:</b>
+<ul>
+<li>
+<a href="#subsection1">Using Scoped Names</a></li>
+
+<li>
+<a href="#subsection2">Mapping for Template and Array Types</a></li>
+
+<li>
+<a href="#subsection3">Mapping for Objects and Operations</a></li>
+
+<li>
+<a href="#subsection4">Narrowing Object References</a></li>
+
+<li>
+<a href="#subsection5">Mapping for Exceptions</a></li>
+
+<li>
+<a href="#subsection6">Mapping for Enumeration Types</a></li>
+
+<li>
+<a href="#subsection7">Mapping for Structured Types</a></li>
+</ul>
+<br>
+<a NAME="subsection1"></a>
+<h3>
+Using Scoped Names</h3>
+Python implements a module concept that is similar to the IDL scoping mechanisms,
+except that it does not allow for nested modules. In addition, Python requires
+each object to be implemented in a module; globally visible objects are
+not supported.
+<p>Because of these constraints, scoped names are translated into Python
+using the following rules:
+<p>\95 An IDL module mapped into a Python module. Modules containing modules
+are mapped to packages (i.e., directories with an <b>__init__</b> module
+containing all definitions excluding the nested modules). An implementation
+can chose to map toplevel definitions (including the module CORBA) to modules
+in an implementationdefined package, to allow concurrent installations
+of different CORBA runtime libraries. In that case, the implementation
+must provide additional modules so that toplevel modules can be used without
+importing them from a package.
+<p>\95 For all other scopes, a Python class is introduced that contains all
+the definitions inside this scope.
+<p>\95 Other global definitions (except modules) appear in a module whose
+name is implementation dependent. Implementations are encouraged to use
+the name of the IDL file when defining the name of that module.
+<p>For instance,
+<div class="fragment">
+<pre>module SALOMEDS {
+ interface StudyManager {
+ void Close(in Study aStudy);
+ };
+};</pre>
+</div>
+would introduce a module SALOMEDS.py, which contains the following definitions:
+<div class="fragment">
+<pre># module SALOMEDS.py
+class StudyManager:
+ def _Close(self,aStudy):
+ pass #interfaces are discussed later</pre>
+</div>
+To avoid conflicts, IDL names that are also Python identifiers are prefixed
+with an underscore (\91_\92).
+<p><b><i><a href="#contents">Back to the contents</a></i></b><b><i></i></b>
+<p><a NAME="subsection2"></a>
+<h3>
+Mapping for Template and Array Types</h3>
+Both the bounded and the unbounded string type of IDL are mapped to the
+Python string type. Wide strings are represented by an implementation-defined
+type with the following properties:
+<p>\95 For the wide string X and the integer n, X[n] returns the nth character,
+which is a wide string of length 1.
+<p>\95 len(X) returns the number of characters of wide string X.
+<p>\95 CORBA.wstr(c) returns a wide character with the code point c in an
+implementation-defined encoding.
+<p>\95 X+Y returns the concatenation of wide strings X and Y.
+<p>\95 CORBA.word(CORBA.wstr(c)) == c
+<p>The sequence template is mapped to sequence objects (e.g., tuples or
+lists). Applications should not assume that values of a sequence type are
+mutable. Sequences and arrays of octets and characters are mapped to the
+string type for efficiency reasons.
+<p>For example, given the IDL definitions
+<div class="fragment">
+<pre>module SALOMEDS {
+ typedef sequence <string> StringSeq;
+
+ interface AttributeTableOfInteger : GenericAttribute {
+
+ void SetRowTitles(in StringSeq theTitles) raises(IncorrectArgumentLength);
+ };
+};</pre>
+</div>
+a client could invoke the operation
+<div class="fragment">
+<pre>print My_AttributeTableOfInteger.SetRowTitles(["X","F"])</pre>
+</div>
+Array types are mapped like sequence templates. The application in this
+example also expects an IncorrectArgumentLength exception if it passes
+sequences that violate the bounds constraint or arrays of wrong size.
+<p>Another example with arrays. The following IDL definition
+<div class="fragment">
+<pre>module SALOMEDS {
+ typedef sequence<GenericAttribute> ListOfAttributes;
+ interface SObject {
+ ListOfAttributes GetAllAttributes();
+ };
+};</pre>
+</div>
+is equal to
+<div class="fragment">
+<pre>import SALOMEDS
+
+attributes=[]
+
+attributes = My_SObject.GetAllAttributes()
+
+length = len(attributes)
+
+print "Attributes number = ", length
+print attributes</pre>
+</div>
+<b><i><a href="#contents">Back to the contents</a></i></b>
+<p><a NAME="subsection3"></a>
+<h3>
+Mapping for Objects and Operations</h3>
+A CORBA object reference is represented as a Python object at run-time.
+This object provides all the operations that are available on the interface
+of the object. Although this specification does not mandate the use of
+classes for stub objects, the following discussion uses classes to indicate
+the interface.
+<p>The nil object is represented by <b>None</b>.
+<p>If an operation expects parameters of the IDL Object type, any Python
+object representing an object reference might be passed as actual argument.
+<p>If an operation expects a parameter of an abstract interface, either
+an object implementing that interface, or a value supporting this interface
+may be passed as actual argument. The semantics of abstract values then
+define whether the argument is passed by value or by reference.
+<p>Operations of an interface map to methods available on the object references.
+Parameters with a parameter attribute of <b>in</b> or <b>inout</b> are
+passed from left to right tothe method, skipping <b>out</b> parameters.
+The return value of a method depends on the number of <b>out</b> parameters
+and the return type. If the operation returns a value, this value forms
+the first <i>result value</i>. All <b>inout</b> or <b>out</b> parameters
+form consecutive <i>result values</i>. The method result depends then on
+the number of <i>result values</i>:
+<p>\95 If there is no <i>result value</i>, the method returns None.
+<p>\95 If there is exactly one <i>result value</i>, it is returned as a single
+value.
+<p>\95 If there is more than one <i>result value</i>, all of them are packed
+into a tuple, and this tuple is returned.
+<p>Assuming the IDL definition
+<div class="fragment">
+<pre>module SALOMEDS{
+ interface StudyBuilder{
+ boolean FindAttribute ( in SObject anObject,
+ out GenericAttribute anAttribute,
+ in string aTypeOfAttribute );
+ };
+};</pre>
+</div>
+a client could write
+<div class="fragment">
+<pre>from SALOMEDS import StudyBuilder;
+my_StudyBuilder=...
+
+ res,A=my_StudyBuilder.FindAttribute(Sobj, "AttributeSequenceOfReal")</pre>
+</div>
+In this example <b>A</b> corresponds to the return value <b>anAttribute</b>
+and <b>res</b> to the <b>boolean</b> return value.
+<p>If an interface defines an <b>attribute name</b>, for example, the attribute
+is mapped into an operation <b>_get_name</b>. If the attribute is not <b>readonly</b>,
+there is an additional operation <b>_set_name</b>.
+<p>The IDL definition
+<div class="fragment">
+<pre>module SALOMEDS{
+ interface Study{
+ attribute string Name;
+ };
+};</pre>
+</div>
+is equal to the following
+<div class="fragment">
+<pre>from SALOMEDS import Study
+My_Study=...
+ Name=My_Study._get_name();
+ Name=My_Study._set_name();</pre>
+</div>
+<b><i><a href="#contents">Back to the contents</a></i></b><b><i><a href="#contents"></a></i></b>
+<p><a NAME="subsection4"></a>
+<h3>
+Narrowing Object References</h3>
+Python objects returned from CORBA operations or pseudo-operations (such
+as string_to_object) might have a dynamic type, which is more specific
+than the static type as defined in the operation signature.
+<p>Since there is no efficient and reliable way of automatically creating
+the most specific type, explicit narrowing is necessary. To narrow an object
+reference <b>A</b> to an interface class <b>AttributeSequenceOfReal</b>,
+the client can use the following operation
+<div class="fragment">
+<pre>A = A._narrow(SALOMEDS.AttributeSequenceOfReal)</pre>
+</div>
+<b><i><a href="#contents">Back to the contents</a></i></b><b><i><a href="#contents"></a></i></b>
+<p><a NAME="subsection5"></a>
+<h3>
+Mapping for Exceptions</h3>
+An IDL exception is translated into a Python class derived from CORBA.UserException.
+System exceptions are derived from CORBA.SystemException. Both base classes
+are derived from CORBA.Exception. The parameters of the exception are mapped
+in the same way as the fields of a struct definition. When raising an exception,
+a new instance of the class is created; the constructor expects the exception
+parameters. For example, the definition
+<div class="fragment">
+<pre>module SALOMEDS{
+ interface StudyBuilder{
+ exception LockProtection {};
+ void CommitCommand() raises(LockProtection);
+ };
+};</pre>
+</div>
+could be used caught as
+<div class="fragment">
+<pre>from SALOMEDS import StudyBuilder;
+my_StudyBuilder=...
+try:
+ my_StudyBuilder.CommitCommand();
+except StudyBuilder.LockProtection,value:
+ print "Error! Study is locked for modifications"</pre>
+</div>
+
+<p><br><b><i><a href="#contents">Back to the contents</a></i></b><b><i><a href="#contents"></a></i></b>
+<p><a NAME="subsection6"></a>
+<h3>
+Mapping for Enumeration Types</h3>
+An enumeration is mapped into a number of constant objects in the name
+space where the enumeration is defined. An application may only test for
+equivalence of two enumeration values, and not assume that they behave
+like numbers. For example, the definition
+<div class="fragment">
+<pre>module VISU {
+ interface PrsObject{
+
+ enum PrsObjType{ TCURVE, TTABLE, TMESH, TCONTAINER,
+ TSCALARMAP, TISOSURFACE, TDEFORMEDSHAPE,
+ TCUTPLANES, TVECTORS };
+ };
+};</pre>
+</div>
+introduces the objects
+<div class="fragment">
+<pre>from VISU import PrsObject
+VISU.PrsObjType.TCURVE,VISU.PrsObjType.TTABLE,VISU.PrsObjType.TMESH,VISU.PrsObjType.TCONTAINER,
+VISU.PrsObjType.TSCALARMAP,VISU.PrsObjType.TISOSURFACE,VISU.PrsObjType.TDEFORMEDSHAPE,VISU.PrsObjType.TCUTPLANES,
+VISU.PrsObjType.TVECTORS</pre>
+</div>
+<b><i><a href="#contents">Back to the contents</a></i></b>
+<p><a NAME="subsection7"></a>
+<h3>
+Mapping for Structured Types</h3>
+An IDL struct definition is mapped into a Python class or type. For each
+field in the struct, there is a corresponding attribute in the class with
+the same name as the field. The constructor of the class expects the field
+values, from left to right. For example, the IDL definition
+<div class="fragment">
+<pre>struct SDate {
+ short Second;
+ short Minute;
+ short Hour;
+ short Day;
+ short Month;
+ short Year;
+ };</pre>
+</div>
+could be used in the Python statements
+<div class="fragment">
+<pre>Date=SDate(30, 12, 15, 26, 1, 79)
+print Date.Second,Date.Minute,Date.Hour,Date.Day,Date.Month,Date.Year</pre>
+</div>
+
+<address>
+<b><i><a href="#contents">Back to the contents</a></i></b></address>
+
+</body>
+<!-- Generated by Doxygen 1.2.14 -->
+</html>
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">\r
-<html>\r
-<head>\r
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\r
- <meta name="GENERATOR" content="Mozilla/4.73 [en] (WinNT; I) [Netscape]">\r
- <title>Main Page</title>\r
-<link href="doxygen.css" rel="stylesheet" type="text/css">\r
-</head>\r
-<body>\r
- \r
-<center><table WIDTH="96%" >\r
-<tr>\r
-<td><a href="http://www.opencascade.com"><img src="sources/logocorp.gif" BORDER=0 height=46 width=122></a></td>\r
-\r
-\r
-<td>\r
-<div align=right><a href="http://www.opencascade.org/SALOME/"><img src="sources/application.gif" BORDER=0 height=46 width=108></a></div>\r
-</td>\r
-</tr>\r
-</table></center>\r
-\r
-\r
-<h1><a name="page2">General overview</a>\r
-</h1>\r
-<a name="cont"></a><h2>Table of contents </h2>\r
-<b><i>\r
-<ul>\r
- <li><a href="#1">1. Introduction</a></li>\r
- <li><a href="#2">2. Basic principles </a></li>\r
- \r
- <li><a href="#3">3. Services and features of the SALOME kernel module</a></li>\r
- <ul>\r
- <li><a href="#3_1">3.1 Session service</a></li>\r
- <li><a href="#3_2">3.2 Registry service </a></li>\r
- <li><a href="#3_3">3.3 Notification service </a></li>\r
- <li><a href="#3_4">3.4 Module catalog service </a></li>\r
- <li><a href="#3_5">3.5 Data type catalog </a></li>\r
- <li><a href="#3_6">3.6 Resource catalog </a></li>\r
- <li><a href="#3_7">3.7 Engine </a></li>\r
- <ul>\r
- <li><a href="#3_7_1">3.7.1 Component class </a></li>\r
- <li><a href="#3_7_2">3.7.2 Container class </a></li>\r
- </ul>\r
- </ul>\r
-</ul>\r
-</i> </b> <br>\r
-<a name="1"></a><h2>1. Introduction</h2>\r
-<p>The kernel corresponds to the minimal set of services required for the use of SALOME components (Supervisor, IAPP). \r
-The kernel is also used by application software components (solver) and their container. \r
-The kernel is associated to a unique user who can launch only one kernel at once. \r
-The kernel is launched and destroyed by voluntary actions of the user. These functions are realized via the\r
-use of scripts.</p>\r
-<p>The list of the kernel services related to communication issues is:</p>\r
-<ul>\r
- <li>The Naming service</li>\r
- <li> The Session service </li>\r
- <li>The Life Cycle service </li>\r
- <li>The Registry service </li>\r
- <li>The Notification service </li>\r
-</ul>\r
-<p>This list is enlarged with CORBA independent services :</p>\r
-\r
-<ul>\r
- <li>The module catalog service </li>\r
- <li>The Data Type Catalog service </li>\r
- <li>The resource catalog service </li>\r
-</ul>\r
-<p> SALOME kernel module also encapsulates the Engine\r
-<i><a href="#cont">Back to the contents</a></i>\r
-<a name="2"></a><h2>2. Basic principles </h2>\r
-<p>The SALOME user's desktop is a process on a machine. This process includes:</p>\r
-<ul>\r
- <li>A graphic interface (based on Qt), </li>\r
- <li>A text interface (Python interpreter), </li>\r
- <li>A 3D visualization window shared by components.</li>\r
-</ul>\r
-<p>SALOME Modules decompose into an interface (widgets GUI, text mode TUI, 3D visualization V3D) and\r
-an engine.</p>\r
-<p>The description of a module and its components is obtained by consulting the module catalog.</p>\r
-<p>The interface is dynamically loaded in the process of the SALOME user's desktop. The engine is a CORBA\r
-server launched either on the local machine or on the distant machine.</p>\r
-<p>The engine (CORBA server) is created by a factory (or container). \r
-This factory is also a CORBA server. Several containers can be present on a machine. \r
-Some containers are specialized for types of components requiring a specific management. \r
-For example, a specific container is required for components performing parallel calculations.\r
-The engine includes at least a dynamically linked library in the container process. \r
-This library is the implementation of the CORBA server associated to the engine. \r
-If the engine is built from a pre-existent executable code, the library is simply a wrapper of the encapsulated code. \r
-It launches the code in a separate process. Wherever possible, the code is included into the dynamic library.\r
-<p>The container is one of the kernel services. If one needs to create a container on a distant machine, one creates a process resuming a part of the kernel services. The kernel can create other containers on distant machines via the trader (rsh). All the containers and the kernel share the same CORBA naming service with which they register.</p>\r
-<p>The user reaches the functions of various SALOME'S components, either in graphic interactive mode (GUI) or in command mode ( TUI), via a Python interpreter.</p>\r
-<i><a href="#cont">Back to the contents</a></i>\r
-<a name="3"></a>\r
-<h2>3. Services and features of the SALOME kernel module </h2>\r
-<p>This section gives a brief overview of the services composing the kernel module. \r
- The <a href="overview_Life_Cycle.html">Life Cycle</a> and <a href="overview_Naming.html">Naming</a> \r
- services are described in separate chapters of this reference manual.</p>\r
- \r
-<a name="3_1"></a><h3>3.1 Session service </h3>\r
-<p>SALOME session describes the period starting from the kernel creation and \r
- ending with its destruction. During this period the user can connect the session \r
- and disconnect from it without ending this session. One connection log could \r
- be written. A priori, no information resulting from another (past) session can \r
- be used by the current session. </p>\r
- <p>Implementation of this service in SALOME application is provided by the class \r
-<a href="interfaceSALOME_1_1Session.html">Session</a> encapsulated in the package \r
-<a href="namespaceSALOME.html">SALOME</a>.</p> \r
-\r
-<a name="3_2"></a><h3>3.2 Registry service </h3>\r
-<p> The active component registry should contain:</p>\r
-\r
-<ul>\r
- <li>The list of the active components</li>\r
- <li>The list of the active containers during a SALOME session.</li>\r
-</ul>\r
-<p>It should allow the state of a session. It also should allow to know if session can be stopped.</p>\r
-<p>The API reference for this service is not included in the current version of the reference manual.</p>\r
-\r
-<a name="3_3"></a><h3>3.3 Notification service </h3>\r
-<p>The notification service is a kernel function which allows exchanging of events between CORBA objects.</p>\r
-<p>In comparison with traditional CORBA event service, SALOME notification service allows to:</p>\r
-<ul>\r
- <li>Filter the events, </li>\r
- <li>Structure the events,</li>\r
- <li>Establish quality policies of services,</li>\r
- <li>Subscribe to various event channels.</li>\r
-</ul>\r
-<p>The API reference for this service is not included in the current version of the reference \r
- manual. </p>\r
- \r
-<a name="3_4"></a><h3>3.4 Module catalog service </h3>\r
-<p>There are two module catalogs in SALOME application:</p>\r
-<ul>\r
-<li>General module catalog : This first catalog is common to all SALOME users once the the platform is installed (for example for a particular company or a service). This catalog will be managed by the integrator or the administrator of the platform,\r
-<li>Personal module catalog : A specific catalog for every user (possibly empty). This catalog should notably allow the developers to test a new component before integrating it into the general catalog.\r
-</ul>\r
-<p>The objective of these two module catalogs is to:</p>\r
-<ul>\r
-<li>List the available modules;\r
-<li>Allow the addition, the modification and the deletion of a module in catalogs;\r
-<li>Look for a module and\or a service fulfilling some given criteria (in catalogs);\r
-</ul>\r
-<p><p>Implementation of this service in SALOME application is provided by two classes \r
-<a href="interfaceSALOME__ModuleCatalog_1_1ModuleCatalog.html">ModuleCatalog</a>and <a href="interfaceSALOME__ModuleCatalog_1_1AComponent.html">AComponent</a> encapsulated in the package \r
-<a href="namespaceSALOME__ModuleCatalog.html">SALOME_ModuleCatalog</a>.</p> \r
-\r
-<a name="3_5"></a><h3>3.5 Data type catalog </h3>\r
-\r
-<p>The data exchanged between components services have definite types. During description of input, output, and \r
-configuration parameters of components in the module catalog, the\r
-definition of the parameters types is taken from data type catalog. During the editing of execution of \r
-graphs, it is necessary to check that the connections output-input parameters are of compatible\r
-types.</p>\r
-<p>The data types correspond to CORBA object classes, including attributes and access methods (defined by their IDL). \r
-These types can be created by specialization of generic data types.</p>\r
-<p>The purpose of the data type catalog is to:</p>\r
-<ul>\r
-<li>List the available data types in the catalog;\r
-<li>Browse the type hierarchy to check the compatibility of types (specialized output toward generic input);\r
-<li>Allow the addition, the modification and the deletion of a data type in the catalog;\r
-</ul>\r
-<p>The API reference for this service is not included in the current version of the reference \r
- manual. </p>\r
- <a name="3_6"></a><h3>3.6 Resource catalog</h3> \r
- \r
-<p>This catalog describes machines, possible types of container on a machine, resources of machines... This catalog is used by the SALOME LifeCycle service.</p>\r
-<p>The API reference for this service is not included in the current version of the reference \r
- manual. </p>\r
- \r
-<a name="3_7"></a><h3>3.7 Engine</h3> \r
-<p>The engine represents a shared library which can be dynamically loaded by a container. The container can load this library, \r
-given an interface name and an implementation\r
-name. The container dynamically resolves an extern_C function in the library,\r
-which constructs the CORBA Engine servant object.</p>\r
-<p>The SALOME engine in\r
- the current version of the application is implemented \r
- as <b>Engines</b> package of interfaces. It encapsulates two classes: Component, Container.</p> \r
-<p>The API refernce for <b>Engines</b> package can be found <a href="namespaceEngines.html">here</a>. \r
-</p>\r
-<a name="3_7_1"></a><h4>3.7.1 Component class</h4> \r
-<p>This class is used for interaction between the container and the component and between the components inside the container. \r
-</p> \r
-<p>The API reference for this class can be found <a href="interfaceEngines_1_1Component.html">here</a>.</p>\r
-\r
-<a name="3_7_2"></a><h4>3.7.2 Container class</h4> \r
-<p>This class provides a set of methods which are necessary for definition of the process of loading and registration of new components in SALOME application.</p> \r
-<p>The API reference for this class can be found <a href="interfaceEngines_1_1Container.html">here</a>.</p>\r
-\r
-<i><a href="#cont">Back to the contents</a></i> \r
-</body>\r
-</html>\r
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.73 [en] (WinNT; I) [Netscape]">
+ <title>Main Page</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head>
+<body>
+
+<center><table WIDTH="96%" >
+<tr>
+<td><a href="http://www.opencascade.com"><img src="sources/logocorp.gif" BORDER=0 height=46 width=122></a></td>
+
+
+<td>
+<div align=right><a href="http://www.opencascade.org/SALOME/"><img src="sources/application.gif" BORDER=0 height=46 width=108></a></div>
+</td>
+</tr>
+</table></center>
+
+
+<h1><a name="page2">General overview</a>
+</h1>
+<a name="cont"></a><h2>Table of contents </h2>
+<b><i>
+<ul>
+ <li><a href="#1">1. Introduction</a></li>
+ <li><a href="#2">2. Basic principles </a></li>
+
+ <li><a href="#3">3. Services and features of the SALOME kernel module</a></li>
+ <ul>
+ <li><a href="#3_1">3.1 Session service</a></li>
+ <li><a href="#3_2">3.2 Registry service </a></li>
+ <li><a href="#3_3">3.3 Notification service </a></li>
+ <li><a href="#3_4">3.4 Module catalog service </a></li>
+ <li><a href="#3_5">3.5 Data type catalog </a></li>
+ <li><a href="#3_6">3.6 Resource catalog </a></li>
+ <li><a href="#3_7">3.7 Engine </a></li>
+ <ul>
+ <li><a href="#3_7_1">3.7.1 Component class </a></li>
+ <li><a href="#3_7_2">3.7.2 Container class </a></li>
+ </ul>
+ </ul>
+</ul>
+</i> </b> <br>
+<a name="1"></a><h2>1. Introduction</h2>
+<p>The kernel corresponds to the minimal set of services required for the use of SALOME components (Supervisor, IAPP).
+The kernel is also used by application software components (solver) and their container.
+The kernel is associated to a unique user who can launch only one kernel at once.
+The kernel is launched and destroyed by voluntary actions of the user. These functions are realized via the
+use of scripts.</p>
+<p>The list of the kernel services related to communication issues is:</p>
+<ul>
+ <li>The Naming service</li>
+ <li> The Session service </li>
+ <li>The Life Cycle service </li>
+ <li>The Registry service </li>
+ <li>The Notification service </li>
+</ul>
+<p>This list is enlarged with CORBA independent services :</p>
+
+<ul>
+ <li>The module catalog service </li>
+ <li>The Data Type Catalog service </li>
+ <li>The resource catalog service </li>
+</ul>
+<p> SALOME kernel module also encapsulates the Engine
+<i><a href="#cont">Back to the contents</a></i>
+<a name="2"></a><h2>2. Basic principles </h2>
+<p>The SALOME user's desktop is a process on a machine. This process includes:</p>
+<ul>
+ <li>A graphic interface (based on Qt), </li>
+ <li>A text interface (Python interpreter), </li>
+ <li>A 3D visualization window shared by components.</li>
+</ul>
+<p>SALOME Modules decompose into an interface (widgets GUI, text mode TUI, 3D visualization V3D) and
+an engine.</p>
+<p>The description of a module and its components is obtained by consulting the module catalog.</p>
+<p>The interface is dynamically loaded in the process of the SALOME user's desktop. The engine is a CORBA
+server launched either on the local machine or on the distant machine.</p>
+<p>The engine (CORBA server) is created by a factory (or container).
+This factory is also a CORBA server. Several containers can be present on a machine.
+Some containers are specialized for types of components requiring a specific management.
+For example, a specific container is required for components performing parallel calculations.
+The engine includes at least a dynamically linked library in the container process.
+This library is the implementation of the CORBA server associated to the engine.
+If the engine is built from a pre-existent executable code, the library is simply a wrapper of the encapsulated code.
+It launches the code in a separate process. Wherever possible, the code is included into the dynamic library.
+<p>The container is one of the kernel services. If one needs to create a container on a distant machine, one creates a process resuming a part of the kernel services. The kernel can create other containers on distant machines via the trader (rsh). All the containers and the kernel share the same CORBA naming service with which they register.</p>
+<p>The user reaches the functions of various SALOME'S components, either in graphic interactive mode (GUI) or in command mode ( TUI), via a Python interpreter.</p>
+<i><a href="#cont">Back to the contents</a></i>
+<a name="3"></a>
+<h2>3. Services and features of the SALOME kernel module </h2>
+<p>This section gives a brief overview of the services composing the kernel module.
+ The <a href="overview_Life_Cycle.html">Life Cycle</a> and <a href="overview_Naming.html">Naming</a>
+ services are described in separate chapters of this reference manual.</p>
+
+<a name="3_1"></a><h3>3.1 Session service </h3>
+<p>SALOME session describes the period starting from the kernel creation and
+ ending with its destruction. During this period the user can connect the session
+ and disconnect from it without ending this session. One connection log could
+ be written. A priori, no information resulting from another (past) session can
+ be used by the current session. </p>
+ <p>Implementation of this service in SALOME application is provided by the class
+<a href="interfaceSALOME_1_1Session.html">Session</a> encapsulated in the package
+<a href="namespaceSALOME.html">SALOME</a>.</p>
+
+<a name="3_2"></a><h3>3.2 Registry service </h3>
+<p> The active component registry should contain:</p>
+
+<ul>
+ <li>The list of the active components</li>
+ <li>The list of the active containers during a SALOME session.</li>
+</ul>
+<p>It should allow the state of a session. It also should allow to know if session can be stopped.</p>
+<p>The API reference for this service is not included in the current version of the reference manual.</p>
+
+<a name="3_3"></a><h3>3.3 Notification service </h3>
+<p>The notification service is a kernel function which allows exchanging of events between CORBA objects.</p>
+<p>In comparison with traditional CORBA event service, SALOME notification service allows to:</p>
+<ul>
+ <li>Filter the events, </li>
+ <li>Structure the events,</li>
+ <li>Establish quality policies of services,</li>
+ <li>Subscribe to various event channels.</li>
+</ul>
+<p>The API reference for this service is not included in the current version of the reference
+ manual. </p>
+
+<a name="3_4"></a><h3>3.4 Module catalog service </h3>
+<p>There are two module catalogs in SALOME application:</p>
+<ul>
+<li>General module catalog : This first catalog is common to all SALOME users once the the platform is installed (for example for a particular company or a service). This catalog will be managed by the integrator or the administrator of the platform,
+<li>Personal module catalog : A specific catalog for every user (possibly empty). This catalog should notably allow the developers to test a new component before integrating it into the general catalog.
+</ul>
+<p>The objective of these two module catalogs is to:</p>
+<ul>
+<li>List the available modules;
+<li>Allow the addition, the modification and the deletion of a module in catalogs;
+<li>Look for a module and\or a service fulfilling some given criteria (in catalogs);
+</ul>
+<p><p>Implementation of this service in SALOME application is provided by two classes
+<a href="interfaceSALOME__ModuleCatalog_1_1ModuleCatalog.html">ModuleCatalog</a>and <a href="interfaceSALOME__ModuleCatalog_1_1AComponent.html">AComponent</a> encapsulated in the package
+<a href="namespaceSALOME__ModuleCatalog.html">SALOME_ModuleCatalog</a>.</p>
+
+<a name="3_5"></a><h3>3.5 Data type catalog </h3>
+
+<p>The data exchanged between components services have definite types. During description of input, output, and
+configuration parameters of components in the module catalog, the
+definition of the parameters types is taken from data type catalog. During the editing of execution of
+graphs, it is necessary to check that the connections output-input parameters are of compatible
+types.</p>
+<p>The data types correspond to CORBA object classes, including attributes and access methods (defined by their IDL).
+These types can be created by specialization of generic data types.</p>
+<p>The purpose of the data type catalog is to:</p>
+<ul>
+<li>List the available data types in the catalog;
+<li>Browse the type hierarchy to check the compatibility of types (specialized output toward generic input);
+<li>Allow the addition, the modification and the deletion of a data type in the catalog;
+</ul>
+<p>The API reference for this service is not included in the current version of the reference
+ manual. </p>
+ <a name="3_6"></a><h3>3.6 Resource catalog</h3>
+
+<p>This catalog describes machines, possible types of container on a machine, resources of machines... This catalog is used by the SALOME LifeCycle service.</p>
+<p>The API reference for this service is not included in the current version of the reference
+ manual. </p>
+
+<a name="3_7"></a><h3>3.7 Engine</h3>
+<p>The engine represents a shared library which can be dynamically loaded by a container. The container can load this library,
+given an interface name and an implementation
+name. The container dynamically resolves an extern_C function in the library,
+which constructs the CORBA Engine servant object.</p>
+<p>The SALOME engine in
+ the current version of the application is implemented
+ as <b>Engines</b> package of interfaces. It encapsulates two classes: Component, Container.</p>
+<p>The API refernce for <b>Engines</b> package can be found <a href="namespaceEngines.html">here</a>.
+</p>
+<a name="3_7_1"></a><h4>3.7.1 Component class</h4>
+<p>This class is used for interaction between the container and the component and between the components inside the container.
+</p>
+<p>The API reference for this class can be found <a href="interfaceEngines_1_1Component.html">here</a>.</p>
+
+<a name="3_7_2"></a><h4>3.7.2 Container class</h4>
+<p>This class provides a set of methods which are necessary for definition of the process of loading and registration of new components in SALOME application.</p>
+<p>The API reference for this class can be found <a href="interfaceEngines_1_1Container.html">here</a>.</p>
+
+<i><a href="#cont">Back to the contents</a></i>
+</body>
+</html>
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">\r
-<html>\r
-<head>\r
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\r
- <meta name="GENERATOR" content="Mozilla/4.73 [en] (WinNT; I) [Netscape]">\r
- <title>Life Cycle service Description</title>\r
-\r
-<link href="doxygen.css" rel="stylesheet" type="text/css">\r
-\r
-</head>\r
-\r
-<body>\r
- \r
-<center><table WIDTH="96%" >\r
-<tr>\r
-<td><a href="http://www.opencascade.com"><img src="sources/logocorp.gif" BORDER=0 height=46 width=122></a></td>\r
-\r
-\r
-<td>\r
-<div align=right><a href="http://www.opencascade.org/SALOME/"><img src="sources/application.gif" BORDER=0 height=46 width=108></a></div>\r
-</td>\r
-</tr>\r
-</table></center>\r
-\r
-\r
-<h1><a name="page2">Life Cycle service Description</a> </h1>\r
-<h2>Introduction</h2>\r
-<p> The objective of this document is to give the users of SALOME \r
- application a brief overview of the Life Cycle service implemented in SALOME. \r
- A complete version of the LifeCycle service specification edited by the Object Management Group, Inc.(OMG) can be found <a href="http://www.omg.org" target="top">here.</a> <a name="#cont"></a>\r
- </p>\r
-<a name="cont"></a><h2>Table of contents </h2>\r
-<b><i><ul>\r
- <li><a href="#1">1. Overview</a></li>\r
-\r
-\r
- <li><a href="#2">2. SALOME Life Cycle service description</a></li>\r
-</ul>\r
-</i></b><br>\r
-\r
-<a name="1"></a><h2>1. Overview</h2>\r
- \r
-<p>Life Cycle service defines services and conventions for creating, deleting, copying and moving objects. \r
-Because CORBA-based environments support distributed objects, the Life Cycle service defines conventions that allow clients to perform \r
-life cycle operations on objects in different locations. This overview describes the life cycle problem for distributed object systems. </p>\r
-<br>\r
- \r
-\r
-<a name="2"></a><h2>2. SALOME Life Cycle service description</h2>\r
-<p>The SALOME Life Cycle service represents a partial implementation of the CORBA LifeCycle service. <p>\r
-<p>From general point of view, the SALOME Life Cycle service allows to <i>find</i> or <i>load</i> with the help of a given container a definte SALOME component with its further\r
-initialization and registration in the Naming service.</p>\r
-<p><b>Container</b> - it's a certain engine realizing the mechanism of loading a SALOME module.</p>\r
- <p><b>Component</b> - it's a certain abstract shell wrapping SALOME modules, performing all operations concerned with their initialization and registration. </p>\r
-<p>From the point of view of the service user, the Life Cycle provides a set of functions allowing to :</p>\r
-<ul>\r
-<li>Locate a machine (more generally a container) by a logical set of required features (of both container and\r
- machine);</li>\r
-<li>Load components on the obtained containers;</li>\r
-<li>Create a container;</li>\r
-<li>Obtain the container containing a given component;</li>\r
-<li>Treat the list of the active components;</li>\r
-<li>Treat the list of the available containers.</li>\r
-</ul>\r
- \r
-\r
-\r
-<p>The SALOME Life Cycle is a CORBA server. This server at its initialization is registered with the naming service.</p>\r
-<p>The Life Cycle service is invoked to find a container and use it to load a\r
-component. It supplies, as parameters, the type of container and the machine features required for loading\r
-a given component.\r
-</p>\r
-<p>The Life Cycle service then returns a CORBA reference of a launched container.</p>\r
-<p>Containers are launched on demand depending on components to be loaded. The Life Cycle service manages loading of containers.</p>\r
-<p>When there is no launched container matching the request the Life Cycle service invokes loading of the correct type of container on a correct machine via a rsh type command.</p>\r
-<p>The Life Cycle service interrogates containers to have information about the dynamic state of the machine (load). It contains (and update) the state of the active containers.</p>\r
-<p>The Life Cycle service can implement a loading strategy for new containers on new machines, depending on the state of the already launched containers.</p>\r
-<p>The Life Cycle service can stop containers at the end of session on\r
-demand.</p>\r
-\r
-<p>In SALOME platform the Life Cycle service is implemented in <b>SALOME_Life CycleCORBA</b> class. The API refernce for the methods of this class\r
-can be found <a href="classSALOME__LifeCycleCORBA.html"> here</a>.</p>\r
-<i><a href="#cont">Back to the contents</a></i>\r
-<br>\r
-\r
- \r
-<br>\r
-\r
-</body>\r
-</html>\r
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.73 [en] (WinNT; I) [Netscape]">
+ <title>Life Cycle service Description</title>
+
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+
+</head>
+
+<body>
+
+<center><table WIDTH="96%" >
+<tr>
+<td><a href="http://www.opencascade.com"><img src="sources/logocorp.gif" BORDER=0 height=46 width=122></a></td>
+
+
+<td>
+<div align=right><a href="http://www.opencascade.org/SALOME/"><img src="sources/application.gif" BORDER=0 height=46 width=108></a></div>
+</td>
+</tr>
+</table></center>
+
+
+<h1><a name="page2">Life Cycle service Description</a> </h1>
+<h2>Introduction</h2>
+<p> The objective of this document is to give the users of SALOME
+ application a brief overview of the Life Cycle service implemented in SALOME.
+ A complete version of the LifeCycle service specification edited by the Object Management Group, Inc.(OMG) can be found <a href="http://www.omg.org" target="top">here.</a> <a name="#cont"></a>
+ </p>
+<a name="cont"></a><h2>Table of contents </h2>
+<b><i><ul>
+ <li><a href="#1">1. Overview</a></li>
+
+
+ <li><a href="#2">2. SALOME Life Cycle service description</a></li>
+</ul>
+</i></b><br>
+
+<a name="1"></a><h2>1. Overview</h2>
+
+<p>Life Cycle service defines services and conventions for creating, deleting, copying and moving objects.
+Because CORBA-based environments support distributed objects, the Life Cycle service defines conventions that allow clients to perform
+life cycle operations on objects in different locations. This overview describes the life cycle problem for distributed object systems. </p>
+<br>
+
+
+<a name="2"></a><h2>2. SALOME Life Cycle service description</h2>
+<p>The SALOME Life Cycle service represents a partial implementation of the CORBA LifeCycle service. <p>
+<p>From general point of view, the SALOME Life Cycle service allows to <i>find</i> or <i>load</i> with the help of a given container a definte SALOME component with its further
+initialization and registration in the Naming service.</p>
+<p><b>Container</b> - it's a certain engine realizing the mechanism of loading a SALOME module.</p>
+ <p><b>Component</b> - it's a certain abstract shell wrapping SALOME modules, performing all operations concerned with their initialization and registration. </p>
+<p>From the point of view of the service user, the Life Cycle provides a set of functions allowing to :</p>
+<ul>
+<li>Locate a machine (more generally a container) by a logical set of required features (of both container and
+ machine);</li>
+<li>Load components on the obtained containers;</li>
+<li>Create a container;</li>
+<li>Obtain the container containing a given component;</li>
+<li>Treat the list of the active components;</li>
+<li>Treat the list of the available containers.</li>
+</ul>
+
+
+
+<p>The SALOME Life Cycle is a CORBA server. This server at its initialization is registered with the naming service.</p>
+<p>The Life Cycle service is invoked to find a container and use it to load a
+component. It supplies, as parameters, the type of container and the machine features required for loading
+a given component.
+</p>
+<p>The Life Cycle service then returns a CORBA reference of a launched container.</p>
+<p>Containers are launched on demand depending on components to be loaded. The Life Cycle service manages loading of containers.</p>
+<p>When there is no launched container matching the request the Life Cycle service invokes loading of the correct type of container on a correct machine via a rsh type command.</p>
+<p>The Life Cycle service interrogates containers to have information about the dynamic state of the machine (load). It contains (and update) the state of the active containers.</p>
+<p>The Life Cycle service can implement a loading strategy for new containers on new machines, depending on the state of the already launched containers.</p>
+<p>The Life Cycle service can stop containers at the end of session on
+demand.</p>
+
+<p>In SALOME platform the Life Cycle service is implemented in <b>SALOME_Life CycleCORBA</b> class. The API refernce for the methods of this class
+can be found <a href="classSALOME__LifeCycleCORBA.html"> here</a>.</p>
+<i><a href="#cont">Back to the contents</a></i>
+<br>
+
+
+<br>
+
+</body>
+</html>
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">\r
-<html>\r
-<head>\r
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\r
- <meta name="GENERATOR" content="Mozilla/4.73 [en] (WinNT; I) [Netscape]">\r
- <title>Naming Service Description</title>\r
-<link href="doxygen.css" rel="stylesheet" type="text/css">\r
-</head>\r
-<body>\r
- \r
-<center><table WIDTH="96%" >\r
-<tr>\r
-<td><a href="http://www.opencascade.com"><img src="sources/logocorp.gif" BORDER=0 height=46 width=122></a></td>\r
-\r
-\r
-<td>\r
-<div align=right><a href="http://www.opencascade.org/SALOME/"><img src="sources/application.gif" BORDER=0 height=46 width=108></a></div>\r
-</td>\r
-</tr>\r
-</table></center>\r
-\r
-\r
-<h1><a name="page2">Naming Service Description </a></h1>\r
-<br>\r
-<h2>Introduction</h2>\r
-<p>This page contains an abridged version of the Naming Service specification \r
- edited by the Object Management Group, Inc.(OMG). The objective of this document is to give the users of SALOME \r
- application a brief overview of the Naming Service implemented in SALOME. \r
- A complete version of this document can be found <a href="http://www.omg.org" target="top">here.</a> <a name="#cont"></a>\r
- </p>\r
- <br>\r
-<a name="cont"></a><h2>Table of contents </h2>\r
-<b><i>\r
-<ul>\r
- <li><a href="#1">1. Overview</a></li>\r
- <li><a href="#2">2. SALOME Naming Service </a></li>\r
- <ul>\r
- <li><a href="#2_1">2.1 Introduction </a></li>\r
- <li><a href="#2_2">2.2 Definitions </a></li>\r
- <li><a href="#2_3">2.3 Partition of SALOME name directory hierarchy </a></li>\r
- <li><a href="#2_4">2.4 SALOME name directory persistence </a></li>\r
- <li><a href="#2_5">2.5 SALOME naming service features </a></li>\r
- </ul>\r
- \r
-</ul>\r
-</i> </b> <br>\r
-\r
-<a name="1"></a><h2>1. Overview</h2>\r
-<p>This chapter presents the OMG Naming Service and explains how the Naming Service can be used to decouple clients and servers by\r
-providing an external reference exchange mechanism. The chapter also covers how to solve the bootstrapping problem for clients and\r
-servers by controlling their configuration. \r
- </p>\r
- \r
-<p>In practice, copying stringified references from a server to all its clients is clumsy and does not scale. The Naming Service provides a way\r
-for servers to advertise references under a name, and for clients to retrieve them. The advantages are: \r
-</p>\r
-<ul>\r
- <li>Clients and servers can use meaningful names instead of having to deal with stringified references. </li>\r
- <li> By changing a reference in the service without changing its name, you can transparently direct clients to a different object.</li> \r
- <li> The Naming Service solves the bootstrapping problem because it provides a fixed point for clients and servers to rendezvous. </li>\r
-</ul>\r
-<p>The Naming Service is much like a white pages phone book. Given a name, it \r
- returns an object reference. </p>\r
- \r
-<p>The terminology used in description of NamigService is the following: </p>\r
-\r
-<ul>\r
- <li>A name-to-IOR association is called by a name binding. </li>\r
- <li>Each binding identifies exactly one object reference, but an object reference \r
- may be bound more than once (have more than one name). </li>\r
- <li><a name="graph"></a>A naming context is an object that contains name bindings. \r
- The names within a context must be unique. Naming contexts can contain bindings \r
- to other naming contexts, so naming contexts can form graphs. Binding contexts \r
- in other contexts creates a <i>naming graph</i> \97 a directed graph with nodes \r
- and labeled edges where the nodes are contexts. A naming graph allows more \r
- complex names to reference an object. Given a context in a naming graph, a \r
- sequence of names can reference an object. This sequence of names (called \r
- a <i>compound name</i>) defines a path in the naming graph to navigate the \r
- resolution process. Figure 1-1 shows an example of a naming graph. </li>\r
- <li>Binding a name to a context means to add a name\96IOR pair to a context. </li>\r
- <li>Resolving a name means to look for a name in a context and to obtain the \r
- IOR bound under that name.</li>\r
-</ul>\r
-\r
- \r
-<div align="center"><img src="ns_f3-1.jpg"> </div>\r
-<p align="center"><font size="-1"><i>Figure 1-1</i> A Naming Graph </font></p>\r
- <i><a href="#cont">Back to the contents</a></i>\r
- <br>\r
- <a name="2"></a>\r
-<h2>2. SALOME Naming Service </h2>\r
-<a name="2_1"></a>\r
-<h3>2.1 Introduction</h3\r
- \r
->\r
-<p>The SALOME Naming Service is a kernel function which supplies a name directory \r
- hierarchy for pointing out CORBA objects. This name directory hierarchy allows, \r
- from symbolic names, to dynamically find the references of distributed SALOME \r
- objects, without information about their location. SALOME objects which can \r
- be reached via the naming service are:</p>\r
- \r
-<ul>\r
- <li>The kernel services</li>\r
- <li>Containers\r
- <li>SALOME components instances\r
-</ul>\r
-<p>The name directory hierarchy in SALOME represents a graph of directories containing \r
- symbolic associations name-reference on objects. (It has been described in the \r
- <a href="#graph">previous section</a>)</p>\r
-<a name="2_2"></a>\r
-<h3>2.2 Definitions</h3>\r
-<dl>\r
-<dt><i><b>Directory</b></i></dt> \r
-<dd>Context of names containing symbolic associations name-reference on objects.</dd><br><br>\r
- <dt><i><b>"/"</b></i></dt>\r
- <dd>Character used in SALOME to separate two names of a directory</dd><br><br>\r
- <dt><i><b>Access path</b></i></dt> \r
- <dd>List of names (separated by "/" character representing the path to be followed \r
- in the graph to reach an association name-reference (the last name in the sequence).</dd>\r
-</dl> \r
-<blockquote><b>Note:</b>An object can be referenced by several symbolic names \r
- in one or several directories.</blockquote>\r
- <a name="2_3"></a>\r
-<h3>2.3 Partition of SALOME name directory hierarchy</h3>\r
-<p>The hierarchical organization of the SALOME name directory is not completely frozen .\r
-Because the framework allows the simultaneous opening of several studies, the following levels are determined:</p>\r
-<pre> \r
- /Kernel\r
- /Container/\r
- /Component \r
-</pre>\r
-<a name="2_4"></a>\r
-<h3>2.4 SALOME name directory persistence</h3>\r
-<p>During a SALOME session, stopping a server in charge of the Naming Service \r
- doesn't imply the loss of the contents of the SALOME name directory hierarchy. \r
- A backup file is produced and can be used to restart the Naming Service. So, \r
- one can recover the state of the SALOME name directory hierarchy at restart \r
- time. During such breakdown, every call to any function of the Naming Service \r
- invokes an exception of type <i>Unreachable service</i>.</p>\r
-<a name="2_5"></a>\r
-<h3>2.5 SALOME Naming Service features</h3>\r
-<p>Usage and administration of the name directory hierarchy is realized by means of the following functions:</p> \r
-<ul>\r
- <li>Recording and recovering of the reference of an object </li>\r
- <li>Searching for a symbolic name</li>\r
- <li>Creating of a directory, reading and modifying of the current directory</li>\r
- <li>Destructing of a symbolic name and a diredtory</li>\r
-</ul>\r
-<p>The access path used in these functions can be defined, either from the root, or from any\r
-directory of SALOME name directory hierarchy.</p> \r
-\r
-<p>In SALOME there is s standard interface of Naming Service, and any user can \r
- use it for binding and finding objects. How to use it, it's possible to find \r
- in any CORBA documentation. However in SALOME there is an additional layer which \r
- hides calls to standard interface. </p>\r
- <p>The precise API reference for these functions you can find <a href="classSALOME__Naming Service.html">here.</a> </p>\r
-<p>Here is a short list of public methods which are used for working with the SALOME Naming Service:</p>\r
-<dl>\r
-<dt><h4>Register</h4> </dt>\r
-<dd>Method which register object reference in the naming service with given name. It makes assignment between IOR and stringified name.\r
-Then it's possible to get object reference from name using "Resolve" method. </dd>\r
-<br><br>\r
-<dt><h4>Resolve</h4> </dt>\r
- <dd>Try to obtain object reference from name. It's necessary before publishing \r
- IOR in the Naming Service by Register method. </dd>\r
-<br><br>\r
-<dt><h4>Find</h4> </dt>\r
- <dd>The purpose of this method is to research a name from the current directory \r
- of the naming service. Then if there is occurrence the naming service changes \r
- directory to go to the directory where last occurrence is found. </dd>\r
-<br><br>\r
-<dt><h4>CreateDirectory</h4> </dt>\r
-<dd>This method allows to create one or several directories in the current directory</dd>\r
-<br><br>\r
-<dt><h4>ChangeDirectory</h4> </dt>\r
-<dd>Moves the current directory. The current directory is moved to the root directory if the input parameter <i>Name</i> is "/".</dd>\r
-<br><br>\r
-<dt><h4>CurrentDirectory</h4> </dt>\r
-<dd>Method allowing to get the current directory.</dd>\r
-<br><br>\r
-<dt><h4>list</h4> </dt>\r
-<dd>Method allowing to list and print the whole context beginning from the current context.</dd> \r
-<br><br>\r
-<dt><h4>list_directory</h4> </dt>\r
-<dd>Method to get all contexts contained in the current directory.</dd> \r
-<br><br>\r
-<dt><h4>DestroyName</h4> </dt>\r
-<dd>Destroys a symbolic name-object reference association.</dd>\r
-<br><br>\r
-<dt><h4>DestroyDirectory</h4> </dt>\r
-<dd>Destroys an empty directory.</dd>\r
-</dl>\r
-\r
-<i><a href="#cont">Back to the contents</a></i>\r
-<br>\r
-</body>\r
-</html>\r
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.73 [en] (WinNT; I) [Netscape]">
+ <title>Naming Service Description</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head>
+<body>
+
+<center><table WIDTH="96%" >
+<tr>
+<td><a href="http://www.opencascade.com"><img src="sources/logocorp.gif" BORDER=0 height=46 width=122></a></td>
+
+
+<td>
+<div align=right><a href="http://www.opencascade.org/SALOME/"><img src="sources/application.gif" BORDER=0 height=46 width=108></a></div>
+</td>
+</tr>
+</table></center>
+
+
+<h1><a name="page2">Naming Service Description </a></h1>
+<br>
+<h2>Introduction</h2>
+<p>This page contains an abridged version of the Naming Service specification
+ edited by the Object Management Group, Inc.(OMG). The objective of this document is to give the users of SALOME
+ application a brief overview of the Naming Service implemented in SALOME.
+ A complete version of this document can be found <a href="http://www.omg.org" target="top">here.</a> <a name="#cont"></a>
+ </p>
+ <br>
+<a name="cont"></a><h2>Table of contents </h2>
+<b><i>
+<ul>
+ <li><a href="#1">1. Overview</a></li>
+ <li><a href="#2">2. SALOME Naming Service </a></li>
+ <ul>
+ <li><a href="#2_1">2.1 Introduction </a></li>
+ <li><a href="#2_2">2.2 Definitions </a></li>
+ <li><a href="#2_3">2.3 Partition of SALOME name directory hierarchy </a></li>
+ <li><a href="#2_4">2.4 SALOME name directory persistence </a></li>
+ <li><a href="#2_5">2.5 SALOME naming service features </a></li>
+ </ul>
+
+</ul>
+</i> </b> <br>
+
+<a name="1"></a><h2>1. Overview</h2>
+<p>This chapter presents the OMG Naming Service and explains how the Naming Service can be used to decouple clients and servers by
+providing an external reference exchange mechanism. The chapter also covers how to solve the bootstrapping problem for clients and
+servers by controlling their configuration.
+ </p>
+
+<p>In practice, copying stringified references from a server to all its clients is clumsy and does not scale. The Naming Service provides a way
+for servers to advertise references under a name, and for clients to retrieve them. The advantages are:
+</p>
+<ul>
+ <li>Clients and servers can use meaningful names instead of having to deal with stringified references. </li>
+ <li> By changing a reference in the service without changing its name, you can transparently direct clients to a different object.</li>
+ <li> The Naming Service solves the bootstrapping problem because it provides a fixed point for clients and servers to rendezvous. </li>
+</ul>
+<p>The Naming Service is much like a white pages phone book. Given a name, it
+ returns an object reference. </p>
+
+<p>The terminology used in description of NamigService is the following: </p>
+
+<ul>
+ <li>A name-to-IOR association is called by a name binding. </li>
+ <li>Each binding identifies exactly one object reference, but an object reference
+ may be bound more than once (have more than one name). </li>
+ <li><a name="graph"></a>A naming context is an object that contains name bindings.
+ The names within a context must be unique. Naming contexts can contain bindings
+ to other naming contexts, so naming contexts can form graphs. Binding contexts
+ in other contexts creates a <i>naming graph</i> \97 a directed graph with nodes
+ and labeled edges where the nodes are contexts. A naming graph allows more
+ complex names to reference an object. Given a context in a naming graph, a
+ sequence of names can reference an object. This sequence of names (called
+ a <i>compound name</i>) defines a path in the naming graph to navigate the
+ resolution process. Figure 1-1 shows an example of a naming graph. </li>
+ <li>Binding a name to a context means to add a name\96IOR pair to a context. </li>
+ <li>Resolving a name means to look for a name in a context and to obtain the
+ IOR bound under that name.</li>
+</ul>
+
+
+<div align="center"><img src="ns_f3-1.jpg"> </div>
+<p align="center"><font size="-1"><i>Figure 1-1</i> A Naming Graph </font></p>
+ <i><a href="#cont">Back to the contents</a></i>
+ <br>
+ <a name="2"></a>
+<h2>2. SALOME Naming Service </h2>
+<a name="2_1"></a>
+<h3>2.1 Introduction</h3
+
+>
+<p>The SALOME Naming Service is a kernel function which supplies a name directory
+ hierarchy for pointing out CORBA objects. This name directory hierarchy allows,
+ from symbolic names, to dynamically find the references of distributed SALOME
+ objects, without information about their location. SALOME objects which can
+ be reached via the naming service are:</p>
+
+<ul>
+ <li>The kernel services</li>
+ <li>Containers
+ <li>SALOME components instances
+</ul>
+<p>The name directory hierarchy in SALOME represents a graph of directories containing
+ symbolic associations name-reference on objects. (It has been described in the
+ <a href="#graph">previous section</a>)</p>
+<a name="2_2"></a>
+<h3>2.2 Definitions</h3>
+<dl>
+<dt><i><b>Directory</b></i></dt>
+<dd>Context of names containing symbolic associations name-reference on objects.</dd><br><br>
+ <dt><i><b>"/"</b></i></dt>
+ <dd>Character used in SALOME to separate two names of a directory</dd><br><br>
+ <dt><i><b>Access path</b></i></dt>
+ <dd>List of names (separated by "/" character representing the path to be followed
+ in the graph to reach an association name-reference (the last name in the sequence).</dd>
+</dl>
+<blockquote><b>Note:</b>An object can be referenced by several symbolic names
+ in one or several directories.</blockquote>
+ <a name="2_3"></a>
+<h3>2.3 Partition of SALOME name directory hierarchy</h3>
+<p>The hierarchical organization of the SALOME name directory is not completely frozen .
+Because the framework allows the simultaneous opening of several studies, the following levels are determined:</p>
+<pre>
+ /Kernel
+ /Container/
+ /Component
+</pre>
+<a name="2_4"></a>
+<h3>2.4 SALOME name directory persistence</h3>
+<p>During a SALOME session, stopping a server in charge of the Naming Service
+ doesn't imply the loss of the contents of the SALOME name directory hierarchy.
+ A backup file is produced and can be used to restart the Naming Service. So,
+ one can recover the state of the SALOME name directory hierarchy at restart
+ time. During such breakdown, every call to any function of the Naming Service
+ invokes an exception of type <i>Unreachable service</i>.</p>
+<a name="2_5"></a>
+<h3>2.5 SALOME Naming Service features</h3>
+<p>Usage and administration of the name directory hierarchy is realized by means of the following functions:</p>
+<ul>
+ <li>Recording and recovering of the reference of an object </li>
+ <li>Searching for a symbolic name</li>
+ <li>Creating of a directory, reading and modifying of the current directory</li>
+ <li>Destructing of a symbolic name and a diredtory</li>
+</ul>
+<p>The access path used in these functions can be defined, either from the root, or from any
+directory of SALOME name directory hierarchy.</p>
+
+<p>In SALOME there is s standard interface of Naming Service, and any user can
+ use it for binding and finding objects. How to use it, it's possible to find
+ in any CORBA documentation. However in SALOME there is an additional layer which
+ hides calls to standard interface. </p>
+ <p>The precise API reference for these functions you can find <a href="classSALOME__Naming Service.html">here.</a> </p>
+<p>Here is a short list of public methods which are used for working with the SALOME Naming Service:</p>
+<dl>
+<dt><h4>Register</h4> </dt>
+<dd>Method which register object reference in the naming service with given name. It makes assignment between IOR and stringified name.
+Then it's possible to get object reference from name using "Resolve" method. </dd>
+<br><br>
+<dt><h4>Resolve</h4> </dt>
+ <dd>Try to obtain object reference from name. It's necessary before publishing
+ IOR in the Naming Service by Register method. </dd>
+<br><br>
+<dt><h4>Find</h4> </dt>
+ <dd>The purpose of this method is to research a name from the current directory
+ of the naming service. Then if there is occurrence the naming service changes
+ directory to go to the directory where last occurrence is found. </dd>
+<br><br>
+<dt><h4>CreateDirectory</h4> </dt>
+<dd>This method allows to create one or several directories in the current directory</dd>
+<br><br>
+<dt><h4>ChangeDirectory</h4> </dt>
+<dd>Moves the current directory. The current directory is moved to the root directory if the input parameter <i>Name</i> is "/".</dd>
+<br><br>
+<dt><h4>CurrentDirectory</h4> </dt>
+<dd>Method allowing to get the current directory.</dd>
+<br><br>
+<dt><h4>list</h4> </dt>
+<dd>Method allowing to list and print the whole context beginning from the current context.</dd>
+<br><br>
+<dt><h4>list_directory</h4> </dt>
+<dd>Method to get all contexts contained in the current directory.</dd>
+<br><br>
+<dt><h4>DestroyName</h4> </dt>
+<dd>Destroys a symbolic name-object reference association.</dd>
+<br><br>
+<dt><h4>DestroyDirectory</h4> </dt>
+<dd>Destroys an empty directory.</dd>
+</dl>
+
+<i><a href="#cont">Back to the contents</a></i>
+<br>
+</body>
+</html>
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">\r
-<html>\r
-<head>\r
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\r
- <meta name="GENERATOR" content="Mozilla/4.73 [en] (WinNT; I) [Netscape]">\r
- <title>Main Page</title>\r
-<link href="doxygen.css" rel="stylesheet" type="text/css">\r
-</head>\r
-<body>\r
- \r
-<center><table WIDTH="96%" >\r
-<tr>\r
-<td><a href="http://www.opencascade.com"><img src="sources/logocorp.gif" BORDER=0 height=46 width=122></a></td>\r
-\r
-\r
-<td>\r
-<div align=right><a href="http://www.opencascade.org/SALOME/"><img src="sources/application.gif" BORDER=0 height=46 width=108></a></div>\r
-</td>\r
-</tr>\r
-</table></center>\r
-\r
-\r
-<h1><a name="page2">General overview</a>\r
-</h1>\r
-<br>\r
-<h2><a name="cont"></a>Table of contents</h2>\r
-<ul>\r
- <li><i><b><a href="#1">1. Introduction</a></b></i></li>\r
- <li><i><b><a href="#2">2. Representation of the study</a></b></i></li>\r
- <ul>\r
- <li><i><b><a href="#2_1">2.1 Study in transient format</a></b></i></li>\r
- <li><i><b><a href="#2_2">2.2 Study in persistent format</a></b></i></li>\r
- <li><i><b><a href="#2_3">2.3 Link between transient and persistent formats</a></b></i></li>\r
- </ul>\r
- <li><i><b><a href="#3">3. Services and features of the study</a></b></i></li>\r
- <ul>\r
- <li><i><b><a href="#3_1">3.1 Study class </a></b></i></li>\r
- <li><i><b><a href="#3_2">3.2 StudyBuilder class </a></b></i></li>\r
- <li><i><b><a href="#3_3">3.3 StudyManager class </a></b></i></li>\r
- <li><i><b><a href="#3_4">3.4 SObject class </a></b></i></li>\r
- <li><i><b><a href="#3_5">3.5 SComponent class </a></b></i></li>\r
- <li><i><b><a href="#3_6">3.6 ChildIterator class </a></b></i></li>\r
- <li><i><b><a href="#3_7">3.7 SComponentIterator </a></b></i></li>\r
- <li><i><b><a href="#3_8">3.8 GenericAttribute class </a></b></i></li>\r
- <li><i><b><a href="#3_9">3.9 UseCaseBuilder class </a></b></i></li>\r
- <li><i><b><a href="#3_10">3.10 UseCaseIterator </a></b></i></li>\r
- <li><i><b><a href="#3_12">3.11 Callback class </a></b></i></li>\r
- <li><i><b><a href="#3_12">3.12 Driver class </a></b></i></li>\r
- </ul>\r
-</ul> \r
-<h2><a name="1"></a>1. Introduction</h2>\r
-<p>In SALOME application the Study module is used for management (creation, saving \r
- etc.) of studies. In the framework of the platform, a study represents a working \r
- document allowing to manage the data produced by various components which are \r
- integarted into SALOME.<br>\r
-</p>\r
-<h2><a name="2"></a>2. Representation of the study</h2>\r
-<p>The study represents a set of objects that we will call Study Objects or SObjects. \r
- The study can be represented as a tree, every node of that tree containing a \r
- SObject. SObjects in the study can be values or references towards data of calculation, \r
- graphs of calculation, trees of construction of detail(room), results. Every \r
- SOject of the study is characterised by a unique identifier in the study.</p>\r
-<p>The study allows to describe the following relations:</p>\r
-<ul>\r
- <li>The link between the transient and persistent values of an SObject.</li>\r
- <li>The relations between the SObjects produced by different components.</li>\r
- <li>The relations between the SObjects produced by the same component.</li>\r
- <li>The link between an object and its user name.</li>\r
- <li>The access to the definition of the component which produce an object of \r
- the study.</li>\r
- <li>The access to instance of the component (if this one exists) which has produced \r
- this SObject of the study.</li>\r
-</ul>\r
-\r
-<p>Every SObject in the study contains a set of attributes. These attributes represent \r
- a set of definitions associated to that object, they can contain values or corba \r
- references towards the data contained in the internal data structure of a component.</p>\r
-<p>As the structure of the study is tree-like it is possible to associate sub-objects \r
- to objects.</p>\r
-<p>As particular object, the study contains Component Data which are labels associated to the component\r
-which produce data in the study. It is to this object that we can associate attributes containing ID which\r
-we shall allow to identify the type of the component and also its instance. Objects produced by a\r
-component will be sub-objects of the coresponding Data Component.</p>\r
-<p>For example Component Data GEOM will contain the data produced by the component \r
- Geom.</p>\r
-<table width="100%" border="0">\r
- <tr>\r
- <td><img src="Study_Struct.gif"></td>\r
- <td>GEOM contains the data produced by the component GEOM. The component MESH \r
- contains a SObject Mesh_1 wich refers to the SObject identified \r
- by ID4 corresponding to Geometrie_1.</td>\r
- </tr>\r
-</table>\r
-<p>We distinguish two forms of the study, the study opened in a session SALOME and the study in the\r
-persistent format. These two formats are described in the following sections</p>\r
-<h3><a name="2_1"></a>2.1 Study in transient format</h3>\r
-<p>The representation of the study in memory will be based on the document OCAF (supplied by OCC).\r
-The document OCAF can be seen as a tree, every node of that tree is identified by <i>a tag</i> representing an integer value.</p>\r
-<p>The exploration of the tree from the root to a node supplies a sequence of tags which establishes a\r
-unique identifier <i>ID</i>. ID represents a character string containing the sequence of tags separated by\r
-one ':'.</p> \r
-<p>For example 0:1:12:4 </p>\r
-<p>To every node we can associate a set of attributes.</p>\r
-<p>The attributes which the study can contain can be of the following types:</p>\r
-<ul>\r
-<li>All standard attributes supplied by OCC (package TdataStd) which allow to define (integers,\r
-real, strings, identifiers, references etc.)</li>\r
-<li>Attributes which contain CORBA references.</li>\r
-<li>Attributes which contain the path HDF to reach the persistent datum. (Cf. the following chapter)</li>\r
-</ul>\r
-<p><b>Remark</b>: it is the study which takes care to build the attributes from the values which are passed to it, so\r
-an attribute is always in a study, and it knows the study object to which it is attached.</p>\r
-<p>Example of a Study Object as a set of various attributes.</p>\r
-<img src="SObject.gif"> \r
-<h3><a name="2_2"></a>2.2 Study in persistent format</h3>\r
-<p>To store a study HDF format is used, this tool allows to represent persistent data in the form of a tree.</p>\r
-<p>Under the root of the persistent document, you can find a set of nodes:</p>\r
-<ul>\r
-<li>The first node contains the skeleton of the study. The skeleton consists of the identifiers of the\r
-objects, as well as the references among them.</li>\r
-<li>There is also one node for every component which has produced data during this SALOME session. Under each of these\r
-node there are values of the data produced by this component.</li>\r
-</ul>\r
-<h3><a name="2_3"></a>2.3 Link between transient and persistent formats</h3>\r
-<p>It will be possible to complete the definition of one object in the study by associating to it an attribute\r
-<i>HDFPath</i> which will contain the path to the persistent data.</p>\r
-<img src="Link.gif"> \r
-<p><a href="#cont"><b><i>Back to the contents</i></b></a></p>\r
-<h2><a name="3"></a>3. Services and features of the study</h2>\r
-<p>The Study in SALOME application possess a wide functionality. This functionality is provided by a set of classes which are described\r
-below.\r
-<h3><a name="3_1"></a>3.1 Study class</h3>\r
-<p>The purpose of the Study class is to manage the data produced by various components \r
- of SALOME platform. Most of the Study operations are handled by the <a href="#3_3">StudyManager</a> \r
- and the <a href="#3_2">StudyBuilder</a>. What \r
- is left in the Study class are elementary inquiries. A Study is explored by \r
- a set of tools, mainly iterators , which are described further.</p> \r
- <p>Nevertheless, the Study class contains a set of methods providing: </p>\r
- \r
-<ul>\r
- <li>management of study properties \r
- <li> search for SObjects. \r
- <li>search for SComponents\r
- <li>creation of a new StudyBuilder, ComponentIterator, ChildIterator etc.\r
-</ul>\r
-<p>The API reference for this class can be found <a href="interfaceSALOMEDS_1_1Study.html">here</a>.</p>\r
-<h3><a name="3_2"></a>3.2 StudyBuilder class</h3>\r
-<p>StudyBuilder supplies basic services to edit the study. The edition of the study is made by the\r
-component. Every component will use the basic services of the StudyBuilder allowing to write and publish objects.</p>\r
-<p>StudyBulder provides the following functionality:</p>\r
-<ul>\r
- <li>creation, modification or deletetion of SObjects in the study</li>\r
- <li>creation or removal of SComponents </li>\r
- <li>undo/redo functionality. For that purpose it supplies the methods NewCommand, \r
- CommitCommand, AbortCommand. </li>\r
-</ul>\r
-<p>The API reference for this class can be found <a href="interfaceSALOMEDS_1_1StudyBuilder.html">here</a>.</p>\r
-<h3><a name="3_3"></a>3.3 StudyManager class</h3>\r
-<p>The purpose of the Manager is to manipulate Studies. Since SALOME is a multi-document \r
- application during a working session you can operate as many stadies as you \r
- wishes to create. </p>\r
-<p>For that purpose StudyManager provides the following functionality:</p>\r
-<ul>\r
- <li>creation, opening, closing and saving studies</li>\r
- <li>navigation through a set of studies present in the current working session</li>\r
- <li> copy/paste of the objects in the study functionality.</li>\r
-</ul>\r
-<p>The API reference for this class can be found <a href="interfaceSALOMEDS_1_1StudyManager.html">here</a>.</p>\r
-<h3><a name="3_4"></a>3.4 SObject class</h3>\r
-<p>The objects in the study are built by the StudyBuilder. \r
-The SObject class provides methods for elementary inquiries, like getting an object ID or its attribuites. </p>\r
-<p>The API reference for this class can be found <a href="interfaceSALOMEDS_1_1SObject.html">here</a>.</p>\r
-<h3><a name="3_5"></a>3.5 SComponent class</h3>\r
-<p>The SComponent class establishes in the study a permanent assocition to the components \r
-integrated into SALOME platform. The SComponent interface is a specialization of the SObject\r
- class. It inherits the most of its methods from the SObject class which are used for management of the SComponents.</p>\r
-<p>The API reference for this class can be found <a href="interfaceSALOMEDS_1_1SComponent.html">here</a>.</p>\r
-<h3><a name="3_6"></a>3.6 ChildIterator class</h3>\r
-<p>It is one of the tools destined for exploration of the study. This class contains a set of methods allowing to get \r
-the access to all identified objects which are sons of another identifiedobject.</p>\r
-<p>The API reference for this class can be found <a href="interfaceSALOMEDS_1_1ChildIterator.html">here</a>.</p>\r
-<h3><a name="3_7"></a>3.7 SComponentIterator</h3>\r
-<p>This is the second tool destined for exploration of the study. This interface contains the methods allowing to iterate over all SComponents in the list.\r
- The search is started from the first SComponent in the list. </p>\r
-<p>The API reference for this class can be found <a href="interfaceSALOMEDS_1_1SComponentIterator.html">here</a>.</p> \r
- \r
-<h3><a name="3_8"></a>3.8 GenericAttribute class </h3>\r
- <p>GenericAttribute represents a base class for all attributes which can be assigned to the SObjects created in the study. All attribute classes \r
- derive from this classe and inherit its methods. </p>\r
- <p>The API reference for this class can be found <a href="interfaceSALOMEDS_1_1GenericAttribute.html">here</a>.</p> \r
- \r
-<p>In SALOME application a SObject can possess the following attributes:</p>\r
-<table width="48%" border="0">\r
- <tr>\r
- <td width="44%" height="241"> \r
- <ul>\r
- <li><a href="interfaceSALOMEDS_1_1AttributeName.html">AttributeName</a></li>\r
- <li><a href="interfaceSALOMEDS_1_1AttributeComment.html">AttributeComment</a></li>\r
- <li><a href="interfaceSALOMEDS_1_1AttributeIOR.html">AttributeIOR</a></li>\r
- <li><a href="interfaceSALOMEDS_1_1AttributeReal.html">AttributeReal</a></li>\r
- <li><a href="interfaceSALOMEDS_1_1AttributeInteger.html">AttributeInteger</a></li>\r
- <li><a href="interfaceSALOMEDS_1_1AttributeSequenceOfReal.html">AttributeSequenceOfReal</a></li>\r
- <li><a href="interfaceSALOMEDS_1_1AttributeSequenceOfInteger.html">AttributeSequenceOfInteger</a></li>\r
- <li><a href="interfaceSALOMEDS_1_1AttributePersistentRef.html">AttributePersistentRef</a></li>\r
- <li><a href="interfaceSALOMEDS_1_1AttributeDrawable.html">AttributeDrawable</a></li>\r
- <li><a href="interfaceSALOMEDS_1_1AttributeSelectable.html">AttributeSelectable</a></li>\r
- <li><a href="interfaceSALOMEDS_1_1AttributeExpandable.html">AttributeExpandable</a></li>\r
- <li><a href="interfaceSALOMEDS_1_1AttributeOpened.html">AttributeOpened</a></li>\r
- </ul></td>\r
- <td width="56%" height="241"> \r
- <ul>\r
- <li><a href="interfaceSALOMEDS_1_1AttributeTextColor.html">AttributeTextColor </a></li>\r
- <li><a href="interfaceSALOMEDS_1_1AttributeTextHighlightColor.html">AttributeTextHighlightColor</a></li>\r
- <li><a href="interfaceSALOMEDS_1_1AttributePixMap.html">AttributePixMap</a></li>\r
- <li><a href="interfaceSALOMEDS_1_1AttributeTreeNode.html">AttributeTreeNode</a></li>\r
- <li><a href="interfaceSALOMEDS_1_1AttributeLocalID.html">AttributeLocalID</a></li>\r
- <li><a href="interfaceSALOMEDS_1_1AttributeUserID.html">AttributeUserID</a></li>\r
- <li><a href="interfaceSALOMEDS_1_1AttributeTarget.html">AttributeTarget</a></li>\r
- <li><a href="interfaceSALOMEDS_1_1AttributeTableOfInteger.html">AttributeTableOfInteger</a></li>\r
- <li><a href="interfaceSALOMEDS_1_1AttributeTableOfReal.html">AttributeTableOfReal</a></li>\r
- <li><a href="interfaceSALOMEDS_1_1AttributeTableOfString.html">AttributeTableOfString</a></li>\r
- <li><a href="interfaceSALOMEDS_1_1AttributeStudyProperties.html">AttributeStudyProperties</a></li>\r
- <li><a href="interfaceSALOMEDS_1_1AttributePythonObject.html">AttributePythonObject</a></li> \r
- </ul></td>\r
- </tr>\r
-</table>\r
-<h3><a name="3_9"></a>3.9 UseCaseBuilder class</h3>\r
-<p>UseCase in the study represents a user-defined subtree, containing all or some of the objects which currently exist \r
-in the study. The UseCaseBuilder class contains a set of methods used for management (creation, deletion etc) of this sub-tree in the study. </p>\r
-<p>The API reference for this class can be found <a href="interfaceSALOMEDS_1_1UseCaseBuilder.html">here</a>.</p>\r
- \r
-<h3><a name="3_10"></a>3.10 UseCaseIterator</h3>\r
- <p>This class represents an exploration tool for the UseCase. It contains a set of methods used for iteration over the objects in the UseCase.</p> \r
- <p>The API reference for this class can be found <a href="interfaceSALOMEDS_1_1UseCaseIterator.html">here</a>.</p>\r
- \r
-<h3><a name="3_11"></a>3.11 Callback class</h3>\r
- <p>The StudyBuilder can be created with the method NewBuilder. While invocation of this method a new object of the class \r
- Callback is created and this object is assigned to the newly created Builder as callback which should be called \r
- when <i>adding</i> and <i>removing</i> the objects. </p>\r
- <p>The API reference for this class can be found <a href="interfaceSALOMEDS_1_1Callback.html">here</a>.</p>\r
- \r
-<h3><a name="3_12"></a>3.12 Driver class</h3>\r
- \r
-<p>This class represents a common tool for all components integrated into SALOME \r
- application, that allows them to communicate with the study. It contains a set \r
- of methods which can be called by any component and which provide the following \r
- functionality:\r
-<ul>\r
- <li>publishing in the study of the objects created by a definite component </li>\r
- <li>saving/loading of the data created by a definite component. These methods \r
- are called by the StudyManager when loading/saving a study containing the \r
- data created by a definite component.</li>\r
- <li>transforming of the transient references into persistant references (or \r
- vice versa) of the SObjects when saving (or loading) a study</li>\r
- <li>copy/paste common functionality. These methods can be called by any component \r
- in order to copy/paste its object created in the study</li>\r
-</ul>\r
-<p>The API reference for this class can be found <a href="interfaceSALOMEDS_1_1Driver.html">here</a>.</p>\r
-<p><a href="#cont"><b><i>Back to the contents</i></b></a></p>\r
-</body>\r
-</html>\r
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.73 [en] (WinNT; I) [Netscape]">
+ <title>Main Page</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head>
+<body>
+
+<center><table WIDTH="96%" >
+<tr>
+<td><a href="http://www.opencascade.com"><img src="sources/logocorp.gif" BORDER=0 height=46 width=122></a></td>
+
+
+<td>
+<div align=right><a href="http://www.opencascade.org/SALOME/"><img src="sources/application.gif" BORDER=0 height=46 width=108></a></div>
+</td>
+</tr>
+</table></center>
+
+
+<h1><a name="page2">General overview</a>
+</h1>
+<br>
+<h2><a name="cont"></a>Table of contents</h2>
+<ul>
+ <li><i><b><a href="#1">1. Introduction</a></b></i></li>
+ <li><i><b><a href="#2">2. Representation of the study</a></b></i></li>
+ <ul>
+ <li><i><b><a href="#2_1">2.1 Study in transient format</a></b></i></li>
+ <li><i><b><a href="#2_2">2.2 Study in persistent format</a></b></i></li>
+ <li><i><b><a href="#2_3">2.3 Link between transient and persistent formats</a></b></i></li>
+ </ul>
+ <li><i><b><a href="#3">3. Services and features of the study</a></b></i></li>
+ <ul>
+ <li><i><b><a href="#3_1">3.1 Study class </a></b></i></li>
+ <li><i><b><a href="#3_2">3.2 StudyBuilder class </a></b></i></li>
+ <li><i><b><a href="#3_3">3.3 StudyManager class </a></b></i></li>
+ <li><i><b><a href="#3_4">3.4 SObject class </a></b></i></li>
+ <li><i><b><a href="#3_5">3.5 SComponent class </a></b></i></li>
+ <li><i><b><a href="#3_6">3.6 ChildIterator class </a></b></i></li>
+ <li><i><b><a href="#3_7">3.7 SComponentIterator </a></b></i></li>
+ <li><i><b><a href="#3_8">3.8 GenericAttribute class </a></b></i></li>
+ <li><i><b><a href="#3_9">3.9 UseCaseBuilder class </a></b></i></li>
+ <li><i><b><a href="#3_10">3.10 UseCaseIterator </a></b></i></li>
+ <li><i><b><a href="#3_12">3.11 Callback class </a></b></i></li>
+ <li><i><b><a href="#3_12">3.12 Driver class </a></b></i></li>
+ </ul>
+</ul>
+<h2><a name="1"></a>1. Introduction</h2>
+<p>In SALOME application the Study module is used for management (creation, saving
+ etc.) of studies. In the framework of the platform, a study represents a working
+ document allowing to manage the data produced by various components which are
+ integarted into SALOME.<br>
+</p>
+<h2><a name="2"></a>2. Representation of the study</h2>
+<p>The study represents a set of objects that we will call Study Objects or SObjects.
+ The study can be represented as a tree, every node of that tree containing a
+ SObject. SObjects in the study can be values or references towards data of calculation,
+ graphs of calculation, trees of construction of detail(room), results. Every
+ SOject of the study is characterised by a unique identifier in the study.</p>
+<p>The study allows to describe the following relations:</p>
+<ul>
+ <li>The link between the transient and persistent values of an SObject.</li>
+ <li>The relations between the SObjects produced by different components.</li>
+ <li>The relations between the SObjects produced by the same component.</li>
+ <li>The link between an object and its user name.</li>
+ <li>The access to the definition of the component which produce an object of
+ the study.</li>
+ <li>The access to instance of the component (if this one exists) which has produced
+ this SObject of the study.</li>
+</ul>
+
+<p>Every SObject in the study contains a set of attributes. These attributes represent
+ a set of definitions associated to that object, they can contain values or corba
+ references towards the data contained in the internal data structure of a component.</p>
+<p>As the structure of the study is tree-like it is possible to associate sub-objects
+ to objects.</p>
+<p>As particular object, the study contains Component Data which are labels associated to the component
+which produce data in the study. It is to this object that we can associate attributes containing ID which
+we shall allow to identify the type of the component and also its instance. Objects produced by a
+component will be sub-objects of the coresponding Data Component.</p>
+<p>For example Component Data GEOM will contain the data produced by the component
+ Geom.</p>
+<table width="100%" border="0">
+ <tr>
+ <td><img src="Study_Struct.gif"></td>
+ <td>GEOM contains the data produced by the component GEOM. The component MESH
+ contains a SObject Mesh_1 wich refers to the SObject identified
+ by ID4 corresponding to Geometrie_1.</td>
+ </tr>
+</table>
+<p>We distinguish two forms of the study, the study opened in a session SALOME and the study in the
+persistent format. These two formats are described in the following sections</p>
+<h3><a name="2_1"></a>2.1 Study in transient format</h3>
+<p>The representation of the study in memory will be based on the document OCAF (supplied by OCC).
+The document OCAF can be seen as a tree, every node of that tree is identified by <i>a tag</i> representing an integer value.</p>
+<p>The exploration of the tree from the root to a node supplies a sequence of tags which establishes a
+unique identifier <i>ID</i>. ID represents a character string containing the sequence of tags separated by
+one ':'.</p>
+<p>For example 0:1:12:4 </p>
+<p>To every node we can associate a set of attributes.</p>
+<p>The attributes which the study can contain can be of the following types:</p>
+<ul>
+<li>All standard attributes supplied by OCC (package TdataStd) which allow to define (integers,
+real, strings, identifiers, references etc.)</li>
+<li>Attributes which contain CORBA references.</li>
+<li>Attributes which contain the path HDF to reach the persistent datum. (Cf. the following chapter)</li>
+</ul>
+<p><b>Remark</b>: it is the study which takes care to build the attributes from the values which are passed to it, so
+an attribute is always in a study, and it knows the study object to which it is attached.</p>
+<p>Example of a Study Object as a set of various attributes.</p>
+<img src="SObject.gif">
+<h3><a name="2_2"></a>2.2 Study in persistent format</h3>
+<p>To store a study HDF format is used, this tool allows to represent persistent data in the form of a tree.</p>
+<p>Under the root of the persistent document, you can find a set of nodes:</p>
+<ul>
+<li>The first node contains the skeleton of the study. The skeleton consists of the identifiers of the
+objects, as well as the references among them.</li>
+<li>There is also one node for every component which has produced data during this SALOME session. Under each of these
+node there are values of the data produced by this component.</li>
+</ul>
+<h3><a name="2_3"></a>2.3 Link between transient and persistent formats</h3>
+<p>It will be possible to complete the definition of one object in the study by associating to it an attribute
+<i>HDFPath</i> which will contain the path to the persistent data.</p>
+<img src="Link.gif">
+<p><a href="#cont"><b><i>Back to the contents</i></b></a></p>
+<h2><a name="3"></a>3. Services and features of the study</h2>
+<p>The Study in SALOME application possess a wide functionality. This functionality is provided by a set of classes which are described
+below.
+<h3><a name="3_1"></a>3.1 Study class</h3>
+<p>The purpose of the Study class is to manage the data produced by various components
+ of SALOME platform. Most of the Study operations are handled by the <a href="#3_3">StudyManager</a>
+ and the <a href="#3_2">StudyBuilder</a>. What
+ is left in the Study class are elementary inquiries. A Study is explored by
+ a set of tools, mainly iterators , which are described further.</p>
+ <p>Nevertheless, the Study class contains a set of methods providing: </p>
+
+<ul>
+ <li>management of study properties
+ <li> search for SObjects.
+ <li>search for SComponents
+ <li>creation of a new StudyBuilder, ComponentIterator, ChildIterator etc.
+</ul>
+<p>The API reference for this class can be found <a href="interfaceSALOMEDS_1_1Study.html">here</a>.</p>
+<h3><a name="3_2"></a>3.2 StudyBuilder class</h3>
+<p>StudyBuilder supplies basic services to edit the study. The edition of the study is made by the
+component. Every component will use the basic services of the StudyBuilder allowing to write and publish objects.</p>
+<p>StudyBulder provides the following functionality:</p>
+<ul>
+ <li>creation, modification or deletetion of SObjects in the study</li>
+ <li>creation or removal of SComponents </li>
+ <li>undo/redo functionality. For that purpose it supplies the methods NewCommand,
+ CommitCommand, AbortCommand. </li>
+</ul>
+<p>The API reference for this class can be found <a href="interfaceSALOMEDS_1_1StudyBuilder.html">here</a>.</p>
+<h3><a name="3_3"></a>3.3 StudyManager class</h3>
+<p>The purpose of the Manager is to manipulate Studies. Since SALOME is a multi-document
+ application during a working session you can operate as many stadies as you
+ wishes to create. </p>
+<p>For that purpose StudyManager provides the following functionality:</p>
+<ul>
+ <li>creation, opening, closing and saving studies</li>
+ <li>navigation through a set of studies present in the current working session</li>
+ <li> copy/paste of the objects in the study functionality.</li>
+</ul>
+<p>The API reference for this class can be found <a href="interfaceSALOMEDS_1_1StudyManager.html">here</a>.</p>
+<h3><a name="3_4"></a>3.4 SObject class</h3>
+<p>The objects in the study are built by the StudyBuilder.
+The SObject class provides methods for elementary inquiries, like getting an object ID or its attribuites. </p>
+<p>The API reference for this class can be found <a href="interfaceSALOMEDS_1_1SObject.html">here</a>.</p>
+<h3><a name="3_5"></a>3.5 SComponent class</h3>
+<p>The SComponent class establishes in the study a permanent assocition to the components
+integrated into SALOME platform. The SComponent interface is a specialization of the SObject
+ class. It inherits the most of its methods from the SObject class which are used for management of the SComponents.</p>
+<p>The API reference for this class can be found <a href="interfaceSALOMEDS_1_1SComponent.html">here</a>.</p>
+<h3><a name="3_6"></a>3.6 ChildIterator class</h3>
+<p>It is one of the tools destined for exploration of the study. This class contains a set of methods allowing to get
+the access to all identified objects which are sons of another identifiedobject.</p>
+<p>The API reference for this class can be found <a href="interfaceSALOMEDS_1_1ChildIterator.html">here</a>.</p>
+<h3><a name="3_7"></a>3.7 SComponentIterator</h3>
+<p>This is the second tool destined for exploration of the study. This interface contains the methods allowing to iterate over all SComponents in the list.
+ The search is started from the first SComponent in the list. </p>
+<p>The API reference for this class can be found <a href="interfaceSALOMEDS_1_1SComponentIterator.html">here</a>.</p>
+
+<h3><a name="3_8"></a>3.8 GenericAttribute class </h3>
+ <p>GenericAttribute represents a base class for all attributes which can be assigned to the SObjects created in the study. All attribute classes
+ derive from this classe and inherit its methods. </p>
+ <p>The API reference for this class can be found <a href="interfaceSALOMEDS_1_1GenericAttribute.html">here</a>.</p>
+
+<p>In SALOME application a SObject can possess the following attributes:</p>
+<table width="48%" border="0">
+ <tr>
+ <td width="44%" height="241">
+ <ul>
+ <li><a href="interfaceSALOMEDS_1_1AttributeName.html">AttributeName</a></li>
+ <li><a href="interfaceSALOMEDS_1_1AttributeComment.html">AttributeComment</a></li>
+ <li><a href="interfaceSALOMEDS_1_1AttributeIOR.html">AttributeIOR</a></li>
+ <li><a href="interfaceSALOMEDS_1_1AttributeReal.html">AttributeReal</a></li>
+ <li><a href="interfaceSALOMEDS_1_1AttributeInteger.html">AttributeInteger</a></li>
+ <li><a href="interfaceSALOMEDS_1_1AttributeSequenceOfReal.html">AttributeSequenceOfReal</a></li>
+ <li><a href="interfaceSALOMEDS_1_1AttributeSequenceOfInteger.html">AttributeSequenceOfInteger</a></li>
+ <li><a href="interfaceSALOMEDS_1_1AttributePersistentRef.html">AttributePersistentRef</a></li>
+ <li><a href="interfaceSALOMEDS_1_1AttributeDrawable.html">AttributeDrawable</a></li>
+ <li><a href="interfaceSALOMEDS_1_1AttributeSelectable.html">AttributeSelectable</a></li>
+ <li><a href="interfaceSALOMEDS_1_1AttributeExpandable.html">AttributeExpandable</a></li>
+ <li><a href="interfaceSALOMEDS_1_1AttributeOpened.html">AttributeOpened</a></li>
+ </ul></td>
+ <td width="56%" height="241">
+ <ul>
+ <li><a href="interfaceSALOMEDS_1_1AttributeTextColor.html">AttributeTextColor </a></li>
+ <li><a href="interfaceSALOMEDS_1_1AttributeTextHighlightColor.html">AttributeTextHighlightColor</a></li>
+ <li><a href="interfaceSALOMEDS_1_1AttributePixMap.html">AttributePixMap</a></li>
+ <li><a href="interfaceSALOMEDS_1_1AttributeTreeNode.html">AttributeTreeNode</a></li>
+ <li><a href="interfaceSALOMEDS_1_1AttributeLocalID.html">AttributeLocalID</a></li>
+ <li><a href="interfaceSALOMEDS_1_1AttributeUserID.html">AttributeUserID</a></li>
+ <li><a href="interfaceSALOMEDS_1_1AttributeTarget.html">AttributeTarget</a></li>
+ <li><a href="interfaceSALOMEDS_1_1AttributeTableOfInteger.html">AttributeTableOfInteger</a></li>
+ <li><a href="interfaceSALOMEDS_1_1AttributeTableOfReal.html">AttributeTableOfReal</a></li>
+ <li><a href="interfaceSALOMEDS_1_1AttributeTableOfString.html">AttributeTableOfString</a></li>
+ <li><a href="interfaceSALOMEDS_1_1AttributeStudyProperties.html">AttributeStudyProperties</a></li>
+ <li><a href="interfaceSALOMEDS_1_1AttributePythonObject.html">AttributePythonObject</a></li>
+ </ul></td>
+ </tr>
+</table>
+<h3><a name="3_9"></a>3.9 UseCaseBuilder class</h3>
+<p>UseCase in the study represents a user-defined subtree, containing all or some of the objects which currently exist
+in the study. The UseCaseBuilder class contains a set of methods used for management (creation, deletion etc) of this sub-tree in the study. </p>
+<p>The API reference for this class can be found <a href="interfaceSALOMEDS_1_1UseCaseBuilder.html">here</a>.</p>
+
+<h3><a name="3_10"></a>3.10 UseCaseIterator</h3>
+ <p>This class represents an exploration tool for the UseCase. It contains a set of methods used for iteration over the objects in the UseCase.</p>
+ <p>The API reference for this class can be found <a href="interfaceSALOMEDS_1_1UseCaseIterator.html">here</a>.</p>
+
+<h3><a name="3_11"></a>3.11 Callback class</h3>
+ <p>The StudyBuilder can be created with the method NewBuilder. While invocation of this method a new object of the class
+ Callback is created and this object is assigned to the newly created Builder as callback which should be called
+ when <i>adding</i> and <i>removing</i> the objects. </p>
+ <p>The API reference for this class can be found <a href="interfaceSALOMEDS_1_1Callback.html">here</a>.</p>
+
+<h3><a name="3_12"></a>3.12 Driver class</h3>
+
+<p>This class represents a common tool for all components integrated into SALOME
+ application, that allows them to communicate with the study. It contains a set
+ of methods which can be called by any component and which provide the following
+ functionality:
+<ul>
+ <li>publishing in the study of the objects created by a definite component </li>
+ <li>saving/loading of the data created by a definite component. These methods
+ are called by the StudyManager when loading/saving a study containing the
+ data created by a definite component.</li>
+ <li>transforming of the transient references into persistant references (or
+ vice versa) of the SObjects when saving (or loading) a study</li>
+ <li>copy/paste common functionality. These methods can be called by any component
+ in order to copy/paste its object created in the study</li>
+</ul>
+<p>The API reference for this class can be found <a href="interfaceSALOMEDS_1_1Driver.html">here</a>.</p>
+<p><a href="#cont"><b><i>Back to the contents</i></b></a></p>
+</body>
+</html>
include $(top_srcdir)/salome_adm/unix/make_common_starter.am
-EXTRA_DIST = $(srcdir)/KERNEL $(srcdir)/pythfilter.py
+EXTRA_DIST = KERNEL pythfilter.py
dist-hook:
rm -rf `find $(distdir) -name CVS`
-@set UPDATED 31 May 2006
-@set UPDATED-MONTH May 2006
-@set EDITION 3.2.0
-@set VERSION 3.2.0
+@set UPDATED 14 June 2006
+@set UPDATED-MONTH June 2006
+@set EDITION 3.2.4
+@set VERSION 3.2.4
\param thePID is a process ID of the caller
\param isLocal is set True if the Study is launched locally with the caller
*/
- long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal);
+ long long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal);
/*!
\param thePID is a process ID of the caller
\param isLocal is set True if the StudyManager is launched locally with the caller
*/
- long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal);
+ long long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal);
};
\param thePID is a process ID of the caller
\param isLocal is set True if the SObject is launched locally with the caller
*/
- long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal);
+ long long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal);
};
\param thePID is a process ID of the caller
\param isLocal is set True if the GenericAttribute is launched locally with the caller
*/
- long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal);
+ long long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal);
};
\param value This string parameter defines the value of this attribute - a description of a %SObject.
<BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+*/
+ void SetValue(in string value);
+ };
+ //==========================================================================
+/*! \brief String attribute
+
+ This attribute stores a string value containing arbitrary information.
+*/
+ //==========================================================================
+ interface AttributeString : GenericAttribute
+ {
+/*!
+ Returns the value of this attribute
+*/
+ string Value();
+/*!
+ Sets the value of this attribute
+ \param value This string parameter defines the value of this attribute.
*/
void SetValue(in string value);
};
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
//
//
//
--- /dev/null
+# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+#
+#
+
+# Doxyfile 1.2.8.1
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+# TAG = value [value, ...]
+# For lists items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# General configuration options
+#---------------------------------------------------------------------------
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+# by quotes) that should identify the project.
+
+PROJECT_NAME =
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
+# if some version control system is used.
+
+PROJECT_NUMBER =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY =
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Brazilian, Chinese, Croatian, Czech, Danish, Dutch, Finnish, French,
+# German, Hungarian, Italian, Japanese, Korean, Norwegian, Polish,
+# Portuguese, Romanian, Russian, Slovak, Slovene, Spanish and Swedish.
+
+OUTPUT_LANGUAGE = English
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# will be included in the documentation.
+
+EXTRACT_PRIVATE = YES
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# will be included in the documentation.
+
+EXTRACT_STATIC = YES
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these class will be included in the various
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES = NO
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF = YES
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
+# description.
+
+ALWAYS_DETAILED_SEC = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. It is allowed to use relative paths in the argument list.
+
+STRIP_FROM_PATH =
+
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS = NO
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a class diagram (in Html and LaTeX) for classes with base or
+# super classes. Setting the tag to NO turns the diagrams off.
+
+CLASS_DIAGRAMS = YES
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+
+SOURCE_BROWSER = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES = YES
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS = YES
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower case letters. If set to YES upper case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# users are adviced to set this option to NO.
+
+CASE_SENSE_NAMES = YES
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful is your file systems
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS = YES
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put list of the files that are included by a file in the documentation
+# of that file.
+
+SHOW_INCLUDE_FILES = YES
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like the Qt-style comments (thus requiring an
+# explict @brief command for a brief description.
+
+JAVADOC_AUTOBRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
+# reimplements.
+
+INHERIT_DOCS = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+# is inserted in the documentation for inline members.
+
+INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
+# declaration order.
+
+SORT_MEMBER_DOCS = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE = 8
+
+# The ENABLED_SECTIONS tag can be used to enable conditional
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS =
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
+# commands in the documentation.
+
+GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
+# commands in the documentation.
+
+GENERATE_TESTLIST = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
+# commands in the documentation.
+
+GENERATE_BUGLIST = YES
+
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user defined paragraph with heading "Side Effects:".
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or define consist of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and defines in the
+# documentation can be controlled using \showinitializer or \hideinitializer
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES = 30
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C.
+# For instance some of the names that are used will be different. The list
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C = NO
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
+# NO is used.
+
+WARNINGS = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED = YES
+
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text.
+
+WARN_FORMAT =
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
+# to stderr.
+
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
+# with spaces.
+
+INPUT = /home01/prascle/devSalome/rootsrc
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
+FILE_PATTERNS = *idl *.cxx *.hxx *.hh *.h *.c *.cc *.py
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
+# If left blank NO is used.
+
+RECURSIVE = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE =
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+
+EXCLUDE_PATTERNS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
+# the \include command).
+
+EXAMPLE_PATH =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
+EXAMPLE_PATTERNS =
+
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
+# the \image command).
+
+IMAGE_PATH =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output.
+
+INPUT_FILTER =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
+# files to browse.
+
+FILTER_SOURCE_FILES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX = 5
+
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX =
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# generate HTML output.
+
+GENERATE_HTML = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT = /home01/prascle/devSalome/doc/html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard header.
+
+HTML_HEADER =
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard footer.
+
+HTML_FOOTER =
+
+# The HTML_STYLESHEET tag can be used to specify a user defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet
+
+HTML_STYLESHEET =
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
+# to the contents of the Html help documentation and to the tree view.
+
+TOC_EXPAND = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
+# the value YES disables it.
+
+DISABLE_INDEX = NO
+
+# This tag can be used to set the number of enum values (range [1..20])
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE = 4
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
+# generated containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript and frames is required (for instance Netscape 4.0+
+# or Internet explorer 4.0+).
+
+GENERATE_TREEVIEW = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
+# is shown.
+
+TREEVIEW_WIDTH = 250
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+# generate Latex output.
+
+GENERATE_LATEX = YES
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT = /home01/prascle/devSalome/doc/latex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_LATEX = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, a4wide, letter, legal and
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS = NO
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
+# higher quality PDF documentation.
+
+USE_PDFLATEX = NO
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimised for Word 97 and may not look very pretty with
+# other RTF readers or editors.
+
+GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT =
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_RTF = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assigments. You only have to provide
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE =
+
+# Set optional variables used in the generation of an rtf document.
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+# generate man pages
+
+GENERATE_MAN = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT =
+
+# The MAN_EXTENSION tag determines the extension that is added to
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION =
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
+# files.
+
+ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
+# PREDEFINED and EXPAND_AS_PREDEFINED tags.
+
+EXPAND_ONLY_PREDEF = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
+# the preprocessor.
+
+INCLUDE_PATH =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
+# be used.
+
+INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed.
+
+PREDEFINED =
+
+# If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED =
+
+#---------------------------------------------------------------------------
+# Configuration::addtions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES tag can be used to specify one or more tagfiles.
+
+TAGFILES =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE =
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
+# will be listed.
+
+ALLEXTERNALS = NO
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT = NO
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+# tags are set to YES then doxygen will generate a graph for each documented
+# file showing the direct and indirect include dependencies of the file with
+# other documented files.
+
+INCLUDE_GRAPH = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH = YES
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY = YES
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found on the path.
+
+DOT_PATH =
+
+# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than
+# this value, doxygen will try to truncate the graph, so that it fits within
+# the specified constraint. Beware that most browsers cannot cope with very
+# large images.
+
+MAX_DOT_GRAPH_WIDTH = 1024
+
+# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than
+# this value, doxygen will try to truncate the graph, so that it fits within
+# the specified constraint. Beware that most browsers cannot cope with very
+# large images.
+
+MAX_DOT_GRAPH_HEIGHT = 1024
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+# remove the intermedate dot files that are used to generate
+# the various graphs.
+
+DOT_CLEANUP = YES
+
+#---------------------------------------------------------------------------
+# Configuration::addtions related to the search engine
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE = NO
+
+# The CGI_NAME tag should be the name of the CGI script that
+# starts the search engine (doxysearch) with the correct parameters.
+# A script with this name will be generated by doxygen.
+
+CGI_NAME =
+
+# The CGI_URL tag should be the absolute URL to the directory where the
+# cgi binaries are located. See the documentation of your http daemon for
+# details.
+
+CGI_URL =
+
+# The DOC_URL tag should be the absolute URL to the directory where the
+# documentation is located. If left blank the absolute path to the
+# documentation, with file:// prepended to it, will be used.
+
+DOC_URL =
+
+# The DOC_ABSPATH tag should be the absolute path to the directory where the
+# documentation is located. If left blank the directory on the local machine
+# will be used.
+
+DOC_ABSPATH =
+
+# The BIN_ABSPATH tag must point to the directory where the doxysearch binary
+# is installed.
+
+BIN_ABSPATH =
+
+# The EXT_DOC_PATHS tag can be used to specify one or more paths to
+# documentation generated for other projects. This allows doxysearch to search
+# the documentation for these projects as well.
+
+EXT_DOC_PATHS =
--- /dev/null
+/*----------------------------------------------------------------------------------
+ Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+------------------------------------------------------------------------------------*/
+
+
+#ifndef F77_FUNC
+
+#define F77_FUNC(name,NAME) @F77_FUNC_NAME@
+#define F77_FUNC_(name,NAME) @F77_FUNC_NAME_@
+
+#endif
+
--- /dev/null
+dnl Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+dnl
+dnl This library is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU Lesser General Public
+dnl License as published by the Free Software Foundation; either
+dnl version 2.1 of the License.
+dnl
+dnl This library is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl Lesser General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU Lesser General Public
+dnl License along with this library; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+dnl
+dnl See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+dnl
+dnl
+dnl
+dnl Synopsis : AC_CC_WARNINGS([ANSI])
+dnl
+dnl Version : 1.1 (2000/12/31)
+dnl
+dnl Author : Ville Laurikari <vl@iki.fi>
+dnl
+dnl Description :
+dnl
+dnl Enables a reasonable set of warnings for the C compiler.
+dnl Optionally, if the first argument is nonempty, turns on
+dnl flags which enforce and/or enable proper ANSI C if such
+dnl flags are known to the compiler used.
+dnl
+dnl Currently this macro knows about GCC, Solaris C compiler,
+dnl Digital Unix C compiler, C for AIX Compiler, HP-UX C
+dnl compiler, and IRIX C compiler.
+
+AC_DEFUN([AC_CC_WARNINGS], [
+ ansi=$1
+ if test -z "$ansi"; then
+ msg="for C compiler warning flags"
+ else
+ msg="for C compiler warning and ANSI conformance flags"
+ fi
+ AC_CACHE_CHECK($msg, ac_cv_prog_cc_warnings, [
+ if test -n "$CC"; then
+ cat > conftest.c <<EOF
+int main(int argc, char **argv) { return 0; }
+EOF
+
+ dnl GCC
+ if test "$GCC" = "yes"; then
+ if test -z "$ansi"; then
+ ac_cv_prog_cc_warnings="-Wall"
+ else
+ ac_cv_prog_cc_warnings="-Wall -ansi -pedantic"
+ fi
+
+ dnl Solaris C compiler
+ elif $CC -flags 2>&1 | grep "Xc.*strict ANSI C" > /dev/null 2>&1 &&
+ $CC -c -v -Xc conftest.c > /dev/null 2>&1 &&
+ test -f conftest.o; then
+ if test -z "$ansi"; then
+ ac_cv_prog_cc_warnings="-v"
+ else
+ ac_cv_prog_cc_warnings="-v -Xc"
+ fi
+
+ dnl HP-UX C compiler
+ elif $CC > /dev/null 2>&1 &&
+ $CC -c -Aa +w1 conftest.c > /dev/null 2>&1 &&
+ test -f conftest.o; then
+ if test -z "$ansi"; then
+ ac_cv_prog_cc_warnings="+w1"
+ else
+ ac_cv_prog_cc_warnings="+w1 -Aa"
+ fi
+
+ dnl Digital Unix C compiler
+ elif ! $CC > /dev/null 2>&1 &&
+ $CC -c -verbose -w0 -warnprotos -std1 conftest.c > /dev/null 2>&1 &&
+ test -f conftest.o; then
+ if test -z "$ansi"; then
+ ac_cv_prog_cc_warnings="-verbose -w0 -warnprotos"
+ else
+ ac_cv_prog_cc_warnings="-verbose -w0 -warnprotos -std1"
+ fi
+
+ dnl C for AIX Compiler
+ elif $CC > /dev/null 2>&1 | grep AIX > /dev/null 2>&1 &&
+ $CC -c -qlanglvl=ansi -qinfo=all conftest.c > /dev/null 2>&1 &&
+ test -f conftest.o; then
+ if test -z "$ansi"; then
+ ac_cv_prog_cc_warnings="-qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd"
+ else
+ ac_cv_prog_cc_warnings="-qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd -qlanglvl=ansi"
+ fi
+
+ dnl IRIX C compiler
+ elif $CC -fullwarn -ansi -ansiE > /dev/null 2>&1 &&
+ test -f conftest.o; then
+ if test -z "$ansi"; then
+ ac_cv_prog_cc_warnings="-fullwarn"
+ else
+ ac_cv_prog_cc_warnings="-fullwarn -ansi -ansiE"
+ fi
+
+ fi
+ rm -f conftest.*
+ fi
+ if test -n "$ac_cv_prog_cc_warnings"; then
+ CFLAGS="$CFLAGS $ac_cv_prog_cc_warnings"
+ CXXFLAGS="$CXXFLAGS $ac_cv_prog_cc_warnings"
+ else
+ ac_cv_prog_cc_warnings="unknown"
+ fi
+ ])
+])
echo "conftest.o: conftest.c" > conftest.verif
echo "int main() { return 0; }" > conftest.c
+f77int="F77INT32"
+case $host_os in
+ irix5.* | irix6.* | osf4.* | osf5.* | linux* )
+
+ linux64="true"
+ expr "$host_os" : 'linux' >/dev/null && test ! x"$host_cpu" = x"x86_64" && linux64="false"
+ if test ! x"$linux64" = "xfalse" ; then
+ echo "$as_me:$LINENO: checking for 64bits integers size in F77/F90" >&5
+echo $ECHO_N "checking for 64bits integers size in F77/F90... $ECHO_C" >&6
+ # Check whether --enable-int64 or --disable-int64 was given.
+if test "${enable_int64+set}" = set; then
+ enableval="$enable_int64"
+
+fi;
+ case "X-$enable_int64" in
+ X-no)
+ echo "$as_me:$LINENO: result: \"disabled\"" >&5
+echo "${ECHO_T}\"disabled\"" >&6
+ SUFFIXES="_32"
+ ;;
+ *)
+ echo "$as_me:$LINENO: result: \"enabled\"" >&5
+echo "${ECHO_T}\"enabled\"" >&6
+ SUFFIXES=""
+ f77int="F77INT64"
+ ;;
+ esac
+ fi
+ ;;
+ *)
+ ;;
+esac
+
+case $host_os in
+ linux*)
+ if test x"$linux64" = x"true"; then \
+ MACHINE="PCLINUX64${SUFFIXES}";
+ CFLAGS=" -m64 ${CXXFLAGS}";
+ CXXFLAGS=" -m64 ${CXXFLAGS}";\
+ else \
+ MACHINE=PCLINUX; \
+ fi
+ ;;
+ hpux*)
+ MACHINE=HP9000
+ ;;
+ aix4.*)
+ MACHINE=RS6000
+ host_os_novers=aix4.x
+ ;;
+ irix5.*)
+ MACHINE="IRIX64${SUFFIXES}"
+ host_os_novers=irix5.x
+ ;;
+ irix6.*)
+ MACHINE="IRIX64${SUFFIXES}"
+ host_os_novers=irix6.x
+ ;;
+ osf4.*)
+ MACHINE="OSF1${SUFFIXES}"
+ host_os_novers=osf4.x
+ ;;
+ osf5.*)
+ MACHINE="OSF1${SUFFIXES}"
+ host_os_novers=osf5.x
+ ;;
+ solaris2.*)
+ MACHINE=SUN4SOL2
+ host_os_novers=solaris2.x
+ ;;
+ uxpv*)
+ MACHINE=VPP5000
+ ;;
+ *)
+ MACHINE=
+ host_os_novers=$host_os
+ ;;
+esac
+
dnl Evolution portage sur CCRT/osf system
case $host_os in
osf*)
DEPCXX=g++
DEPCXXFLAGS="-Wno-deprecated"
DIFFFLAGS="-w"
- MACHINE="OSF1"
+dnl MACHINE="OSF1"
;;
*)
DEPCC=${CC-cc}
DEPCXX=${CXX-c++}
DEPCXXFLAGS="\${CXXFLAGS}"
DIFFFLAGS="-b -B"
- MACHINE="PCLINUX"
+dnl MACHINE="PCLINUX"
;;
esac
C_DEPEND_FLAG=
--- /dev/null
+# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+#
+#------------------------------------------------------------
+# Check availability of Salome binary distribution
+#
+# Author : Marc Tajchman (CEA, 2002)
+#------------------------------------------------------------
+
+AC_DEFUN([CHECK_SALOME],[
+
+AC_CHECKING(for Salome)
+
+Salome_ok=no
+
+AC_ARG_WITH(salome,
+ --with-salome=DIR root directory path of SALOME installation,
+ SALOME_DIR="$withval",SALOME_DIR="")
+
+if test "x$SALOME_DIR" == "x" ; then
+
+# no --with-salome-dir option used
+
+ if test "x$SALOME_ROOT_DIR" != "x" ; then
+
+ # SALOME_ROOT_DIR environment variable defined
+ SALOME_DIR=$SALOME_ROOT_DIR
+
+ else
+
+ # search Salome binaries in PATH variable
+ AC_PATH_PROG(TEMP, libMEDMEM_Swig.py)
+ if test "x$TEMP" != "x" ; then
+ SALOME_BIN_DIR=`dirname $TEMP`
+ SALOME_DIR=`dirname $SALOME_BIN_DIR`
+ fi
+
+ fi
+#
+fi
+
+if test -f ${SALOME_DIR}/bin/libMEDMEM_Swig.py ; then
+ Salome_ok=yes
+ AC_MSG_RESULT(Using Salome distribution in ${SALOME_DIR})
+
+ if test "x$SALOME_ROOT_DIR" == "x" ; then
+ SALOME_ROOT_DIR=${SALOME_DIR}
+ fi
+ if test "x$SALOME_SITE_DIR" == "x" ; then
+ SALOME_SITE_DIR=${SALOME_ROOT_DIR}
+ fi
+ AC_SUBST(SALOME_ROOT_DIR)
+ AC_SUBST(SALOME_SITE_DIR)
+
+else
+ AC_MSG_WARN("Cannot find compiled Salome distribution")
+fi
+
+AC_MSG_RESULT(for Salome: $Salome_ok)
+
+])dnl
+
exits_ok=no
if test "x$exits_ok" = "xno"; then
for d in /usr/local /usr ; do
- AC_CHECK_FILE(${d}/lib/libcppunit.so,exits_ok=yes,exits_ok=no)
+ AC_CHECK_FILE(${d}/lib64/libcppunit.so,exits_ok=yes,exits_ok=no)
+ if test "x$exits_ok" = "xyes"; then
+ CPPUNITHOME=$d
+ AC_MSG_RESULT(libcppunit.so detected in $d/lib64)
+ break
+ fi
+ AC_CHECK_FILE(${d}/lib/libcppunit.so,exits_ok=yes,exits_ok=no)
if test "x$exits_ok" = "xyes"; then
CPPUNITHOME=$d
AC_MSG_RESULT(libcppunit.so detected in $d/lib)
+ break
fi
done
fi
--- /dev/null
+dnl Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+dnl
+dnl This library is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU Lesser General Public
+dnl License as published by the Free Software Foundation; either
+dnl version 2.1 of the License.
+dnl
+dnl This library is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl Lesser General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU Lesser General Public
+dnl License along with this library; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+dnl
+dnl See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+dnl
+dnl
+dnl
+AC_DEFUN([CHECK_JAVA],[
+dnl AC_REQUIRE([AC_CANONICAL_SYSTEM])dnl
+dnl AC_REQUIRE([AC_PROG_CPP])dnl
+
+AC_CHECKING(for JAVA)
+
+JAVA_INCLUDES=""
+JAVA_LIBS=""
+JAVA_LDPATH=""
+
+java_ok=no
+
+if test -z $JAVAHOME
+then
+ AC_MSG_WARN(define JAVAHOME variable to use Java)
+else
+ java_ok=yes
+fi
+
+if test "x$java_ok" = "xyes"
+then
+ AC_EXEEXT
+ AC_CHECK_PROG(JAVA, java$EXEEXT,found)
+ if test "x$JAVA" = "x"
+ then
+ java_ok=no
+ fi
+
+ AC_CHECK_PROG(JAVAC, javac$EXEEXT,found)
+ if test "x$JAVAC" = "x"
+ then
+ java_ok=no
+ fi
+fi
+
+if test "x$java_ok" = "xyes"
+then
+ version=`$JAVA -version 2>&1 | grep "java version"`
+ case "$version" in
+ *1.1.*)
+ AC_MSG_RESULT(using jdk1.1 version - jdk1.4 required)
+ java_ok=no;;
+ *1.2*)
+ AC_MSG_RESULT(using jdk1.2 version - jdk1.4 required)
+ java_ok=no;;
+ *1.3*)
+ AC_MSG_RESULT(using jdk1.3 version - jdk1.4 required)
+ java_ok=no;;
+ *1.4*)
+ AC_MSG_RESULT(using jdk1.4 version) ;;
+ esac
+fi
+
+if test "x$java_ok" = "xyes"
+then
+dnl java headers
+ LOCAL_INCLUDES=" -I${JAVAHOME}/include -I${JAVAHOME}/include/linux"
+ CPPFLAGS_old="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $LOCAL_INCLUDES"
+ AC_CHECK_HEADER(jni.h,java_ok=yes ,java_ok=no)
+
+ CPPFLAGS="$CPPFLAGS_old"
+fi
+
+if test "x$java_ok" = "xyes"
+then
+dnl libjava library
+ LOCAL_LIBS="-L${JAVAHOME}/jre/lib/i386 -ljava -L${JAVAHOME}/jre/lib/i386/client -ljvm -lverify"
+ LIBS_old="$LIBS"
+ LIBS="$LIBS $LOCAL_LIBS"
+
+ AC_CHECK_LIB(jvm,JNI_CreateJavaVM,java_ok=yes,java_ok=no)
+
+ LIBS="$LIBS_old"
+fi
+
+if test "x$java_ok" = "xyes"
+then
+ JAVA_INCLUDES="$LOCAL_INCLUDES"
+ JAVA_LIBS="$LOCAL_LIBS"
+fi
+
+AC_SUBST(JAVA_INCLUDES)
+AC_SUBST(JAVA_LIBS)
+AC_SUBST(JAVA_LDPATH)
+
+AC_MSG_RESULT(for java: $java_ok)
+
+])dnl
+dnl
if test "x$qt_ok" = "xno"
then
- AC_MSG_RESULT(unable to link with qt library)
- AC_MSG_RESULT(QTDIR environment variable may be wrong)
+ #AC_MSG_RESULT(unable to link with qt library)
+ #AC_MSG_RESULT(QTDIR environment variable may be wrong)
+ # BEGIN: for CCRT (installation of qt have only a "lib" directory)
+ LIBS="$LIBS_old -L$QTDIR/lib -lqt-mt $OGL_LIBS"
+
+ AC_CACHE_VAL(salome_cv_lib_qt,[
+ AC_TRY_LINK(
+#include <qapplication.h>
+, int n;
+ char **s;
+ QApplication a(n, s);
+ a.exec();,
+ eval "salome_cv_lib_qt=yes",eval "salome_cv_lib_qt=no")
+ ])
+ qt_ok="$salome_cv_lib_qt"
+
+ if test "x$qt_ok" = "xno"
+ then
+ AC_MSG_RESULT(unable to link with qt library)
+ AC_MSG_RESULT(QTDIR environment variable may be wrong)
+ else
+ AC_MSG_RESULT(yes)
+ QT_LIBS="-L$QTDIR/lib -lqt-mt"
+ QT_MT_LIBS="-L$QTDIR/lib -lqt-mt"
+ fi
+ # END: for CCRT
else
AC_MSG_RESULT(yes)
if test "x$QTDIR" = "x/usr"
--- /dev/null
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+timestamp='2004-03-12'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit 0 ;;
+ --version | -v )
+ echo "$version" ; exit 0 ;;
+ --help | --h* | -h )
+ echo "$usage"; exit 0 ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep __ELF__ >/dev/null
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit 0 ;;
+ amd64:OpenBSD:*:*)
+ echo x86_64-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ amiga:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ arc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ cats:OpenBSD:*:*)
+ echo arm-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ hp300:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mac68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ macppc:OpenBSD:*:*)
+ echo powerpc-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme88k:OpenBSD:*:*)
+ echo m88k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvmeppc:OpenBSD:*:*)
+ echo powerpc-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ pegasos:OpenBSD:*:*)
+ echo powerpc-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ pmax:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sgi:OpenBSD:*:*)
+ echo mipseb-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sun3:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ wgrisc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ *:OpenBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit 0 ;;
+ macppc:MirBSD:*:*)
+ echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+ exit 0 ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit 0 ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit 0 ;;
+ Alpha*:OpenVMS:*:*)
+ echo alpha-hp-vms
+ exit 0 ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit 0 ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit 0 ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit 0;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit 0 ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit 0 ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit 0 ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit 0 ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit 0;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit 0;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit 0 ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit 0 ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit 0 ;;
+ DRS?6000:UNIX_SV:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7 && exit 0 ;;
+ esac ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ i86pc:SunOS:5.*:*)
+ echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit 0 ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit 0 ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit 0 ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit 0 ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit 0 ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit 0 ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit 0 ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit 0 ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit 0 ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit 0 ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit 0 ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit 0 ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit 0 ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c \
+ && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+ && exit 0
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit 0 ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit 0 ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit 0 ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit 0 ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit 0 ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit 0 ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit 0 ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit 0 ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit 0 ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit 0 ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit 0 ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit 0 ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit 0 ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit 0 ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit 0 ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit 0 ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+ echo rs6000-ibm-aix3.2.5
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit 0 ;;
+ *:AIX:*:[45])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit 0 ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit 0 ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit 0 ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit 0 ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit 0 ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit 0 ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit 0 ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit 0 ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ # avoid double evaluation of $set_cc_for_build
+ test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit 0 ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit 0 ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+ echo unknown-hitachi-hiuxwe2
+ exit 0 ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit 0 ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit 0 ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit 0 ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit 0 ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit 0 ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit 0 ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit 0 ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit 0 ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit 0 ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit 0 ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit 0 ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit 0 ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ *:UNICOS/mp:*:*)
+ echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit 0 ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit 0 ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ *:FreeBSD:*:*)
+ # Determine whether the default compiler uses glibc.
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <features.h>
+ #if __GLIBC__ >= 2
+ LIBC=gnu
+ #else
+ LIBC=
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+ # GNU/KFreeBSD systems have a "k" prefix to indicate we are using
+ # FreeBSD's kernel, but not the complete OS.
+ case ${LIBC} in gnu) kernel_only='k' ;; esac
+ echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
+ exit 0 ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit 0 ;;
+ i*:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit 0 ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit 0 ;;
+ x86:Interix*:[34]*)
+ echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
+ exit 0 ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit 0 ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit 0 ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit 0 ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit 0 ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit 0 ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ exit 0 ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit 0 ;;
+ arm*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ cris:Linux:*:*)
+ echo cris-axis-linux-gnu
+ exit 0 ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ mips:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips
+ #undef mipsel
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mipsel
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+ test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+ ;;
+ mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips64
+ #undef mips64el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mips64el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips64
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+ test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+ ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
+ exit 0 ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit 0 ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit 0 ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-gnu ;;
+ PA8*) echo hppa2.0-unknown-linux-gnu ;;
+ *) echo hppa-unknown-linux-gnu ;;
+ esac
+ exit 0 ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ exit 0 ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit 0 ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ x86_64:Linux:*:*)
+ echo x86_64-unknown-linux-gnu
+ exit 0 ;;
+ i*86:Linux:*:*)
+ # The BFD linker knows what the default object file format is, so
+ # first see if it will tell us. cd to the root directory to prevent
+ # problems with other programs or directories called `ld' in the path.
+ # Set LC_ALL=C to ensure ld outputs messages in English.
+ ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+ | sed -ne '/supported targets:/!d
+ s/[ ][ ]*/ /g
+ s/.*supported targets: *//
+ s/ .*//
+ p'`
+ case "$ld_supported_targets" in
+ elf32-i386)
+ TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+ ;;
+ a.out-i386-linux)
+ echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+ exit 0 ;;
+ coff-i386)
+ echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+ exit 0 ;;
+ "")
+ # Either a pre-BFD a.out linker (linux-gnuoldld) or
+ # one that does not give us useful --help.
+ echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+ exit 0 ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <features.h>
+ #ifdef __ELF__
+ # ifdef __GLIBC__
+ # if __GLIBC__ >= 2
+ LIBC=gnu
+ # else
+ LIBC=gnulibc1
+ # endif
+ # else
+ LIBC=gnulibc1
+ # endif
+ #else
+ #ifdef __INTEL_COMPILER
+ LIBC=gnu
+ #else
+ LIBC=gnuaout
+ #endif
+ #endif
+ #ifdef __dietlibc__
+ LIBC=dietlibc
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+ test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
+ test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+ ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit 0 ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit 0 ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit 0 ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit 0 ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit 0 ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit 0 ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit 0 ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit 0 ;;
+ i*86:*:5:[78]*)
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit 0 ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit 0 ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i386.
+ echo i386-pc-msdosdjgpp
+ exit 0 ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit 0 ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit 0 ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit 0 ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit 0 ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit 0 ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit 0 ;;
+ M68*:*:R3V[567]*:*)
+ test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && echo i486-ncr-sysv4 && exit 0 ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit 0 ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit 0 ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit 0 ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit 0 ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit 0 ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit 0 ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit 0 ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit 0 ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit 0 ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit 0 ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit 0 ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit 0 ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit 0 ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit 0 ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit 0 ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit 0 ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit 0 ;;
+ *:Darwin:*:*)
+ case `uname -p` in
+ *86) UNAME_PROCESSOR=i686 ;;
+ powerpc) UNAME_PROCESSOR=powerpc ;;
+ esac
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit 0 ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit 0 ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit 0 ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit 0 ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit 0 ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit 0 ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit 0 ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit 0 ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit 0 ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit 0 ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit 0 ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit 0 ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit 0 ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit 0 ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit 0 ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit 0 ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include <sys/param.h>
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit 0 ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit 0 ;;
+ c34*)
+ echo c34-convex-bsd
+ exit 0 ;;
+ c38*)
+ echo c38-convex-bsd
+ exit 0 ;;
+ c4*)
+ echo c4-convex-bsd
+ exit 0 ;;
+ esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+ ftp://ftp.gnu.org/pub/gnu/config/
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
--- /dev/null
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+timestamp='2004-03-12'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine. It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit 0 ;;
+ --version | -v )
+ echo "$version" ; exit 0 ;;
+ --help | --h* | -h )
+ echo "$usage"; exit 0 ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit 0;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
+ kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple | -axis)
+ os=
+ basic_machine=$1
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | m32r | m32rle | m68000 | m68k | m88k | mcore \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64vr | mips64vrel \
+ | mips64orion | mips64orionel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | msp430 \
+ | ns16k | ns32k \
+ | openrisc | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | pyramid \
+ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
+ | strongarm \
+ | tahoe | thumb | tic4x | tic80 | tron \
+ | v850 | v850e \
+ | we32k \
+ | x86 | xscale | xstormy16 | xtensa \
+ | z8k)
+ basic_machine=$basic_machine-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12)
+ # Motorola 68HC11/12.
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* \
+ | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+ | clipper-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | mcore-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39-* | mipstx39el-* \
+ | msp430-* \
+ | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | pyramid-* \
+ | romp-* | rs6000-* \
+ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+ | tahoe-* | thumb-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tron-* \
+ | v850-* | v850e-* | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
+ | xtensa-* \
+ | ymp-* \
+ | z8k-*)
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ cr16c)
+ basic_machine=cr16c-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+# I'm not sure what "Sysv32" means. Should this be sysv3.2?
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ mmix*)
+ basic_machine=mmix-knuth
+ os=-mmixware
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ nv1)
+ basic_machine=nv1-cray
+ os=-unicosmp
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ or32 | or32-*)
+ basic_machine=or32-unknown
+ os=-coff
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc) basic_machine=powerpc-unknown
+ ;;
+ ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tic54x | c54x*)
+ basic_machine=tic54x-unknown
+ os=-coff
+ ;;
+ tic55x | c55x*)
+ basic_machine=tic55x-unknown
+ os=-coff
+ ;;
+ tic6x | c6x*)
+ basic_machine=tic6x-unknown
+ os=-coff
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -kaos*)
+ os=-kaos
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ # This also exists in the configure program, but was not the
+ # default.
+ # os=-sunos4
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -os400*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -tpf*)
+ vendor=ibm
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
--- /dev/null
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2004-12-17.09
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch. It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+chmodcmd="$chmodprog 0755"
+chowncmd=
+chgrpcmd=
+stripcmd=
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=
+dst=
+dir_arg=
+dstarg=
+no_target_directory=
+
+usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+ or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+-c (ignored)
+-d create directories instead of installing files.
+-g GROUP $chgrpprog installed files to GROUP.
+-m MODE $chmodprog installed files to MODE.
+-o USER $chownprog installed files to USER.
+-s $stripprog installed files.
+-t DIRECTORY install into DIRECTORY.
+-T report an error if DSTFILE is a directory.
+--help display this help and exit.
+--version display version info and exit.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+"
+
+while test -n "$1"; do
+ case $1 in
+ -c) shift
+ continue;;
+
+ -d) dir_arg=true
+ shift
+ continue;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ --help) echo "$usage"; exit 0;;
+
+ -m) chmodcmd="$chmodprog $2"
+ shift
+ shift
+ continue;;
+
+ -o) chowncmd="$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd=$stripprog
+ shift
+ continue;;
+
+ -t) dstarg=$2
+ shift
+ shift
+ continue;;
+
+ -T) no_target_directory=true
+ shift
+ continue;;
+
+ --version) echo "$0 $scriptversion"; exit 0;;
+
+ *) # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ test -n "$dir_arg$dstarg" && break
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dstarg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dstarg"
+ shift # fnord
+ fi
+ shift # arg
+ dstarg=$arg
+ done
+ break;;
+ esac
+done
+
+if test -z "$1"; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # It's OK to call `install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
+fi
+
+for src
+do
+ # Protect names starting with `-'.
+ case $src in
+ -*) src=./$src ;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ src=
+
+ if test -d "$dst"; then
+ mkdircmd=:
+ chmodcmd=
+ else
+ mkdircmd=$mkdirprog
+ fi
+ else
+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dstarg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+
+ dst=$dstarg
+ # Protect names starting with `-'.
+ case $dst in
+ -*) dst=./$dst ;;
+ esac
+
+ # If destination is a directory, append the input filename; won't work
+ # if double slashes aren't ignored.
+ if test -d "$dst"; then
+ if test -n "$no_target_directory"; then
+ echo "$0: $dstarg: Is a directory" >&2
+ exit 1
+ fi
+ dst=$dst/`basename "$src"`
+ fi
+ fi
+
+ # This sed command emulates the dirname command.
+ dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
+
+ # Make sure that the destination directory exists.
+
+ # Skip lots of stat calls in the usual case.
+ if test ! -d "$dstdir"; then
+ defaultIFS='
+ '
+ IFS="${IFS-$defaultIFS}"
+
+ oIFS=$IFS
+ # Some sh's can't handle IFS=/ for some reason.
+ IFS='%'
+ set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+ shift
+ IFS=$oIFS
+
+ pathcomp=
+
+ while test $# -ne 0 ; do
+ pathcomp=$pathcomp$1
+ shift
+ if test ! -d "$pathcomp"; then
+ $mkdirprog "$pathcomp"
+ # mkdir can fail with a `File exist' error in case several
+ # install-sh are creating the directory concurrently. This
+ # is OK.
+ test -d "$pathcomp" || exit
+ fi
+ pathcomp=$pathcomp/
+ done
+ fi
+
+ if test -n "$dir_arg"; then
+ $doit $mkdircmd "$dst" \
+ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
+ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
+ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
+ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
+
+ else
+ dstfile=`basename "$dst"`
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+ trap '(exit $?); exit' 1 2 13 15
+
+ # Copy the file name to the temp name.
+ $doit $cpprog "$src" "$dsttmp" &&
+
+ # and set any options; do chmod last to preserve setuid bits.
+ #
+ # If any of these fail, we abort the whole thing. If we want to
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $cpprog $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
+ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
+ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
+ && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
+
+ # Now rename the file to the real destination.
+ { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
+ || {
+ # The rename failed, perhaps because mv can't rename something else
+ # to itself, or perhaps because mv is so ancient that it does not
+ # support -f.
+
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ if test -f "$dstdir/$dstfile"; then
+ $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
+ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
+ || {
+ echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+ (exit 1); exit 1
+ }
+ else
+ :
+ fi
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+ }
+ }
+ fi || { (exit 1); exit 1; }
+done
+
+# The final little trick to "correctly" pass the exit status to the exit trap.
+{
+ (exit 0); exit 0
+}
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
--- /dev/null
+# ltmain.sh - Provide generalized library-building support services.
+# NOTE: Changing this file will not affect anything until you rerun configure.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
+# Free Software Foundation, Inc.
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+basename="s,^.*/,,g"
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
+
+# define SED for historic ltconfig's generated by Libtool 1.3
+test -z "$SED" && SED=sed
+
+# The name of this program:
+progname=`echo "$progpath" | $SED $basename`
+modename="$progname"
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION=1.5.6
+TIMESTAMP=" (1.1220.2.95 2004/04/11 05:50:42)"
+
+
+# Check that we have a working $echo.
+if test "X$1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X$1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
+ # Yippee, $echo works!
+ :
+else
+ # Restart under the correct shell, and then maybe $echo will work.
+ exec $SHELL "$progpath" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<EOF
+$*
+EOF
+ exit $EXIT_SUCCESS
+fi
+
+default_mode=
+help="Try \`$progname --help' for more information."
+magic="%%%MAGIC variable%%%"
+mkdir="mkdir"
+mv="mv -f"
+rm="rm -f"
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed="${SED}"' -e 1s/^X//'
+sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
+# test EBCDIC or ASCII
+case `echo A|tr A '\301'` in
+ A) # EBCDIC based system
+ SP2NL="tr '\100' '\n'"
+ NL2SP="tr '\r\n' '\100\100'"
+ ;;
+ *) # Assume ASCII based system
+ SP2NL="tr '\040' '\012'"
+ NL2SP="tr '\015\012' '\040\040'"
+ ;;
+esac
+
+# NLS nuisances.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+# We save the old values to restore during execute mode.
+if test "${LC_ALL+set}" = set; then
+ save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
+fi
+if test "${LANG+set}" = set; then
+ save_LANG="$LANG"; LANG=C; export LANG
+fi
+
+# Make sure IFS has a sensible default
+: ${IFS="
+"}
+
+if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+ $echo "$modename: not configured to build any kind of library" 1>&2
+ $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
+ exit $EXIT_FAILURE
+fi
+
+# Global variables.
+mode=$default_mode
+nonopt=
+prev=
+prevopt=
+run=
+show="$echo"
+show_help=
+execute_dlfiles=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+
+#####################################
+# Shell function definitions:
+# This seems to be the best place for them
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+func_win32_libid () {
+ win32_libid_type="unknown"
+ win32_fileres=`file -L $1 2>/dev/null`
+ case $win32_fileres in
+ *ar\ archive\ import\ library*) # definitely import
+ win32_libid_type="x86 archive import"
+ ;;
+ *ar\ archive*) # could be an import, or static
+ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
+ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
+ win32_nmres=`eval $NM -f posix -A $1 | \
+ sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
+ if test "X$win32_nmres" = "Ximport" ; then
+ win32_libid_type="x86 archive import"
+ else
+ win32_libid_type="x86 archive static"
+ fi
+ fi
+ ;;
+ *DLL*)
+ win32_libid_type="x86 DLL"
+ ;;
+ *executable*) # but shell scripts are "executable" too...
+ case $win32_fileres in
+ *MS\ Windows\ PE\ Intel*)
+ win32_libid_type="x86 DLL"
+ ;;
+ esac
+ ;;
+ esac
+ $echo $win32_libid_type
+}
+
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag () {
+ if test -n "$available_tags" && test -z "$tagname"; then
+ CC_quoted=
+ for arg in $CC; do
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ arg="\"$arg\""
+ ;;
+ esac
+ CC_quoted="$CC_quoted $arg"
+ done
+ case $@ in
+ # Blanks in the command may have been stripped by the calling shell,
+ # but not from the CC environment variable when configure was run.
+ " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
+ # Blanks at the start of $base_compile will cause this to fail
+ # if we don't check for them as well.
+ *)
+ for z in $available_tags; do
+ if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+ # Evaluate the configuration.
+ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+ CC_quoted=
+ for arg in $CC; do
+ # Double-quote args containing other shell metacharacters.
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ arg="\"$arg\""
+ ;;
+ esac
+ CC_quoted="$CC_quoted $arg"
+ done
+ case "$@ " in
+ " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
+ # The compiler in the base compile command matches
+ # the one in the tagged configuration.
+ # Assume this is the tagged configuration we want.
+ tagname=$z
+ break
+ ;;
+ esac
+ fi
+ done
+ # If $tagname still isn't set, then no tagged configuration
+ # was found and let the user know that the "--tag" command
+ # line option must be used.
+ if test -z "$tagname"; then
+ $echo "$modename: unable to infer tagged configuration"
+ $echo "$modename: specify a tag with \`--tag'" 1>&2
+ exit $EXIT_FAILURE
+# else
+# $echo "$modename: using $tagname tagged configuration"
+ fi
+ ;;
+ esac
+ fi
+}
+# End of Shell function definitions
+#####################################
+
+# Darwin sucks
+#eval std_shrext=\"$shrext_cmds\"
+
+# And fixing for Darwin sucks for everybody else
+if test -z "$shrext_cmds" && test -n "$shrext"; then
+ eval shrext_cmds=\"$shrext\"
+fi
+eval std_shrext=\"$shrext_cmds\"
+
+# This value is evaluated to 32768, so place it here as a compatilibity hack
+# because older libtool.m4 didn't define this variable
+test -z "$max_cmd_len" && max_cmd_len=32768
+
+# Parse our command line options once, thoroughly.
+while test "$#" -gt 0
+do
+ arg="$1"
+ shift
+
+ case $arg in
+ -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$prev"; then
+ case $prev in
+ execute_dlfiles)
+ execute_dlfiles="$execute_dlfiles $arg"
+ ;;
+ tag)
+ tagname="$arg"
+ preserve_args="${preserve_args}=$arg"
+
+ # Check whether tagname contains only valid characters
+ case $tagname in
+ *[!-_A-Za-z0-9,/]*)
+ $echo "$progname: invalid tag name: $tagname" 1>&2
+ exit $EXIT_FAILURE
+ ;;
+ esac
+
+ case $tagname in
+ CC)
+ # Don't test for the "default" C tag, as we know, it's there, but
+ # not specially marked.
+ ;;
+ *)
+ if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
+ taglist="$taglist $tagname"
+ # Evaluate the configuration.
+ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
+ else
+ $echo "$progname: ignoring unknown tag $tagname" 1>&2
+ fi
+ ;;
+ esac
+ ;;
+ *)
+ eval "$prev=\$arg"
+ ;;
+ esac
+
+ prev=
+ prevopt=
+ continue
+ fi
+
+ # Have we seen a non-optional argument yet?
+ case $arg in
+ --help)
+ show_help=yes
+ ;;
+
+ --version)
+ $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
+ $echo
+ $echo "Copyright (C) 2003 Free Software Foundation, Inc."
+ $echo "This is free software; see the source for copying conditions. There is NO"
+ $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+ exit $EXIT_SUCCESS
+ ;;
+
+ --config)
+ ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
+ # Now print the configurations for the tags.
+ for tagname in $taglist; do
+ ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
+ done
+ exit $EXIT_SUCCESS
+ ;;
+
+ --debug)
+ $echo "$progname: enabling shell trace mode"
+ set -x
+ preserve_args="$preserve_args $arg"
+ ;;
+
+ --dry-run | -n)
+ run=:
+ ;;
+
+ --features)
+ $echo "host: $host"
+ if test "$build_libtool_libs" = yes; then
+ $echo "enable shared libraries"
+ else
+ $echo "disable shared libraries"
+ fi
+ if test "$build_old_libs" = yes; then
+ $echo "enable static libraries"
+ else
+ $echo "disable static libraries"
+ fi
+ exit $EXIT_SUCCESS
+ ;;
+
+ --finish) mode="finish" ;;
+
+ --mode) prevopt="--mode" prev=mode ;;
+ --mode=*) mode="$optarg" ;;
+
+ --preserve-dup-deps) duplicate_deps="yes" ;;
+
+ --quiet | --silent)
+ show=:
+ preserve_args="$preserve_args $arg"
+ ;;
+
+ --tag) prevopt="--tag" prev=tag ;;
+ --tag=*)
+ set tag "$optarg" ${1+"$@"}
+ shift
+ prev=tag
+ preserve_args="$preserve_args --tag"
+ ;;
+
+ -dlopen)
+ prevopt="-dlopen"
+ prev=execute_dlfiles
+ ;;
+
+ -*)
+ $echo "$modename: unrecognized option \`$arg'" 1>&2
+ $echo "$help" 1>&2
+ exit $EXIT_FAILURE
+ ;;
+
+ *)
+ nonopt="$arg"
+ break
+ ;;
+ esac
+done
+
+if test -n "$prevopt"; then
+ $echo "$modename: option \`$prevopt' requires an argument" 1>&2
+ $echo "$help" 1>&2
+ exit $EXIT_FAILURE
+fi
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end. This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+if test -z "$show_help"; then
+
+ # Infer the operation mode.
+ if test -z "$mode"; then
+ $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
+ $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2
+ case $nonopt in
+ *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
+ mode=link
+ for arg
+ do
+ case $arg in
+ -c)
+ mode=compile
+ break
+ ;;
+ esac
+ done
+ ;;
+ *db | *dbx | *strace | *truss)
+ mode=execute
+ ;;
+ *install*|cp|mv)
+ mode=install
+ ;;
+ *rm)
+ mode=uninstall
+ ;;
+ *)
+ # If we have no mode, but dlfiles were specified, then do execute mode.
+ test -n "$execute_dlfiles" && mode=execute
+
+ # Just use the default operation mode.
+ if test -z "$mode"; then
+ if test -n "$nonopt"; then
+ $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
+ else
+ $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
+ fi
+ fi
+ ;;
+ esac
+ fi
+
+ # Only execute mode is allowed to have -dlopen flags.
+ if test -n "$execute_dlfiles" && test "$mode" != execute; then
+ $echo "$modename: unrecognized option \`-dlopen'" 1>&2
+ $echo "$help" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ # Change the help message to a mode-specific one.
+ generic_help="$help"
+ help="Try \`$modename --help --mode=$mode' for more information."
+
+ # These modes are in order of execution frequency so that they run quickly.
+ case $mode in
+ # libtool compile mode
+ compile)
+ modename="$modename: compile"
+ # Get the compilation command and the source file.
+ base_compile=
+ srcfile="$nonopt" # always keep a non-empty value in "srcfile"
+ suppress_opt=yes
+ suppress_output=
+ arg_mode=normal
+ libobj=
+ later=
+
+ for arg
+ do
+ case "$arg_mode" in
+ arg )
+ # do not "continue". Instead, add this to base_compile
+ lastarg="$arg"
+ arg_mode=normal
+ ;;
+
+ target )
+ libobj="$arg"
+ arg_mode=normal
+ continue
+ ;;
+
+ normal )
+ # Accept any command-line options.
+ case $arg in
+ -o)
+ if test -n "$libobj" ; then
+ $echo "$modename: you cannot specify \`-o' more than once" 1>&2
+ exit $EXIT_FAILURE
+ fi
+ arg_mode=target
+ continue
+ ;;
+
+ -static | -prefer-pic | -prefer-non-pic)
+ later="$later $arg"
+ continue
+ ;;
+
+ -no-suppress)
+ suppress_opt=no
+ continue
+ ;;
+
+ -Xcompiler)
+ arg_mode=arg # the next one goes into the "base_compile" arg list
+ continue # The current "srcfile" will either be retained or
+ ;; # replaced later. I would guess that would be a bug.
+
+ -Wc,*)
+ args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
+ lastarg=
+ save_ifs="$IFS"; IFS=','
+ for arg in $args; do
+ IFS="$save_ifs"
+
+ # Double-quote args containing other shell metacharacters.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ arg="\"$arg\""
+ ;;
+ esac
+ lastarg="$lastarg $arg"
+ done
+ IFS="$save_ifs"
+ lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
+
+ # Add the arguments to base_compile.
+ base_compile="$base_compile $lastarg"
+ continue
+ ;;
+
+ * )
+ # Accept the current argument as the source file.
+ # The previous "srcfile" becomes the current argument.
+ #
+ lastarg="$srcfile"
+ srcfile="$arg"
+ ;;
+ esac # case $arg
+ ;;
+ esac # case $arg_mode
+
+ # Aesthetically quote the previous argument.
+ lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
+
+ case $lastarg in
+ # Double-quote args containing other shell metacharacters.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ lastarg="\"$lastarg\""
+ ;;
+ esac
+
+ base_compile="$base_compile $lastarg"
+ done # for arg
+
+ case $arg_mode in
+ arg)
+ $echo "$modename: you must specify an argument for -Xcompile"
+ exit $EXIT_FAILURE
+ ;;
+ target)
+ $echo "$modename: you must specify a target with \`-o'" 1>&2
+ exit $EXIT_FAILURE
+ ;;
+ *)
+ # Get the name of the library object.
+ [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
+ ;;
+ esac
+
+ # Recognize several different file suffixes.
+ # If the user specifies -o file.o, it is replaced with file.lo
+ xform='[cCFSifmso]'
+ case $libobj in
+ *.ada) xform=ada ;;
+ *.adb) xform=adb ;;
+ *.ads) xform=ads ;;
+ *.asm) xform=asm ;;
+ *.c++) xform=c++ ;;
+ *.cc) xform=cc ;;
+ *.ii) xform=ii ;;
+ *.class) xform=class ;;
+ *.cpp) xform=cpp ;;
+ *.cxx) xform=cxx ;;
+ *.f90) xform=f90 ;;
+ *.for) xform=for ;;
+ *.java) xform=java ;;
+ esac
+
+ libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
+
+ case $libobj in
+ *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
+ *)
+ $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
+ exit $EXIT_FAILURE
+ ;;
+ esac
+
+ func_infer_tag $base_compile
+
+ for arg in $later; do
+ case $arg in
+ -static)
+ build_old_libs=yes
+ continue
+ ;;
+
+ -prefer-pic)
+ pic_mode=yes
+ continue
+ ;;
+
+ -prefer-non-pic)
+ pic_mode=no
+ continue
+ ;;
+ esac
+ done
+
+ objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+ xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$xdir" = "X$obj"; then
+ xdir=
+ else
+ xdir=$xdir/
+ fi
+ lobj=${xdir}$objdir/$objname
+
+ if test -z "$base_compile"; then
+ $echo "$modename: you must specify a compilation command" 1>&2
+ $echo "$help" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ # Delete any leftover library objects.
+ if test "$build_old_libs" = yes; then
+ removelist="$obj $lobj $libobj ${libobj}T"
+ else
+ removelist="$lobj $libobj ${libobj}T"
+ fi
+
+ $run $rm $removelist
+ trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
+
+ # On Cygwin there's no "real" PIC flag so we must build both object types
+ case $host_os in
+ cygwin* | mingw* | pw32* | os2*)
+ pic_mode=default
+ ;;
+ esac
+ if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+ # non-PIC code in shared libraries is not supported
+ pic_mode=default
+ fi
+
+ # Calculate the filename of the output object if compiler does
+ # not support -o with -c
+ if test "$compiler_c_o" = no; then
+ output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
+ lockfile="$output_obj.lock"
+ removelist="$removelist $output_obj $lockfile"
+ trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
+ else
+ output_obj=
+ need_locks=no
+ lockfile=
+ fi
+
+ # Lock this critical section if it is needed
+ # We use this script file to make the link, it avoids creating a new file
+ if test "$need_locks" = yes; then
+ until $run ln "$progpath" "$lockfile" 2>/dev/null; do
+ $show "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ elif test "$need_locks" = warn; then
+ if test -f "$lockfile"; then
+ $echo "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $run $rm $removelist
+ exit $EXIT_FAILURE
+ fi
+ $echo $srcfile > "$lockfile"
+ fi
+
+ if test -n "$fix_srcfile_path"; then
+ eval srcfile=\"$fix_srcfile_path\"
+ fi
+
+ $run $rm "$libobj" "${libobj}T"
+
+ # Create a libtool object file (analogous to a ".la" file),
+ # but don't create it if we're doing a dry run.
+ test -z "$run" && cat > ${libobj}T <<EOF
+# $libobj - a libtool object file
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+EOF
+
+ # Only build a PIC object if we are building libtool libraries.
+ if test "$build_libtool_libs" = yes; then
+ # Without this assignment, base_compile gets emptied.
+ fbsd_hideous_sh_bug=$base_compile
+
+ if test "$pic_mode" != no; then
+ command="$base_compile $srcfile $pic_flag"
+ else
+ # Don't build PIC code
+ command="$base_compile $srcfile"
+ fi
+
+ if test ! -d "${xdir}$objdir"; then
+ $show "$mkdir ${xdir}$objdir"
+ $run $mkdir ${xdir}$objdir
+ status=$?
+ if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
+ exit $status
+ fi
+ fi
+
+ if test -z "$output_obj"; then
+ # Place PIC objects in $objdir
+ command="$command -o $lobj"
+ fi
+
+ $run $rm "$lobj" "$output_obj"
+
+ $show "$command"
+ if $run eval "$command"; then :
+ else
+ test -n "$output_obj" && $run $rm $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ if test "$need_locks" = warn &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $run $rm $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed, then go on to compile the next one
+ if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+ $show "$mv $output_obj $lobj"
+ if $run $mv $output_obj $lobj; then :
+ else
+ error=$?
+ $run $rm $removelist
+ exit $error
+ fi
+ fi
+
+ # Append the name of the PIC object to the libtool object file.
+ test -z "$run" && cat >> ${libobj}T <<EOF
+pic_object='$objdir/$objname'
+
+EOF
+
+ # Allow error messages only from the first compilation.
+ if test "$suppress_opt" = yes; then
+ suppress_output=' >/dev/null 2>&1'
+ fi
+ else
+ # No PIC object so indicate it doesn't exist in the libtool
+ # object file.
+ test -z "$run" && cat >> ${libobj}T <<EOF
+pic_object=none
+
+EOF
+ fi
+
+ # Only build a position-dependent object if we build old libraries.
+ if test "$build_old_libs" = yes; then
+ if test "$pic_mode" != yes; then
+ # Don't build PIC code
+ command="$base_compile $srcfile"
+ else
+ command="$base_compile $srcfile $pic_flag"
+ fi
+ if test "$compiler_c_o" = yes; then
+ command="$command -o $obj"
+ fi
+
+ # Suppress compiler output if we already did a PIC compilation.
+ command="$command$suppress_output"
+ $run $rm "$obj" "$output_obj"
+ $show "$command"
+ if $run eval "$command"; then :
+ else
+ $run $rm $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ if test "$need_locks" = warn &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $run $rm $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed
+ if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
+ $show "$mv $output_obj $obj"
+ if $run $mv $output_obj $obj; then :
+ else
+ error=$?
+ $run $rm $removelist
+ exit $error
+ fi
+ fi
+
+ # Append the name of the non-PIC object the libtool object file.
+ # Only append if the libtool object file exists.
+ test -z "$run" && cat >> ${libobj}T <<EOF
+# Name of the non-PIC object.
+non_pic_object='$objname'
+
+EOF
+ else
+ # Append the name of the non-PIC object the libtool object file.
+ # Only append if the libtool object file exists.
+ test -z "$run" && cat >> ${libobj}T <<EOF
+# Name of the non-PIC object.
+non_pic_object=none
+
+EOF
+ fi
+
+ $run $mv "${libobj}T" "${libobj}"
+
+ # Unlock the critical section if it was locked
+ if test "$need_locks" != no; then
+ $run $rm "$lockfile"
+ fi
+
+ exit $EXIT_SUCCESS
+ ;;
+
+ # libtool link mode
+ link | relink)
+ modename="$modename: link"
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ # It is impossible to link a dll without this setting, and
+ # we shouldn't force the makefile maintainer to figure out
+ # which system we are compiling for in order to pass an extra
+ # flag for every libtool invocation.
+ # allow_undefined=no
+
+ # FIXME: Unfortunately, there are problems with the above when trying
+ # to make a dll which has undefined symbols, in which case not
+ # even a static library is built. For now, we need to specify
+ # -no-undefined on the libtool link line when we can be certain
+ # that all symbols are satisfied, otherwise we get a static library.
+ allow_undefined=yes
+ ;;
+ *)
+ allow_undefined=yes
+ ;;
+ esac
+ libtool_args="$nonopt"
+ base_compile="$nonopt $@"
+ compile_command="$nonopt"
+ finalize_command="$nonopt"
+
+ compile_rpath=
+ finalize_rpath=
+ compile_shlibpath=
+ finalize_shlibpath=
+ convenience=
+ old_convenience=
+ deplibs=
+ old_deplibs=
+ compiler_flags=
+ linker_flags=
+ dllsearchpath=
+ lib_search_path=`pwd`
+ inst_prefix_dir=
+
+ avoid_version=no
+ dlfiles=
+ dlprefiles=
+ dlself=no
+ export_dynamic=no
+ export_symbols=
+ export_symbols_regex=
+ generated=
+ libobjs=
+ ltlibs=
+ module=no
+ no_install=no
+ objs=
+ non_pic_objects=
+ precious_files_regex=
+ prefer_static_libs=no
+ preload=no
+ prev=
+ prevarg=
+ release=
+ rpath=
+ xrpath=
+ perm_rpath=
+ temp_rpath=
+ thread_safe=no
+ vinfo=
+ vinfo_number=no
+
+ func_infer_tag $base_compile
+
+ # We need to know -static, to get the right output filenames.
+ for arg
+ do
+ case $arg in
+ -all-static | -static)
+ if test "X$arg" = "X-all-static"; then
+ if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+ $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
+ fi
+ if test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ else
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ fi
+ build_libtool_libs=no
+ build_old_libs=yes
+ prefer_static_libs=yes
+ break
+ ;;
+ esac
+ done
+
+ # See if our shared archives depend on static archives.
+ test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+ # Go through the arguments, transforming them on the way.
+ while test "$#" -gt 0; do
+ arg="$1"
+ shift
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
+ ;;
+ *) qarg=$arg ;;
+ esac
+ libtool_args="$libtool_args $qarg"
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$prev"; then
+ case $prev in
+ output)
+ compile_command="$compile_command @OUTPUT@"
+ finalize_command="$finalize_command @OUTPUT@"
+ ;;
+ esac
+
+ case $prev in
+ dlfiles|dlprefiles)
+ if test "$preload" = no; then
+ # Add the symbol object into the linking commands.
+ compile_command="$compile_command @SYMFILE@"
+ finalize_command="$finalize_command @SYMFILE@"
+ preload=yes
+ fi
+ case $arg in
+ *.la | *.lo) ;; # We handle these cases below.
+ force)
+ if test "$dlself" = no; then
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ self)
+ if test "$prev" = dlprefiles; then
+ dlself=yes
+ elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+ dlself=yes
+ else
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ *)
+ if test "$prev" = dlfiles; then
+ dlfiles="$dlfiles $arg"
+ else
+ dlprefiles="$dlprefiles $arg"
+ fi
+ prev=
+ continue
+ ;;
+ esac
+ ;;
+ expsyms)
+ export_symbols="$arg"
+ if test ! -f "$arg"; then
+ $echo "$modename: symbol file \`$arg' does not exist"
+ exit $EXIT_FAILURE
+ fi
+ prev=
+ continue
+ ;;
+ expsyms_regex)
+ export_symbols_regex="$arg"
+ prev=
+ continue
+ ;;
+ inst_prefix)
+ inst_prefix_dir="$arg"
+ prev=
+ continue
+ ;;
+ precious_regex)
+ precious_files_regex="$arg"
+ prev=
+ continue
+ ;;
+ release)
+ release="-$arg"
+ prev=
+ continue
+ ;;
+ objectlist)
+ if test -f "$arg"; then
+ save_arg=$arg
+ moreargs=
+ for fil in `cat $save_arg`
+ do
+# moreargs="$moreargs $fil"
+ arg=$fil
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ # If there is no directory component, then add one.
+ case $arg in
+ */* | *\\*) . $arg ;;
+ *) . ./$arg ;;
+ esac
+
+ if test -z "$pic_object" || \
+ test -z "$non_pic_object" ||
+ test "$pic_object" = none && \
+ test "$non_pic_object" = none; then
+ $echo "$modename: cannot find name of object for \`$arg'" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ # Extract subdirectory from the argument.
+ xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$xdir" = "X$arg"; then
+ xdir=
+ else
+ xdir="$xdir/"
+ fi
+
+ if test "$pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ pic_object="$xdir$pic_object"
+
+ if test "$prev" = dlfiles; then
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+ dlfiles="$dlfiles $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ dlprefiles="$dlprefiles $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ libobjs="$libobjs $pic_object"
+ arg="$pic_object"
+ fi
+
+ # Non-PIC object.
+ if test "$non_pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object="$xdir$non_pic_object"
+
+ # A standard non-PIC object
+ non_pic_objects="$non_pic_objects $non_pic_object"
+ if test -z "$pic_object" || test "$pic_object" = none ; then
+ arg="$non_pic_object"
+ fi
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if test -z "$run"; then
+ $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
+ exit $EXIT_FAILURE
+ else
+ # Dry-run case.
+
+ # Extract subdirectory from the argument.
+ xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$xdir" = "X$arg"; then
+ xdir=
+ else
+ xdir="$xdir/"
+ fi
+
+ pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
+ non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
+ libobjs="$libobjs $pic_object"
+ non_pic_objects="$non_pic_objects $non_pic_object"
+ fi
+ fi
+ done
+ else
+ $echo "$modename: link input file \`$save_arg' does not exist"
+ exit $EXIT_FAILURE
+ fi
+ arg=$save_arg
+ prev=
+ continue
+ ;;
+ rpath | xrpath)
+ # We need an absolute path.
+ case $arg in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ $echo "$modename: only absolute run-paths are allowed" 1>&2
+ exit $EXIT_FAILURE
+ ;;
+ esac
+ if test "$prev" = rpath; then
+ case "$rpath " in
+ *" $arg "*) ;;
+ *) rpath="$rpath $arg" ;;
+ esac
+ else
+ case "$xrpath " in
+ *" $arg "*) ;;
+ *) xrpath="$xrpath $arg" ;;
+ esac
+ fi
+ prev=
+ continue
+ ;;
+ xcompiler)
+ compiler_flags="$compiler_flags $qarg"
+ prev=
+ compile_command="$compile_command $qarg"
+ finalize_command="$finalize_command $qarg"
+ continue
+ ;;
+ xlinker)
+ linker_flags="$linker_flags $qarg"
+ compiler_flags="$compiler_flags $wl$qarg"
+ prev=
+ compile_command="$compile_command $wl$qarg"
+ finalize_command="$finalize_command $wl$qarg"
+ continue
+ ;;
+ xcclinker)
+ linker_flags="$linker_flags $qarg"
+ compiler_flags="$compiler_flags $qarg"
+ prev=
+ compile_command="$compile_command $qarg"
+ finalize_command="$finalize_command $qarg"
+ continue
+ ;;
+ shrext)
+ shrext_cmds="$arg"
+ prev=
+ continue
+ ;;
+ *)
+ eval "$prev=\"\$arg\""
+ prev=
+ continue
+ ;;
+ esac
+ fi # test -n "$prev"
+
+ prevarg="$arg"
+
+ case $arg in
+ -all-static)
+ if test -n "$link_static_flag"; then
+ compile_command="$compile_command $link_static_flag"
+ finalize_command="$finalize_command $link_static_flag"
+ fi
+ continue
+ ;;
+
+ -allow-undefined)
+ # FIXME: remove this flag sometime in the future.
+ $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
+ continue
+ ;;
+
+ -avoid-version)
+ avoid_version=yes
+ continue
+ ;;
+
+ -dlopen)
+ prev=dlfiles
+ continue
+ ;;
+
+ -dlpreopen)
+ prev=dlprefiles
+ continue
+ ;;
+
+ -export-dynamic)
+ export_dynamic=yes
+ continue
+ ;;
+
+ -export-symbols | -export-symbols-regex)
+ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+ $echo "$modename: more than one -exported-symbols argument is not allowed"
+ exit $EXIT_FAILURE
+ fi
+ if test "X$arg" = "X-export-symbols"; then
+ prev=expsyms
+ else
+ prev=expsyms_regex
+ fi
+ continue
+ ;;
+
+ -inst-prefix-dir)
+ prev=inst_prefix
+ continue
+ ;;
+
+ # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+ # so, if we see these flags be careful not to treat them like -L
+ -L[A-Z][A-Z]*:*)
+ case $with_gcc/$host in
+ no/*-*-irix* | /*-*-irix*)
+ compile_command="$compile_command $arg"
+ finalize_command="$finalize_command $arg"
+ ;;
+ esac
+ continue
+ ;;
+
+ -L*)
+ dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ if test -z "$absdir"; then
+ $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
+ exit $EXIT_FAILURE
+ fi
+ dir="$absdir"
+ ;;
+ esac
+ case "$deplibs " in
+ *" -L$dir "*) ;;
+ *)
+ deplibs="$deplibs -L$dir"
+ lib_search_path="$lib_search_path $dir"
+ ;;
+ esac
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ case :$dllsearchpath: in
+ *":$dir:"*) ;;
+ *) dllsearchpath="$dllsearchpath:$dir";;
+ esac
+ ;;
+ esac
+ continue
+ ;;
+
+ -l*)
+ if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+ case $host in
+ *-*-cygwin* | *-*-pw32* | *-*-beos*)
+ # These systems don't actually have a C or math library (as such)
+ continue
+ ;;
+ *-*-mingw* | *-*-os2*)
+ # These systems don't actually have a C library (as such)
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-openbsd* | *-*-freebsd*)
+ # Do not include libc due to us having libc/libc_r.
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C and math libraries are in the System framework
+ deplibs="$deplibs -framework System"
+ continue
+ esac
+ elif test "X$arg" = "X-lc_r"; then
+ case $host in
+ *-*-openbsd* | *-*-freebsd*)
+ # Do not include libc_r directly, use -pthread flag.
+ continue
+ ;;
+ esac
+ fi
+ deplibs="$deplibs $arg"
+ continue
+ ;;
+
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+ deplibs="$deplibs $arg"
+ continue
+ ;;
+
+ -module)
+ module=yes
+ continue
+ ;;
+
+ # gcc -m* arguments should be passed to the linker via $compiler_flags
+ # in order to pass architecture information to the linker
+ # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo
+ # but this is not reliable with gcc because gcc may use -mfoo to
+ # select a different linker, different libraries, etc, while
+ # -Wl,-mfoo simply passes -mfoo to the linker.
+ -m*)
+ # Unknown arguments in both finalize_command and compile_command need
+ # to be aesthetically quoted because they are evaled later.
+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ arg="\"$arg\""
+ ;;
+ esac
+ compile_command="$compile_command $arg"
+ finalize_command="$finalize_command $arg"
+ if test "$with_gcc" = "yes" ; then
+ compiler_flags="$compiler_flags $arg"
+ fi
+ continue
+ ;;
+
+ -shrext)
+ prev=shrext
+ continue
+ ;;
+
+ -no-fast-install)
+ fast_install=no
+ continue
+ ;;
+
+ -no-install)
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ # The PATH hackery in wrapper scripts is required on Windows
+ # in order for the loader to find any dlls it needs.
+ $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
+ $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
+ fast_install=no
+ ;;
+ *) no_install=yes ;;
+ esac
+ continue
+ ;;
+
+ -no-undefined)
+ allow_undefined=no
+ continue
+ ;;
+
+ -objectlist)
+ prev=objectlist
+ continue
+ ;;
+
+ -o) prev=output ;;
+
+ -precious-files-regex)
+ prev=precious_regex
+ continue
+ ;;
+
+ -release)
+ prev=release
+ continue
+ ;;
+
+ -rpath)
+ prev=rpath
+ continue
+ ;;
+
+ -R)
+ prev=xrpath
+ continue
+ ;;
+
+ -R*)
+ dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ $echo "$modename: only absolute run-paths are allowed" 1>&2
+ exit $EXIT_FAILURE
+ ;;
+ esac
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) xrpath="$xrpath $dir" ;;
+ esac
+ continue
+ ;;
+
+ -static)
+ # The effects of -static are defined in a previous loop.
+ # We used to do the same as -all-static on platforms that
+ # didn't have a PIC flag, but the assumption that the effects
+ # would be equivalent was wrong. It would break on at least
+ # Digital Unix and AIX.
+ continue
+ ;;
+
+ -thread-safe)
+ thread_safe=yes
+ continue
+ ;;
+
+ -version-info)
+ prev=vinfo
+ continue
+ ;;
+ -version-number)
+ prev=vinfo
+ vinfo_number=yes
+ continue
+ ;;
+
+ -Wc,*)
+ args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
+ arg=
+ save_ifs="$IFS"; IFS=','
+ for flag in $args; do
+ IFS="$save_ifs"
+ case $flag in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ flag="\"$flag\""
+ ;;
+ esac
+ arg="$arg $wl$flag"
+ compiler_flags="$compiler_flags $flag"
+ done
+ IFS="$save_ifs"
+ arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+ ;;
+
+ -Wl,*)
+ args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
+ arg=
+ save_ifs="$IFS"; IFS=','
+ for flag in $args; do
+ IFS="$save_ifs"
+ case $flag in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ flag="\"$flag\""
+ ;;
+ esac
+ arg="$arg $wl$flag"
+ compiler_flags="$compiler_flags $wl$flag"
+ linker_flags="$linker_flags $flag"
+ done
+ IFS="$save_ifs"
+ arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+ ;;
+
+ -Xcompiler)
+ prev=xcompiler
+ continue
+ ;;
+
+ -Xlinker)
+ prev=xlinker
+ continue
+ ;;
+
+ -XCClinker)
+ prev=xcclinker
+ continue
+ ;;
+
+ # Some other compiler flag.
+ -* | +*)
+ # Unknown arguments in both finalize_command and compile_command need
+ # to be aesthetically quoted because they are evaled later.
+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ arg="\"$arg\""
+ ;;
+ esac
+ ;;
+
+ *.$objext)
+ # A standard object.
+ objs="$objs $arg"
+ ;;
+
+ *.lo)
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ # If there is no directory component, then add one.
+ case $arg in
+ */* | *\\*) . $arg ;;
+ *) . ./$arg ;;
+ esac
+
+ if test -z "$pic_object" || \
+ test -z "$non_pic_object" ||
+ test "$pic_object" = none && \
+ test "$non_pic_object" = none; then
+ $echo "$modename: cannot find name of object for \`$arg'" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ # Extract subdirectory from the argument.
+ xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$xdir" = "X$arg"; then
+ xdir=
+ else
+ xdir="$xdir/"
+ fi
+
+ if test "$pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ pic_object="$xdir$pic_object"
+
+ if test "$prev" = dlfiles; then
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+ dlfiles="$dlfiles $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ dlprefiles="$dlprefiles $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ libobjs="$libobjs $pic_object"
+ arg="$pic_object"
+ fi
+
+ # Non-PIC object.
+ if test "$non_pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object="$xdir$non_pic_object"
+
+ # A standard non-PIC object
+ non_pic_objects="$non_pic_objects $non_pic_object"
+ if test -z "$pic_object" || test "$pic_object" = none ; then
+ arg="$non_pic_object"
+ fi
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if test -z "$run"; then
+ $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
+ exit $EXIT_FAILURE
+ else
+ # Dry-run case.
+
+ # Extract subdirectory from the argument.
+ xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$xdir" = "X$arg"; then
+ xdir=
+ else
+ xdir="$xdir/"
+ fi
+
+ pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
+ non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
+ libobjs="$libobjs $pic_object"
+ non_pic_objects="$non_pic_objects $non_pic_object"
+ fi
+ fi
+ ;;
+
+ *.$libext)
+ # An archive.
+ deplibs="$deplibs $arg"
+ old_deplibs="$old_deplibs $arg"
+ continue
+ ;;
+
+ *.la)
+ # A libtool-controlled library.
+
+ if test "$prev" = dlfiles; then
+ # This library was specified with -dlopen.
+ dlfiles="$dlfiles $arg"
+ prev=
+ elif test "$prev" = dlprefiles; then
+ # The library was specified with -dlpreopen.
+ dlprefiles="$dlprefiles $arg"
+ prev=
+ else
+ deplibs="$deplibs $arg"
+ fi
+ continue
+ ;;
+
+ # Some other compiler argument.
+ *)
+ # Unknown arguments in both finalize_command and compile_command need
+ # to be aesthetically quoted because they are evaled later.
+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ arg="\"$arg\""
+ ;;
+ esac
+ ;;
+ esac # arg
+
+ # Now actually substitute the argument into the commands.
+ if test -n "$arg"; then
+ compile_command="$compile_command $arg"
+ finalize_command="$finalize_command $arg"
+ fi
+ done # argument parsing loop
+
+ if test -n "$prev"; then
+ $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
+ $echo "$help" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+ eval arg=\"$export_dynamic_flag_spec\"
+ compile_command="$compile_command $arg"
+ finalize_command="$finalize_command $arg"
+ fi
+
+ oldlibs=
+ # calculate the name of the file, without its directory
+ outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
+ libobjs_save="$libobjs"
+
+ if test -n "$shlibpath_var"; then
+ # get the directories listed in $shlibpath_var
+ eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+ else
+ shlib_search_path=
+ fi
+ eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+ output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$output_objdir" = "X$output"; then
+ output_objdir="$objdir"
+ else
+ output_objdir="$output_objdir/$objdir"
+ fi
+ # Create the object directory.
+ if test ! -d "$output_objdir"; then
+ $show "$mkdir $output_objdir"
+ $run $mkdir $output_objdir
+ status=$?
+ if test "$status" -ne 0 && test ! -d "$output_objdir"; then
+ exit $status
+ fi
+ fi
+
+ # Determine the type of output
+ case $output in
+ "")
+ $echo "$modename: you must specify an output file" 1>&2
+ $echo "$help" 1>&2
+ exit $EXIT_FAILURE
+ ;;
+ *.$libext) linkmode=oldlib ;;
+ *.lo | *.$objext) linkmode=obj ;;
+ *.la) linkmode=lib ;;
+ *) linkmode=prog ;; # Anything else should be a program.
+ esac
+
+ case $host in
+ *cygwin* | *mingw* | *pw32*)
+ # don't eliminate duplications in $postdeps and $predeps
+ duplicate_compiler_generated_deps=yes
+ ;;
+ *)
+ duplicate_compiler_generated_deps=$duplicate_deps
+ ;;
+ esac
+ specialdeplibs=
+
+ libs=
+ # Find all interdependent deplibs by searching for libraries
+ # that are linked more than once (e.g. -la -lb -la)
+ for deplib in $deplibs; do
+ if test "X$duplicate_deps" = "Xyes" ; then
+ case "$libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ libs="$libs $deplib"
+ done
+
+ if test "$linkmode" = lib; then
+ libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+ # Compute libraries that are listed more than once in $predeps
+ # $postdeps and mark them as special (i.e., whose duplicates are
+ # not to be eliminated).
+ pre_post_deps=
+ if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
+ for pre_post_dep in $predeps $postdeps; do
+ case "$pre_post_deps " in
+ *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
+ esac
+ pre_post_deps="$pre_post_deps $pre_post_dep"
+ done
+ fi
+ pre_post_deps=
+ fi
+
+ deplibs=
+ newdependency_libs=
+ newlib_search_path=
+ need_relink=no # whether we're linking any uninstalled libtool libraries
+ notinst_deplibs= # not-installed libtool libraries
+ notinst_path= # paths that contain not-installed libtool libraries
+ case $linkmode in
+ lib)
+ passes="conv link"
+ for file in $dlfiles $dlprefiles; do
+ case $file in
+ *.la) ;;
+ *)
+ $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
+ exit $EXIT_FAILURE
+ ;;
+ esac
+ done
+ ;;
+ prog)
+ compile_deplibs=
+ finalize_deplibs=
+ alldeplibs=no
+ newdlfiles=
+ newdlprefiles=
+ passes="conv scan dlopen dlpreopen link"
+ ;;
+ *) passes="conv"
+ ;;
+ esac
+ for pass in $passes; do
+ if test "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan"; then
+ libs="$deplibs"
+ deplibs=
+ fi
+ if test "$linkmode" = prog; then
+ case $pass in
+ dlopen) libs="$dlfiles" ;;
+ dlpreopen) libs="$dlprefiles" ;;
+ link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+ esac
+ fi
+ if test "$pass" = dlopen; then
+ # Collect dlpreopened libraries
+ save_deplibs="$deplibs"
+ deplibs=
+ fi
+ for deplib in $libs; do
+ lib=
+ found=no
+ case $deplib in
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ fi
+ continue
+ ;;
+ -l*)
+ if test "$linkmode" != lib && test "$linkmode" != prog; then
+ $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
+ continue
+ fi
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
+ for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ for search_ext in .la $std_shrext .so .a; do
+ # Search the libtool library
+ lib="$searchdir/lib${name}${search_ext}"
+ if test -f "$lib"; then
+ if test "$search_ext" = ".la"; then
+ found=yes
+ else
+ found=no
+ fi
+ break 2
+ fi
+ done
+ done
+ if test "$found" != yes; then
+ # deplib doesn't seem to be a libtool library
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ else # deplib is a libtool library
+ # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+ # We need to do some special things here, and not later.
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $deplib "*)
+ if (${SED} -e '2q' $lib |
+ grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ library_names=
+ old_library=
+ case $lib in
+ */* | *\\*) . $lib ;;
+ *) . ./$lib ;;
+ esac
+ for l in $old_library $library_names; do
+ ll="$l"
+ done
+ if test "X$ll" = "X$old_library" ; then # only static version available
+ found=no
+ ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
+ test "X$ladir" = "X$lib" && ladir="."
+ lib=$ladir/$old_library
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ fi
+ fi
+ ;;
+ *) ;;
+ esac
+ fi
+ fi
+ ;; # -l
+ -L*)
+ case $linkmode in
+ lib)
+ deplibs="$deplib $deplibs"
+ test "$pass" = conv && continue
+ newdependency_libs="$deplib $newdependency_libs"
+ newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+ ;;
+ prog)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ if test "$pass" = scan; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+ ;;
+ *)
+ $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
+ ;;
+ esac # linkmode
+ continue
+ ;; # -L
+ -R*)
+ if test "$pass" = link; then
+ dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
+ # Make sure the xrpath contains only unique directories.
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) xrpath="$xrpath $dir" ;;
+ esac
+ fi
+ deplibs="$deplib $deplibs"
+ continue
+ ;;
+ *.la) lib="$deplib" ;;
+ *.$libext)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ case $linkmode in
+ lib)
+ if test "$deplibs_check_method" != pass_all; then
+ $echo
+ $echo "*** Warning: Trying to link with static lib archive $deplib."
+ $echo "*** I have the capability to make that library automatically link in when"
+ $echo "*** you link to this library. But I can only do this if you have a"
+ $echo "*** shared version of the library, which you do not appear to have"
+ $echo "*** because the file extensions .$libext of this argument makes me believe"
+ $echo "*** that it is just a static archive that I should not used here."
+ else
+ $echo
+ $echo "*** Warning: Linking the shared library $output against the"
+ $echo "*** static library $deplib is not portable!"
+ deplibs="$deplib $deplibs"
+ fi
+ continue
+ ;;
+ prog)
+ if test "$pass" != link; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ continue
+ ;;
+ esac # linkmode
+ ;; # *.$libext
+ *.lo | *.$objext)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ elif test "$linkmode" = prog; then
+ if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+ # If there is no dlopen support or we're linking statically,
+ # we need to preload.
+ newdlprefiles="$newdlprefiles $deplib"
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ newdlfiles="$newdlfiles $deplib"
+ fi
+ fi
+ continue
+ ;;
+ %DEPLIBS%)
+ alldeplibs=yes
+ continue
+ ;;
+ esac # case $deplib
+ if test "$found" = yes || test -f "$lib"; then :
+ else
+ $echo "$modename: cannot find the library \`$lib'" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ # Check to see that this really is a libtool archive.
+ if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+ else
+ $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
+ test "X$ladir" = "X$lib" && ladir="."
+
+ dlname=
+ dlopen=
+ dlpreopen=
+ libdir=
+ library_names=
+ old_library=
+ # If the library was installed with an old release of libtool,
+ # it will not redefine variables installed, or shouldnotlink
+ installed=yes
+ shouldnotlink=no
+
+ # Read the .la file
+ case $lib in
+ */* | *\\*) . $lib ;;
+ *) . ./$lib ;;
+ esac
+
+ if test "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan" ||
+ { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+ test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
+ test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
+ fi
+
+ if test "$pass" = conv; then
+ # Only check for convenience libraries
+ deplibs="$lib $deplibs"
+ if test -z "$libdir"; then
+ if test -z "$old_library"; then
+ $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
+ exit $EXIT_FAILURE
+ fi
+ # It is a libtool convenience library, so add in its objects.
+ convenience="$convenience $ladir/$objdir/$old_library"
+ old_convenience="$old_convenience $ladir/$objdir/$old_library"
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ deplibs="$deplib $deplibs"
+ if test "X$duplicate_deps" = "Xyes" ; then
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ tmp_libs="$tmp_libs $deplib"
+ done
+ elif test "$linkmode" != prog && test "$linkmode" != lib; then
+ $echo "$modename: \`$lib' is not a convenience library" 1>&2
+ exit $EXIT_FAILURE
+ fi
+ continue
+ fi # $pass = conv
+
+
+ # Get the name of the library we link against.
+ linklib=
+ for l in $old_library $library_names; do
+ linklib="$l"
+ done
+ if test -z "$linklib"; then
+ $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ # This library was specified with -dlopen.
+ if test "$pass" = dlopen; then
+ if test -z "$libdir"; then
+ $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
+ exit $EXIT_FAILURE
+ fi
+ if test -z "$dlname" ||
+ test "$dlopen_support" != yes ||
+ test "$build_libtool_libs" = no; then
+ # If there is no dlname, no dlopen support or we're linking
+ # statically, we need to preload. We also need to preload any
+ # dependent libraries so libltdl's deplib preloader doesn't
+ # bomb out in the load deplibs phase.
+ dlprefiles="$dlprefiles $lib $dependency_libs"
+ else
+ newdlfiles="$newdlfiles $lib"
+ fi
+ continue
+ fi # $pass = dlopen
+
+ # We need an absolute path.
+ case $ladir in
+ [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+ *)
+ abs_ladir=`cd "$ladir" && pwd`
+ if test -z "$abs_ladir"; then
+ $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
+ $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
+ abs_ladir="$ladir"
+ fi
+ ;;
+ esac
+ laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+
+ # Find the relevant object directory and library name.
+ if test "X$installed" = Xyes; then
+ if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ $echo "$modename: warning: library \`$lib' was moved." 1>&2
+ dir="$ladir"
+ absdir="$abs_ladir"
+ libdir="$abs_ladir"
+ else
+ dir="$libdir"
+ absdir="$libdir"
+ fi
+ else
+ dir="$ladir/$objdir"
+ absdir="$abs_ladir/$objdir"
+ # Remove this search path later
+ notinst_path="$notinst_path $abs_ladir"
+ fi # $installed = yes
+ name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+
+ # This library was specified with -dlpreopen.
+ if test "$pass" = dlpreopen; then
+ if test -z "$libdir"; then
+ $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
+ exit $EXIT_FAILURE
+ fi
+ # Prefer using a static library (so that no silly _DYNAMIC symbols
+ # are required to link).
+ if test -n "$old_library"; then
+ newdlprefiles="$newdlprefiles $dir/$old_library"
+ # Otherwise, use the dlname, so that lt_dlopen finds it.
+ elif test -n "$dlname"; then
+ newdlprefiles="$newdlprefiles $dir/$dlname"
+ else
+ newdlprefiles="$newdlprefiles $dir/$linklib"
+ fi
+ fi # $pass = dlpreopen
+
+ if test -z "$libdir"; then
+ # Link the convenience library
+ if test "$linkmode" = lib; then
+ deplibs="$dir/$old_library $deplibs"
+ elif test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$dir/$old_library $compile_deplibs"
+ finalize_deplibs="$dir/$old_library $finalize_deplibs"
+ else
+ deplibs="$lib $deplibs" # used for prog,scan pass
+ fi
+ continue
+ fi
+
+
+ if test "$linkmode" = prog && test "$pass" != link; then
+ newlib_search_path="$newlib_search_path $ladir"
+ deplibs="$lib $deplibs"
+
+ linkalldeplibs=no
+ if test "$link_all_deplibs" != no || test -z "$library_names" ||
+ test "$build_libtool_libs" = no; then
+ linkalldeplibs=yes
+ fi
+
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
+ esac
+ # Need to link against all dependency_libs?
+ if test "$linkalldeplibs" = yes; then
+ deplibs="$deplib $deplibs"
+ else
+ # Need to hardcode shared library paths
+ # or/and link against static libraries
+ newdependency_libs="$deplib $newdependency_libs"
+ fi
+ if test "X$duplicate_deps" = "Xyes" ; then
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ tmp_libs="$tmp_libs $deplib"
+ done # for deplib
+ continue
+ fi # $linkmode = prog...
+
+ if test "$linkmode,$pass" = "prog,link"; then
+ if test -n "$library_names" &&
+ { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
+ # We need to hardcode the library path
+ if test -n "$shlibpath_var"; then
+ # Make sure the rpath contains only unique directories.
+ case "$temp_rpath " in
+ *" $dir "*) ;;
+ *" $absdir "*) ;;
+ *) temp_rpath="$temp_rpath $dir" ;;
+ esac
+ fi
+
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) compile_rpath="$compile_rpath $absdir"
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir"
+ esac
+ ;;
+ esac
+ fi # $linkmode,$pass = prog,link...
+
+ if test "$alldeplibs" = yes &&
+ { test "$deplibs_check_method" = pass_all ||
+ { test "$build_libtool_libs" = yes &&
+ test -n "$library_names"; }; }; then
+ # We only need to search for static libraries
+ continue
+ fi
+ fi
+
+ link_static=no # Whether the deplib will be linked statically
+ if test -n "$library_names" &&
+ { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
+ if test "$installed" = no; then
+ notinst_deplibs="$notinst_deplibs $lib"
+ need_relink=yes
+ fi
+ # This is a shared library
+
+ # Warn about portability, can't link against -module's on
+ # some systems (darwin)
+ if test "$shouldnotlink" = yes && test "$pass" = link ; then
+ $echo
+ if test "$linkmode" = prog; then
+ $echo "*** Warning: Linking the executable $output against the loadable module"
+ else
+ $echo "*** Warning: Linking the shared library $output against the loadable module"
+ fi
+ $echo "*** $linklib is not portable!"
+ fi
+ if test "$linkmode" = lib &&
+ test "$hardcode_into_libs" = yes; then
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) compile_rpath="$compile_rpath $absdir"
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir"
+ esac
+ ;;
+ esac
+ fi
+
+ if test -n "$old_archive_from_expsyms_cmds"; then
+ # figure out the soname
+ set dummy $library_names
+ realname="$2"
+ shift; shift
+ libname=`eval \\$echo \"$libname_spec\"`
+ # use dlname if we got it. it's perfectly good, no?
+ if test -n "$dlname"; then
+ soname="$dlname"
+ elif test -n "$soname_spec"; then
+ # bleh windows
+ case $host in
+ *cygwin* | mingw*)
+ major=`expr $current - $age`
+ versuffix="-$major"
+ ;;
+ esac
+ eval soname=\"$soname_spec\"
+ else
+ soname="$realname"
+ fi
+
+ # Make a new name for the extract_expsyms_cmds to use
+ soroot="$soname"
+ soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
+ newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
+
+ # If the library has no export list, then create one now
+ if test -f "$output_objdir/$soname-def"; then :
+ else
+ $show "extracting exported symbol list from \`$soname'"
+ save_ifs="$IFS"; IFS='~'
+ cmds=$extract_expsyms_cmds
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ eval cmd=\"$cmd\"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ fi
+
+ # Create $newlib
+ if test -f "$output_objdir/$newlib"; then :; else
+ $show "generating import library for \`$soname'"
+ save_ifs="$IFS"; IFS='~'
+ cmds=$old_archive_from_expsyms_cmds
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ eval cmd=\"$cmd\"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ fi
+ # make sure the library variables are pointing to the new library
+ dir=$output_objdir
+ linklib=$newlib
+ fi # test -n "$old_archive_from_expsyms_cmds"
+
+ if test "$linkmode" = prog || test "$mode" != relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+ lib_linked=yes
+ case $hardcode_action in
+ immediate | unsupported)
+ if test "$hardcode_direct" = no; then
+ add="$dir/$linklib"
+ case $host in
+ *-*-sco3.2v5* ) add_dir="-L$dir" ;;
+ *-*-darwin* )
+ # if the lib is a module then we can not link against
+ # it, someone is ignoring the new warnings I added
+ if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then
+ $echo "** Warning, lib $linklib is a module, not a shared library"
+ if test -z "$old_library" ; then
+ $echo
+ $echo "** And there doesn't seem to be a static archive available"
+ $echo "** The link will probably fail, sorry"
+ else
+ add="$dir/$old_library"
+ fi
+ fi
+ esac
+ elif test "$hardcode_minus_L" = no; then
+ case $host in
+ *-*-sunos*) add_shlibpath="$dir" ;;
+ esac
+ add_dir="-L$dir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = no; then
+ add_shlibpath="$dir"
+ add="-l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+ relink)
+ if test "$hardcode_direct" = yes; then
+ add="$dir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ add_dir="-L$dir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case "$libdir" in
+ [\\/]*)
+ add_dir="$add_dir -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ add_shlibpath="$dir"
+ add="-l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+ *) lib_linked=no ;;
+ esac
+
+ if test "$lib_linked" != yes; then
+ $echo "$modename: configuration error: unsupported hardcode properties"
+ exit $EXIT_FAILURE
+ fi
+
+ if test -n "$add_shlibpath"; then
+ case :$compile_shlibpath: in
+ *":$add_shlibpath:"*) ;;
+ *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+ esac
+ fi
+ if test "$linkmode" = prog; then
+ test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+ test -n "$add" && compile_deplibs="$add $compile_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ if test "$hardcode_direct" != yes && \
+ test "$hardcode_minus_L" != yes && \
+ test "$hardcode_shlibpath_var" = yes; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+ esac
+ fi
+ fi
+ fi
+
+ if test "$linkmode" = prog || test "$mode" = relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+ # Finalize command for both is simple: just hardcode it.
+ if test "$hardcode_direct" = yes; then
+ add="$libdir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ add_dir="-L$libdir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+ esac
+ add="-l$name"
+ elif test "$hardcode_automatic" = yes; then
+ if test -n "$inst_prefix_dir" &&
+ test -f "$inst_prefix_dir$libdir/$linklib" ; then
+ add="$inst_prefix_dir$libdir/$linklib"
+ else
+ add="$libdir/$linklib"
+ fi
+ else
+ # We cannot seem to hardcode it, guess we'll fake it.
+ add_dir="-L$libdir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case "$libdir" in
+ [\\/]*)
+ add_dir="$add_dir -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add="-l$name"
+ fi
+
+ if test "$linkmode" = prog; then
+ test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+ test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ fi
+ fi
+ elif test "$linkmode" = prog; then
+ # Here we assume that one of hardcode_direct or hardcode_minus_L
+ # is not unsupported. This is valid on all known static and
+ # shared platforms.
+ if test "$hardcode_direct" != unsupported; then
+ test -n "$old_library" && linklib="$old_library"
+ compile_deplibs="$dir/$linklib $compile_deplibs"
+ finalize_deplibs="$dir/$linklib $finalize_deplibs"
+ else
+ compile_deplibs="-l$name -L$dir $compile_deplibs"
+ finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+ fi
+ elif test "$build_libtool_libs" = yes; then
+ # Not a shared library
+ if test "$deplibs_check_method" != pass_all; then
+ # We're trying link a shared library against a static one
+ # but the system doesn't support it.
+
+ # Just print a warning and add the library to dependency_libs so
+ # that the program can be linked against the static library.
+ $echo
+ $echo "*** Warning: This system can not link to static lib archive $lib."
+ $echo "*** I have the capability to make that library automatically link in when"
+ $echo "*** you link to this library. But I can only do this if you have a"
+ $echo "*** shared version of the library, which you do not appear to have."
+ if test "$module" = yes; then
+ $echo "*** But as you try to build a module library, libtool will still create "
+ $echo "*** a static module, that should work as long as the dlopening application"
+ $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
+ if test -z "$global_symbol_pipe"; then
+ $echo
+ $echo "*** However, this would only work if libtool was able to extract symbol"
+ $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ $echo "*** not find such a program. So, this module is probably useless."
+ $echo "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" = no; then
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ else
+ convenience="$convenience $dir/$old_library"
+ old_convenience="$old_convenience $dir/$old_library"
+ deplibs="$dir/$old_library $deplibs"
+ link_static=yes
+ fi
+ fi # link shared/static library?
+
+ if test "$linkmode" = lib; then
+ if test -n "$dependency_libs" &&
+ { test "$hardcode_into_libs" != yes ||
+ test "$build_old_libs" = yes ||
+ test "$link_static" = yes; }; then
+ # Extract -R from dependency_libs
+ temp_deplibs=
+ for libdir in $dependency_libs; do
+ case $libdir in
+ -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
+ case " $xrpath " in
+ *" $temp_xrpath "*) ;;
+ *) xrpath="$xrpath $temp_xrpath";;
+ esac;;
+ *) temp_deplibs="$temp_deplibs $libdir";;
+ esac
+ done
+ dependency_libs="$temp_deplibs"
+ fi
+
+ newlib_search_path="$newlib_search_path $absdir"
+ # Link against this library
+ test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+ # ... and its dependency_libs
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ newdependency_libs="$deplib $newdependency_libs"
+ if test "X$duplicate_deps" = "Xyes" ; then
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ tmp_libs="$tmp_libs $deplib"
+ done
+
+ if test "$link_all_deplibs" != no; then
+ # Add the search paths of all dependency libraries
+ for deplib in $dependency_libs; do
+ case $deplib in
+ -L*) path="$deplib" ;;
+ *.la)
+ dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
+ test "X$dir" = "X$deplib" && dir="."
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ if test -z "$absdir"; then
+ $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
+ absdir="$dir"
+ fi
+ ;;
+ esac
+ if grep "^installed=no" $deplib > /dev/null; then
+ path="$absdir/$objdir"
+ else
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ if test -z "$libdir"; then
+ $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+ exit $EXIT_FAILURE
+ fi
+ if test "$absdir" != "$libdir"; then
+ $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
+ fi
+ path="$absdir"
+ fi
+ depdepl=
+ case $host in
+ *-*-darwin*)
+ # we do not want to link against static libs,
+ # but need to link against shared
+ eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+ if test -n "$deplibrary_names" ; then
+ for tmp in $deplibrary_names ; do
+ depdepl=$tmp
+ done
+ if test -f "$path/$depdepl" ; then
+ depdepl="$path/$depdepl"
+ fi
+ # do not add paths which are already there
+ case " $newlib_search_path " in
+ *" $path "*) ;;
+ *) newlib_search_path="$newlib_search_path $path";;
+ esac
+ fi
+ path=""
+ ;;
+ *)
+ path="-L$path"
+ ;;
+ esac
+ ;;
+ -l*)
+ case $host in
+ *-*-darwin*)
+ # Again, we only want to link against shared libraries
+ eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
+ for tmp in $newlib_search_path ; do
+ if test -f "$tmp/lib$tmp_libs.dylib" ; then
+ eval depdepl="$tmp/lib$tmp_libs.dylib"
+ break
+ fi
+ done
+ path=""
+ ;;
+ *) continue ;;
+ esac
+ ;;
+ *) continue ;;
+ esac
+ case " $deplibs " in
+ *" $depdepl "*) ;;
+ *) deplibs="$depdepl $deplibs" ;;
+ esac
+ case " $deplibs " in
+ *" $path "*) ;;
+ *) deplibs="$deplibs $path" ;;
+ esac
+ done
+ fi # link_all_deplibs != no
+ fi # linkmode = lib
+ done # for deplib in $libs
+ dependency_libs="$newdependency_libs"
+ if test "$pass" = dlpreopen; then
+ # Link the dlpreopened libraries before other libraries
+ for deplib in $save_deplibs; do
+ deplibs="$deplib $deplibs"
+ done
+ fi
+ if test "$pass" != dlopen; then
+ if test "$pass" != conv; then
+ # Make sure lib_search_path contains only unique directories.
+ lib_search_path=
+ for dir in $newlib_search_path; do
+ case "$lib_search_path " in
+ *" $dir "*) ;;
+ *) lib_search_path="$lib_search_path $dir" ;;
+ esac
+ done
+ newlib_search_path=
+ fi
+
+ if test "$linkmode,$pass" != "prog,link"; then
+ vars="deplibs"
+ else
+ vars="compile_deplibs finalize_deplibs"
+ fi
+ for var in $vars dependency_libs; do
+ # Add libraries to $var in reverse order
+ eval tmp_libs=\"\$$var\"
+ new_libs=
+ for deplib in $tmp_libs; do
+ # FIXME: Pedantically, this is the right thing to do, so
+ # that some nasty dependency loop isn't accidentally
+ # broken:
+ #new_libs="$deplib $new_libs"
+ # Pragmatically, this seems to cause very few problems in
+ # practice:
+ case $deplib in
+ -L*) new_libs="$deplib $new_libs" ;;
+ -R*) ;;
+ *)
+ # And here is the reason: when a library appears more
+ # than once as an explicit dependence of a library, or
+ # is implicitly linked in more than once by the
+ # compiler, it is considered special, and multiple
+ # occurrences thereof are not removed. Compare this
+ # with having the same library being listed as a
+ # dependency of multiple other libraries: in this case,
+ # we know (pedantically, we assume) the library does not
+ # need to be listed more than once, so we keep only the
+ # last copy. This is not always right, but it is rare
+ # enough that we require users that really mean to play
+ # such unportable linking tricks to link the library
+ # using -Wl,-lname, so that libtool does not consider it
+ # for duplicate removal.
+ case " $specialdeplibs " in
+ *" $deplib "*) new_libs="$deplib $new_libs" ;;
+ *)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$deplib $new_libs" ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ done
+ tmp_libs=
+ for deplib in $new_libs; do
+ case $deplib in
+ -L*)
+ case " $tmp_libs " in
+ *" $deplib "*) ;;
+ *) tmp_libs="$tmp_libs $deplib" ;;
+ esac
+ ;;
+ *) tmp_libs="$tmp_libs $deplib" ;;
+ esac
+ done
+ eval $var=\"$tmp_libs\"
+ done # for var
+ fi
+ # Last step: remove runtime libs from dependency_libs
+ # (they stay in deplibs)
+ tmp_libs=
+ for i in $dependency_libs ; do
+ case " $predeps $postdeps $compiler_lib_search_path " in
+ *" $i "*)
+ i=""
+ ;;
+ esac
+ if test -n "$i" ; then
+ tmp_libs="$tmp_libs $i"
+ fi
+ done
+ dependency_libs=$tmp_libs
+ done # for pass
+ if test "$linkmode" = prog; then
+ dlfiles="$newdlfiles"
+ dlprefiles="$newdlprefiles"
+ fi
+
+ case $linkmode in
+ oldlib)
+ if test -n "$deplibs"; then
+ $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
+ fi
+
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
+ fi
+
+ if test -n "$rpath"; then
+ $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
+ fi
+
+ if test -n "$xrpath"; then
+ $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
+ fi
+
+ if test -n "$vinfo"; then
+ $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
+ fi
+
+ if test -n "$release"; then
+ $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
+ fi
+
+ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+ $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
+ fi
+
+ # Now set the variables for building old libraries.
+ build_libtool_libs=no
+ oldlibs="$output"
+ objs="$objs$old_deplibs"
+ ;;
+
+ lib)
+ # Make sure we only generate libraries of the form `libNAME.la'.
+ case $outputname in
+ lib*)
+ name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ ;;
+ *)
+ if test "$module" = no; then
+ $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
+ $echo "$help" 1>&2
+ exit $EXIT_FAILURE
+ fi
+ if test "$need_lib_prefix" != no; then
+ # Add the "lib" prefix for modules if required
+ name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ else
+ libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+ fi
+ ;;
+ esac
+
+ if test -n "$objs"; then
+ if test "$deplibs_check_method" != pass_all; then
+ $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
+ exit $EXIT_FAILURE
+ else
+ $echo
+ $echo "*** Warning: Linking the shared library $output against the non-libtool"
+ $echo "*** objects $objs is not portable!"
+ libobjs="$libobjs $objs"
+ fi
+ fi
+
+ if test "$dlself" != no; then
+ $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
+ fi
+
+ set dummy $rpath
+ if test "$#" -gt 2; then
+ $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
+ fi
+ install_libdir="$2"
+
+ oldlibs=
+ if test -z "$rpath"; then
+ if test "$build_libtool_libs" = yes; then
+ # Building a libtool convenience library.
+ # Some compilers have problems with a `.al' extension so
+ # convenience libraries should have the same extension an
+ # archive normally would.
+ oldlibs="$output_objdir/$libname.$libext $oldlibs"
+ build_libtool_libs=convenience
+ build_old_libs=yes
+ fi
+
+ if test -n "$vinfo"; then
+ $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
+ fi
+
+ if test -n "$release"; then
+ $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
+ fi
+ else
+
+ # Parse the version information argument.
+ save_ifs="$IFS"; IFS=':'
+ set dummy $vinfo 0 0 0
+ IFS="$save_ifs"
+
+ if test -n "$8"; then
+ $echo "$modename: too many parameters to \`-version-info'" 1>&2
+ $echo "$help" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ # convert absolute version numbers to libtool ages
+ # this retains compatibility with .la files and attempts
+ # to make the code below a bit more comprehensible
+
+ case $vinfo_number in
+ yes)
+ number_major="$2"
+ number_minor="$3"
+ number_revision="$4"
+ #
+ # There are really only two kinds -- those that
+ # use the current revision as the major version
+ # and those that subtract age and use age as
+ # a minor version. But, then there is irix
+ # which has an extra 1 added just for fun
+ #
+ case $version_type in
+ darwin|linux|osf|windows)
+ current=`expr $number_major + $number_minor`
+ age="$number_minor"
+ revision="$number_revision"
+ ;;
+ freebsd-aout|freebsd-elf|sunos)
+ current="$number_major"
+ revision="$number_minor"
+ age="0"
+ ;;
+ irix|nonstopux)
+ current=`expr $number_major + $number_minor - 1`
+ age="$number_minor"
+ revision="$number_minor"
+ ;;
+ esac
+ ;;
+ no)
+ current="$2"
+ revision="$3"
+ age="$4"
+ ;;
+ esac
+
+ # Check that each of the things are valid numbers.
+ case $current in
+ [0-9]*) ;;
+ *)
+ $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+ exit $EXIT_FAILURE
+ ;;
+ esac
+
+ case $revision in
+ [0-9]*) ;;
+ *)
+ $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+ exit $EXIT_FAILURE
+ ;;
+ esac
+
+ case $age in
+ [0-9]*) ;;
+ *)
+ $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+ exit $EXIT_FAILURE
+ ;;
+ esac
+
+ if test "$age" -gt "$current"; then
+ $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ # Calculate the version variables.
+ major=
+ versuffix=
+ verstring=
+ case $version_type in
+ none) ;;
+
+ darwin)
+ # Like Linux, but with the current version available in
+ # verstring for coding it into the library header
+ major=.`expr $current - $age`
+ versuffix="$major.$age.$revision"
+ # Darwin ld doesn't like 0 for these options...
+ minor_current=`expr $current + 1`
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ ;;
+
+ freebsd-aout)
+ major=".$current"
+ versuffix=".$current.$revision";
+ ;;
+
+ freebsd-elf)
+ major=".$current"
+ versuffix=".$current";
+ ;;
+
+ irix | nonstopux)
+ major=`expr $current - $age + 1`
+
+ case $version_type in
+ nonstopux) verstring_prefix=nonstopux ;;
+ *) verstring_prefix=sgi ;;
+ esac
+ verstring="$verstring_prefix$major.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$revision
+ while test "$loop" -ne 0; do
+ iface=`expr $revision - $loop`
+ loop=`expr $loop - 1`
+ verstring="$verstring_prefix$major.$iface:$verstring"
+ done
+
+ # Before this point, $major must not contain `.'.
+ major=.$major
+ versuffix="$major.$revision"
+ ;;
+
+ linux)
+ major=.`expr $current - $age`
+ versuffix="$major.$age.$revision"
+ ;;
+
+ osf)
+ major=.`expr $current - $age`
+ versuffix=".$current.$age.$revision"
+ verstring="$current.$age.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$age
+ while test "$loop" -ne 0; do
+ iface=`expr $current - $loop`
+ loop=`expr $loop - 1`
+ verstring="$verstring:${iface}.0"
+ done
+
+ # Make executables depend on our current version.
+ verstring="$verstring:${current}.0"
+ ;;
+
+ sunos)
+ major=".$current"
+ versuffix=".$current.$revision"
+ ;;
+
+ windows)
+ # Use '-' rather than '.', since we only want one
+ # extension on DOS 8.3 filesystems.
+ major=`expr $current - $age`
+ versuffix="-$major"
+ ;;
+
+ *)
+ $echo "$modename: unknown library version type \`$version_type'" 1>&2
+ $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
+ exit $EXIT_FAILURE
+ ;;
+ esac
+
+ # Clear the version info if we defaulted, and they specified a release.
+ if test -z "$vinfo" && test -n "$release"; then
+ major=
+ case $version_type in
+ darwin)
+ # we can't check for "0.0" in archive_cmds due to quoting
+ # problems, so we reset it completely
+ verstring=
+ ;;
+ *)
+ verstring="0.0"
+ ;;
+ esac
+ if test "$need_version" = no; then
+ versuffix=
+ else
+ versuffix=".0.0"
+ fi
+ fi
+
+ # Remove version info from name if versioning should be avoided
+ if test "$avoid_version" = yes && test "$need_version" = no; then
+ major=
+ versuffix=
+ verstring=""
+ fi
+
+ # Check to see if the archive will have undefined symbols.
+ if test "$allow_undefined" = yes; then
+ if test "$allow_undefined_flag" = unsupported; then
+ $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
+ build_libtool_libs=no
+ build_old_libs=yes
+ fi
+ else
+ # Don't allow undefined symbols.
+ allow_undefined_flag="$no_undefined_flag"
+ fi
+ fi
+
+ if test "$mode" != relink; then
+ # Remove our outputs, but don't remove object files since they
+ # may have been created when compiling PIC objects.
+ removelist=
+ tempremovelist=`$echo "$output_objdir/*"`
+ for p in $tempremovelist; do
+ case $p in
+ *.$objext)
+ ;;
+ $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+ if test "X$precious_files_regex" != "X"; then
+ if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+ then
+ continue
+ fi
+ fi
+ removelist="$removelist $p"
+ ;;
+ *) ;;
+ esac
+ done
+ if test -n "$removelist"; then
+ $show "${rm}r $removelist"
+ $run ${rm}r $removelist
+ fi
+ fi
+
+ # Now set the variables for building old libraries.
+ if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+ oldlibs="$oldlibs $output_objdir/$libname.$libext"
+
+ # Transform .lo files to .o files.
+ oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+ fi
+
+ # Eliminate all temporary directories.
+ for path in $notinst_path; do
+ lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
+ deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
+ dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
+ done
+
+ if test -n "$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ temp_xrpath=
+ for libdir in $xrpath; do
+ temp_xrpath="$temp_xrpath -R$libdir"
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir" ;;
+ esac
+ done
+ if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+ dependency_libs="$temp_xrpath $dependency_libs"
+ fi
+ fi
+
+ # Make sure dlfiles contains only unique files that won't be dlpreopened
+ old_dlfiles="$dlfiles"
+ dlfiles=
+ for lib in $old_dlfiles; do
+ case " $dlprefiles $dlfiles " in
+ *" $lib "*) ;;
+ *) dlfiles="$dlfiles $lib" ;;
+ esac
+ done
+
+ # Make sure dlprefiles contains only unique files
+ old_dlprefiles="$dlprefiles"
+ dlprefiles=
+ for lib in $old_dlprefiles; do
+ case "$dlprefiles " in
+ *" $lib "*) ;;
+ *) dlprefiles="$dlprefiles $lib" ;;
+ esac
+ done
+
+ if test "$build_libtool_libs" = yes; then
+ if test -n "$rpath"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
+ # these systems don't actually have a c library (as such)!
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C library is in the System framework
+ deplibs="$deplibs -framework System"
+ ;;
+ *-*-netbsd*)
+ # Don't link with libc until the a.out ld.so is fixed.
+ ;;
+ *-*-openbsd* | *-*-freebsd*)
+ # Do not include libc due to us having libc/libc_r.
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *)
+ # Add libc to deplibs on all other systems if necessary.
+ if test "$build_libtool_need_lc" = "yes"; then
+ deplibs="$deplibs -lc"
+ fi
+ ;;
+ esac
+ fi
+
+ # Transform deplibs into only deplibs that can be linked in shared.
+ name_save=$name
+ libname_save=$libname
+ release_save=$release
+ versuffix_save=$versuffix
+ major_save=$major
+ # I'm not sure if I'm treating the release correctly. I think
+ # release should show up in the -l (ie -lgmp5) so we don't want to
+ # add it in twice. Is that correct?
+ release=""
+ versuffix=""
+ major=""
+ newdeplibs=
+ droppeddeps=no
+ case $deplibs_check_method in
+ pass_all)
+ # Don't check for shared/static. Everything works.
+ # This might be a little naive. We might want to check
+ # whether the library exists or not. But this is on
+ # osf3 & osf4 and I'm not really sure... Just
+ # implementing what was already the behavior.
+ newdeplibs=$deplibs
+ ;;
+ test_compile)
+ # This code stresses the "libraries are programs" paradigm to its
+ # limits. Maybe even breaks it. We compile a program, linking it
+ # against the deplibs as a proxy for the library. Then we can check
+ # whether they linked in statically or dynamically with ldd.
+ $rm conftest.c
+ cat > conftest.c <<EOF
+ int main() { return 0; }
+EOF
+ $rm conftest
+ $LTCC -o conftest conftest.c $deplibs
+ if test "$?" -eq 0 ; then
+ ldd_output=`ldd conftest`
+ for i in $deplibs; do
+ name="`expr $i : '-l\(.*\)'`"
+ # If $name is empty we are operating on a -L argument.
+ if test "$name" != "" && test "$name" -ne "0"; then
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ newdeplibs="$newdeplibs $i"
+ i=""
+ ;;
+ esac
+ fi
+ if test -n "$i" ; then
+ libname=`eval \\$echo \"$libname_spec\"`
+ deplib_matches=`eval \\$echo \"$library_names_spec\"`
+ set dummy $deplib_matches
+ deplib_match=$2
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs="$newdeplibs $i"
+ else
+ droppeddeps=yes
+ $echo
+ $echo "*** Warning: dynamic linker does not accept needed library $i."
+ $echo "*** I have the capability to make that library automatically link in when"
+ $echo "*** you link to this library. But I can only do this if you have a"
+ $echo "*** shared version of the library, which I believe you do not have"
+ $echo "*** because a test_compile did reveal that the linker did not use it for"
+ $echo "*** its dynamic dependency list that programs get resolved with at runtime."
+ fi
+ fi
+ else
+ newdeplibs="$newdeplibs $i"
+ fi
+ done
+ else
+ # Error occurred in the first compile. Let's try to salvage
+ # the situation: Compile a separate program for each library.
+ for i in $deplibs; do
+ name="`expr $i : '-l\(.*\)'`"
+ # If $name is empty we are operating on a -L argument.
+ if test "$name" != "" && test "$name" != "0"; then
+ $rm conftest
+ $LTCC -o conftest conftest.c $i
+ # Did it work?
+ if test "$?" -eq 0 ; then
+ ldd_output=`ldd conftest`
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ newdeplibs="$newdeplibs $i"
+ i=""
+ ;;
+ esac
+ fi
+ if test -n "$i" ; then
+ libname=`eval \\$echo \"$libname_spec\"`
+ deplib_matches=`eval \\$echo \"$library_names_spec\"`
+ set dummy $deplib_matches
+ deplib_match=$2
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs="$newdeplibs $i"
+ else
+ droppeddeps=yes
+ $echo
+ $echo "*** Warning: dynamic linker does not accept needed library $i."
+ $echo "*** I have the capability to make that library automatically link in when"
+ $echo "*** you link to this library. But I can only do this if you have a"
+ $echo "*** shared version of the library, which you do not appear to have"
+ $echo "*** because a test_compile did reveal that the linker did not use this one"
+ $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
+ fi
+ fi
+ else
+ droppeddeps=yes
+ $echo
+ $echo "*** Warning! Library $i is needed by this library but I was not able to"
+ $echo "*** make it link in! You will probably need to install it or some"
+ $echo "*** library that it depends on before this library will be fully"
+ $echo "*** functional. Installing it before continuing would be even better."
+ fi
+ else
+ newdeplibs="$newdeplibs $i"
+ fi
+ done
+ fi
+ ;;
+ file_magic*)
+ set dummy $deplibs_check_method
+ file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+ for a_deplib in $deplibs; do
+ name="`expr $a_deplib : '-l\(.*\)'`"
+ # If $name is empty we are operating on a -L argument.
+ if test "$name" != "" && test "$name" != "0"; then
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib" ; then
+ libname=`eval \\$echo \"$libname_spec\"`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ # Follow soft links.
+ if ls -lLd "$potent_lib" 2>/dev/null \
+ | grep " -> " >/dev/null; then
+ continue
+ fi
+ # The statement above tries to avoid entering an
+ # endless loop below, in case of cyclic links.
+ # We might still enter an endless loop, since a link
+ # loop can be closed while we follow links,
+ # but so what?
+ potlib="$potent_lib"
+ while test -h "$potlib" 2>/dev/null; do
+ potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
+ case $potliblink in
+ [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+ *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+ esac
+ done
+ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
+ | ${SED} 10q \
+ | $EGREP "$file_magic_regex" > /dev/null; then
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib" ; then
+ droppeddeps=yes
+ $echo
+ $echo "*** Warning: linker path does not have real file for library $a_deplib."
+ $echo "*** I have the capability to make that library automatically link in when"
+ $echo "*** you link to this library. But I can only do this if you have a"
+ $echo "*** shared version of the library, which you do not appear to have"
+ $echo "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib" ; then
+ $echo "*** with $libname but no candidates were found. (...for file magic test)"
+ else
+ $echo "*** with $libname and none of the candidates passed a file format test"
+ $echo "*** using a file magic. Last file checked: $potlib"
+ fi
+ fi
+ else
+ # Add a -L argument.
+ newdeplibs="$newdeplibs $a_deplib"
+ fi
+ done # Gone through all deplibs.
+ ;;
+ match_pattern*)
+ set dummy $deplibs_check_method
+ match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+ for a_deplib in $deplibs; do
+ name="`expr $a_deplib : '-l\(.*\)'`"
+ # If $name is empty we are operating on a -L argument.
+ if test -n "$name" && test "$name" != "0"; then
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib" ; then
+ libname=`eval \\$echo \"$libname_spec\"`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ potlib="$potent_lib" # see symlink-check above in file_magic test
+ if eval $echo \"$potent_lib\" 2>/dev/null \
+ | ${SED} 10q \
+ | $EGREP "$match_pattern_regex" > /dev/null; then
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib" ; then
+ droppeddeps=yes
+ $echo
+ $echo "*** Warning: linker path does not have real file for library $a_deplib."
+ $echo "*** I have the capability to make that library automatically link in when"
+ $echo "*** you link to this library. But I can only do this if you have a"
+ $echo "*** shared version of the library, which you do not appear to have"
+ $echo "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib" ; then
+ $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
+ else
+ $echo "*** with $libname and none of the candidates passed a file format test"
+ $echo "*** using a regex pattern. Last file checked: $potlib"
+ fi
+ fi
+ else
+ # Add a -L argument.
+ newdeplibs="$newdeplibs $a_deplib"
+ fi
+ done # Gone through all deplibs.
+ ;;
+ none | unknown | *)
+ newdeplibs=""
+ tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
+ -e 's/ -[LR][^ ]*//g'`
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ for i in $predeps $postdeps ; do
+ # can't use Xsed below, because $i might contain '/'
+ tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
+ done
+ fi
+ if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \
+ | grep . >/dev/null; then
+ $echo
+ if test "X$deplibs_check_method" = "Xnone"; then
+ $echo "*** Warning: inter-library dependencies are not supported in this platform."
+ else
+ $echo "*** Warning: inter-library dependencies are not known to be supported."
+ fi
+ $echo "*** All declared inter-library dependencies are being dropped."
+ droppeddeps=yes
+ fi
+ ;;
+ esac
+ versuffix=$versuffix_save
+ major=$major_save
+ release=$release_save
+ libname=$libname_save
+ name=$name_save
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library is the System framework
+ newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
+ ;;
+ esac
+
+ if test "$droppeddeps" = yes; then
+ if test "$module" = yes; then
+ $echo
+ $echo "*** Warning: libtool could not satisfy all declared inter-library"
+ $echo "*** dependencies of module $libname. Therefore, libtool will create"
+ $echo "*** a static module, that should work as long as the dlopening"
+ $echo "*** application is linked with the -dlopen flag."
+ if test -z "$global_symbol_pipe"; then
+ $echo
+ $echo "*** However, this would only work if libtool was able to extract symbol"
+ $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ $echo "*** not find such a program. So, this module is probably useless."
+ $echo "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" = no; then
+ oldlibs="$output_objdir/$libname.$libext"
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ else
+ $echo "*** The inter-library dependencies that have been dropped here will be"
+ $echo "*** automatically added whenever a program is linked with this library"
+ $echo "*** or is declared to -dlopen it."
+
+ if test "$allow_undefined" = no; then
+ $echo
+ $echo "*** Since this library must not contain undefined symbols,"
+ $echo "*** because either the platform does not support them or"
+ $echo "*** it was explicitly requested with -no-undefined,"
+ $echo "*** libtool will only create a static version of it."
+ if test "$build_old_libs" = no; then
+ oldlibs="$output_objdir/$libname.$libext"
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ fi
+ fi
+ # Done checking deplibs!
+ deplibs=$newdeplibs
+ fi
+
+ # All the library-specific variables (install_libdir is set above).
+ library_names=
+ old_library=
+ dlname=
+
+ # Test again, we may have decided not to build it any more
+ if test "$build_libtool_libs" = yes; then
+ if test "$hardcode_into_libs" = yes; then
+ # Hardcode the library paths
+ hardcode_libdirs=
+ dep_rpath=
+ rpath="$finalize_rpath"
+ test "$mode" != relink && rpath="$compile_rpath$rpath"
+ for libdir in $rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ dep_rpath="$dep_rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) perm_rpath="$perm_rpath $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ if test -n "$hardcode_libdir_flag_spec_ld"; then
+ eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+ else
+ eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+ fi
+ fi
+ if test -n "$runpath_var" && test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+ fi
+ test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+ fi
+
+ shlibpath="$finalize_shlibpath"
+ test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+ if test -n "$shlibpath"; then
+ eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+ fi
+
+ # Get the real and link names of the library.
+ eval shared_ext=\"$shrext_cmds\"
+ eval library_names=\"$library_names_spec\"
+ set dummy $library_names
+ realname="$2"
+ shift; shift
+
+ if test -n "$soname_spec"; then
+ eval soname=\"$soname_spec\"
+ else
+ soname="$realname"
+ fi
+ if test -z "$dlname"; then
+ dlname=$soname
+ fi
+
+ lib="$output_objdir/$realname"
+ for link
+ do
+ linknames="$linknames $link"
+ done
+
+ # Use standard objects if they are pic
+ test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+ $show "generating symbol list for \`$libname.la'"
+ export_symbols="$output_objdir/$libname.exp"
+ $run $rm $export_symbols
+ cmds=$export_symbols_cmds
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ eval cmd=\"$cmd\"
+ if len=`expr "X$cmd" : ".*"` &&
+ test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ skipped_export=false
+ else
+ # The command line is too long to execute in one step.
+ $show "using reloadable object file for export list..."
+ skipped_export=:
+ fi
+ done
+ IFS="$save_ifs"
+ if test -n "$export_symbols_regex"; then
+ $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
+ $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ $show "$mv \"${export_symbols}T\" \"$export_symbols\""
+ $run eval '$mv "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+ fi
+
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
+ fi
+
+ tmp_deplibs=
+ inst_prefix_arg=
+ for test_deplib in $deplibs; do
+ case " $convenience " in
+ *" $test_deplib "*) ;;
+ *)
+ if test -n "$inst_prefix_dir" && (echo "$test_deplib" | grep -- "$inst_prefix_dir" >/dev/null); then
+ inst_prefix_arg="$test_deplib"
+ else
+ tmp_deplibs="$tmp_deplibs $test_deplib"
+ fi
+ ;;
+ esac
+ done
+ deplibs="$tmp_deplibs"
+ if test -n "$inst_prefix_arg"; then
+ deplibs="$inst_prefix_arg $deplibs"
+ fi
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ else
+ gentop="$output_objdir/${outputname}x"
+ $show "${rm}r $gentop"
+ $run ${rm}r "$gentop"
+ $show "$mkdir $gentop"
+ $run $mkdir "$gentop"
+ status=$?
+ if test "$status" -ne 0 && test ! -d "$gentop"; then
+ exit $status
+ fi
+ generated="$generated $gentop"
+
+ for xlib in $convenience; do
+ # Extract the objects.
+ case $xlib in
+ [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
+ *) xabs=`pwd`"/$xlib" ;;
+ esac
+ xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+ xdir="$gentop/$xlib"
+
+ $show "${rm}r $xdir"
+ $run ${rm}r "$xdir"
+ $show "$mkdir $xdir"
+ $run $mkdir "$xdir"
+ status=$?
+ if test "$status" -ne 0 && test ! -d "$xdir"; then
+ exit $status
+ fi
+ # We will extract separately just the conflicting names and we will no
+ # longer touch any unique names. It is faster to leave these extract
+ # automatically by $AR in one run.
+ $show "(cd $xdir && $AR x $xabs)"
+ $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+ if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
+ $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
+ $AR t "$xabs" | sort | uniq -cd | while read -r count name
+ do
+ i=1
+ while test "$i" -le "$count"
+ do
+ # Put our $i before any first dot (extension)
+ # Never overwrite any file
+ name_to="$name"
+ while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
+ do
+ name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
+ done
+ $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
+ $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
+ i=`expr $i + 1`
+ done
+ done
+ fi
+
+ libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+ done
+ fi
+ fi
+
+ if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+ eval flag=\"$thread_safe_flag_spec\"
+ linker_flags="$linker_flags $flag"
+ fi
+
+ # Make a backup of the uninstalled library when relinking
+ if test "$mode" = relink; then
+ $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
+ fi
+
+ # Do each of the archive commands.
+ if test "$module" = yes && test -n "$module_cmds" ; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ eval test_cmds=\"$module_expsym_cmds\"
+ cmds=$module_expsym_cmds
+ else
+ eval test_cmds=\"$module_cmds\"
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ eval test_cmds=\"$archive_expsym_cmds\"
+ cmds=$archive_expsym_cmds
+ else
+ eval test_cmds=\"$archive_cmds\"
+ cmds=$archive_cmds
+ fi
+ fi
+
+ if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` &&
+ test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ :
+ else
+ # The command line is too long to link in one step, link piecewise.
+ $echo "creating reloadable object files..."
+
+ # Save the value of $output and $libobjs because we want to
+ # use them later. If we have whole_archive_flag_spec, we
+ # want to use save_libobjs as it was before
+ # whole_archive_flag_spec was expanded, because we can't
+ # assume the linker understands whole_archive_flag_spec.
+ # This may have to be revisited, in case too many
+ # convenience libraries get linked in and end up exceeding
+ # the spec.
+ if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ fi
+ save_output=$output
+
+ # Clear the reloadable object creation command queue and
+ # initialize k to one.
+ test_cmds=
+ concat_cmds=
+ objlist=
+ delfiles=
+ last_robj=
+ k=1
+ output=$output_objdir/$save_output-${k}.$objext
+ # Loop over the list of objects to be linked.
+ for obj in $save_libobjs
+ do
+ eval test_cmds=\"$reload_cmds $objlist $last_robj\"
+ if test "X$objlist" = X ||
+ { len=`expr "X$test_cmds" : ".*"` &&
+ test "$len" -le "$max_cmd_len"; }; then
+ objlist="$objlist $obj"
+ else
+ # The command $test_cmds is almost too long, add a
+ # command to the queue.
+ if test "$k" -eq 1 ; then
+ # The first file doesn't have a previous command to add.
+ eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
+ else
+ # All subsequent reloadable object files will link in
+ # the last one created.
+ eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
+ fi
+ last_robj=$output_objdir/$save_output-${k}.$objext
+ k=`expr $k + 1`
+ output=$output_objdir/$save_output-${k}.$objext
+ objlist=$obj
+ len=1
+ fi
+ done
+ # Handle the remaining objects by creating one last
+ # reloadable object file. All subsequent reloadable object
+ # files will link in the last one created.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
+
+ if ${skipped_export-false}; then
+ $show "generating symbol list for \`$libname.la'"
+ export_symbols="$output_objdir/$libname.exp"
+ $run $rm $export_symbols
+ libobjs=$output
+ # Append the command to create the export file.
+ eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
+ fi
+
+ # Set up a command to remove the reloadale object files
+ # after they are used.
+ i=0
+ while test "$i" -lt "$k"
+ do
+ i=`expr $i + 1`
+ delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
+ done
+
+ $echo "creating a temporary reloadable object file: $output"
+
+ # Loop through the commands generated above and execute them.
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $concat_cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+
+ libobjs=$output
+ # Restore the value of output.
+ output=$save_output
+
+ if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ fi
+ # Expand the library linking commands again to reset the
+ # value of $libobjs for piecewise linking.
+
+ # Do each of the archive commands.
+ if test "$module" = yes && test -n "$module_cmds" ; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ cmds=$module_expsym_cmds
+ else
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ cmds=$archive_expsym_cmds
+ else
+ cmds=$archive_cmds
+ fi
+ fi
+
+ # Append the command to remove the reloadable object files
+ # to the just-reset $cmds.
+ eval cmds=\"\$cmds~\$rm $delfiles\"
+ fi
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ eval cmd=\"$cmd\"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+
+ # Restore the uninstalled library and exit
+ if test "$mode" = relink; then
+ $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
+ exit $EXIT_SUCCESS
+ fi
+
+ # Create links to the real library.
+ for linkname in $linknames; do
+ if test "$realname" != "$linkname"; then
+ $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
+ $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
+ fi
+ done
+
+ # If -module or -export-dynamic was specified, set the dlname.
+ if test "$module" = yes || test "$export_dynamic" = yes; then
+ # On all known operating systems, these are identical.
+ dlname="$soname"
+ fi
+ fi
+ ;;
+
+ obj)
+ if test -n "$deplibs"; then
+ $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
+ fi
+
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
+ fi
+
+ if test -n "$rpath"; then
+ $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
+ fi
+
+ if test -n "$xrpath"; then
+ $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
+ fi
+
+ if test -n "$vinfo"; then
+ $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
+ fi
+
+ if test -n "$release"; then
+ $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
+ fi
+
+ case $output in
+ *.lo)
+ if test -n "$objs$old_deplibs"; then
+ $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
+ exit $EXIT_FAILURE
+ fi
+ libobj="$output"
+ obj=`$echo "X$output" | $Xsed -e "$lo2o"`
+ ;;
+ *)
+ libobj=
+ obj="$output"
+ ;;
+ esac
+
+ # Delete the old objects.
+ $run $rm $obj $libobj
+
+ # Objects from convenience libraries. This assumes
+ # single-version convenience libraries. Whenever we create
+ # different ones for PIC/non-PIC, this we'll have to duplicate
+ # the extraction.
+ reload_conv_objs=
+ gentop=
+ # reload_cmds runs $LD directly, so let us get rid of
+ # -Wl from whole_archive_flag_spec
+ wl=
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec"; then
+ eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
+ else
+ gentop="$output_objdir/${obj}x"
+ $show "${rm}r $gentop"
+ $run ${rm}r "$gentop"
+ $show "$mkdir $gentop"
+ $run $mkdir "$gentop"
+ status=$?
+ if test "$status" -ne 0 && test ! -d "$gentop"; then
+ exit $status
+ fi
+ generated="$generated $gentop"
+
+ for xlib in $convenience; do
+ # Extract the objects.
+ case $xlib in
+ [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
+ *) xabs=`pwd`"/$xlib" ;;
+ esac
+ xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+ xdir="$gentop/$xlib"
+
+ $show "${rm}r $xdir"
+ $run ${rm}r "$xdir"
+ $show "$mkdir $xdir"
+ $run $mkdir "$xdir"
+ status=$?
+ if test "$status" -ne 0 && test ! -d "$xdir"; then
+ exit $status
+ fi
+ # We will extract separately just the conflicting names and we will no
+ # longer touch any unique names. It is faster to leave these extract
+ # automatically by $AR in one run.
+ $show "(cd $xdir && $AR x $xabs)"
+ $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+ if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
+ $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
+ $AR t "$xabs" | sort | uniq -cd | while read -r count name
+ do
+ i=1
+ while test "$i" -le "$count"
+ do
+ # Put our $i before any first dot (extension)
+ # Never overwrite any file
+ name_to="$name"
+ while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
+ do
+ name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
+ done
+ $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
+ $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
+ i=`expr $i + 1`
+ done
+ done
+ fi
+
+ reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+ done
+ fi
+ fi
+
+ # Create the old-style object.
+ reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+
+ output="$obj"
+ cmds=$reload_cmds
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ eval cmd=\"$cmd\"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+
+ # Exit if we aren't doing a library object file.
+ if test -z "$libobj"; then
+ if test -n "$gentop"; then
+ $show "${rm}r $gentop"
+ $run ${rm}r $gentop
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ if test "$build_libtool_libs" != yes; then
+ if test -n "$gentop"; then
+ $show "${rm}r $gentop"
+ $run ${rm}r $gentop
+ fi
+
+ # Create an invalid libtool object if no PIC, so that we don't
+ # accidentally link it into a program.
+ # $show "echo timestamp > $libobj"
+ # $run eval "echo timestamp > $libobj" || exit $?
+ exit $EXIT_SUCCESS
+ fi
+
+ if test -n "$pic_flag" || test "$pic_mode" != default; then
+ # Only do commands if we really have different PIC objects.
+ reload_objs="$libobjs $reload_conv_objs"
+ output="$libobj"
+ cmds=$reload_cmds
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ eval cmd=\"$cmd\"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ fi
+
+ if test -n "$gentop"; then
+ $show "${rm}r $gentop"
+ $run ${rm}r $gentop
+ fi
+
+ exit $EXIT_SUCCESS
+ ;;
+
+ prog)
+ case $host in
+ *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
+ esac
+ if test -n "$vinfo"; then
+ $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
+ fi
+
+ if test -n "$release"; then
+ $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
+ fi
+
+ if test "$preload" = yes; then
+ if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
+ test "$dlopen_self_static" = unknown; then
+ $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
+ fi
+ fi
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library is the System framework
+ compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
+ finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
+ ;;
+ esac
+
+ case $host in
+ *darwin*)
+ # Don't allow lazy linking, it breaks C++ global constructors
+ if test "$tagname" = CXX ; then
+ compile_command="$compile_command ${wl}-bind_at_load"
+ finalize_command="$finalize_command ${wl}-bind_at_load"
+ fi
+ ;;
+ esac
+
+ compile_command="$compile_command $compile_deplibs"
+ finalize_command="$finalize_command $finalize_deplibs"
+
+ if test -n "$rpath$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ for libdir in $rpath $xrpath; do
+ # This is the magic to use -rpath.
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir" ;;
+ esac
+ done
+ fi
+
+ # Now hardcode the library paths
+ rpath=
+ hardcode_libdirs=
+ for libdir in $compile_rpath $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ rpath="$rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) perm_rpath="$perm_rpath $libdir" ;;
+ esac
+ fi
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ case :$dllsearchpath: in
+ *":$libdir:"*) ;;
+ *) dllsearchpath="$dllsearchpath:$libdir";;
+ esac
+ ;;
+ esac
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ compile_rpath="$rpath"
+
+ rpath=
+ hardcode_libdirs=
+ for libdir in $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ rpath="$rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$finalize_perm_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ finalize_rpath="$rpath"
+
+ if test -n "$libobjs" && test "$build_old_libs" = yes; then
+ # Transform all the library objects into standard objects.
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ fi
+
+ dlsyms=
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ if test -n "$NM" && test -n "$global_symbol_pipe"; then
+ dlsyms="${outputname}S.c"
+ else
+ $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
+ fi
+ fi
+
+ if test -n "$dlsyms"; then
+ case $dlsyms in
+ "") ;;
+ *.c)
+ # Discover the nlist of each of the dlfiles.
+ nlist="$output_objdir/${outputname}.nm"
+
+ $show "$rm $nlist ${nlist}S ${nlist}T"
+ $run $rm "$nlist" "${nlist}S" "${nlist}T"
+
+ # Parse the name list into a source file.
+ $show "creating $output_objdir/$dlsyms"
+
+ test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
+/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
+/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+/* Prevent the only kind of declaration conflicts we can make. */
+#define lt_preloaded_symbols some_other_symbol
+
+/* External symbol declarations for the compiler. */\
+"
+
+ if test "$dlself" = yes; then
+ $show "generating symbol list for \`$output'"
+
+ test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
+
+ # Add our own program objects to the symbol list.
+ progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ for arg in $progfiles; do
+ $show "extracting global C symbols from \`$arg'"
+ $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+ done
+
+ if test -n "$exclude_expsyms"; then
+ $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+ $run eval '$mv "$nlist"T "$nlist"'
+ fi
+
+ if test -n "$export_symbols_regex"; then
+ $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+ $run eval '$mv "$nlist"T "$nlist"'
+ fi
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ export_symbols="$output_objdir/$output.exp"
+ $run $rm $export_symbols
+ $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ else
+ $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
+ $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
+ $run eval 'mv "$nlist"T "$nlist"'
+ fi
+ fi
+
+ for arg in $dlprefiles; do
+ $show "extracting global C symbols from \`$arg'"
+ name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
+ $run eval '$echo ": $name " >> "$nlist"'
+ $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+ done
+
+ if test -z "$run"; then
+ # Make sure we have at least an empty file.
+ test -f "$nlist" || : > "$nlist"
+
+ if test -n "$exclude_expsyms"; then
+ $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+ $mv "$nlist"T "$nlist"
+ fi
+
+ # Try sorting and uniquifying the output.
+ if grep -v "^: " < "$nlist" |
+ if sort -k 3 </dev/null >/dev/null 2>&1; then
+ sort -k 3
+ else
+ sort +2
+ fi |
+ uniq > "$nlist"S; then
+ :
+ else
+ grep -v "^: " < "$nlist" > "$nlist"S
+ fi
+
+ if test -f "$nlist"S; then
+ eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
+ else
+ $echo '/* NONE */' >> "$output_objdir/$dlsyms"
+ fi
+
+ $echo >> "$output_objdir/$dlsyms" "\
+
+#undef lt_preloaded_symbols
+
+#if defined (__STDC__) && __STDC__
+# define lt_ptr void *
+#else
+# define lt_ptr char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+ const char *name;
+ lt_ptr address;
+}
+lt_preloaded_symbols[] =
+{\
+"
+
+ eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
+
+ $echo >> "$output_objdir/$dlsyms" "\
+ {0, (lt_ptr) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+ fi
+
+ pic_flag_for_symtable=
+ case $host in
+ # compiling the symbol table file with pic_flag works around
+ # a FreeBSD bug that causes programs to crash when -lm is
+ # linked before any other PIC object. But we must not use
+ # pic_flag when linking with -static. The problem exists in
+ # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+ *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+ case "$compile_command " in
+ *" -static "*) ;;
+ *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
+ esac;;
+ *-*-hpux*)
+ case "$compile_command " in
+ *" -static "*) ;;
+ *) pic_flag_for_symtable=" $pic_flag";;
+ esac
+ esac
+
+ # Now compile the dynamic symbol file.
+ $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
+ $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
+
+ # Clean up the generated files.
+ $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
+ $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
+
+ # Transform the symbol file into the correct name.
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ ;;
+ *)
+ $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
+ exit $EXIT_FAILURE
+ ;;
+ esac
+ else
+ # We keep going just in case the user didn't refer to
+ # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
+ # really was required.
+
+ # Nullify the symbol file.
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+ fi
+
+ if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+ # Replace the output file specification.
+ compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ link_command="$compile_command$compile_rpath"
+
+ # We have no uninstalled library dependencies, so finalize right now.
+ $show "$link_command"
+ $run eval "$link_command"
+ status=$?
+
+ # Delete the generated files.
+ if test -n "$dlsyms"; then
+ $show "$rm $output_objdir/${outputname}S.${objext}"
+ $run $rm "$output_objdir/${outputname}S.${objext}"
+ fi
+
+ exit $status
+ fi
+
+ if test -n "$shlibpath_var"; then
+ # We should set the shlibpath_var
+ rpath=
+ for dir in $temp_rpath; do
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*)
+ # Absolute path.
+ rpath="$rpath$dir:"
+ ;;
+ *)
+ # Relative path: add a thisdir entry.
+ rpath="$rpath\$thisdir/$dir:"
+ ;;
+ esac
+ done
+ temp_rpath="$rpath"
+ fi
+
+ if test -n "$compile_shlibpath$finalize_shlibpath"; then
+ compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+ fi
+ if test -n "$finalize_shlibpath"; then
+ finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+ fi
+
+ compile_var=
+ finalize_var=
+ if test -n "$runpath_var"; then
+ if test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ if test -n "$finalize_perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $finalize_perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ fi
+
+ if test "$no_install" = yes; then
+ # We don't need to create a wrapper script.
+ link_command="$compile_var$compile_command$compile_rpath"
+ # Replace the output file specification.
+ link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ # Delete the old output file.
+ $run $rm $output
+ # Link the executable and exit
+ $show "$link_command"
+ $run eval "$link_command" || exit $?
+ exit $EXIT_SUCCESS
+ fi
+
+ if test "$hardcode_action" = relink; then
+ # Fast installation is not supported
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+ $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
+ $echo "$modename: \`$output' will be relinked during installation" 1>&2
+ else
+ if test "$fast_install" != no; then
+ link_command="$finalize_var$compile_command$finalize_rpath"
+ if test "$fast_install" = yes; then
+ relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+ else
+ # fast_install is set to needless
+ relink_command=
+ fi
+ else
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+ fi
+ fi
+
+ # Replace the output file specification.
+ link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+ # Delete the old output files.
+ $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+ $show "$link_command"
+ $run eval "$link_command" || exit $?
+
+ # Now create the wrapper script.
+ $show "creating $output"
+
+ # Quote the relink command for shipping.
+ if test -n "$relink_command"; then
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+ relink_command="$var=\"$var_value\"; export $var; $relink_command"
+ fi
+ done
+ relink_command="(cd `pwd`; $relink_command)"
+ relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ fi
+
+ # Quote $echo for shipping.
+ if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
+ case $progpath in
+ [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
+ *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
+ esac
+ qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
+ else
+ qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
+ fi
+
+ # Only actually do things if our run command is non-null.
+ if test -z "$run"; then
+ # win32 will think the script is a binary if it has
+ # a .exe suffix, so we strip it off here.
+ case $output in
+ *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
+ esac
+ # test for cygwin because mv fails w/o .exe extensions
+ case $host in
+ *cygwin*)
+ exeext=.exe
+ outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
+ *) exeext= ;;
+ esac
+ case $host in
+ *cygwin* | *mingw* )
+ cwrappersource=`$echo ${objdir}/lt-${output}.c`
+ cwrapper=`$echo ${output}.exe`
+ $rm $cwrappersource $cwrapper
+ trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+ cat > $cwrappersource <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+ Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+
+ The $output program cannot be directly executed until all the libtool
+ libraries that it depends on are installed.
+
+ This wrapper executable should never be moved out of the build directory.
+ If it is, it will not operate correctly.
+
+ Currently, it simply execs the wrapper *script* "/bin/sh $output",
+ but could eventually absorb all of the scripts functionality and
+ exec $objdir/$outputname directly.
+*/
+EOF
+ cat >> $cwrappersource<<"EOF"
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef DIR_SEPARATOR
+#define DIR_SEPARATOR '/'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+ defined (__OS2__)
+#define HAVE_DOS_BASED_FILE_SYSTEM
+#ifndef DIR_SEPARATOR_2
+#define DIR_SEPARATOR_2 '\\'
+#endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+ if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+const char *program_name = NULL;
+
+void * xmalloc (size_t num);
+char * xstrdup (const char *string);
+char * basename (const char *name);
+char * fnqualify(const char *path);
+char * strendzap(char *str, const char *pat);
+void lt_fatal (const char *message, ...);
+
+int
+main (int argc, char *argv[])
+{
+ char **newargz;
+ int i;
+
+ program_name = (char *) xstrdup ((char *) basename (argv[0]));
+ newargz = XMALLOC(char *, argc+2);
+EOF
+
+ cat >> $cwrappersource <<EOF
+ newargz[0] = "$SHELL";
+EOF
+
+ cat >> $cwrappersource <<"EOF"
+ newargz[1] = fnqualify(argv[0]);
+ /* we know the script has the same name, without the .exe */
+ /* so make sure newargz[1] doesn't end in .exe */
+ strendzap(newargz[1],".exe");
+ for (i = 1; i < argc; i++)
+ newargz[i+1] = xstrdup(argv[i]);
+ newargz[argc+1] = NULL;
+EOF
+
+ cat >> $cwrappersource <<EOF
+ execv("$SHELL",newargz);
+EOF
+
+ cat >> $cwrappersource <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+ void * p = (void *) malloc (num);
+ if (!p)
+ lt_fatal ("Memory exhausted");
+
+ return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+ return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
+;
+}
+
+char *
+basename (const char *name)
+{
+ const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ /* Skip over the disk name in MSDOS pathnames. */
+ if (isalpha (name[0]) && name[1] == ':')
+ name += 2;
+#endif
+
+ for (base = name; *name; name++)
+ if (IS_DIR_SEPARATOR (*name))
+ base = name + 1;
+ return (char *) base;
+}
+
+char *
+fnqualify(const char *path)
+{
+ size_t size;
+ char *p;
+ char tmp[LT_PATHMAX + 1];
+
+ assert(path != NULL);
+
+ /* Is it qualified already? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ if (isalpha (path[0]) && path[1] == ':')
+ return xstrdup (path);
+#endif
+ if (IS_DIR_SEPARATOR (path[0]))
+ return xstrdup (path);
+
+ /* prepend the current directory */
+ /* doesn't handle '~' */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal ("getcwd failed");
+ size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
+ p = XMALLOC(char, size);
+ sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
+ return p;
+}
+
+char *
+strendzap(char *str, const char *pat)
+{
+ size_t len, patlen;
+
+ assert(str != NULL);
+ assert(pat != NULL);
+
+ len = strlen(str);
+ patlen = strlen(pat);
+
+ if (patlen <= len)
+ {
+ str += len - patlen;
+ if (strcmp(str, pat) == 0)
+ *str = '\0';
+ }
+ return str;
+}
+
+static void
+lt_error_core (int exit_status, const char * mode,
+ const char * message, va_list ap)
+{
+ fprintf (stderr, "%s: %s: ", program_name, mode);
+ vfprintf (stderr, message, ap);
+ fprintf (stderr, ".\n");
+
+ if (exit_status >= 0)
+ exit (exit_status);
+}
+
+void
+lt_fatal (const char *message, ...)
+{
+ va_list ap;
+ va_start (ap, message);
+ lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
+ va_end (ap);
+}
+EOF
+ # we should really use a build-platform specific compiler
+ # here, but OTOH, the wrappers (shell script and this C one)
+ # are only useful if you want to execute the "real" binary.
+ # Since the "real" binary is built for $host, then this
+ # wrapper might as well be built for $host, too.
+ $run $LTCC -s -o $cwrapper $cwrappersource
+ ;;
+ esac
+ $rm $output
+ trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
+
+ $echo > $output "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='${SED} -e 1s/^X//'
+sed_quote_subst='$sed_quote_subst'
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+ # install mode needs the following variable:
+ notinst_deplibs='$notinst_deplibs'
+else
+ # When we are sourced in execute mode, \$file and \$echo are already set.
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ echo=\"$qecho\"
+ file=\"\$0\"
+ # Make sure echo works.
+ if test \"X\$1\" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+ elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
+ # Yippee, \$echo works!
+ :
+ else
+ # Restart under the correct shell, and then maybe \$echo will work.
+ exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
+ fi
+ fi\
+"
+ $echo >> $output "\
+
+ # Find the directory that this script lives in.
+ thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+ test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+ # Follow symbolic links until we get to the real thisdir.
+ file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
+ while test -n \"\$file\"; do
+ destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
+
+ # If there was a directory component, then change thisdir.
+ if test \"x\$destdir\" != \"x\$file\"; then
+ case \"\$destdir\" in
+ [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+ *) thisdir=\"\$thisdir/\$destdir\" ;;
+ esac
+ fi
+
+ file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
+ file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
+ done
+
+ # Try to get the absolute directory name.
+ absdir=\`cd \"\$thisdir\" && pwd\`
+ test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+ if test "$fast_install" = yes; then
+ $echo >> $output "\
+ program=lt-'$outputname'$exeext
+ progdir=\"\$thisdir/$objdir\"
+
+ if test ! -f \"\$progdir/\$program\" || \\
+ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
+ test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+ file=\"\$\$-\$program\"
+
+ if test ! -d \"\$progdir\"; then
+ $mkdir \"\$progdir\"
+ else
+ $rm \"\$progdir/\$file\"
+ fi"
+
+ $echo >> $output "\
+
+ # relink executable if necessary
+ if test -n \"\$relink_command\"; then
+ if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+ else
+ $echo \"\$relink_command_output\" >&2
+ $rm \"\$progdir/\$file\"
+ exit $EXIT_FAILURE
+ fi
+ fi
+
+ $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+ { $rm \"\$progdir/\$program\";
+ $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+ $rm \"\$progdir/\$file\"
+ fi"
+ else
+ $echo >> $output "\
+ program='$outputname'
+ progdir=\"\$thisdir/$objdir\"
+"
+ fi
+
+ $echo >> $output "\
+
+ if test -f \"\$progdir/\$program\"; then"
+
+ # Export our shlibpath_var if we have one.
+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ $echo >> $output "\
+ # Add our own library path to $shlibpath_var
+ $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+ # Some systems cannot cope with colon-terminated $shlibpath_var
+ # The second colon is a workaround for a bug in BeOS R4 sed
+ $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
+
+ export $shlibpath_var
+"
+ fi
+
+ # fixup the dll searchpath if we need to.
+ if test -n "$dllsearchpath"; then
+ $echo >> $output "\
+ # Add the dll search path components to the executable PATH
+ PATH=$dllsearchpath:\$PATH
+"
+ fi
+
+ $echo >> $output "\
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ # Run the actual program with our arguments.
+"
+ case $host in
+ # Backslashes separate directories on plain windows
+ *-*-mingw | *-*-os2*)
+ $echo >> $output "\
+ exec \$progdir\\\\\$program \${1+\"\$@\"}
+"
+ ;;
+
+ *)
+ $echo >> $output "\
+ exec \$progdir/\$program \${1+\"\$@\"}
+"
+ ;;
+ esac
+ $echo >> $output "\
+ \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
+ exit $EXIT_FAILURE
+ fi
+ else
+ # The program doesn't exist.
+ \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
+ \$echo \"This script is just a wrapper for \$program.\" 1>&2
+ $echo \"See the $PACKAGE documentation for more information.\" 1>&2
+ exit $EXIT_FAILURE
+ fi
+fi\
+"
+ chmod +x $output
+ fi
+ exit $EXIT_SUCCESS
+ ;;
+ esac
+
+ # See if we need to build an old-fashioned archive.
+ for oldlib in $oldlibs; do
+
+ if test "$build_libtool_libs" = convenience; then
+ oldobjs="$libobjs_save"
+ addlibs="$convenience"
+ build_libtool_libs=no
+ else
+ if test "$build_libtool_libs" = module; then
+ oldobjs="$libobjs_save"
+ build_libtool_libs=no
+ else
+ oldobjs="$old_deplibs $non_pic_objects"
+ fi
+ addlibs="$old_convenience"
+ fi
+
+ if test -n "$addlibs"; then
+ gentop="$output_objdir/${outputname}x"
+ $show "${rm}r $gentop"
+ $run ${rm}r "$gentop"
+ $show "$mkdir $gentop"
+ $run $mkdir "$gentop"
+ status=$?
+ if test "$status" -ne 0 && test ! -d "$gentop"; then
+ exit $status
+ fi
+ generated="$generated $gentop"
+
+ # Add in members from convenience archives.
+ for xlib in $addlibs; do
+ # Extract the objects.
+ case $xlib in
+ [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
+ *) xabs=`pwd`"/$xlib" ;;
+ esac
+ xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+ xdir="$gentop/$xlib"
+
+ $show "${rm}r $xdir"
+ $run ${rm}r "$xdir"
+ $show "$mkdir $xdir"
+ $run $mkdir "$xdir"
+ status=$?
+ if test "$status" -ne 0 && test ! -d "$xdir"; then
+ exit $status
+ fi
+ # We will extract separately just the conflicting names and we will no
+ # longer touch any unique names. It is faster to leave these extract
+ # automatically by $AR in one run.
+ $show "(cd $xdir && $AR x $xabs)"
+ $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+ if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
+ $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
+ $AR t "$xabs" | sort | uniq -cd | while read -r count name
+ do
+ i=1
+ while test "$i" -le "$count"
+ do
+ # Put our $i before any first dot (extension)
+ # Never overwrite any file
+ name_to="$name"
+ while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
+ do
+ name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
+ done
+ $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
+ $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
+ i=`expr $i + 1`
+ done
+ done
+ fi
+
+ oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
+ done
+ fi
+
+ # Do each command in the archive commands.
+ if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+ cmds=$old_archive_from_new_cmds
+ else
+ eval cmds=\"$old_archive_cmds\"
+
+ if len=`expr "X$cmds" : ".*"` &&
+ test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ cmds=$old_archive_cmds
+ else
+ # the command line is too long to link in one step, link in parts
+ $echo "using piecewise archive linking..."
+ save_RANLIB=$RANLIB
+ RANLIB=:
+ objlist=
+ concat_cmds=
+ save_oldobjs=$oldobjs
+ # GNU ar 2.10+ was changed to match POSIX; thus no paths are
+ # encoded into archives. This makes 'ar r' malfunction in
+ # this piecewise linking case whenever conflicting object
+ # names appear in distinct ar calls; check, warn and compensate.
+ if (for obj in $save_oldobjs
+ do
+ $echo "X$obj" | $Xsed -e 's%^.*/%%'
+ done | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
+ $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
+ AR_FLAGS=cq
+ fi
+ # Is there a better way of finding the last object in the list?
+ for obj in $save_oldobjs
+ do
+ last_oldobj=$obj
+ done
+ for obj in $save_oldobjs
+ do
+ oldobjs="$objlist $obj"
+ objlist="$objlist $obj"
+ eval test_cmds=\"$old_archive_cmds\"
+ if len=`expr "X$test_cmds" : ".*"` &&
+ test "$len" -le "$max_cmd_len"; then
+ :
+ else
+ # the above command should be used before it gets too long
+ oldobjs=$objlist
+ if test "$obj" = "$last_oldobj" ; then
+ RANLIB=$save_RANLIB
+ fi
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+ objlist=
+ fi
+ done
+ RANLIB=$save_RANLIB
+ oldobjs=$objlist
+ if test "X$oldobjs" = "X" ; then
+ eval cmds=\"\$concat_cmds\"
+ else
+ eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+ fi
+ fi
+ fi
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ eval cmd=\"$cmd\"
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ done
+
+ if test -n "$generated"; then
+ $show "${rm}r$generated"
+ $run ${rm}r$generated
+ fi
+
+ # Now create the libtool archive.
+ case $output in
+ *.la)
+ old_library=
+ test "$build_old_libs" = yes && old_library="$libname.$libext"
+ $show "creating $output"
+
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+ relink_command="$var=\"$var_value\"; export $var; $relink_command"
+ fi
+ done
+ # Quote the link command for shipping.
+ relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+ relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ if test "$hardcode_automatic" = yes ; then
+ relink_command=
+ fi
+
+
+ # Only create the output if not a dry run.
+ if test -z "$run"; then
+ for installed in no yes; do
+ if test "$installed" = yes; then
+ if test -z "$install_libdir"; then
+ break
+ fi
+ output="$output_objdir/$outputname"i
+ # Replace all uninstalled libtool libraries with the installed ones
+ newdependency_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ *.la)
+ name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ if test -z "$libdir"; then
+ $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+ exit $EXIT_FAILURE
+ fi
+ newdependency_libs="$newdependency_libs $libdir/$name"
+ ;;
+ *) newdependency_libs="$newdependency_libs $deplib" ;;
+ esac
+ done
+ dependency_libs="$newdependency_libs"
+ newdlfiles=
+ for lib in $dlfiles; do
+ name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ if test -z "$libdir"; then
+ $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+ exit $EXIT_FAILURE
+ fi
+ newdlfiles="$newdlfiles $libdir/$name"
+ done
+ dlfiles="$newdlfiles"
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ if test -z "$libdir"; then
+ $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+ exit $EXIT_FAILURE
+ fi
+ newdlprefiles="$newdlprefiles $libdir/$name"
+ done
+ dlprefiles="$newdlprefiles"
+ else
+ newdlfiles=
+ for lib in $dlfiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ newdlfiles="$newdlfiles $abs"
+ done
+ dlfiles="$newdlfiles"
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ newdlprefiles="$newdlprefiles $abs"
+ done
+ dlprefiles="$newdlprefiles"
+ fi
+ $rm $output
+ # place dlname in correct position for cygwin
+ tdlname=$dlname
+ case $host,$output,$installed,$module,$dlname in
+ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+ esac
+ $echo > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+ if test "$installed" = no && test "$need_relink" = yes; then
+ $echo >> $output "\
+relink_command=\"$relink_command\""
+ fi
+ done
+ fi
+
+ # Do a symbolic link so that the libtool archive can be found in
+ # LD_LIBRARY_PATH before the program is installed.
+ $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
+ $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
+ ;;
+ esac
+ exit $EXIT_SUCCESS
+ ;;
+
+ # libtool install mode
+ install)
+ modename="$modename: install"
+
+ # There may be an optional sh(1) argument at the beginning of
+ # install_prog (especially on Windows NT).
+ if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+ # Allow the use of GNU shtool's install command.
+ $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
+ # Aesthetically quote it.
+ arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ arg="\"$arg\""
+ ;;
+ esac
+ install_prog="$arg "
+ arg="$1"
+ shift
+ else
+ install_prog=
+ arg="$nonopt"
+ fi
+
+ # The real first argument should be the name of the installation program.
+ # Aesthetically quote it.
+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ arg="\"$arg\""
+ ;;
+ esac
+ install_prog="$install_prog$arg"
+
+ # We need to accept at least all the BSD install flags.
+ dest=
+ files=
+ opts=
+ prev=
+ install_type=
+ isdir=no
+ stripme=
+ for arg
+ do
+ if test -n "$dest"; then
+ files="$files $dest"
+ dest="$arg"
+ continue
+ fi
+
+ case $arg in
+ -d) isdir=yes ;;
+ -f) prev="-f" ;;
+ -g) prev="-g" ;;
+ -m) prev="-m" ;;
+ -o) prev="-o" ;;
+ -s)
+ stripme=" -s"
+ continue
+ ;;
+ -*) ;;
+
+ *)
+ # If the previous option needed an argument, then skip it.
+ if test -n "$prev"; then
+ prev=
+ else
+ dest="$arg"
+ continue
+ fi
+ ;;
+ esac
+
+ # Aesthetically quote the argument.
+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ arg="\"$arg\""
+ ;;
+ esac
+ install_prog="$install_prog $arg"
+ done
+
+ if test -z "$install_prog"; then
+ $echo "$modename: you must specify an install program" 1>&2
+ $echo "$help" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ if test -n "$prev"; then
+ $echo "$modename: the \`$prev' option requires an argument" 1>&2
+ $echo "$help" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ if test -z "$files"; then
+ if test -z "$dest"; then
+ $echo "$modename: no file or destination specified" 1>&2
+ else
+ $echo "$modename: you must specify a destination" 1>&2
+ fi
+ $echo "$help" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ # Strip any trailing slash from the destination.
+ dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
+
+ # Check to see that the destination is a directory.
+ test -d "$dest" && isdir=yes
+ if test "$isdir" = yes; then
+ destdir="$dest"
+ destname=
+ else
+ destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
+ test "X$destdir" = "X$dest" && destdir=.
+ destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
+
+ # Not a directory, so check to see that there is only one file specified.
+ set dummy $files
+ if test "$#" -gt 2; then
+ $echo "$modename: \`$dest' is not a directory" 1>&2
+ $echo "$help" 1>&2
+ exit $EXIT_FAILURE
+ fi
+ fi
+ case $destdir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ for file in $files; do
+ case $file in
+ *.lo) ;;
+ *)
+ $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
+ $echo "$help" 1>&2
+ exit $EXIT_FAILURE
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+
+ staticlibs=
+ future_libdirs=
+ current_libdirs=
+ for file in $files; do
+
+ # Do each installation.
+ case $file in
+ *.$libext)
+ # Do the static libraries later.
+ staticlibs="$staticlibs $file"
+ ;;
+
+ *.la)
+ # Check to see that this really is a libtool archive.
+ if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+ else
+ $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
+ $echo "$help" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ library_names=
+ old_library=
+ relink_command=
+ # If there is no directory component, then add one.
+ case $file in
+ */* | *\\*) . $file ;;
+ *) . ./$file ;;
+ esac
+
+ # Add the libdir to current_libdirs if it is the destination.
+ if test "X$destdir" = "X$libdir"; then
+ case "$current_libdirs " in
+ *" $libdir "*) ;;
+ *) current_libdirs="$current_libdirs $libdir" ;;
+ esac
+ else
+ # Note the libdir as a future libdir.
+ case "$future_libdirs " in
+ *" $libdir "*) ;;
+ *) future_libdirs="$future_libdirs $libdir" ;;
+ esac
+ fi
+
+ dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
+ test "X$dir" = "X$file/" && dir=
+ dir="$dir$objdir"
+
+ if test -n "$relink_command"; then
+ # Determine the prefix the user has applied to our future dir.
+ inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
+
+ # Don't allow the user to place us outside of our expected
+ # location b/c this prevents finding dependent libraries that
+ # are installed to the same prefix.
+ # At present, this check doesn't affect windows .dll's that
+ # are installed into $libdir/../bin (currently, that works fine)
+ # but it's something to keep an eye on.
+ if test "$inst_prefix_dir" = "$destdir"; then
+ $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ if test -n "$inst_prefix_dir"; then
+ # Stick the inst_prefix_dir data into the link command.
+ relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+ else
+ relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+ fi
+
+ $echo "$modename: warning: relinking \`$file'" 1>&2
+ $show "$relink_command"
+ if $run eval "$relink_command"; then :
+ else
+ $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+ exit $EXIT_FAILURE
+ fi
+ fi
+
+ # See the names of the shared library.
+ set dummy $library_names
+ if test -n "$2"; then
+ realname="$2"
+ shift
+ shift
+
+ srcname="$realname"
+ test -n "$relink_command" && srcname="$realname"T
+
+ # Install the shared library and build the symlinks.
+ $show "$install_prog $dir/$srcname $destdir/$realname"
+ $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
+ if test -n "$stripme" && test -n "$striplib"; then
+ $show "$striplib $destdir/$realname"
+ $run eval "$striplib $destdir/$realname" || exit $?
+ fi
+
+ if test "$#" -gt 0; then
+ # Delete the old symlinks, and create new ones.
+ for linkname
+ do
+ if test "$linkname" != "$realname"; then
+ $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+ $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+ fi
+ done
+ fi
+
+ # Do each command in the postinstall commands.
+ lib="$destdir/$realname"
+ cmds=$postinstall_cmds
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ eval cmd=\"$cmd\"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ fi
+
+ # Install the pseudo-library for information purposes.
+ name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+ instname="$dir/$name"i
+ $show "$install_prog $instname $destdir/$name"
+ $run eval "$install_prog $instname $destdir/$name" || exit $?
+
+ # Maybe install the static library, too.
+ test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+ ;;
+
+ *.lo)
+ # Install (i.e. copy) a libtool object.
+
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+ destfile="$destdir/$destfile"
+ fi
+
+ # Deduce the name of the destination old-style object file.
+ case $destfile in
+ *.lo)
+ staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
+ ;;
+ *.$objext)
+ staticdest="$destfile"
+ destfile=
+ ;;
+ *)
+ $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
+ $echo "$help" 1>&2
+ exit $EXIT_FAILURE
+ ;;
+ esac
+
+ # Install the libtool object if requested.
+ if test -n "$destfile"; then
+ $show "$install_prog $file $destfile"
+ $run eval "$install_prog $file $destfile" || exit $?
+ fi
+
+ # Install the old object if enabled.
+ if test "$build_old_libs" = yes; then
+ # Deduce the name of the old-style object file.
+ staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
+
+ $show "$install_prog $staticobj $staticdest"
+ $run eval "$install_prog \$staticobj \$staticdest" || exit $?
+ fi
+ exit $EXIT_SUCCESS
+ ;;
+
+ *)
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+ destfile="$destdir/$destfile"
+ fi
+
+ # If the file is missing, and there is a .exe on the end, strip it
+ # because it is most likely a libtool script we actually want to
+ # install
+ stripped_ext=""
+ case $file in
+ *.exe)
+ if test ! -f "$file"; then
+ file=`$echo $file|${SED} 's,.exe$,,'`
+ stripped_ext=".exe"
+ fi
+ ;;
+ esac
+
+ # Do a test to see if this is really a libtool program.
+ case $host in
+ *cygwin*|*mingw*)
+ wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
+ ;;
+ *)
+ wrapper=$file
+ ;;
+ esac
+ if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
+ notinst_deplibs=
+ relink_command=
+
+ # To insure that "foo" is sourced, and not "foo.exe",
+ # finese the cygwin/MSYS system by explicitly sourcing "foo."
+ # which disallows the automatic-append-.exe behavior.
+ case $build in
+ *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
+ *) wrapperdot=${wrapper} ;;
+ esac
+ # If there is no directory component, then add one.
+ case $file in
+ */* | *\\*) . ${wrapperdot} ;;
+ *) . ./${wrapperdot} ;;
+ esac
+
+ # Check the variables that should have been set.
+ if test -z "$notinst_deplibs"; then
+ $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ finalize=yes
+ for lib in $notinst_deplibs; do
+ # Check to see that each library is installed.
+ libdir=
+ if test -f "$lib"; then
+ # If there is no directory component, then add one.
+ case $lib in
+ */* | *\\*) . $lib ;;
+ *) . ./$lib ;;
+ esac
+ fi
+ libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
+ if test -n "$libdir" && test ! -f "$libfile"; then
+ $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
+ finalize=no
+ fi
+ done
+
+ relink_command=
+ # To insure that "foo" is sourced, and not "foo.exe",
+ # finese the cygwin/MSYS system by explicitly sourcing "foo."
+ # which disallows the automatic-append-.exe behavior.
+ case $build in
+ *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
+ *) wrapperdot=${wrapper} ;;
+ esac
+ # If there is no directory component, then add one.
+ case $file in
+ */* | *\\*) . ${wrapperdot} ;;
+ *) . ./${wrapperdot} ;;
+ esac
+
+ outputname=
+ if test "$fast_install" = no && test -n "$relink_command"; then
+ if test "$finalize" = yes && test -z "$run"; then
+ tmpdir="/tmp"
+ test -n "$TMPDIR" && tmpdir="$TMPDIR"
+ tmpdir="$tmpdir/libtool-$$"
+ save_umask=`umask`
+ umask 0077
+ if $mkdir "$tmpdir"; then
+ umask $save_umask
+ else
+ umask $save_umask
+ $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
+ continue
+ fi
+ file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
+ outputname="$tmpdir/$file"
+ # Replace the output file specification.
+ relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+
+ $show "$relink_command"
+ if $run eval "$relink_command"; then :
+ else
+ $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+ ${rm}r "$tmpdir"
+ continue
+ fi
+ file="$outputname"
+ else
+ $echo "$modename: warning: cannot relink \`$file'" 1>&2
+ fi
+ else
+ # Install the binary that we compiled earlier.
+ file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+ fi
+ fi
+
+ # remove .exe since cygwin /usr/bin/install will append another
+ # one anyways
+ case $install_prog,$host in
+ */usr/bin/install*,*cygwin*)
+ case $file:$destfile in
+ *.exe:*.exe)
+ # this is ok
+ ;;
+ *.exe:*)
+ destfile=$destfile.exe
+ ;;
+ *:*.exe)
+ destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
+ ;;
+ esac
+ ;;
+ esac
+ $show "$install_prog$stripme $file $destfile"
+ $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
+ test -n "$outputname" && ${rm}r "$tmpdir"
+ ;;
+ esac
+ done
+
+ for file in $staticlibs; do
+ name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+
+ # Set up the ranlib parameters.
+ oldlib="$destdir/$name"
+
+ $show "$install_prog $file $oldlib"
+ $run eval "$install_prog \$file \$oldlib" || exit $?
+
+ if test -n "$stripme" && test -n "$old_striplib"; then
+ $show "$old_striplib $oldlib"
+ $run eval "$old_striplib $oldlib" || exit $?
+ fi
+
+ # Do each command in the postinstall commands.
+ cmds=$old_postinstall_cmds
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ eval cmd=\"$cmd\"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ done
+
+ if test -n "$future_libdirs"; then
+ $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
+ fi
+
+ if test -n "$current_libdirs"; then
+ # Maybe just do a dry run.
+ test -n "$run" && current_libdirs=" -n$current_libdirs"
+ exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+ else
+ exit $EXIT_SUCCESS
+ fi
+ ;;
+
+ # libtool finish mode
+ finish)
+ modename="$modename: finish"
+ libdirs="$nonopt"
+ admincmds=
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ for dir
+ do
+ libdirs="$libdirs $dir"
+ done
+
+ for libdir in $libdirs; do
+ if test -n "$finish_cmds"; then
+ # Do each command in the finish commands.
+ cmds=$finish_cmds
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ eval cmd=\"$cmd\"
+ $show "$cmd"
+ $run eval "$cmd" || admincmds="$admincmds
+ $cmd"
+ done
+ IFS="$save_ifs"
+ fi
+ if test -n "$finish_eval"; then
+ # Do the single finish_eval.
+ eval cmds=\"$finish_eval\"
+ $run eval "$cmds" || admincmds="$admincmds
+ $cmds"
+ fi
+ done
+ fi
+
+ # Exit here if they wanted silent mode.
+ test "$show" = : && exit $EXIT_SUCCESS
+
+ $echo "----------------------------------------------------------------------"
+ $echo "Libraries have been installed in:"
+ for libdir in $libdirs; do
+ $echo " $libdir"
+ done
+ $echo
+ $echo "If you ever happen to want to link against installed libraries"
+ $echo "in a given directory, LIBDIR, you must either use libtool, and"
+ $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
+ $echo "flag during linking and do at least one of the following:"
+ if test -n "$shlibpath_var"; then
+ $echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
+ $echo " during execution"
+ fi
+ if test -n "$runpath_var"; then
+ $echo " - add LIBDIR to the \`$runpath_var' environment variable"
+ $echo " during linking"
+ fi
+ if test -n "$hardcode_libdir_flag_spec"; then
+ libdir=LIBDIR
+ eval flag=\"$hardcode_libdir_flag_spec\"
+
+ $echo " - use the \`$flag' linker flag"
+ fi
+ if test -n "$admincmds"; then
+ $echo " - have your system administrator run these commands:$admincmds"
+ fi
+ if test -f /etc/ld.so.conf; then
+ $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+ fi
+ $echo
+ $echo "See any operating system documentation about shared libraries for"
+ $echo "more information, such as the ld(1) and ld.so(8) manual pages."
+ $echo "----------------------------------------------------------------------"
+ exit $EXIT_SUCCESS
+ ;;
+
+ # libtool execute mode
+ execute)
+ modename="$modename: execute"
+
+ # The first argument is the command name.
+ cmd="$nonopt"
+ if test -z "$cmd"; then
+ $echo "$modename: you must specify a COMMAND" 1>&2
+ $echo "$help"
+ exit $EXIT_FAILURE
+ fi
+
+ # Handle -dlopen flags immediately.
+ for file in $execute_dlfiles; do
+ if test ! -f "$file"; then
+ $echo "$modename: \`$file' is not a file" 1>&2
+ $echo "$help" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ dir=
+ case $file in
+ *.la)
+ # Check to see that this really is a libtool archive.
+ if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+ else
+ $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+ $echo "$help" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ # Read the libtool library.
+ dlname=
+ library_names=
+
+ # If there is no directory component, then add one.
+ case $file in
+ */* | *\\*) . $file ;;
+ *) . ./$file ;;
+ esac
+
+ # Skip this library if it cannot be dlopened.
+ if test -z "$dlname"; then
+ # Warn if it was a shared library.
+ test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
+ continue
+ fi
+
+ dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+ test "X$dir" = "X$file" && dir=.
+
+ if test -f "$dir/$objdir/$dlname"; then
+ dir="$dir/$objdir"
+ else
+ $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
+ exit $EXIT_FAILURE
+ fi
+ ;;
+
+ *.lo)
+ # Just add the directory containing the .lo file.
+ dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+ test "X$dir" = "X$file" && dir=.
+ ;;
+
+ *)
+ $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
+ continue
+ ;;
+ esac
+
+ # Get the absolute pathname.
+ absdir=`cd "$dir" && pwd`
+ test -n "$absdir" && dir="$absdir"
+
+ # Now add the directory to shlibpath_var.
+ if eval "test -z \"\$$shlibpath_var\""; then
+ eval "$shlibpath_var=\"\$dir\""
+ else
+ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+ fi
+ done
+
+ # This variable tells wrapper scripts just to set shlibpath_var
+ # rather than running their programs.
+ libtool_execute_magic="$magic"
+
+ # Check if any of the arguments is a wrapper script.
+ args=
+ for file
+ do
+ case $file in
+ -*) ;;
+ *)
+ # Do a test to see if this is really a libtool program.
+ if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ # If there is no directory component, then add one.
+ case $file in
+ */* | *\\*) . $file ;;
+ *) . ./$file ;;
+ esac
+
+ # Transform arg to wrapped name.
+ file="$progdir/$program"
+ fi
+ ;;
+ esac
+ # Quote arguments (to preserve shell metacharacters).
+ file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
+ args="$args \"$file\""
+ done
+
+ if test -z "$run"; then
+ if test -n "$shlibpath_var"; then
+ # Export the shlibpath_var.
+ eval "export $shlibpath_var"
+ fi
+
+ # Restore saved environment variables
+ if test "${save_LC_ALL+set}" = set; then
+ LC_ALL="$save_LC_ALL"; export LC_ALL
+ fi
+ if test "${save_LANG+set}" = set; then
+ LANG="$save_LANG"; export LANG
+ fi
+
+ # Now prepare to actually exec the command.
+ exec_cmd="\$cmd$args"
+ else
+ # Display what would be done.
+ if test -n "$shlibpath_var"; then
+ eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
+ $echo "export $shlibpath_var"
+ fi
+ $echo "$cmd$args"
+ exit $EXIT_SUCCESS
+ fi
+ ;;
+
+ # libtool clean and uninstall mode
+ clean | uninstall)
+ modename="$modename: $mode"
+ rm="$nonopt"
+ files=
+ rmforce=
+ exit_status=0
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+
+ for arg
+ do
+ case $arg in
+ -f) rm="$rm $arg"; rmforce=yes ;;
+ -*) rm="$rm $arg" ;;
+ *) files="$files $arg" ;;
+ esac
+ done
+
+ if test -z "$rm"; then
+ $echo "$modename: you must specify an RM program" 1>&2
+ $echo "$help" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ rmdirs=
+
+ origobjdir="$objdir"
+ for file in $files; do
+ dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$dir" = "X$file"; then
+ dir=.
+ objdir="$origobjdir"
+ else
+ objdir="$dir/$origobjdir"
+ fi
+ name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+ test "$mode" = uninstall && objdir="$dir"
+
+ # Remember objdir for removal later, being careful to avoid duplicates
+ if test "$mode" = clean; then
+ case " $rmdirs " in
+ *" $objdir "*) ;;
+ *) rmdirs="$rmdirs $objdir" ;;
+ esac
+ fi
+
+ # Don't error if the file doesn't exist and rm -f was used.
+ if (test -L "$file") >/dev/null 2>&1 \
+ || (test -h "$file") >/dev/null 2>&1 \
+ || test -f "$file"; then
+ :
+ elif test -d "$file"; then
+ exit_status=1
+ continue
+ elif test "$rmforce" = yes; then
+ continue
+ fi
+
+ rmfiles="$file"
+
+ case $name in
+ *.la)
+ # Possibly a libtool archive, so verify it.
+ if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ . $dir/$name
+
+ # Delete the libtool libraries and symlinks.
+ for n in $library_names; do
+ rmfiles="$rmfiles $objdir/$n"
+ done
+ test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
+ test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+
+ if test "$mode" = uninstall; then
+ if test -n "$library_names"; then
+ # Do each command in the postuninstall commands.
+ cmds=$postuninstall_cmds
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ eval cmd=\"$cmd\"
+ $show "$cmd"
+ $run eval "$cmd"
+ if test "$?" -ne 0 && test "$rmforce" != yes; then
+ exit_status=1
+ fi
+ done
+ IFS="$save_ifs"
+ fi
+
+ if test -n "$old_library"; then
+ # Do each command in the old_postuninstall commands.
+ cmds=$old_postuninstall_cmds
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ eval cmd=\"$cmd\"
+ $show "$cmd"
+ $run eval "$cmd"
+ if test "$?" -ne 0 && test "$rmforce" != yes; then
+ exit_status=1
+ fi
+ done
+ IFS="$save_ifs"
+ fi
+ # FIXME: should reinstall the best remaining shared library.
+ fi
+ fi
+ ;;
+
+ *.lo)
+ # Possibly a libtool object, so verify it.
+ if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+
+ # Read the .lo file
+ . $dir/$name
+
+ # Add PIC object to the list of files to remove.
+ if test -n "$pic_object" \
+ && test "$pic_object" != none; then
+ rmfiles="$rmfiles $dir/$pic_object"
+ fi
+
+ # Add non-PIC object to the list of files to remove.
+ if test -n "$non_pic_object" \
+ && test "$non_pic_object" != none; then
+ rmfiles="$rmfiles $dir/$non_pic_object"
+ fi
+ fi
+ ;;
+
+ *)
+ if test "$mode" = clean ; then
+ noexename=$name
+ case $file in
+ *.exe)
+ file=`$echo $file|${SED} 's,.exe$,,'`
+ noexename=`$echo $name|${SED} 's,.exe$,,'`
+ # $file with .exe has already been added to rmfiles,
+ # add $file without .exe
+ rmfiles="$rmfiles $file"
+ ;;
+ esac
+ # Do a test to see if this is a libtool program.
+ if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ relink_command=
+ . $dir/$noexename
+
+ # note $name still contains .exe if it was in $file originally
+ # as does the version of $file that was added into $rmfiles
+ rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
+ if test "$fast_install" = yes && test -n "$relink_command"; then
+ rmfiles="$rmfiles $objdir/lt-$name"
+ fi
+ if test "X$noexename" != "X$name" ; then
+ rmfiles="$rmfiles $objdir/lt-${noexename}.c"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ $show "$rm $rmfiles"
+ $run $rm $rmfiles || exit_status=1
+ done
+ objdir="$origobjdir"
+
+ # Try to remove the ${objdir}s in the directories where we deleted files
+ for dir in $rmdirs; do
+ if test -d "$dir"; then
+ $show "rmdir $dir"
+ $run rmdir $dir >/dev/null 2>&1
+ fi
+ done
+
+ exit $exit_status
+ ;;
+
+ "")
+ $echo "$modename: you must specify a MODE" 1>&2
+ $echo "$generic_help" 1>&2
+ exit $EXIT_FAILURE
+ ;;
+ esac
+
+ if test -z "$exec_cmd"; then
+ $echo "$modename: invalid operation mode \`$mode'" 1>&2
+ $echo "$generic_help" 1>&2
+ exit $EXIT_FAILURE
+ fi
+fi # test -z "$show_help"
+
+if test -n "$exec_cmd"; then
+ eval exec $exec_cmd
+ exit $EXIT_FAILURE
+fi
+
+# We need to display help for each of the modes.
+case $mode in
+"") $echo \
+"Usage: $modename [OPTION]... [MODE-ARG]...
+
+Provide generalized library-building support services.
+
+ --config show all configuration variables
+ --debug enable verbose shell tracing
+-n, --dry-run display commands without modifying any files
+ --features display basic configuration information and exit
+ --finish same as \`--mode=finish'
+ --help display this help message and exit
+ --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
+ --quiet same as \`--silent'
+ --silent don't print informational messages
+ --tag=TAG use configuration variables from tag TAG
+ --version print version information
+
+MODE must be one of the following:
+
+ clean remove files from the build directory
+ compile compile a source file into a libtool object
+ execute automatically set library path, then run a program
+ finish complete the installation of libtool libraries
+ install install libraries or executables
+ link create a library or an executable
+ uninstall remove libraries from an installed directory
+
+MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
+a more detailed description of MODE.
+
+Report bugs to <bug-libtool@gnu.org>."
+ exit $EXIT_SUCCESS
+ ;;
+
+clean)
+ $echo \
+"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+compile)
+ $echo \
+"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+ -o OUTPUT-FILE set the output file name to OUTPUT-FILE
+ -prefer-pic try to building PIC objects only
+ -prefer-non-pic try to building non-PIC objects only
+ -static always build a \`.o' file suitable for static linking
+
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+ ;;
+
+execute)
+ $echo \
+"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+ -dlopen FILE add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+ ;;
+
+finish)
+ $echo \
+"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges. Use
+the \`--dry-run' option if you just want to see what would be executed."
+ ;;
+
+install)
+ $echo \
+"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command. The first component should be
+either the \`install' or \`cp' program.
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+ ;;
+
+link)
+ $echo \
+"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+ -all-static do not do any dynamic linking at all
+ -avoid-version do not add a version suffix if possible
+ -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
+ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
+ -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+ -export-symbols SYMFILE
+ try to export only the symbols listed in SYMFILE
+ -export-symbols-regex REGEX
+ try to export only the symbols matching REGEX
+ -LLIBDIR search LIBDIR for required installed libraries
+ -lNAME OUTPUT-FILE requires the installed library libNAME
+ -module build a library that can dlopened
+ -no-fast-install disable the fast-install mode
+ -no-install link a not-installable executable
+ -no-undefined declare that a library does not refer to external symbols
+ -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
+ -objectlist FILE Use a list of object files found in FILE to specify objects
+ -precious-files-regex REGEX
+ don't remove output files matching REGEX
+ -release RELEASE specify package release information
+ -rpath LIBDIR the created library will eventually be installed in LIBDIR
+ -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
+ -static do not do any dynamic linking of libtool libraries
+ -version-info CURRENT[:REVISION[:AGE]]
+ specify library version info [each variable defaults to 0]
+
+All other options (arguments beginning with \`-') are ignored.
+
+Every other argument is treated as a filename. Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+ ;;
+
+uninstall)
+ $echo \
+"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+*)
+ $echo "$modename: invalid operation mode \`$mode'" 1>&2
+ $echo "$help" 1>&2
+ exit $EXIT_FAILURE
+ ;;
+esac
+
+$echo
+$echo "Try \`$modename --help' for more information about other modes."
+
+exit $EXIT_SUCCESS
+
+# The TAGs below are defined such that we never get into a situation
+# in which we disable both kinds of libraries. Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them. This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration. But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+build_libtool_libs=no
+build_old_libs=yes
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
--- /dev/null
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+# Franc,ois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+fi
+
+case "$1" in
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+
+Supported PROGRAM values:
+ aclocal touch file \`aclocal.m4'
+ autoconf touch file \`configure'
+ autoheader touch file \`config.h.in'
+ automake touch all \`Makefile.in' files
+ bison create \`y.tab.[ch]', if possible, from existing .[ch]
+ flex create \`lex.yy.c', if possible, from existing .c
+ lex create \`lex.yy.c', if possible, from existing .c
+ makeinfo touch the output file
+ yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing - GNU libit 0.0"
+ ;;
+
+ -*)
+ echo 1>&2 "$0: Unknown \`$1' option"
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+ ;;
+
+ aclocal)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`acinclude.m4' or \`configure.in'. You might want
+ to install the \`Automake' and \`Perl' packages. Grab them from
+ any GNU archive site."
+ touch aclocal.m4
+ ;;
+
+ autoconf)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`configure.in'. You might want to install the
+ \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
+ archive site."
+ touch configure
+ ;;
+
+ autoheader)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`acconfig.h' or \`configure.in'. You might want
+ to install the \`Autoconf' and \`GNU m4' packages. Grab them
+ from any GNU archive site."
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in`
+ test -z "$files" && files="config.h"
+ touch_files=
+ for f in $files; do
+ case "$f" in
+ *:*) touch_files="$touch_files "`echo "$f" |
+ sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+ *) touch_files="$touch_files $f.in";;
+ esac
+ done
+ touch $touch_files
+ ;;
+
+ automake)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
+ You might want to install the \`Automake' and \`Perl' packages.
+ Grab them from any GNU archive site."
+ find . -type f -name Makefile.am -print |
+ sed 's/\.am$/.in/' |
+ while read f; do touch "$f"; done
+ ;;
+
+ bison|yacc)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.y' file. You may need the \`Bison' package
+ in order for those modifications to take effect. You can get
+ \`Bison' from any GNU archive site."
+ rm -f y.tab.c y.tab.h
+ if [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.y)
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.c
+ fi
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.h
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f y.tab.h ]; then
+ echo >y.tab.h
+ fi
+ if [ ! -f y.tab.c ]; then
+ echo 'main() { return 0; }' >y.tab.c
+ fi
+ ;;
+
+ lex|flex)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.l' file. You may need the \`Flex' package
+ in order for those modifications to take effect. You can get
+ \`Flex' from any GNU archive site."
+ rm -f lex.yy.c
+ if [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.l)
+ SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" lex.yy.c
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f lex.yy.c ]; then
+ echo 'main() { return 0; }' >lex.yy.c
+ fi
+ ;;
+
+ makeinfo)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.texi' or \`.texinfo' file, or any other file
+ indirectly affecting the aspect of the manual. The spurious
+ call might also be the consequence of using a buggy \`make' (AIX,
+ DU, IRIX). You might want to install the \`Texinfo' package or
+ the \`GNU make' package. Grab either from any GNU archive site."
+ file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ if test -z "$file"; then
+ file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+ fi
+ touch $file
+ ;;
+
+ *)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+ system. You might have modified some files without having the
+ proper tools for further handling them. Check the \`README' file,
+ it often tells you about the needed prerequirements for installing
+ this package. You may also peek at any GNU archive site, in case
+ some other package would contain this missing \`$1' program."
+ exit 1
+ ;;
+esac
+
+exit 0
])
# AC_DISABLE_DEBUG - set the default flag to --disable-debug
-AC_DEFUN([AC_DISABLE_DEBUG], [AC_ENABLE_DEBUG(no)])
\ No newline at end of file
+AC_DEFUN([AC_DISABLE_DEBUG], [AC_ENABLE_DEBUG(no)])
--- /dev/null
+/* This is part of libio/iostream, providing -*- C++ -*- input/output.
+Copyright (C) 2000 Free Software Foundation
+
+This file is part of the GNU IO Library. This library is free
+software; you can redistribute it and/or modify it under the
+terms of the GNU General Public License as published by the
+Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this library; see the file COPYING. If not, write to the Free
+Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+As a special exception, if you link this library with files
+compiled with a GNU compiler to produce an executable, this does not cause
+the resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why
+the executable file might be covered by the GNU General Public License. */
+
+/* Written by Magnus Fromreide (magfr@lysator.liu.se). */
+
+#ifndef __SSTREAM__
+#define __SSTREAM__
+
+#include <string>
+#include <iostream.h>
+#include <streambuf.h>
+
+namespace std
+{
+ class stringbuf : public streambuf
+ {
+ public:
+ typedef char char_type;
+ typedef int int_type;
+ typedef streampos pos_type;
+ typedef streamoff off_type;
+
+ explicit stringbuf(int which=ios::in|ios::out) :
+ streambuf(which), buf(), mode(static_cast<ios::open_mode>(which)),
+ rpos(0), bufsize(1)
+ { }
+
+ explicit stringbuf(const std::string &s, int which=ios::in|ios::out) :
+ streambuf(which), buf(s), mode(static_cast<ios::open_mode>(which)),
+ bufsize(1)
+ {
+ if(mode & ios::in)
+ {
+ setg(&defbuf, &defbuf + bufsize, &defbuf + bufsize);
+ }
+ if(mode & ios::out)
+ {
+ setp(&defbuf, &defbuf + bufsize);
+ }
+ rpos = (mode & ios::ate ? s.size() : 0);
+ }
+
+ std::string str() const
+ {
+ const_cast<stringbuf*>(this)->sync(); // Sigh, really ugly hack
+ return buf;
+ };
+
+ void str(const std::string& s)
+ {
+ buf = s;
+ if(mode & ios::in)
+ {
+ gbump(egptr() - gptr());
+ }
+ if(mode & ios::out)
+ {
+ pbump(pbase() - pptr());
+ }
+ rpos = (mode & ios::ate ? s.size() : 0);
+ }
+
+ protected:
+ inline virtual int sync();
+ inline virtual int overflow(int = EOF);
+ inline virtual int underflow();
+ private:
+ std::string buf;
+ ios::open_mode mode;
+ std::string::size_type rpos;
+ streamsize bufsize;
+ char defbuf;
+ };
+
+ class stringstreambase : virtual public ios {
+ protected:
+ stringbuf __my_sb;
+ public:
+ std::string str() const
+ {
+ return dynamic_cast<stringbuf*>(_strbuf)->str();
+ }
+ void str(const std::string& s)
+ {
+ clear();
+ dynamic_cast<stringbuf*>(_strbuf)->str(s);
+ }
+
+ stringbuf* rdbuf()
+ {
+ return &__my_sb;
+ }
+ protected:
+ stringstreambase(int which) :
+ __my_sb(which)
+ {
+ init (&__my_sb);
+ }
+
+ stringstreambase(const std::string& s, int which) :
+ __my_sb(s, which)
+ {
+ init (&__my_sb);
+ }
+ };
+
+ class istringstream : public stringstreambase, public istream {
+ public:
+ istringstream(int which=ios::in) :
+ stringstreambase(which)
+ { }
+
+ istringstream(const std::string& s, int which=ios::in) :
+ stringstreambase(s, which)
+ { }
+ };
+
+ class ostringstream : public stringstreambase, public ostream {
+ public:
+ ostringstream(int which=ios::out) :
+ stringstreambase(which)
+ { }
+
+ ostringstream(const std::string& s, int which=ios::out) :
+ stringstreambase(s, which)
+ { }
+ };
+
+ class stringstream : public stringstreambase, public iostream {
+ public:
+ stringstream(int which=ios::in|ios::out) :
+ stringstreambase(which)
+ { }
+
+ stringstream(const std::string &s, int which=ios::in|ios::out) :
+ stringstreambase(s, which)
+ { }
+ };
+}
+
+inline int std::stringbuf::sync()
+{
+ if((mode & ios::out) == 0)
+ return EOF;
+
+ streamsize n = pptr() - pbase();
+ if(n)
+ {
+ buf.replace(rpos, std::string::npos, pbase(), n);
+ if(buf.size() - rpos != n)
+ return EOF;
+ rpos += n;
+ pbump(-n);
+ gbump(egptr() - gptr());
+ }
+ return 0;
+}
+
+inline int std::stringbuf::overflow(int ch)
+{
+ if((mode & ios::out) == 0)
+ return EOF;
+
+ streamsize n = pptr() - pbase();
+
+ if(n && sync())
+ return EOF;
+
+ if(ch != EOF)
+ {
+ std::string::size_type oldSize = buf.size();
+
+ buf.replace(rpos, std::string::npos, ch);
+ if(buf.size() - oldSize != 1)
+ return EOF;
+ ++rpos;
+ }
+ return 0;
+}
+
+inline int std::stringbuf::underflow()
+{
+ sync();
+ if((mode & ios::in) == 0)
+ {
+ return EOF;
+ }
+ if(rpos >= buf.size())
+ {
+ return EOF;
+ }
+
+ std::string::size_type n = egptr() - eback();
+ std::string::size_type s;
+
+ s = buf.copy(eback(), n, rpos);
+ pbump(pbase() - pptr());
+ gbump(eback() - gptr());
+ int res = (0377 & buf[rpos]);
+ rpos += s;
+ return res;
+}
+
+#endif /* not __STRSTREAM__ */
void HouseKeeping();
std::list<PROTECTED_DELETE*> PROTECTED_DELETE::_objList;
-//CCRT
-pthread_mutex_t PROTECTED_DELETE::_listMutex = PTHREAD_MUTEX_INITIALIZER ;
-//pthread_mutex_t PROTECTED_DELETE::_listMutex ;
+#ifndef WNT
+pthread_mutex_t PROTECTED_DELETE::_listMutex;
+#else
+pthread_mutex_t PROTECTED_DELETE::_listMutex =
+ PTHREAD_MUTEX_INITIALIZER;
+#endif
std::list<GENERIC_DESTRUCTOR*> *GENERIC_DESTRUCTOR::Destructors = 0;
static bool atExitSingletonDone = false ;
#ifndef _BASICGENERICDESTRUCTOR_HXX_
#define _BASICGENERICDESTRUCTOR_HXX_
+#ifdef WNT
+ #if defined BASICS_EXPORTS
+ #if defined WIN32
+ #define BASICS_EXPORT __declspec( dllexport )
+ #else
+ #define BASICS_EXPORT
+ #endif
+ #else
+ #if defined WIN32
+ #define BASICS_EXPORT __declspec( dllimport )
+ #else
+ #define BASICS_EXPORT
+ #endif
+ #endif
+#else
+ #define BASICS_EXPORT
+#endif
+
#include <list>
#include <algorithm>
#include <cassert>
#include <cstdlib>
#include <pthread.h>
-#if defined BASICS_EXPORTS
-#if defined WIN32
-#define BASICS_EXPORT __declspec( dllexport )
-#else
-#define BASICS_EXPORT
-#endif
-#else
-#if defined WNT
-#define BASICS_EXPORT __declspec( dllimport )
-#else
-#define BASICS_EXPORT
-#endif
-#endif
-
//#define _DEVDEBUG_
#ifdef _DEVDEBUG_
*/
// ============================================================================
-class PROTECTED_DELETE
+class BASICS_EXPORT PROTECTED_DELETE
{
public:
static void deleteInstance(PROTECTED_DELETE *anObject);
*/
// ============================================================================
-class GENERIC_DESTRUCTOR
+class BASICS_EXPORT GENERIC_DESTRUCTOR
{
public :
- BASICS_EXPORT static std::list<GENERIC_DESTRUCTOR*> *Destructors;
+ static std::list<GENERIC_DESTRUCTOR*> *Destructors;
virtual ~GENERIC_DESTRUCTOR() {};
- BASICS_EXPORT static const int Add(GENERIC_DESTRUCTOR &anObject);
- BASICS_EXPORT virtual void operator()(void) = 0;
+ static const int Add(GENERIC_DESTRUCTOR &anObject);
+ virtual void operator()(void) = 0;
};
// ============================================================================
template <class TYPE> class DESTRUCTOR_OF : public GENERIC_DESTRUCTOR
{
-
public:
/*!
Programs the destruction at the end of the process, of the object anObject.
Parametre();
// Constructeur par recopie
- Parametre::Parametre(const Parametre & PM);
+ Parametre(const Parametre & PM);
// Operateur de recherche dans la map
Versatile & operator [] (const string &);
MultiCommException.hxx \
SALOME_Comm_i.hxx \
MatrixClient.hxx \
- SALOME_Matrix_i.hxx
+ SALOME_Matrix_i.hxx \
+ SALOME_Communication.hxx
# Scripts to be installed
#ifndef __MATRIXCLIENT_HXX__
#define __MATRIXCLIENT_HXX__
+#include <SALOME_Communication.hxx>
+
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SALOME_Comm)
-class MatrixClient
+class COMMUNICATION_EXPORT MatrixClient
{
public:
static double *getValue(SALOME::Matrix_ptr distMat, int& columnSize, int& rowSize);
#ifndef _MULTICOMMEXCEPTION_HXX_
#define _MULTICOMMEXCEPTION_HXX_
-#include <string>
+#include <SALOME_Communication.hxx>
+#include <string>
-class MultiCommException {
+class COMMUNICATION_EXPORT MultiCommException {
private:
std::string _message;
public:
#ifndef _RECEIVERFACTORY_HXX_
#define _RECEIVERFACTORY_HXX_
+#include <SALOME_Communication.hxx>
+
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SALOME_Comm)
#include "MultiCommException.hxx"
This class internally builds a receiver associated with the sender given. It also performs transfert completely and clean up the objects.
This is the only class used client side of an array.
*/
-class ReceiverFactory
+class COMMUNICATION_EXPORT ReceiverFactory
{
public:
static double *getValue(SALOME::SenderDouble_ptr sender,long &size)throw(MultiCommException);
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-#include "poa.h"
+#include "omniORB4/poa.h"
#include "utilities.h"
using namespace std;
#ifndef _SALOMEMULTICOMM_HXX_
#define _SALOMEMULTICOMM_HXX_
+#include <SALOME_Communication.hxx>
+
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SALOME_Comm)
Class is designed to ease the use of multi communication.\n
Simply inherite from it your servant class you want to emit data with senders.
*/
-class SALOMEMultiComm : public virtual POA_SALOME::MultiCommClass {
+class COMMUNICATION_EXPORT SALOMEMultiComm : public virtual POA_SALOME::MultiCommClass {
protected:
SALOME::TypeOfCommunication _type;
public:
#ifndef WNT
#include <rpc/xdr.h>
#endif
-#include "poa.h"
+#include "omniORB4/poa.h"
#include "omnithread.h"
#include "Utils_SINGLETON.hxx"
#include "Utils_ORB_INIT.hxx"
#ifndef _SALOME_COMM_I_HXX_
#define _SALOME_COMM_I_HXX_
+#include <SALOME_Communication.hxx>
+
#ifdef HAVE_MPI2
#include "mpi.h"
#endif
Generic servant class for senders that factorizes all the common methods and attributes necessary to senders.
All servant classes for senders have to inheritate from it.
*/
-class SALOME_Sender_i : public virtual POA_SALOME::Sender,
+class COMMUNICATION_EXPORT SALOME_Sender_i : public virtual POA_SALOME::Sender,
public PortableServer::RefCountServantBase {
protected:
/*! Pointer to the generic array to transmit*/
virtual ~SALOME_Sender_i() {}
};
-class SALOME_SenderDouble_i : public virtual POA_SALOME::SenderDouble,
+class COMMUNICATION_EXPORT SALOME_SenderDouble_i : public virtual POA_SALOME::SenderDouble,
public virtual SALOME_Sender_i
{
public:
static SALOME_SenderDouble_i *find(SALOME::SenderDouble_ptr pCorba);
};
-class SALOME_SenderInt_i : public virtual POA_SALOME::SenderInt,
+class COMMUNICATION_EXPORT SALOME_SenderInt_i : public virtual POA_SALOME::SenderInt,
public virtual SALOME_Sender_i
{
public:
/*! Servant class for CORBA sender for double* when no copy of array _tabToSend is required, that is to say double and CORBA::Double are binary equal.
*/
-class SALOME_CorbaDoubleNCSender_i : public POA_SALOME::CorbaDoubleNCSender,
+class COMMUNICATION_EXPORT SALOME_CorbaDoubleNCSender_i : public POA_SALOME::CorbaDoubleNCSender,
public SALOME_SenderDouble_i
{
public:
/*! Servant class for CORBA sender for double* when copy of array _tabToSend is required, that is to say double and CORBA::Double are NOT binary equal.
*/
-class SALOME_CorbaDoubleCSender_i : public POA_SALOME::CorbaDoubleCSender,
+class COMMUNICATION_EXPORT SALOME_CorbaDoubleCSender_i : public POA_SALOME::CorbaDoubleCSender,
public SALOME_SenderDouble_i
{
public:
/*! Servant class for CORBA sender for int* when no copy of array _tabToSend is required, that is to say int and CORBA::Long are binary equal.
*/
-class SALOME_CorbaLongNCSender_i : public POA_SALOME::CorbaLongNCSender,
+class COMMUNICATION_EXPORT SALOME_CorbaLongNCSender_i : public POA_SALOME::CorbaLongNCSender,
public SALOME_SenderInt_i
{
public:
/*! Servant class for CORBA sender for int* when copy of array _tabToSend is required, that is to say int and CORBA::Long are NOT binary equal.
*/
-class SALOME_CorbaLongCSender_i : public POA_SALOME::CorbaLongCSender,
+class COMMUNICATION_EXPORT SALOME_CorbaLongCSender_i : public POA_SALOME::CorbaLongCSender,
public SALOME_SenderInt_i
{
public:
/*! Servant class of sender using MPI2.
*/
-class SALOME_MPISender_i : public virtual POA_SALOME::MPISender,
+class COMMUNICATION_EXPORT SALOME_MPISender_i : public virtual POA_SALOME::MPISender,
public virtual SALOME_Sender_i
{
private:
static void* myThread(void *args);
};
-class SALOME_MPISenderDouble_i : public POA_SALOME::MPISenderDouble,
+class COMMUNICATION_EXPORT SALOME_MPISenderDouble_i : public POA_SALOME::MPISenderDouble,
public SALOME_SenderDouble_i,
public SALOME_MPISender_i
{
SALOME_MPISenderDouble_i(const double *tabToSend,long lgrTabToSend,bool ownTabToSend=false);
};
-class SALOME_MPISenderInt_i : public POA_SALOME::MPISenderInt,
+class COMMUNICATION_EXPORT SALOME_MPISenderInt_i : public POA_SALOME::MPISenderInt,
public SALOME_SenderInt_i,
public SALOME_MPISender_i
{
/*! Servant class of sender using Sockets.
*/
-class SALOME_SocketSender_i : public virtual POA_SALOME::SocketSender,
+class COMMUNICATION_EXPORT SALOME_SocketSender_i : public virtual POA_SALOME::SocketSender,
public virtual SALOME_Sender_i
{
private:
std::string inetAddress();
};
-class SALOME_SocketSenderDouble_i : public POA_SALOME::SocketSenderDouble,
+class COMMUNICATION_EXPORT SALOME_SocketSenderDouble_i : public POA_SALOME::SocketSenderDouble,
public SALOME_SenderDouble_i,
public SALOME_SocketSender_i
{
SALOME_SocketSenderDouble_i(const double *tabToSend,long lgrTabToSend,bool ownTabToSend=false);
};
-class SALOME_SocketSenderInt_i : public POA_SALOME::SocketSenderInt,
+class COMMUNICATION_EXPORT SALOME_SocketSenderInt_i : public POA_SALOME::SocketSenderInt,
public SALOME_SenderInt_i,
public SALOME_SocketSender_i
{
--- /dev/null
+// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//
+//
+// File : SALOME_Communication.hxx
+// Author : Alexander A. BORODIN
+// Module : SALOME
+
+#ifndef _SALOME_COMMIUNICATION_HXX_
+#define _SALOME_COMMIUNICATION_HXX_
+
+#ifdef WNT
+ #if defined COMMUNICATION_EXPORTS
+ #if defined WIN32
+ #define COMMUNICATION_EXPORT __declspec( dllexport )
+ #else
+ #define COMMUNICATION_EXPORT
+ #endif
+ #else
+ #if defined WIN32
+ #define COMMUNICATION_EXPORT __declspec( dllimport )
+ #else
+ #define COMMUNICATION_EXPORT
+ #endif
+ #endif
+#else
+ #define COMMUNICATION_EXPORT
+#endif
+
+#endif
\ No newline at end of file
#ifndef _SENDERFACTORY_HXX_
#define _SENDERFACTORY_HXX_
+#include <SALOME_Communication.hxx>
+
#include "MultiCommException.hxx"
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SALOME_Comm)
/*!
This class implements the factory pattern of GoF by making a sender by giving an array and a communicator.It completely hides the type of sender from the user.
*/
-class SenderFactory
+class COMMUNICATION_EXPORT SenderFactory
{
public:
static SALOME::SenderDouble_ptr buildSender(SALOMEMultiComm &multiCommunicator,const double *tab,long lgr,bool ownTab=false) throw(MultiCommException);
#include <string.h>
#include <stdio.h>
#include <time.h>
-#include <sys/time.h>
#ifndef WNT
+#include <sys/time.h>
#include <dlfcn.h>
#include <unistd.h>
#else
-#include "../../adm/win32/SALOME_WNT.hxx"
#include <signal.h>
#include <process.h>
int SIGUSR1 = 1000;
#include "utilities.h"
#include <SALOMEconfig.h>
-#ifndef WNT
+//#ifndef WNT
#include CORBA_SERVER_HEADER(SALOME_Component)
-#else
-#include <SALOME_Component.hh>
-#endif
+//#else
+//#include <SALOME_Component.hh>
+//#endif
#include <pthread.h> // must be before Python.h !
#include "SALOME_Container_i.hxx"
#include "SALOME_Component_i.hxx"
extern "C" {void ActSigIntHandler() ; }
#ifndef WNT
-extern "C" {void SigIntHandler(int, siginfo_t *, void *) ; }
+ extern "C" {void SigIntHandler(int, siginfo_t *, void *) ; }
#else
extern "C" {void SigIntHandler( int ) ; }
#endif
if (!_isSupervContainer)
{
+#ifdef WNT
+ //Py_ACQUIRE_NEW_THREAD;
+ PyEval_AcquireLock();
+ /* It should not be possible for more than one thread state
+ to be used for a thread.*/
+ PyThreadState *myTstate = PyGILState_GetThisThreadState();
+ // if no thread state defined
+ if ( !myTstate )
+ myTstate = PyThreadState_New(KERNEL_PYTHON::_interp);
+ PyThreadState *myoldTstate = PyThreadState_Swap(myTstate);
+#else
Py_ACQUIRE_NEW_THREAD;
+#endif
+
#ifdef WNT
// mpv: this is temporary solution: there is a unregular crash if not
- Sleep(2000);
+ //Sleep(2000);
+ //
+ // first element is the path to Registry.dll, but it's wrong
PyRun_SimpleString("import sys\n");
- // first element is the path to Registry.dll, but it's wrong
PyRun_SimpleString("sys.path = sys.path[1:]\n");
#endif
PyRun_SimpleString("import SALOME_Container\n");
void Engines_Container_i::Shutdown()
{
MESSAGE("Engines_Container_i::Shutdown()");
+
+ /* For each component contained in this container
+ * tell it to self-destroy
+ */
+ std::map<std::string, Engines::Component_var>::iterator itm;
+ for (itm = _listInstances_map.begin(); itm != _listInstances_map.end(); itm++)
+ itm->second->destroy();
+
_NS->Destroy_FullDirectory(_containerName.c_str());
+ _NS->Destroy_Name(_containerName.c_str());
//_remove_ref();
//_poa->deactivate_object(*_id);
if(_isServantAloneInProcess)
return true;
}
+#ifndef WNT
void* handle;
-#if defined( WNT )
- handle = dlopen( impl_name.c_str() , 0 ) ;
-//#elif defined( __osf1__ )
-// handle = dlopen( impl_name.c_str() , RTLD_NOW ) ;
-#else
handle = dlopen( impl_name.c_str() , RTLD_LAZY ) ;
+#else
+ HINSTANCE handle;
+ handle = LoadLibrary( impl_name.c_str() );
#endif
+
if ( handle )
- {
+ {
_library_map[impl_name] = handle;
_numInstanceMutex.unlock();
return true;
- }
+ }
else
- {
- INFOS("Can't load shared library : " << impl_name);
+ {
+ INFOS( "Can't load shared library: " << impl_name );
+#ifndef WNT
INFOS("error dlopen: " << dlerror());
- }
+#endif
+ }
_numInstanceMutex.unlock();
// --- try import Python component
const char *,
const char *) ;
- FACTORY_FUNCTION Component_factory
- = (FACTORY_FUNCTION) dlsym(handle, factory_name.c_str());
+#ifndef WNT
+ FACTORY_FUNCTION Component_factory = (FACTORY_FUNCTION)dlsym( handle, factory_name.c_str() );
+#else
+ FACTORY_FUNCTION Component_factory = (FACTORY_FUNCTION)GetProcAddress( (HINSTANCE)handle, factory_name.c_str() );
+#endif
- char *error ;
- if ( (error = dlerror() ) != NULL)
- {
- INFOS("Can't resolve symbol: " + factory_name);
- SCRUTE(error);
+ if ( !Component_factory )
+ {
+ INFOS( "Can't resolve symbol: " + factory_name );
+#ifndef WNT
+ SCRUTE( dlerror() );
+#endif
return Engines::Component::_nil() ;
- }
+ }
// --- create instance
PortableServer::ObjectId *id ; //not owner, do not delete (nore use var)
id = (Component_factory) ( _orb, _poa, _id, instanceName.c_str(),
aGenRegisterName.c_str() ) ;
-
+ if (id == NULL)
+ return iobject._retn();
+
// --- get reference & servant from id
CORBA::Object_var obj = _poa->id_to_reference(*id);
}
}
#endif
-
// $Header$
#include <time.h>
-#include <sys/time.h>
+#ifndef WNT
+ #include <sys/time.h>
+#endif
#include "utilities.h"
#ifndef _CONTAINER_INIT_PYTHON_HXX_
#define _CONTAINER_INIT_PYTHON_HXX_
+#include <SALOME_Container.hxx>
+
#include <pthread.h> // must be before Python.h !
#include <Python.h>
// - There is no need of C Lock protection of the sequence.
-#if defined CONTAINER_EXPORTS
-#if defined WIN32
-#define CONTAINER_EXPORT __declspec( dllexport )
-#else
-#define CONTAINER_EXPORT
-#endif
-#else
-#if defined WNT
-#define CONTAINER_EXPORT __declspec( dllimport )
-#else
-#define CONTAINER_EXPORT
-#endif
-#endif
-
#define Py_ACQUIRE_NEW_THREAD \
PyEval_AcquireLock(); \
PyThreadState *myTstate = PyThreadState_New(KERNEL_PYTHON::_interp); \
SALOME_FileTransfer_i.hxx \
SALOME_FileRef_i.hxx \
SALOME_ContainerManager.hxx \
- Container_init_python.hxx
+ Container_init_python.hxx \
+ SALOME_Container.hxx
# Scripts to be installed
dist_salomescript_DATA =\
#ifndef _SALOME_COMPONENT_I_HXX_
#define _SALOME_COMPONENT_I_HXX_
+#include <SALOME_Container.hxx>
+
#include <iostream>
#include <signal.h>
#include <stdlib.h>
class RegistryConnexion;
class Engines_Container_i;
-#if defined CONTAINER_EXPORTS
-#if defined WIN32
-#define CONTAINER_EXPORT __declspec( dllexport )
-#else
-#define CONTAINER_EXPORT
-#endif
-#else
-#if defined WNT
-#define CONTAINER_EXPORT __declspec( dllimport )
-#else
-#define CONTAINER_EXPORT
-#endif
-#endif
-
class CONTAINER_EXPORT Engines_Component_i:
public virtual POA_Engines::Component,
public virtual PortableServer::RefCountServantBase
#include <string>
#include <stdio.h>
#include <time.h>
-#include <sys/time.h>
-#include <dlfcn.h>
+#ifndef WNT
+# include <sys/time.h>
+# include <dlfcn.h>
+#endif
+
#ifndef WNT
#include <unistd.h>
//CORBA::ORB_var orb = CORBA::ORB_init( argc , argv ) ;
ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting());
- CORBA::ORB_ptr orb = init(0 , 0 ) ;
+ CORBA::ORB_ptr orb = init(argc , argv ) ;
// LocalTraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb);
INFOS_COMPILATION;
--- /dev/null
+// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//
+//
+// File : SALOME_Container.hxx
+// Author : Alexander A. BORODIN
+// Module : SALOME
+
+#ifndef _SALOME_Container_HXX_
+#define _SALOME_Container_HXX_
+
+#ifdef WNT
+ #if defined CONTAINER_EXPORTS
+ #if defined WIN32
+ #define CONTAINER_EXPORT __declspec( dllexport )
+ #else
+ #define CONTAINER_EXPORT
+ #endif
+ #else
+ #if defined WIN32
+ #define CONTAINER_EXPORT __declspec( dllimport )
+ #else
+ #define CONTAINER_EXPORT
+ #endif
+ #endif
+#else
+ #define CONTAINER_EXPORT
+#endif
+
+#endif
\ No newline at end of file
MESSAGE("ShutdownContainers");
_NS->Change_Directory("/Containers");
vector<string> vec = _NS->list_directory_recurs();
+ list<string> lstCont;
for(vector<string>::iterator iter = vec.begin();iter!=vec.end();iter++)
+ {
+ SCRUTE((*iter));
+ CORBA::Object_var obj=_NS->Resolve((*iter).c_str());
+ Engines::Container_var cont=Engines::Container::_narrow(obj);
+ if(!CORBA::is_nil(cont))
+ {
+ lstCont.push_back((*iter));
+ }
+ }
+ MESSAGE("Container list: ");
+ for(list<string>::iterator iter=lstCont.begin();iter!=lstCont.end();iter++)
+ {
+ SCRUTE((*iter));
+ }
+ for(list<string>::iterator iter=lstCont.begin();iter!=lstCont.end();iter++)
{
SCRUTE((*iter));
CORBA::Object_var obj=_NS->Resolve((*iter).c_str());
#ifndef __SALOME_CONTAINERMANAGER_HXX__
#define __SALOME_CONTAINERMANAGER_HXX__
+#include <SALOME_Container.hxx>
+
#include <SALOMEconfig.h>
#include CORBA_CLIENT_HEADER(SALOME_Component)
#include CORBA_CLIENT_HEADER(SALOME_ContainerManager)
class SALOME_NamingService;
-#if defined CONTAINER_EXPORTS
-#if defined WIN32
-#define CONTAINER_EXPORT __declspec( dllexport )
-#else
-#define CONTAINER_EXPORT
-#endif
-#else
-#if defined WNT
-#define CONTAINER_EXPORT __declspec( dllimport )
-#else
-#define CONTAINER_EXPORT
-#endif
-#endif
-
class CONTAINER_EXPORT SALOME_ContainerManager:
public POA_Engines::ContainerManager,
public PortableServer::RefCountServantBase
import os
import sys
import string
+
import omnipatch # PAL10310
+
from omniORB import CORBA, PortableServer
import SALOMEDS
import Engines, Engines__POA
#=============================================================================
#initialise the ORB and find the root POA
+print "Starting ",sys.argv[1]
orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
poa = orb.resolve_initial_references("RootPOA")
+print "ORB and POA initialized"
#create an instance of SALOME_ContainerPy_i and a Container reference
#containerName = "FactoryServerPy"
MESSAGE( str(sys.argv) )
containerName = sys.argv[1]
cpy_i = SALOME_ContainerPy_i(orb, poa, containerName)
+print "SALOME_ContainerPy_i instance created ",cpy_i
cpy_o = cpy_i._this()
+print "SALOME_ContainerPy_i instance activated ",cpy_o
#activate the POA
poaManager = poa._get_the_POAManager()
#include <stdexcept>
-#include <CORBA.h>
+#include <omniORB4/CORBA.h>
#include "utilities.h"
// CCRT porting
#ifndef _SALOME_CONTAINER_I_HXX_
#define _SALOME_CONTAINER_I_HXX_
+#include <SALOME_Container.hxx>
+
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SALOME_Component)
class SALOME_NamingService;
-
-#if defined CONTAINER_EXPORTS
-#if defined WIN32
-#define CONTAINER_EXPORT __declspec( dllexport )
-#else
-#define CONTAINER_EXPORT
-#endif
-#else
-#if defined WNT
-#define CONTAINER_EXPORT __declspec( dllimport )
-#else
-#define CONTAINER_EXPORT
-#endif
-#endif
-
class CONTAINER_EXPORT Engines_Container_i:
public virtual POA_Engines::Container,
public virtual PortableServer::RefCountServantBase
#ifndef _SALOME_FILEREF_I_HXX_
#define _SALOME_FILEREF_I_HXX_
+#include <SALOME_Container.hxx>
+
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SALOME_Component)
#include <string>
#include <map>
-class fileRef_i:
+class CONTAINER_EXPORT fileRef_i:
public virtual POA_Engines::fileRef,
public virtual PortableServer::RefCountServantBase
{
#ifndef _SALOME_FILETRANSFER_I_HXX_
#define _SALOME_FILETRANSFER_I_HXX_
+#include <SALOME_Container.hxx>
+
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SALOME_Component)
#include <map>
#include <cstdio>
-class fileTransfer_i:
+class CONTAINER_EXPORT fileTransfer_i:
public virtual POA_Engines::fileTransfer,
public virtual PortableServer::RefCountServantBase
{
fprintf(fp, "\n");
-#ifndef WNT
- for(unsigned j=0; j<nbAttr; j++) {
-#else
- for(j=0; j<nbAttr; j++) {
-#endif
+ for ( unsigned j=0; j<nbAttr; j++ )
+ {
name = hdf_dataset->GetAttributeName(j);
HDFattribute *hdf_attribute = new HDFattribute(name, hdf_dataset);
delete name;
#include "hdfi.h"
#include <hdf5.h>
-hdf_type
-HDFattrGetSize(hdf_idt id)
+hdf_type HDFattrGetSize( hdf_idt id )
{
+ hdf_type ret;
hdf_idt type_id;
- int ret;
if ((type_id = H5Aget_type(id)) < 0)
return HDF_NONE;
- ret = H5Tget_size(type_id);
+ ret = (hdf_type)H5Tget_size(type_id);
H5Tclose(type_id);
hdf_byte_order order;
if ((type_id = H5Dget_type(dataset_id)) < 0)
- return -1;
+ return H5T_ORDER_ERROR;
order = H5Tget_order(type_id);
hdf_err RankInfo(hdf_idt id, const char *name, void *data)
{
- if (data != NULL)
- strcpy(data,name);
+ if ( data )
+ strcpy( (char*)data, name );
else
return -1;
hdf_err
HDFobjectType(hdf_idt id, char *name, hdf_object_type *type)
{
- hdf_object_type rep;
hdf_bool follow = 1;
H5G_stat_t buf;
hdf_err ret;
shared_imported[name]=module
#print "Module %s shared registered" % name,module
+def import_module(partname, fqname, parent):
+ """ Try to import module fqname
+ It's parent is module parent and has name partname
+ """
+ try:
+ m = sys.modules[fqname]
+ except KeyError:
+ pass
+ else:
+ return m
+
def ensure_fromlist(m, fromlist, recursive=0):
""" Return the real modules list to be imported
"""
pass
else:
l.extend(ensure_fromlist(m, all, 1))
- else:
+ elif hasattr(m,sub):
submod=getattr(m,sub)
if type(submod) == type(sys):
l.append(("%s.%s" % (m.__name__, sub),submod))
+ else:
+ subname="%s.%s" % (m.__name__, sub)
+ submod = import_module(sub, subname, m)
+ if not submod:
+ raise ImportError, "No module named " + subname
+ l.append((subname,submod))
return l
def import_hook(name, globals=None, locals=None, fromlist=None):
#when fromlist is not specified and name is a dotted name,
# module is the root package not the real module
#so we need to retrieve it
- m=get_real_module(module,name)
+ # note: some modules like xml.dom do not play the rule
+ # (import xml: no attribute dom, but import xml.dom OK)
+ try:
+ m=get_real_module(module,name)
+ except AttributeError:
+ m=None
if type(m) == type(sys) and is_shared(m.__name__):
set_shared_imported(m.__name__,m)
# Module : SALOME
# $Header$
-import omnipatch
from salome_kernel import *
from salome_study import *
from salome_iapp import *
list_modules=[]
# Import all *_shared_modules in the path and store them in list_modules
-path=salome_path.split(":")
+splitter = ":"
+if sys.platform == "win32":
+ splitter = ";"
+path=salome_path.split(splitter)
import platform
if platform.architecture()[0] == "64bit":
libdir = "lib64"
try:
name=os.path.splitext(os.path.basename(f))[0]
register_name(name)
+ #print name + " REGISTERED"
m=__import__(name)
+ #print name + " IMPORTED"
list_modules.append(m)
except:
+ print "Exception during register and import shared module"
pass
#
from salome import sg
import SALOMEDS
import os
+import sys
import SALOME_ModuleCatalog
# ---- create Hypothesis
+if sys.platform == "win32":
+ stdMeshersEngine = "StdMeshersEngine"
+else:
+ stdMeshersEngine = "libStdMeshersEngine.so"
+
print "-------------------------- create Hypothesis"
print "-------------------------- LocalLength"
-hypLen1 = smesh.CreateHypothesis( "LocalLength", "libStdMeshersEngine.so" )
+hypLen1 = smesh.CreateHypothesis( "LocalLength", stdMeshersEngine )
hypLen1.SetLength(100)
print hypLen1.GetName()
print hypLen1.GetId()
smeshgui.SetName(salome.ObjectToID(hypLen1), "Local_Length_100")
print "-------------------------- NumberOfSegments"
-hypNbSeg1= smesh.CreateHypothesis( "NumberOfSegments", "libStdMeshersEngine.so" )
+hypNbSeg1= smesh.CreateHypothesis( "NumberOfSegments", stdMeshersEngine )
hypNbSeg1.SetNumberOfSegments(7)
print hypNbSeg1.GetName()
print hypNbSeg1.GetId()
smeshgui.SetName(salome.ObjectToID(hypNbSeg1), "NumberOfSegments_7")
print "-------------------------- MaxElementArea"
-hypArea1 = smesh.CreateHypothesis( "MaxElementArea", "libStdMeshersEngine.so" )
+hypArea1 = smesh.CreateHypothesis( "MaxElementArea", stdMeshersEngine )
hypArea1.SetMaxElementArea(2500)
print hypArea1.GetName()
print hypArea1.GetId()
smeshgui.SetName(salome.ObjectToID(hypArea1), "MaxElementArea_2500")
print "-------------------------- MaxElementArea"
-hypArea2 = smesh.CreateHypothesis( "MaxElementArea", "libStdMeshersEngine.so" )
+hypArea2 = smesh.CreateHypothesis( "MaxElementArea", stdMeshersEngine )
hypArea2.SetMaxElementArea(500)
print hypArea2.GetName()
print hypArea2.GetId()
smeshgui.SetName(salome.ObjectToID(hypArea2), "MaxElementArea_500")
print "-------------------------- Regular_1D"
-algoReg = smesh.CreateHypothesis( "Regular_1D", "libStdMeshersEngine.so" )
+algoReg = smesh.CreateHypothesis( "Regular_1D", stdMeshersEngine )
listHyp=algoReg.GetCompatibleHypothesis()
for hyp in listHyp:
print hyp
smeshgui.SetName(salome.ObjectToID(algoReg), "Regular_1D" )
print "-------------------------- MEFISTO_2D"
-algoMef = smesh.CreateHypothesis( "MEFISTO_2D", "libStdMeshersEngine.so" )
+algoMef = smesh.CreateHypothesis( "MEFISTO_2D", stdMeshersEngine )
listHyp=algoMef.GetCompatibleHypothesis()
for hyp in listHyp:
print hyp
smesh.Compute(mesh, box)
sg.updateObjBrowser(1);
-print
-print "============= Test Supervisor ============================="
-print
-
-comp = catalog.GetComponent("SUPERV")
-if comp is None:
- raise RuntimeError,"Component SUPERV not found in Module Catalog."
-
-from SuperV import *
-import SALOMEDS
-myStudy = salome.myStudy
-myBuilder = myStudy.NewBuilder()
-
-SuperVision = lcc.FindOrLoadComponent("SuperVisionContainer","SUPERV")
-father = myStudy.FindComponent("SUPERV")
-if father is None:
- father = myBuilder.NewComponent("SUPERV")
- A1 = myBuilder.FindOrCreateAttribute(father, "AttributeName");
- FName = A1._narrow(SALOMEDS.AttributeName)
- FName.SetValue( salome.sg.getComponentUserName("SUPERV") )
- A2 = myBuilder.FindOrCreateAttribute(father, "AttributePixMap");
- aPixmap = A2._narrow(SALOMEDS.AttributePixMap);
- aPixmap.SetPixMap( "ICON_OBJBROWSER_Supervision" );
- myBuilder.DefineComponentInstance(father,SuperVision)
-
-def addStudy(ior):
- dataflow = SuperVision.getStreamGraph(ior)
- name=dataflow.Name()
- itr = myStudy.NewChildIterator(father)
- while itr.More():
- item=itr.Value()
- res,A=item.FindAttribute("AttributeName")
- if res:
- aName = A._narrow(SALOMEDS.AttributeName)
- if aName.Value() == name :
- print myBuilder.FindOrCreateAttribute(item, "AttributeIOR")
- A = myBuilder.FindOrCreateAttribute(item, "AttributeIOR")
- print "A = ", A
- if A is not None :
- #res,A = myBuilder.FindOrCreateAttribute(item, "AttributeIOR")
- anIOR = A._narrow(SALOMEDS.AttributeIOR);
- print "anIOR.SetValue(dataflow.getIOR())"
- anIOR.SetValue(dataflow.getIOR())
- return
- itr.Next()
- obj = myBuilder.NewObject(father)
- A=myBuilder.FindOrCreateAttribute(obj, "AttributeName")
- aName=A._narrow(SALOMEDS.AttributeName)
- aName.SetValue(name)
- A=myBuilder.FindOrCreateAttribute(obj, "AttributeIOR")
- anIOR = A._narrow(SALOMEDS.AttributeIOR)
- anIOR.SetValue(dataflow.getIOR())
-
-import os
-dir= os.getenv("DATA_DIR")
-if dir == None:
- raise RuntimeError, "DATA_DIR is not defined"
-xmlfile = dir + "/Superv/Graphs/GraphGeomEssaiGates.xml"
-print "Load dataflow from the file : "
-print xmlfile
-print
-
-myGraph = StreamGraph ( xmlfile )
-
-# This DataFlow is "valid" : no loop, correct links between Nodes etc...
-print "myGraph.IsValid() = ", myGraph.IsValid()
-
-# Get Nodes
-myGraph.PrintNodes()
-
-# This DataFlow is "executable" : all pending Ports are defined with Datas
-print myGraph.IsExecutable()
-
-# Starts only execution of that DataFlow and gets control immediatly
-print myGraph.Run()
-
-# That DataFlow is running ==> 0 (false)
-print myGraph.IsDone()
-
-# Events of execution :
-aStatus,aNode,anEvent,aState = myGraph.Event()
-while aStatus :
- print aNode.Thread(),aNode.SubGraph(),aNode.Name(),anEvent,aState
- aStatus,aNode,anEvent,aState = myGraph.Event()
-print "myGraph.IsDone() = ",myGraph.IsDone()
-
-# Wait for Completion (but it is already done after event loop ...)
-print "Done : ",myGraph.DoneW()
-
-print " "
-#print "Type : print myGraph.IsDone()"
-#print " If execution is finished ==> 1 (true)"
-res=myGraph.IsDone()
-if res != 1:
- raise RuntimeError, "myGraph.Run() is not done"
-
-print " "
-print "Type : myGraph.PrintPorts()"
-print " to see input and output values of the graph"
-myGraph.PrintPorts()
-
-# Export will create newsupervisionexample.xml and the corresponding .py file
-tmpdir=os.getenv("TmpDir")
-if tmpdir is None:
- tmpdir="/tmp"
-file = tmpdir + "/newsupervisionexample"
-print "--------------\n"+file+"\n--------------\n"
-myGraph.Export(file)
-
-ior = salome.orb.object_to_string(myGraph.G)
-addStudy(ior)
-
-GraphName = myGraph.Name()
-print "Befor save ",
-#nodes = myGraph.Nodes()
-nodes = myGraph.G.Nodes().FNodes
-length_bs = len(nodes)
-print "ListOfNodes length = ", length_bs
-names=[]
-for node in nodes:
- names.append(node.Name())
-print names
-
-# Graph creation
-GraphInLines = StreamGraph( 'GraphInLines' )
-GraphInLines.SetName( 'GraphInLines' )
-GraphInLines.SetAuthor( '' )
-GraphInLines.SetComment( '' )
-GraphInLines.Coords( 0 , 0 )
-
-# Creation of InLine Nodes
-PyAdd = []
-PyAdd.append( 'def Add(a,b) : ' )
-PyAdd.append( ' return a+b ' )
-PyAdd.append( '' )
-Add = GraphInLines.INode( 'Add' , PyAdd )
-Add.InPort( 'a' , 'long' )
-Add.InPort( 'b' , 'long' )
-Add.OutPort( 'f' , 'long' )
-Add.SetName( 'Add' )
-Add.SetAuthor( '' )
-Add.SetComment( 'Python function' )
-Add.Coords( 351 , 77 )
-PySub = []
-PySub.append( 'def Sub(a,b) : ' )
-PySub.append( ' return a-b ' )
-PySub.append( '' )
-Sub = GraphInLines.INode( 'Sub' , PySub )
-Sub.InPort( 'a' , 'long' )
-Sub.InPort( 'b' , 'long' )
-Sub.OutPort( 'f' , 'long' )
-Sub.SetName( 'Sub' )
-Sub.SetAuthor( '' )
-Sub.SetComment( 'Python function' )
-Sub.Coords( 86 , 333 )
-PyMul = []
-PyMul.append( 'def Mul(a,b) : ' )
-PyMul.append( ' return a*b ' )
-Mul = GraphInLines.INode( 'Mul' , PyMul )
-Mul.InPort( 'a' , 'long' )
-Mul.InPort( 'b' , 'long' )
-Mul.OutPort( 'Result' , 'long' )
-Mul.SetName( 'Mul' )
-Mul.SetAuthor( '' )
-Mul.SetComment( 'Python function' )
-Mul.Coords( 616 , 247 )
-
-# Creation of intermediate Output variables and of Control Links
-Addf = Add.Port( 'f' )
-Mula = GraphInLines.Link( Addf , Mul.Port( 'a' ) )
-Mula.AddCoord( 1 , 570 , 356 )
-Mula.AddCoord( 2 , 570 , 186 )
-Subf = Sub.Port( 'f' )
-Mulb = GraphInLines.Link( Subf , Mul.Port( 'b' ) )
-Mulb.AddCoord( 1 , 282 , 376 )
-Mulb.AddCoord( 2 , 282 , 442 )
-Addb = GraphInLines.Link( Subf , Add.Port( 'b' ) )
-Addb.AddCoord( 1 , 283 , 209 )
-Addb.AddCoord( 2 , 283 , 374 )
-Addb.AddCoord( 3 , 283 , 442 )
-
-# Creation of Input datas
-Adda = Add.Input( 'a' , 1)
-Suba = Sub.Input( 'a' , 3)
-Subb = Sub.Input( 'b' , 4)
-
-# Creation of Output variables
-MulResult = Mul.Port( 'Result' )
-
-GraphInLines.Run()
-
-GraphInLines.DoneW()
-
-GraphInLines.PrintPorts()
-
-sg.updateObjBrowser(1);
+if sys.platform != "win32":
+ print
+ print "============= Test Supervisor ============================="
+ print
+
+ comp = catalog.GetComponent("SUPERV")
+ if comp is None:
+ raise RuntimeError,"Component SUPERV not found in Module Catalog."
+
+ from SuperV import *
+ import SALOMEDS
+ myStudy = salome.myStudy
+ myBuilder = myStudy.NewBuilder()
+
+ SuperVision = lcc.FindOrLoadComponent("SuperVisionContainer","SUPERV")
+ father = myStudy.FindComponent("SUPERV")
+ if father is None:
+ father = myBuilder.NewComponent("SUPERV")
+ A1 = myBuilder.FindOrCreateAttribute(father, "AttributeName");
+ FName = A1._narrow(SALOMEDS.AttributeName)
+ FName.SetValue( salome.sg.getComponentUserName("SUPERV") )
+ A2 = myBuilder.FindOrCreateAttribute(father, "AttributePixMap");
+ aPixmap = A2._narrow(SALOMEDS.AttributePixMap);
+ aPixmap.SetPixMap( "ICON_OBJBROWSER_Supervision" );
+ myBuilder.DefineComponentInstance(father,SuperVision)
+
+ def addStudy(ior):
+ dataflow = SuperVision.getStreamGraph(ior)
+ name=dataflow.Name()
+ itr = myStudy.NewChildIterator(father)
+ while itr.More():
+ item=itr.Value()
+ res,A=item.FindAttribute("AttributeName")
+ if res:
+ aName = A._narrow(SALOMEDS.AttributeName)
+ if aName.Value() == name :
+ print myBuilder.FindOrCreateAttribute(item, "AttributeIOR")
+ A = myBuilder.FindOrCreateAttribute(item, "AttributeIOR")
+ print "A = ", A
+ if A is not None :
+ #res,A = myBuilder.FindOrCreateAttribute(item, "AttributeIOR")
+ anIOR = A._narrow(SALOMEDS.AttributeIOR);
+ print "anIOR.SetValue(dataflow.getIOR())"
+ anIOR.SetValue(dataflow.getIOR())
+ return
+ itr.Next()
+ obj = myBuilder.NewObject(father)
+ A=myBuilder.FindOrCreateAttribute(obj, "AttributeName")
+ aName=A._narrow(SALOMEDS.AttributeName)
+ aName.SetValue(name)
+ A=myBuilder.FindOrCreateAttribute(obj, "AttributeIOR")
+ anIOR = A._narrow(SALOMEDS.AttributeIOR)
+ anIOR.SetValue(dataflow.getIOR())
+
+ import os
+ dir= os.getenv("DATA_DIR")
+ if dir == None:
+ raise RuntimeError, "DATA_DIR is not defined"
+ xmlfile = dir + "/Superv/Graphs/GraphGeomEssaiGates.xml"
+ print "Load dataflow from the file : "
+ print xmlfile
+ print
+
+ myGraph = StreamGraph ( xmlfile )
+
+ # This DataFlow is "valid" : no loop, correct links between Nodes etc...
+ print "myGraph.IsValid() = ", myGraph.IsValid()
+
+ # Get Nodes
+ myGraph.PrintNodes()
+
+ # This DataFlow is "executable" : all pending Ports are defined with Datas
+ print myGraph.IsExecutable()
+
+ # Starts only execution of that DataFlow and gets control immediatly
+ print myGraph.Run()
+
+ # That DataFlow is running ==> 0 (false)
+ print myGraph.IsDone()
+
+ # Events of execution :
+ aStatus,aNode,anEvent,aState = myGraph.Event()
+ while aStatus :
+ print aNode.Thread(),aNode.SubGraph(),aNode.Name(),anEvent,aState
+ aStatus,aNode,anEvent,aState = myGraph.Event()
+ print "myGraph.IsDone() = ",myGraph.IsDone()
+
+ # Wait for Completion (but it is already done after event loop ...)
+ print "Done : ",myGraph.DoneW()
+
+ print " "
+ #print "Type : print myGraph.IsDone()"
+ #print " If execution is finished ==> 1 (true)"
+ res=myGraph.IsDone()
+ if res != 1:
+ raise RuntimeError, "myGraph.Run() is not done"
+
+ print " "
+ print "Type : myGraph.PrintPorts()"
+ print " to see input and output values of the graph"
+ myGraph.PrintPorts()
+
+ # Export will create newsupervisionexample.xml and the corresponding .py file
+ tmpdir=os.getenv("TmpDir")
+ if tmpdir is None:
+ tmpdir="/tmp"
+ file = tmpdir + "/newsupervisionexample"
+ print "--------------\n"+file+"\n--------------\n"
+ myGraph.Export(file)
+
+ ior = salome.orb.object_to_string(myGraph.G)
+ addStudy(ior)
+
+ GraphName = myGraph.Name()
+ print "Befor save ",
+ #nodes = myGraph.Nodes()
+ nodes = myGraph.G.Nodes().FNodes
+ length_bs = len(nodes)
+ print "ListOfNodes length = ", length_bs
+ names=[]
+ for node in nodes:
+ names.append(node.Name())
+ print names
+
+ # Graph creation
+ GraphInLines = StreamGraph( 'GraphInLines' )
+ GraphInLines.SetName( 'GraphInLines' )
+ GraphInLines.SetAuthor( '' )
+ GraphInLines.SetComment( '' )
+ GraphInLines.Coords( 0 , 0 )
+
+ # Creation of InLine Nodes
+ PyAdd = []
+ PyAdd.append( 'def Add(a,b) : ' )
+ PyAdd.append( ' return a+b ' )
+ PyAdd.append( '' )
+ Add = GraphInLines.INode( 'Add' , PyAdd )
+ Add.InPort( 'a' , 'long' )
+ Add.InPort( 'b' , 'long' )
+ Add.OutPort( 'f' , 'long' )
+ Add.SetName( 'Add' )
+ Add.SetAuthor( '' )
+ Add.SetComment( 'Python function' )
+ Add.Coords( 351 , 77 )
+ PySub = []
+ PySub.append( 'def Sub(a,b) : ' )
+ PySub.append( ' return a-b ' )
+ PySub.append( '' )
+ Sub = GraphInLines.INode( 'Sub' , PySub )
+ Sub.InPort( 'a' , 'long' )
+ Sub.InPort( 'b' , 'long' )
+ Sub.OutPort( 'f' , 'long' )
+ Sub.SetName( 'Sub' )
+ Sub.SetAuthor( '' )
+ Sub.SetComment( 'Python function' )
+ Sub.Coords( 86 , 333 )
+ PyMul = []
+ PyMul.append( 'def Mul(a,b) : ' )
+ PyMul.append( ' return a*b ' )
+ Mul = GraphInLines.INode( 'Mul' , PyMul )
+ Mul.InPort( 'a' , 'long' )
+ Mul.InPort( 'b' , 'long' )
+ Mul.OutPort( 'Result' , 'long' )
+ Mul.SetName( 'Mul' )
+ Mul.SetAuthor( '' )
+ Mul.SetComment( 'Python function' )
+ Mul.Coords( 616 , 247 )
+
+ # Creation of intermediate Output variables and of Control Links
+ Addf = Add.Port( 'f' )
+ Mula = GraphInLines.Link( Addf , Mul.Port( 'a' ) )
+ Mula.AddCoord( 1 , 570 , 356 )
+ Mula.AddCoord( 2 , 570 , 186 )
+ Subf = Sub.Port( 'f' )
+ Mulb = GraphInLines.Link( Subf , Mul.Port( 'b' ) )
+ Mulb.AddCoord( 1 , 282 , 376 )
+ Mulb.AddCoord( 2 , 282 , 442 )
+ Addb = GraphInLines.Link( Subf , Add.Port( 'b' ) )
+ Addb.AddCoord( 1 , 283 , 209 )
+ Addb.AddCoord( 2 , 283 , 374 )
+ Addb.AddCoord( 3 , 283 , 442 )
+
+ # Creation of Input datas
+ Adda = Add.Input( 'a' , 1)
+ Suba = Sub.Input( 'a' , 3)
+ Subb = Sub.Input( 'b' , 4)
+
+ # Creation of Output variables
+ MulResult = Mul.Port( 'Result' )
+
+ GraphInLines.Run()
+
+ GraphInLines.DoneW()
+
+ GraphInLines.PrintPorts()
+
+ sg.updateObjBrowser(1);
+
+ pass
print
print "============= Test VISU and MED ============================="
if os.access(medFile, os.R_OK) :
if not os.access(medFile, os.W_OK) :
import random
- medFileNew = "/tmp/" + str(random.randint(0,1000000)) + "_" + medFileName
+ if sys.platform != "win32":
+ tmpDir = "/tmp/"
+ else:
+ tmpDir = os.getenv('TEMP') + '/'
+ medFileNew = tmpDir + str(random.randint(0,1000000)) + "_" + medFileName
print " -- Copy " + medFile + " to " + medFileNew
- os.system("cp "+ medFile + " " + medFileNew)
+
+ if sys.platform != "win32":
+ copyCommand = "cp"
+ else:
+ copyCommand = "copy /Y"
+ os.system(copyCommand + " " + medFile + " " + medFileNew)
+
medFile = medFileNew
os.system("chmod 755 " + medFile)
_refMachine = refMachine;
_origFileName = origFileName;
_containerName = containerName;
- if (_refMachine.empty() or _origFileName.empty())
+ if (_refMachine.empty() || _origFileName.empty())
{
INFOS("bad parameters: machine and file name must be given");
}
if (CORBA::is_nil(_theFileRef))
{
- if (_refMachine.empty() or _origFileName.empty())
+ if (_refMachine.empty() || _origFileName.empty())
{
INFOS("not enough parameters: machine and file name must be given");
return "";
#include <string>
-class SALOME_FileTransferCORBA
+#ifdef WNT
+# if defined LIFECYCLECORBA_EXPORTS
+# define LIFECYCLECORBA_EXPORT __declspec( dllexport )
+# else
+# define LIFECYCLECORBA_EXPORT __declspec( dllimport )
+# endif
+#else
+# define LIFECYCLECORBA_EXPORT
+#endif
+
+class LIFECYCLECORBA_EXPORT SALOME_FileTransferCORBA
{
public:
SALOME_FileTransferCORBA();
#include <iomanip>
#include <time.h>
-#include <sys/time.h>
+#ifndef WNT
+ #include <sys/time.h>
+#endif
#include "OpUtil.hxx"
#include "utilities.h"
Catalog->GetComponent(componentName);
if (CORBA::is_nil (compoInfo))
{
- INFOS("Catalog Error : Component not found in the catalog");
+ INFOS("Catalog Error: Component not found in the catalog" );
+ INFOS( componentName );
return false;
}
else return true;
#include CORBA_CLIENT_HEADER(SALOME_ContainerManager)
#include CORBA_CLIENT_HEADER(SALOME_Component)
-#if defined LIFECYCLECORBA_EXPORTS
-#if defined WIN32
-#define LIFECYCLECORBA_EXPORT __declspec( dllexport )
+#ifdef WNT
+# if defined LIFECYCLECORBA_EXPORTS
+# define LIFECYCLECORBA_EXPORT __declspec( dllexport )
+# else
+# define LIFECYCLECORBA_EXPORT __declspec( dllimport )
+# endif
#else
-#define LIFECYCLECORBA_EXPORT
-#endif
-#else
-#if defined WNT
-#define LIFECYCLECORBA_EXPORT __declspec( dllimport )
-#else
-#define LIFECYCLECORBA_EXPORT
-#endif
+# define LIFECYCLECORBA_EXPORT
#endif
#include <omnithread.h>
#include "Logger.hh"
-class Logger :
+#ifdef WNT
+# if defined LOGGER_EXPORTS
+# define LOGGER_EXPORT __declspec( dllexport )
+# else
+# define LOGGER_EXPORT __declspec( dllimport )
+# endif
+#else
+# define LOGGER_EXPORT
+#endif
+
+
+class LOGGER_EXPORT Logger :
public POA_SALOME_Logger::Logger,
public PortableServer::RefCountServantBase
{
#include <sys/types.h>
#ifndef __WIN32__
# include <unistd.h>
+#else
+# include "utilities.h" // for compilation type "timespec"
#endif
int main(int argc, char **argv)
PathPrefix.hxx \
SALOME_ModuleCatalog_Parser.hxx \
SALOME_ModuleCatalog_Parser_IO.hxx \
- SALOME_ModuleCatalog_Handler.hxx
+ SALOME_ModuleCatalog_Handler.hxx \
+ SALOME_ModuleCatalog.hxx
# Scripts to be installed
dist_salomescript_DATA = TestModuleCatalog.py
--- /dev/null
+// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//
+//
+// File : SALOME_ModuleCatalog.hxx
+// Author : Alexander A. BORODIN
+// Module : SALOME
+
+#ifndef _SALOME_ModuleCatalog_HXX_
+#define _SALOME_ModuleCatalog_HXX_
+
+#ifdef WNT
+ #if defined MODULECATALOG_EXPORTS
+ #if defined WIN32
+ #define MODULECATALOG_EXPORT __declspec( dllexport )
+ #else
+ #define MODULECATALOG_EXPORT
+ #endif
+ #else
+ #if defined WIN32
+ #define MODULECATALOG_EXPORT __declspec( dllimport )
+ #else
+ #define MODULECATALOG_EXPORT
+ #endif
+ #endif
+#else
+ #define MODULECATALOG_EXPORT
+#endif
+
+#endif
\ No newline at end of file
#ifndef ACOMPONENT_IMPL_H
#define ACOMPONENT_IMPL_H
+#include <SALOME_ModuleCatalog.hxx>
+
#include "SALOME_ModuleCatalog_Parser.hxx"
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SALOME_ModuleCatalog)
-#if defined MODULECATALOG_EXPORTS
-#if defined WIN32
-#define MODULECATALOG_EXPORT __declspec( dllexport )
-#else
-#define MODULECATALOG_EXPORT
-#endif
-#else
-#if defined WNT
-#define MODULECATALOG_EXPORT __declspec( dllimport )
-#else
-#define MODULECATALOG_EXPORT
-#endif
-#endif
-
class MODULECATALOG_EXPORT SALOME_ModuleCatalog_AcomponentImpl: public POA_SALOME_ModuleCatalog::Acomponent,
public PortableServer::RefCountServantBase
{
#ifndef SALOME_CATALOG_HANDLER_H
#define SALOME_CATALOG_HANDLER_H
+#include <SALOME_ModuleCatalog.hxx>
+
#include "SALOME_ModuleCatalog_Parser.hxx"
#include <qxml.h>
#include <string>
#include <stack>
#include <map>
-#if defined MODULECATALOG_EXPORTS
-#if defined WIN32
-#define MODULECATALOG_EXPORT __declspec( dllexport )
-#else
-#define MODULECATALOG_EXPORT
-#endif
-#else
-#if defined WNT
-#define MODULECATALOG_EXPORT __declspec( dllimport )
-#else
-#define MODULECATALOG_EXPORT
-#endif
-#endif
-
class MODULECATALOG_EXPORT SALOME_ModuleCatalog_Handler : public QXmlDefaultHandler
{
public:
static int MYDEBUG = 1;
#endif
-static const char* SEPARATOR = ":";
+static const char* SEPARATOR = "::";
//----------------------------------------------------------------------
// Function : SALOME_ModuleCatalogImpl
false ); // skip empty entries
for ( int i = 0; i < dirList.count(); i++ ) {
- QFileInfo fileInfo( dirList[ i ] );
+ //QFileInfo fileInfo( dirList[ i ] );
+ QFileInfo fileInfo( dirList[ i ].replace( '\"', "" ) ); //remove inverted commas from filename
if ( fileInfo.isFile() && fileInfo.exists() ) {
_parse_xml_file(fileInfo.filePath(),
_general_module_list,
#ifndef MODULECATALOG_IMPL_H
#define MODULECATALOG_IMPL_H
+#include <SALOME_ModuleCatalog.hxx>
+
#include <string>
#include <map>
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SALOME_ModuleCatalog)
-
-#if defined MODULECATALOG_EXPORTS
-#if defined WIN32
-#define MODULECATALOG_EXPORT __declspec( dllexport )
-#else
-#define MODULECATALOG_EXPORT
-#endif
-#else
-#if defined WNT
-#define MODULECATALOG_EXPORT __declspec( dllimport )
-#else
-#define MODULECATALOG_EXPORT
-#endif
-#endif
-
class MODULECATALOG_EXPORT SALOME_ModuleCatalogImpl: public POA_SALOME_ModuleCatalog::ModuleCatalog,
public PortableServer::RefCountServantBase
{
pkgpython_PYTHON = libNOTIFICATION.py
pkgpyexec_LTLIBRARIES = _libNOTIFICATION.la
_libNOTIFICATION_la_SOURCES = $(BUILT_SOURCES) $(SWIG_SOURCES) \
- NOTIFICATION_Swig.cxx NOTIFICATION_Swig.hxx
+ NOTIFICATION_Swig.cxx NOTIFICATION_Swig.hxx SALOME_NOTIFICATION_SWIG.hxx
_libNOTIFICATION_la_CPPFLAGS =\
@PYTHON_INCLUDES@ -DHAVE_CONFIG_H \
-I$(srcdir)/../Notification \
%module libNOTIFICATION
+#define _declspec(a)
+
%{
#include "NOTIFICATION_Swig.hxx"
%}
+%include SALOME_NOTIFICATION.hxx
+%include SALOME_NOTIFICATION_SWIG.hxx
%include NOTIFICATION.hxx
%include NOTIFICATION_Swig.hxx
// Module : SALOME
#include "NOTIFICATION.hxx"
+#include "SALOME_NOTIFICATION_SWIG.hxx"
-class NOTIFICATION_Supplier_Swig {
+class NOTIFICATION_SWIG_EXPORT NOTIFICATION_Supplier_Swig {
public:
NOTIFICATION_Supplier_Swig(const char* instanceName, bool notif);
~NOTIFICATION_Supplier_Swig();
NOTIFICATION_Supplier* _supplier;
};
-class NOTIFICATION_Consumer_Swig {
+class NOTIFICATION_SWIG_EXPORT NOTIFICATION_Consumer_Swig {
public:
NOTIFICATION_Consumer_Swig();
~NOTIFICATION_Consumer_Swig();
--- /dev/null
+// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//
+//
+// File : SALOME_NOTIFICATION_SWIG.hxx
+// Author : Oleg UVAROV
+// Module : SALOME
+
+#ifndef _SALOME_NOTIFICATION_SWIG_HXX_
+#define _SALOME_NOTIFICATION_SWIG_HXX_
+
+#ifdef WNT
+ #if defined NOTIFICATION_SWIG_EXPORTS
+ #if defined WIN32
+ #define NOTIFICATION_SWIG_EXPORT __declspec( dllexport )
+ #else
+ #define NOTIFICATION_SWIG_EXPORT
+ #endif
+ #else
+ #if defined WIN32
+ #define NOTIFICATION_SWIG_EXPORT __declspec( dllimport )
+ #else
+ #define NOTIFICATION_SWIG_EXPORT
+ #endif
+ #endif
+#else
+ #define NOTIFICATION_SWIG_EXPORT
+#endif
+
+#endif
\ No newline at end of file
}
else
{
- CORBA::Object_ptr obj = NS->Resolve(serverName.c_str());
+ CORBA::Object_var obj = NS->Resolve(serverName.c_str());
if (! CORBA::is_nil(obj))
{
found =1;
#ifndef _NAMINGSERVICE_WAITFORSERVERREADINESS_HXX_
#define _NAMINGSERVICE_WAITFORSERVERREADINESS_HXX_
-#include <string>
#include "SALOME_NamingService.hxx"
-#ifdef WNT
-#include <SALOME_WNT.hxx>
-#else
-#define SALOME_WNT_EXPORT
-#endif
-void SALOME_WNT_EXPORT NamingService_WaitForServerReadiness(SALOME_NamingService* NS,
+#include <string>
+
+void NAMINGSERVICE_EXPORT NamingService_WaitForServerReadiness(SALOME_NamingService* NS,
std::string serverName);
#endif
ASSERT(!CORBA::is_nil(_current_context));
- CORBA::Object_ptr obj = CORBA::Object::_nil();
+ CORBA::Object_var obj = CORBA::Object::_nil();
try
{
throw ServiceUnreachable();
}
- return obj;
+ return obj._retn();
}
// ============================================================================
}
// SCRUTE(name);
- CORBA::Object_ptr obj = CORBA::Object::_nil();
+ CORBA::Object_var obj = CORBA::Object::_nil();
bool isOk = false;
if (basePath.empty())
}
}
- return obj;
+ return obj._retn();
}
// ============================================================================
if (binding->binding_type == CosNaming::nobject)
{
- dirList.push_back(CORBA::string_dup(bindingName[0].id));
+ // remove memory leak
+ // dirList.push_back(CORBA::string_dup(bindingName[0].id));
+ dirList.push_back(string(bindingName[0].id));
}
}
#if !defined ( SERVICEUNREACHABLE_H )
#define SERVICEUNREACHABLE_H
-#include "Utils_SALOME_Exception.hxx"
-
#if defined NAMINGSERVICE_EXPORTS
-#if defined WIN32
+#if defined WNT
#define NAMINGSERVICE_EXPORT __declspec( dllexport )
#else
#define NAMINGSERVICE_EXPORT
#endif
#endif
+#include "Utils_SALOME_Exception.hxx"
+
//! exception class for NamingService : ServiceUnreachable
class NAMINGSERVICE_EXPORT ServiceUnreachable : public SALOME_Exception
NOTIFICATION.hxx \
NOTIFICATION_Supplier.hxx \
NOTIFICATION_Consumer.hxx \
- CosNotifyShorthands.h
+ CosNotifyShorthands.h \
+ SALOME_NOTIFICATION.hxx
#
# ===============================================================
#ifndef NOTIFICATION_HXX
#define NOTIFICATION_HXX
+#include <SALOME_NOTIFICATION.hxx>
+
#define NOTIF_WARNING "Warning"
#define NOTIF_STEP "Step"
#define NOTIF_TRACE "Trace"
#include "NOTIFICATION_Supplier.hxx"
#include "NOTIFICATION_Consumer.hxx"
-
-#if defined NOTIFICATION_EXPORTS
-#if defined WIN32
-#define NOTIFICATION_EXPORT __declspec( dllexport )
-#else
-#define NOTIFICATION_EXPORT
-#endif
-#else
-#if defined WNT
-#define NOTIFICATION_EXPORT __declspec( dllimport )
-#else
-#define NOTIFICATION_EXPORT
-#endif
-#endif
-
NOTIFICATION_EXPORT char* NOTIFICATION_date();
NOTIFICATION_EXPORT CosNA_EventChannel_ptr NOTIFICATION_channel();
#ifndef NOTIFICATION_Consumer_HXX
#define NOTIFICATION_Consumer_HXX
-#if defined NOTIFICATION_EXPORTS
-#if defined WIN32
-#define NOTIFICATION_EXPORT __declspec( dllexport )
-#else
-#define NOTIFICATION_EXPORT
-#endif
-#else
-#if defined WNT
-#define NOTIFICATION_EXPORT __declspec( dllimport )
-#else
-#define NOTIFICATION_EXPORT
-#endif
-#endif
+#include <SALOME_NOTIFICATION.hxx>
class NOTIFICATION_EXPORT NOTIFICATION_Consumer: public POA_CosNotifyComm::StructuredPullConsumer {
public:
#ifndef NOTIFICATION_Supplier_HXX
#define NOTIFICATION_Supplier_HXX
-#if defined NOTIFICATION_EXPORTS
-#if defined WIN32
-#define NOTIFICATION_EXPORT __declspec( dllexport )
-#else
-#define NOTIFICATION_EXPORT
-#endif
-#else
-#if defined WNT
-#define NOTIFICATION_EXPORT __declspec( dllimport )
-#else
-#define NOTIFICATION_EXPORT
-#endif
-#endif
+#include <SALOME_NOTIFICATION.hxx>
class NOTIFICATION_EXPORT NOTIFICATION_Supplier: public POA_CosNotifyComm::StructuredPushSupplier {
public:
--- /dev/null
+// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//
+//
+// File : SALOME_NOTIFICATION.hxx
+// Author : Alexander A. BORODIN
+// Module : SALOME
+
+#ifndef _SALOME_NOTIFICATION_HXX_
+#define _SALOME_NOTIFICATION_HXX_
+
+#ifdef WNT
+ #if defined NOTIFICATION_EXPORTS
+ #if defined WIN32
+ #define NOTIFICATION_EXPORT __declspec( dllexport )
+ #else
+ #define NOTIFICATION_EXPORT
+ #endif
+ #else
+ #if defined WIN32
+ #define NOTIFICATION_EXPORT __declspec( dllimport )
+ #else
+ #define NOTIFICATION_EXPORT
+ #endif
+ #endif
+#else
+ #define NOTIFICATION_EXPORT
+#endif
+
+#endif
\ No newline at end of file
# header files
salomeinclude_HEADERS =\
RegistryConnexion.hxx \
- RegistryService.hxx
+ RegistryService.hxx \
+ SALOME_Registry.hxx
# Libraries targets
lib_LTLIBRARIES = libRegistry.la
# if !defined( __RegistryConnexion_HXX__ )
# define __RegistryConnexion_HXX__
+#include <SALOME_Registry.hxx>
+
#include <SALOMEconfig.h>
#include CORBA_CLIENT_HEADER(SALOME_Registry)
#include <string>
-#if defined REGISTRY_EXPORTS
-#if defined WIN32
-#define REGISTRY_EXPORT __declspec( dllexport )
-#else
-#define REGISTRY_EXPORT
-#endif
-#else
-#if defined WNT
-#define REGISTRY_EXPORT __declspec( dllimport )
-#else
-#define REGISTRY_EXPORT
-#endif
-#endif
-
class REGISTRY_EXPORT RegistryConnexion
{
protected :
# ifndef __RegistryService_h__
# define __RegistryService_h__
+#include <SALOME_Registry.hxx>
+
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SALOME_Registry)
# include <map>
-#if defined REGISTRY_EXPORTS
-#if defined WIN32
-#define REGISTRY_EXPORT __declspec( dllexport )
-#else
-#define REGISTRY_EXPORT
-#endif
-#else
-#if defined WNT
-#define REGISTRY_EXPORT __declspec( dllimport )
-#else
-#define REGISTRY_EXPORT
-#endif
-#endif
-
class REGISTRY_EXPORT RegistryService : public POA_Registry::Components //, public PortableServer::RefCountServantBase
{
--- /dev/null
+// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//
+//
+// File : SALOME_Registry.hxx
+// Author : Alexander A. BORODIN
+// Module : SALOME
+
+#ifndef _SALOME_Registry_HXX_
+#define _SALOME_Registry_HXX_
+
+#ifdef WNT
+ #if defined REGISTRY_EXPORTS
+ #if defined WIN32
+ #define REGISTRY_EXPORT __declspec( dllexport )
+ #else
+ #define REGISTRY_EXPORT
+ #endif
+ #else
+ #if defined WIN32
+ #define REGISTRY_EXPORT __declspec( dllimport )
+ #else
+ #define REGISTRY_EXPORT
+ #endif
+ #endif
+#else
+ #define REGISTRY_EXPORT
+#endif
+
+#endif
\ No newline at end of file
if ((qName.compare(QString(test_modules)) == 0))
_resource.ModulesPath[previous_module_name] = previous_module_path;
- if ((qName.compare(QString(test_machine)) == 0))
- _resources_list[_resource.DataForSort._hostName] = _resource;
+ if ((qName.compare(QString(test_machine)) == 0)){
+ int nbnodes = _resource.DataForSort._nbOfNodes;
+ if( nbnodes > 1 ){
+ string clusterNode = _resource.DataForSort._hostName ;
+ for(int i=0;i<nbnodes;i++){
+ char inode[64];
+ inode[0] = '\0' ;
+ sprintf(inode,"%s%d",clusterNode.c_str(),i+1);
+ std::string nodeName(inode);
+// _resource.DataForSort._nbOfNodes = 1;
+ _resource.DataForSort._hostName = nodeName ;
+ _resources_list[nodeName] = _resource;
+ //cout << "SALOME_ResourcesCatalog_Handler::endElement _resources_list["
+ // << nodeName << "] = _resource " << _resource.DataForSort._hostName.c_str()
+ // << endl ;
+ }
+ }
+ else
+ _resources_list[_resource.DataForSort._hostName] = _resource;
+ }
return true;
}
else
{
+// Cas d'un cluster: nombre de noeuds > 1
+ int cpt=0;
+ for (map<string, ParserResourcesType>::const_iterator iter = _resourcesList.begin(); iter != _resourcesList.end(); iter++){
+ if( (*iter).second.DataForSort._nbOfNodes > 1 ){
+ if( strncmp(hostname,(*iter).first.c_str(),strlen(hostname)) == 0 ){
+ ret.push_back((*iter).first.c_str());
+ //cout << "SALOME_ResourcesManager::GetFittingResources vector["
+ // << cpt << "] = " << (*iter).first.c_str() << endl ;
+ cpt++;
+ }
+ }
+ }
+ if(cpt==0){
// --- user specified an unknown hostame so notify him.
- MESSAGE("ResourcesManager::GetFittingResources : SALOME_Exception");
- throw SALOME_Exception("unknown host");
+ MESSAGE("ResourcesManager::GetFittingResources : SALOME_Exception");
+ throw SALOME_Exception("unknown host");
+ }
}
}
{
if (_TmpFileName != "")
{
+#ifndef WNT
string command = "rm ";
+#else
+ string command = "del /F ";
+#endif
command += _TmpFileName;
char *temp = strdup(command.c_str());
int lgthTemp = strlen(temp);
void SALOME_ResourcesManager::AddOmninamesParams(ofstream& fileStream) const
{
- string omniORBcfg( getenv( "OMNIORB_CONFIG" ) ) ;
- ifstream omniORBfile( omniORBcfg.c_str() ) ;
- char ORBInitRef[11] ;
- char egal[3] ;
- char nameservice[132] ;
- omniORBfile >> ORBInitRef ;
- fileStream << "ORBInitRef ";
- omniORBfile >> egal ;
- omniORBfile >> nameservice ;
- omniORBfile.close() ;
- char * bsn = strchr( nameservice , '\n' ) ;
-
- if ( bsn )
- {
- bsn[ 0 ] = '\0' ;
- }
-
- fileStream << nameservice;
+ fileStream << "ORBInitRef NameService=";
+ fileStream << _NS->getIORaddr();
}
tempOutputFile << "export LD_LIBRARY_PATH" << endl;
tempOutputFile << "export PYTHONPATH" << endl;
+ tempOutputFile << "export SALOME_trace=local" << endl; // mkr : 27.11.2006 : PAL13967 - Distributed supervision graphs - Problem with "SALOME_trace"
//tempOutputFile << "source " << resInfo.PreReqFilePath << endl;
// ! env vars
}
else if (resInfo.Protocol == ssh)
- command = "ssh ";
+ {
+ command = "ssh ";
+ string commandRcp = "scp ";
+ commandRcp += _TmpFileName;
+ commandRcp += " ";
+ commandRcp += machine;
+ commandRcp += ":";
+ commandRcp += _TmpFileName;
+ system(commandRcp.c_str());
+ }
else
throw SALOME_Exception("Unknown protocol");
#include <fstream>
#include <vector>
-
-
-#if defined RESOURCESMANAGER_EXPORTS
-#if defined WIN32
-#define RESOURCESMANAGER_EXPORT __declspec( dllexport )
-#else
-#define RESOURCESMANAGER_EXPORT
-#endif
-#else
-#if defined WNT
-#define RESOURCESMANAGER_EXPORT __declspec( dllimport )
-#else
-#define RESOURCESMANAGER_EXPORT
-#endif
-#endif
-
// --- WARNING ---
// The call of BuildTempFileToLaunchRemoteContainer and RmTmpFile must be done
// in a critical section to be sure to be clean.
SALOMEDS_SComponent.hxx \
SALOMEDS_GenericAttribute_i.hxx \
SALOMEDS_GenericAttribute.hxx \
- SALOMEDS_IParameters.hxx
+ SALOMEDS_IParameters.hxx \
+ SALOMEDS_Defines.hxx
# Scripts to be installed
dist_salomescript_DATA = SALOME_DriverPy.py
SALOMEDS_AttributeStudyProperties_i.cxx \
SALOMEDS_AttributePythonObject_i.cxx \
SALOMEDS_AttributeParameter_i.cxx \
+ SALOMEDS_AttributeString_i.cxx \
SALOMEDS_SObject.cxx \
SALOMEDS_SComponent.cxx \
SALOMEDS_GenericAttribute.cxx \
SALOMEDS_AttributeUserID.cxx \
SALOMEDS_TMPFile_i.cxx \
SALOMEDS_AttributeParameter.cxx \
+ SALOMEDS_AttributeString.cxx \
SALOMEDS_IParameters.cxx \
\
Handle_SALOMEDS_DataMapNodeOfDataMapOfIntegerString.hxx \
SALOMEDS_UseCaseIterator_i.hxx \
SALOMEDS_AttributeParameter.hxx \
SALOMEDS_AttributeParameter_i.hxx \
+ SALOMEDS_AttributeString.hxx \
+ SALOMEDS_AttributeString_i.hxx \
SALOMEDS_TMPFile_i.hxx
libSalomeDS_la_CPPFLAGS = $(COMMON_CPPFLAGS)
#include "SALOMEDS_StudyManager_i.hxx"
#endif
+#include "SALOMEDS_Defines.hxx"
+
// IDL headers
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SALOMEDS)
extern "C"
{
-
-SALOMEDSClient_StudyManager* StudyManagerFactory()
+SALOMEDS_EXPORT
+ SALOMEDSClient_StudyManager* StudyManagerFactory()
{
return new SALOMEDS_StudyManager();
}
-
-SALOMEDSClient_Study* StudyFactory(SALOMEDS::Study_ptr theStudy)
+SALOMEDS_EXPORT
+ SALOMEDSClient_Study* StudyFactory(SALOMEDS::Study_ptr theStudy)
{
if(CORBA::is_nil(theStudy)) return NULL;
return new SALOMEDS_Study(theStudy);
}
-SALOMEDSClient_SObject* SObjectFactory(SALOMEDS::SObject_ptr theSObject)
+SALOMEDS_EXPORT
+ SALOMEDSClient_SObject* SObjectFactory(SALOMEDS::SObject_ptr theSObject)
{
if(CORBA::is_nil(theSObject)) return NULL;
return new SALOMEDS_SObject(theSObject);
}
-SALOMEDSClient_SComponent* SComponentFactory(SALOMEDS::SComponent_ptr theSComponent)
+SALOMEDS_EXPORT
+ SALOMEDSClient_SComponent* SComponentFactory(SALOMEDS::SComponent_ptr theSComponent)
{
if(CORBA::is_nil(theSComponent)) return NULL;
return new SALOMEDS_SComponent(theSComponent);
}
-SALOMEDSClient_StudyBuilder* BuilderFactory(SALOMEDS::StudyBuilder_ptr theBuilder)
+SALOMEDS_EXPORT
+ SALOMEDSClient_StudyBuilder* BuilderFactory(SALOMEDS::StudyBuilder_ptr theBuilder)
{
if(CORBA::is_nil(theBuilder)) return NULL;
return new SALOMEDS_StudyBuilder(theBuilder);
}
-SALOMEDSClient_StudyManager* CreateStudyManager(CORBA::ORB_ptr orb, PortableServer::POA_ptr root_poa)
+SALOMEDS_EXPORT
+ SALOMEDSClient_StudyManager* CreateStudyManager(CORBA::ORB_ptr orb, PortableServer::POA_ptr root_poa)
{
SALOME_NamingService namingService(orb);
CORBA::Object_var obj = namingService.Resolve( "/myStudyManager" );
return new SALOMEDS_StudyManager();
}
-SALOMEDSClient_IParameters* GetIParameters(const _PTR(AttributeParameter)& ap)
+SALOMEDS_EXPORT
+ SALOMEDSClient_IParameters* GetIParameters(const _PTR(AttributeParameter)& ap)
{
return new SALOMEDS_IParameters(ap);
}
-
-SALOMEDS::SObject_ptr ConvertSObject(const _PTR(SObject)& theSObject)
+SALOMEDS_EXPORT
+ SALOMEDS::SObject_ptr ConvertSObject(const _PTR(SObject)& theSObject)
{
SALOMEDS_SObject* so = _CAST(SObject, theSObject);
return so->GetSObject();
}
-SALOMEDS::Study_ptr ConvertStudy(const _PTR(Study)& theStudy)
+SALOMEDS_EXPORT
+ SALOMEDS::Study_ptr ConvertStudy(const _PTR(Study)& theStudy)
{
SALOMEDS_Study* study = _CAST(Study, theStudy);
if(!theStudy || !study) return SALOMEDS::Study::_nil();
return study->GetStudy();
}
-SALOMEDS::StudyBuilder_ptr ConvertBuilder(const _PTR(StudyBuilder)& theBuilder)
+SALOMEDS_EXPORT
+ SALOMEDS::StudyBuilder_ptr ConvertBuilder(const _PTR(StudyBuilder)& theBuilder)
{
SALOMEDS_StudyBuilder* builder = _CAST(StudyBuilder, theBuilder);
if(!theBuilder || !builder) return SALOMEDS::StudyBuilder::_nil();
#ifndef SALOMEDS_HeaderFile
#define SALOMEDS_HeaderFile
+#include <SALOMEDS_Defines.hxx>
+
#include <Utils_Mutex.hxx>
namespace SALOMEDS
//
// Locker lock;
//
- class Locker : public Utils_Locker
+ class SALOMEDS_EXPORT Locker : public Utils_Locker
{
public:
Locker();
SALOMEDS::Locker lock;
CheckLocked();
CORBA::String_var Str = CORBA::string_dup(value);
- Handle(SALOMEDSImpl_AttributeIOR)::DownCast(_impl)->SetValue(TCollection_ExtendedString(Str));
+ TCollection_ExtendedString anExtStr((char *)Str.in());
+ Handle(SALOMEDSImpl_AttributeIOR)::DownCast(_impl)->SetValue(anExtStr);
}
* Purpose : Associates a double value with the ID
*/
//=======================================================================
-void SALOMEDS_AttributeParameter_i::SetReal(const char* theID, const CORBA::Double theValue)
+void SALOMEDS_AttributeParameter_i::SetReal(const char* theID, CORBA::Double theValue)
{
SALOMEDS::Locker lock;
CheckLocked();
virtual void SetInt(const char* theID, CORBA::Long theValue);
virtual CORBA::Long GetInt(const char* theID);
- virtual void SetReal(const char* theID, const CORBA::Double theValue);
+ virtual void SetReal(const char* theID, CORBA::Double theValue);
virtual CORBA::Double GetReal(const char* theID);
virtual void SetString(const char* theID, const char* theValue);
#include CORBA_SERVER_HEADER(SALOMEDS)
#include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
-
-#ifdef GetObject
-#undef GetObject
-#endif
-
class SALOMEDS_AttributePythonObject: public SALOMEDS_GenericAttribute, public SALOMEDSClient_AttributePythonObject
{
public:
char* SALOMEDS_AttributePythonObject_i::GetObject()
{
SALOMEDS::Locker lock;
- char* aSeq = Handle(SALOMEDSImpl_AttributePythonObject)::DownCast(_impl)->GetObject().ToCString();
- CORBA::String_var aStr = CORBA::string_dup(aSeq);
+ TCollection_AsciiString aSeq(Handle(SALOMEDSImpl_AttributePythonObject)::
+ DownCast(_impl)->GetObject().ToCString());
+ CORBA::String_var aStr = CORBA::string_dup(aSeq.ToCString());
return aStr._retn();
}
--- /dev/null
+// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// File : SALOMEDS_AttributeString.cxx
+// Author : Sergey RUIN
+// Module : SALOME
+
+#include "SALOMEDS_AttributeString.hxx"
+#include "SALOMEDS.hxx"
+
+#include <string>
+#include <TCollection_AsciiString.hxx>
+#include <TCollection_ExtendedString.hxx>
+
+SALOMEDS_AttributeString::SALOMEDS_AttributeString(const Handle(SALOMEDSImpl_AttributeString)& theAttr)
+:SALOMEDS_GenericAttribute(theAttr)
+{}
+
+SALOMEDS_AttributeString::SALOMEDS_AttributeString(SALOMEDS::AttributeString_ptr theAttr)
+:SALOMEDS_GenericAttribute(theAttr)
+{}
+
+SALOMEDS_AttributeString::~SALOMEDS_AttributeString()
+{}
+
+std::string SALOMEDS_AttributeString::Value()
+{
+ std::string aValue;
+ if (_isLocal) {
+ SALOMEDS::Locker lock;
+ aValue = TCollection_AsciiString(Handle(SALOMEDSImpl_AttributeString)::
+ DownCast(_local_impl)->Value()).ToCString();
+ }
+ else aValue = SALOMEDS::AttributeString::_narrow(_corba_impl)->Value();
+ return aValue;
+}
+
+void SALOMEDS_AttributeString::SetValue(const std::string& value)
+{
+ if (_isLocal) {
+ CheckLocked();
+ SALOMEDS::Locker lock;
+ Handle(SALOMEDSImpl_AttributeString)::DownCast(_local_impl)->SetValue((char*)value.c_str());
+ }
+ else SALOMEDS::AttributeString::_narrow(_corba_impl)->SetValue(value.c_str());
+}
--- /dev/null
+// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// File : SALOMEDS_AttributeString.hxx
+// Author : Sergey RUIN
+// Module : SALOME
+
+#ifndef SALOMEDS_AttributeString_HeaderFile
+#define SALOMEDS_AttributeString_HeaderFile
+
+#include "SALOMEDSClient_AttributeString.hxx"
+#include "SALOMEDS_GenericAttribute.hxx"
+#include "SALOMEDSImpl_AttributeString.hxx"
+
+// IDL headers
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(SALOMEDS)
+#include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
+
+class SALOMEDS_AttributeString: public SALOMEDS_GenericAttribute, public SALOMEDSClient_AttributeString
+{
+public:
+ SALOMEDS_AttributeString(const Handle(SALOMEDSImpl_AttributeString)& theAttr);
+ SALOMEDS_AttributeString(SALOMEDS::AttributeString_ptr theAttr);
+ ~SALOMEDS_AttributeString();
+
+ virtual std::string Value();
+ virtual void SetValue(const std::string& value);
+};
+
+#endif
--- /dev/null
+// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// File : SALOMEDS_AttributeString_i.cxx
+// Author : Sergey RUIN
+// Module : SALOME
+
+
+#include "SALOMEDS_AttributeString_i.hxx"
+
+#include <TCollection_ExtendedString.hxx>
+#include "SALOMEDS_SObject_i.hxx"
+#include "SALOMEDS.hxx"
+
+using namespace std;
+
+char* SALOMEDS_AttributeString_i::Value()
+{
+ SALOMEDS::Locker lock;
+
+ CORBA::String_var c_s =
+ CORBA::string_dup(TCollection_AsciiString(Handle(SALOMEDSImpl_AttributeString)::DownCast(_impl)->Value()).ToCString());
+ return c_s._retn();
+}
+
+void SALOMEDS_AttributeString_i::SetValue(const char* value)
+{
+ SALOMEDS::Locker lock;
+
+ CheckLocked();
+ TCollection_AsciiString aStr((char*)value);
+ Handle(SALOMEDSImpl_AttributeString)::DownCast(_impl)->SetValue(TCollection_ExtendedString(aStr));
+}
--- /dev/null
+// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// File : SALOMEDS_AttributeString_i.hxx
+// Author : Sergey RUIN
+// Module : SALOME
+
+#ifndef SALOMEDS_AttributeString_i_HeaderFile
+#define SALOMEDS_AttributeString_i_HeaderFile
+
+// IDL headers
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
+
+#include "SALOMEDS_GenericAttribute_i.hxx"
+#include "SALOMEDSImpl_AttributeString.hxx"
+
+class SALOMEDS_AttributeString_i: public virtual POA_SALOMEDS::AttributeString,
+ public virtual SALOMEDS_GenericAttribute_i
+{
+public:
+ SALOMEDS_AttributeString_i(const Handle(SALOMEDSImpl_AttributeString)& theAttr, CORBA::ORB_ptr orb)
+ :SALOMEDS_GenericAttribute_i(theAttr, orb) {};
+
+ virtual ~SALOMEDS_AttributeString_i() {};
+
+ char* Value();
+ void SetValue(const char* value);
+};
+
+#endif
}
else {
SALOMEDS::LongSeq_var aRow = SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->GetRow(theRow);
+ aLength = aRow->length();
for (i = 0; i < aLength; i++) aVector.push_back(aRow[i]);
}
}
else {
SALOMEDS::LongSeq_var aColumn = SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->GetColumn(theColumn);
+ aLength = aColumn->length();
for (i = 0; i < aLength; i++) aVector.push_back(aColumn[i]);
}
return aVector;
else {
SALOMEDS::LongSeq_var aSet =
SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->GetRowSetIndices(theRow);
+ aLength = aSet->length();
for (i = 0; i < aLength; i++) aVector.push_back(aSet[i]);
}
return aVector;
}
else {
SALOMEDS::DoubleSeq_var aRow = SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->GetRow(theRow);
+ aLength = aRow->length();
for (i = 0; i < aLength; i++) aVector.push_back(aRow[i]);
}
}
else {
SALOMEDS::DoubleSeq_var aColumn = SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->GetColumn(theColumn);
+ aLength = aColumn->length();
for (i = 0; i < aLength; i++) aVector.push_back(aColumn[i]);
}
return aVector;
}
else {
SALOMEDS::LongSeq_var aSet = SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->GetRowSetIndices(theRow);
+ aLength = aSet->length();
for (i = 0; i < aLength; i++) aVector.push_back(aSet[i]);
}
return aVector;
else {
SALOMEDS::Study::ListOfSObject_var aSeq = SALOMEDS::AttributeTarget::_narrow(_corba_impl)->Get();
aLength = aSeq->length();
- aSO = new SALOMEDS_SObject(aSeq[i].in());
- for (i = 0; i < aLength; i++) aVector.push_back(_PTR(SObject)(aSO));
+ for (i = 0; i < aLength; i++) {
+ aSO = new SALOMEDS_SObject(aSeq[i].in());
+ aVector.push_back(_PTR(SObject)(aSO));
+ }
}
return aVector;
#include "SALOMEDSImpl_AttributeFlags.hxx"
#include "SALOMEDSImpl_AttributeGraphic.hxx"
#include "SALOMEDSImpl_AttributeParameter.hxx"
+#include "SALOMEDSImpl_AttributeString.hxx"
#include "SALOMEDS_GenericAttribute_i.hxx"
#include "SALOMEDS_AttributeName_i.hxx"
#include "SALOMEDS_AttributeFlags_i.hxx"
#include "SALOMEDS_AttributeGraphic_i.hxx"
#include "SALOMEDS_AttributeParameter_i.hxx"
+#include "SALOMEDS_AttributeString_i.hxx"
#define __CreateCORBAAttribute(CORBA_Name) if (strcmp(aTypeOfAttribute, #CORBA_Name) == 0) { \
Handle(SALOMEDSImpl_##CORBA_Name) A = Handle(SALOMEDSImpl_##CORBA_Name)::DownCast(theAttr); \
__CreateCORBAAttribute(AttributeGraphic) \
__CreateCORBAAttribute(AttributeTreeNode) \
__CreateCORBAAttribute(AttributeUserID) \
-__CreateCORBAAttribute(AttributeParameter)
+__CreateCORBAAttribute(AttributeParameter) \
+__CreateCORBAAttribute(AttributeString)
#endif
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SALOMEDS)
#include "SALOMEDS_StudyManager_i.hxx"
-#include "utilities.h"
#include "SALOMEDS_AttributeName_i.hxx"
+#include "utilities.h"
#include "HDFOI.hxx"
+
using namespace std;
//============================================================================
#include "SALOMEDSImpl_AttributeFlags.hxx"
#include "SALOMEDSImpl_AttributeGraphic.hxx"
#include "SALOMEDSImpl_AttributeParameter.hxx"
+#include "SALOMEDSImpl_AttributeString.hxx"
#include "SALOMEDS_GenericAttribute.hxx"
#include "SALOMEDS_AttributeName.hxx"
#include "SALOMEDS_AttributeFlags.hxx"
#include "SALOMEDS_AttributeGraphic.hxx"
#include "SALOMEDS_AttributeParameter.hxx"
+#include "SALOMEDS_AttributeString.hxx"
#define __CreateClientAttributeLocal(CORBA_Name) if (strcmp(aTypeOfAttribute.c_str(), #CORBA_Name) == 0) { \
Handle(SALOMEDSImpl_##CORBA_Name) A = Handle(SALOMEDSImpl_##CORBA_Name)::DownCast(theGA); \
__CreateClientAttributeLocal(AttributeGraphic) \
__CreateClientAttributeLocal(AttributeTreeNode) \
__CreateClientAttributeLocal(AttributeUserID) \
-__CreateClientAttributeLocal(AttributeParameter)
+__CreateClientAttributeLocal(AttributeParameter) \
+__CreateClientAttributeLocal(AttributeString)
#define __CreateGenericClientAttributeCORBA \
__CreateClientAttributeCORBA(AttributeReal) \
__CreateClientAttributeCORBA(AttributeGraphic) \
__CreateClientAttributeCORBA(AttributeTreeNode) \
__CreateClientAttributeCORBA(AttributeUserID) \
-__CreateClientAttributeCORBA(AttributeParameter)
+__CreateClientAttributeCORBA(AttributeParameter) \
+__CreateClientAttributeCORBA(AttributeString)
#endif
--- /dev/null
+// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//
+//
+// File : SALOMEDS_Defines.hxx
+// Author : Alexander A. BORODIN
+// Module : SALOME
+
+#ifndef _SALOMEDS_Defines_HXX_
+#define _SALOMEDS_Defines_HXX_
+
+#ifdef WNT
+ #if defined SALOMEDS_EXPORTS
+ #if defined WIN32
+ #define SALOMEDS_EXPORT __declspec( dllexport )
+ #else
+ #define SALOMEDS_EXPORT
+ #endif
+ #else
+ #if defined WIN32
+ #define SALOMEDS_EXPORT __declspec( dllimport )
+ #else
+ #define SALOMEDS_EXPORT
+ #endif
+ #endif
+#else
+ #define SALOMEDS_EXPORT
+#endif
+
+#endif
#ifndef __SALOMEDS_DRIVER_I_H__
#define __SALOMEDS_DRIVER_I_H__
-#include <CORBA.h>
+#include <omniORB4/CORBA.h>
#include <TCollection_AsciiString.hxx>
#include "SALOMEDSImpl_Driver.hxx"
#include "SALOMEDSImpl_SComponent.hxx"
long pid = (long)getpid();
#endif
- long addr = theGA->GetLocalImpl(GetHostname().c_str(), pid, _isLocal);
+ CORBA::LongLong addr = theGA->GetLocalImpl(GetHostname().c_str(), pid, _isLocal);
if(_isLocal) {
_local_impl = ((SALOMEDSImpl_GenericAttribute*)(addr));
_corba_impl = SALOMEDS::GenericAttribute::_nil();
}
*/
// mpv: now servants Destroyed by common algos of CORBA
- char* aTypeOfAttribute = Handle(SALOMEDSImpl_GenericAttribute)::
- DownCast(theAttr)->GetClassType().ToCString();
+ TCollection_AsciiString aClassType = Handle(SALOMEDSImpl_GenericAttribute)::
+ DownCast(theAttr)->GetClassType();
+ char* aTypeOfAttribute = aClassType.ToCString();
SALOMEDS::GenericAttribute_var anAttribute;
SALOMEDS_GenericAttribute_i* attr_servant = NULL;
__CreateGenericCORBAAttribute
//===========================================================================
// PRIVATE FUNCTIONS
//===========================================================================
-CORBA::Long SALOMEDS_GenericAttribute_i::GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal)
+CORBA::LongLong SALOMEDS_GenericAttribute_i::GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal)
{
#ifdef WIN32
long pid = (long)_getpid();
#endif
isLocal = (strcmp(theHostname, GetHostname().c_str()) == 0 && pid == thePID)?1:0;
TDF_Attribute* local_impl = _impl.operator->();
- return ((long)local_impl);
+ return ((CORBA::LongLong)local_impl);
}
static SALOMEDS::GenericAttribute_ptr CreateAttribute(const Handle(TDF_Attribute)& theAttr, CORBA::ORB_ptr theOrb);
- virtual CORBA::Long GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal);
+ virtual CORBA::LongLong GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal);
};
#endif
// Author : Sergey RUIN
// Module : SALOME
-
-
#include <string>
#include <TCollection_AsciiString.hxx>
#include <TColStd_HSequenceOfTransient.hxx>
#include "Utils_SINGLETON.hxx"
#ifdef WIN32
+#include <windows.h>
#include <process.h>
#else
#include <sys/types.h>
long pid = (long)getpid();
#endif
- long addr = theSObject->GetLocalImpl(GetHostname().c_str(), pid, _isLocal);
+ CORBA::LongLong addr = // mpv: fix for IPAL13534: for 64-bit platforms use 8-bytes long for pointer storage
+ theSObject->GetLocalImpl(GetHostname().c_str(), pid, _isLocal);
+
if(_isLocal) {
_local_impl = ((SALOMEDSImpl_SObject*)(addr));
_corba_impl = SALOMEDS::SObject::_duplicate(theSObject);
//===========================================================================
// PRIVATE FUNCTIONS
//===========================================================================
-CORBA::Long SALOMEDS_SObject_i::GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal)
+CORBA::LongLong SALOMEDS_SObject_i::GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal)
{
#ifdef WIN32
long pid = (long)_getpid();
#endif
isLocal = (strcmp(theHostname, GetHostname().c_str()) == 0 && pid == thePID)?1:0;
SALOMEDSImpl_SObject* local_impl = _impl.operator->();
- return ((long)local_impl);
+ return ((CORBA::LongLong)local_impl);
}
// Cascade headers
#include "SALOMEDSImpl_SObject.hxx"
-#ifdef GetObject
-#undef GetObject
-#endif
-
class Standard_EXPORT SALOMEDS_SObject_i: public virtual POA_SALOMEDS::SObject,
public virtual PortableServer::RefCountServantBase,
public virtual SALOME::GenericObj_i
virtual CORBA::Short Tag();
virtual CORBA::Short Depth();
- virtual CORBA::Long GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal);
+ virtual CORBA::LongLong GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal);
};
#endif
// Module : SALOME
// $Header$
-#include <SALOMEconfig.h>
-#include CORBA_SERVER_HEADER(SALOMEDS)
-#include "SALOMEDS_StudyManager_i.hxx"
#include "utilities.h"
#include "Utils_SINGLETON.hxx"
+
#include "SALOME_NamingService.hxx"
+#include "SALOMEDS_StudyManager_i.hxx"
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(SALOMEDS)
#ifdef CHECKTIME
#include <Utils_Timer.hxx>
long pid = (long)getpid();
#endif
- long addr = theStudy->GetLocalImpl(GetHostname().c_str(), pid, _isLocal);
+ CORBA::LongLong addr = // mpv: fix for IPAL13534: for 64 bit platform use 8-bytes long for pointer storage
+ theStudy->GetLocalImpl(GetHostname().c_str(), pid, _isLocal);
+
if(_isLocal) {
_local_impl = ((SALOMEDSImpl_Study*)(addr));
_corba_impl = SALOMEDS::Study::_duplicate(theStudy);
std::string SALOMEDS_Study::ConvertObjectToIOR(CORBA::Object_ptr theObject)
{
- return _orb->object_to_string(theObject);
+ CORBA::String_var objStr = _orb->object_to_string(theObject);
+ return string( objStr.in() );
}
CORBA::Object_ptr SALOMEDS_Study::ConvertIORToObject(const std::string& theIOR)
#ifndef __SALOMEDS_STUDYBUILDER_H__
#define __SALOMEDS_STUDYBUILDER_H__
+#include "SALOMEDS_Defines.hxx"
+
#include "SALOMEDSClient.hxx"
#include "SALOMEDSImpl_StudyBuilder.hxx"
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SALOMEDS)
-
-class SALOMEDS_StudyBuilder: public SALOMEDSClient_StudyBuilder
+class SALOMEDS_EXPORT SALOMEDS_StudyBuilder: public SALOMEDSClient_StudyBuilder
{
private:
bool _isLocal;
aSCO = Handle(SALOMEDSImpl_Study)::DownCast(_impl->GetOwner())->GetSComponent((char*)aComponent->GetID());
CORBA::String_var iorstr = _orb->object_to_string(IOR);
- _impl->DefineComponentInstance(aSCO, (char*)iorstr);
+ _impl->DefineComponentInstance(aSCO, (char*)iorstr.in());
}
//============================================================================
#ifndef __SALOMEDS_STUDYBUILDER_I_H__
#define __SALOMEDS_STUDYBUILDER_I_H__
+#include "SALOMEDS_Defines.hxx"
+
// std C++ headers
#include <iostream>
// Cascade header
#include <TDocStd_Document.hxx>
-class SALOMEDS_StudyBuilder_i: public POA_SALOMEDS::StudyBuilder,
+class SALOMEDS_EXPORT SALOMEDS_StudyBuilder_i: public POA_SALOMEDS::StudyBuilder,
public PortableServer::RefCountServantBase
{
private:
long pid = (long)getpid();
#endif
- long addr = theManager->GetLocalImpl(GetHostname().c_str(), pid, _isLocal);
+ CORBA::LongLong addr = theManager->GetLocalImpl(GetHostname().c_str(), pid, _isLocal);
if(_isLocal) {
_local_impl = ((SALOMEDSImpl_StudyManager*)(addr));
_corba_impl = SALOMEDS::StudyManager::_duplicate(theManager);
long pid = (long)getpid();
#endif
- long addr = theManager->GetLocalImpl(GetHostname().c_str(), pid, _isLocal);
+ CORBA::LongLong addr = theManager->GetLocalImpl(GetHostname().c_str(), pid, _isLocal);
if(_isLocal) {
_local_impl = ((SALOMEDSImpl_StudyManager*)(addr));
_corba_impl = SALOMEDS::StudyManager::_duplicate(theManager);
_name_service->Register(Study, study_name);
// Assign the value of the IOR in the study->root
- const char* IORStudy = _orb->object_to_string(Study);
+ CORBA::String_var IORStudy = _orb->object_to_string(Study);
- aStudyImpl->SetTransientReference((char*)IORStudy);
+ aStudyImpl->SetTransientReference((char*)IORStudy.in());
_mapOfPOA[Study->StudyId()] = _poa;
// Assign the value of the IOR in the study->root
CORBA::String_var IORStudy = _orb->object_to_string(Study);
- aStudyImpl->SetTransientReference((char*)IORStudy);
+ aStudyImpl->SetTransientReference((char*)IORStudy.in());
// Register study in the naming service
// Path to acces the study
}
SALOMEDS_Study_i* aStudy_servant = new SALOMEDS_Study_i(aStudyImpl, _orb);
- SALOMEDS::Study_var aStudy = SALOMEDS::Study::_narrow(aStudy_servant->_this());
+ CORBA::Object_var obj = aStudy_servant->_this();
+ SALOMEDS::Study_var aStudy = SALOMEDS::Study::_narrow(obj);
return aStudy._retn();
}
//===========================================================================
// PRIVATE FUNCTIONS
//===========================================================================
-CORBA::Long SALOMEDS_StudyManager_i::GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal)
+CORBA::LongLong SALOMEDS_StudyManager_i::GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal)
{
#ifdef WIN32
long pid = (long)_getpid();
#endif
isLocal = (strcmp(theHostname, GetHostname().c_str()) == 0 && pid == thePID)?1:0;
SALOMEDSImpl_StudyManager* aManager = _impl.operator->();
- return ((long)aManager);
+ return ((CORBA::LongLong)aManager);
}
//===========================================================================
void ping(){};
- virtual CORBA::Long GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal);
+ virtual CORBA::LongLong GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal);
static PortableServer::POA_ptr GetPOA(const SALOMEDS::Study_ptr theStudy);
};
aSO = _impl->FindObjectID(aSObj->GetID());
}
else {
- aSO = _impl->FindObjectIOR(_orb->object_to_string(theObject));
+ CORBA::String_var objStr = _orb->object_to_string(theObject);
+ TCollection_AsciiString anAscii((char *)objStr.in());
+ aSO = _impl->FindObjectIOR(anAscii);
}
if(aSO.IsNull()) return CORBA::string_dup(aPath.ToCString());
//===========================================================================
// PRIVATE FUNCTIONS
//===========================================================================
-CORBA::Long SALOMEDS_Study_i::GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal)
+CORBA::LongLong SALOMEDS_Study_i::GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal)
{
#ifdef WIN32
long pid = (long)_getpid();
#endif
isLocal = (strcmp(theHostname, GetHostname().c_str()) == 0 && pid == thePID)?1:0;
SALOMEDSImpl_Study* local_impl = _impl.operator->();
- return ((long)local_impl);
+ return ((CORBA::LongLong)local_impl);
}
virtual SALOMEDS::Study::ListOfSObject* FindDependances(SALOMEDS::SObject_ptr anObject);
- virtual SALOMEDS::AttributeStudyProperties_ptr SALOMEDS_Study_i::GetProperties();
+ virtual SALOMEDS::AttributeStudyProperties_ptr GetProperties();
virtual char* GetLastModificationDate();
virtual Handle(SALOMEDSImpl_Study) GetImpl() { return _impl; }
- virtual CORBA::Long GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal);
+ virtual CORBA::LongLong GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal);
};
#endif
SALOMEDSClient_AttributeTreeNode.hxx \
SALOMEDSClient_AttributeUserID.hxx \
SALOMEDSClient_AttributeParameter.hxx \
+ SALOMEDSClient_AttributeString.hxx \
SALOMEDSClient_ChildIterator.hxx \
SALOMEDSClient_GenericAttribute.hxx \
SALOMEDSClient_SComponent.hxx \
#include "SALOMEDSClient_AttributeTreeNode.hxx"
#include "SALOMEDSClient_AttributeUserID.hxx"
#include "SALOMEDSClient_AttributeParameter.hxx"
+#include "SALOMEDSClient_AttributeString.hxx"
#include "SALOMEDSClient_ChildIterator.hxx"
#include "SALOMEDSClient_GenericAttribute.hxx"
#include "SALOMEDSClient_SComponent.hxx"
--- /dev/null
+// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// File : SALOMEDSClient_AttributeString.hxx
+// Author : Sergey RUIN
+// Module : SALOME
+
+#ifndef SALOMEDSClient_AttributeString_HeaderFile
+#define SALOMEDSClient_AttributeString_HeaderFile
+
+#include "SALOMEDSClient_definitions.hxx"
+#include "SALOMEDSClient_GenericAttribute.hxx"
+#include <string>
+
+class SALOMEDSClient_AttributeString: public virtual SALOMEDSClient_GenericAttribute
+{
+public:
+ virtual std::string Value() = 0;
+ virtual void SetValue(const std::string& value) = 0;
+};
+
+#endif
#include <SALOMEconfig.h>
#include CORBA_CLIENT_HEADER(SALOMEDS)
-class ClientFactory {
+class SALOMEDSCLIENT_EXPORT ClientFactory {
public:
/*!
#ifndef SALOMEDSCLIENT_DEF_HXX
#define SALOMEDSCLIENT_DEF_HXX
+#ifdef WIN32
+# ifdef SALOMEDSCLIENT_EXPORTS
+# define SALOMEDSCLIENT_EXPORT __declspec( dllexport )
+# else
+# define SALOMEDSCLIENT_EXPORT __declspec( dllimport )
+# endif
+#else
+# define SALOMEDSCLIENT_EXPORT
+#endif
+
#include <boost/shared_ptr.hpp>
template<class T> class clt_shared_ptr: public boost::shared_ptr<T>
template<class Y>
explicit clt_shared_ptr(Y * p)
{
- reset(p);
+ boost::shared_ptr<T>::reset(p);
}
template<class Y>
SALOMEDSImpl_AttributeComment.hxx \
SALOMEDSImpl_AttributeReference.hxx \
SALOMEDSImpl_AttributeParameter.hxx \
+ SALOMEDSImpl_AttributeString.hxx \
SALOMEDSImpl_UseCaseBuilder.hxx \
SALOMEDSImpl_UseCaseIterator.hxx \
SALOMEDSImpl_SComponentIterator.hxx \
SALOMEDSImpl_AttributeComment.cxx \
SALOMEDSImpl_AttributeReference.cxx \
SALOMEDSImpl_AttributeParameter.cxx \
+ SALOMEDSImpl_AttributeString.cxx \
SALOMEDSImpl_ChildNodeIterator.cxx \
SALOMEDSImpl_UseCaseBuilder.cxx \
SALOMEDSImpl_UseCaseIterator.cxx \
SALOMEDSImpl_AttributeTextHighlightColor.hxx \
SALOMEDSImpl_AttributeTreeNode.hxx \
SALOMEDSImpl_AttributeUserID.hxx \
+ SALOMEDSImpl_AttributeParameter.hxx \
+ SALOMEDSImpl_AttributeString.hxx \
SALOMEDSImpl_Callback.hxx \
SALOMEDSImpl_ChildIterator.hxx \
SALOMEDSImpl_ChildNodeIterator.hxx \
SALOMEDSImpl_AttributeExpandable::SALOMEDSImpl_AttributeExpandable()
:SALOMEDSImpl_GenericAttribute("AttributeExpandable")
{
- myValue = 0;
+ myValue = 1;
}
//=======================================================================
void SALOMEDSImpl_AttributePythonObject::SetObject(const TCollection_AsciiString& theSequence,
const bool theScript)
{
- CheckLocked();
+ CheckLocked();
Backup();
mySequence = theSequence;
myIsScript = theScript;
TCollection_AsciiString SALOMEDSImpl_AttributePythonObject::Save()
{
- char* aString = (char*)GetObject().ToCString();
- char* aResult = new char[strlen(aString) + 2];
- aResult[0] = IsScript()?'s':'n';
- strcpy(aResult+1, aString);
- TCollection_AsciiString ret(aResult);
+ TCollection_AsciiString aString = GetObject();
+ TCollection_AsciiString aResult = IsScript()?'s':'n';
+ aResult += aString;
- delete aResult;
- return ret;
+ return aResult;
}
void SALOMEDSImpl_AttributePythonObject::Load(const TCollection_AsciiString& value)
SALOMEDSImpl_AttributeSelectable::SALOMEDSImpl_AttributeSelectable()
:SALOMEDSImpl_GenericAttribute("AttributeSelectable")
{
- myValue = 0;
+ myValue = 1;
}
//=======================================================================
--- /dev/null
+// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// File : SALOMEDSImpl_AttributeString.cxx
+// Author : Sergey RUIN
+// Module : SALOME
+
+#include "SALOMEDSImpl_AttributeString.hxx"
+
+#ifndef WNT
+using namespace std;
+#endif
+
+IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributeString, SALOMEDSImpl_GenericAttribute )
+IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_AttributeString, SALOMEDSImpl_GenericAttribute )
+
+//=======================================================================
+//function : GetID
+//purpose :
+//=======================================================================
+const Standard_GUID& SALOMEDSImpl_AttributeString::GetID ()
+{
+ static Standard_GUID CommentID ("1808A12F-AD0E-4a6a-B58A-395DCF469FE9");
+ return CommentID;
+}
+
+Handle(SALOMEDSImpl_AttributeString) SALOMEDSImpl_AttributeString::Set (const TDF_Label& L,
+ const TCollection_ExtendedString& Val)
+{
+ Handle(SALOMEDSImpl_AttributeString) A;
+ if (!L.FindAttribute(SALOMEDSImpl_AttributeString::GetID(), A)) {
+ A = new SALOMEDSImpl_AttributeString();
+ L.AddAttribute(A);
+ }
+
+ A->SetValue(Val);
+
+ return A;
+}
+
+//=======================================================================
+//function : SetValue
+//purpose :
+//=======================================================================
+void SALOMEDSImpl_AttributeString::SetValue (const TCollection_ExtendedString& S)
+{
+ CheckLocked();
+
+ if(myString == S) return;
+
+ Backup();
+
+ myString = S;
+
+ SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved
+}
+
+
+//=======================================================================
+//function : ID
+//purpose :
+//=======================================================================
+const Standard_GUID& SALOMEDSImpl_AttributeString::ID () const { return GetID(); }
+
+//=======================================================================
+//function : NewEmpty
+//purpose :
+//=======================================================================
+Handle(TDF_Attribute) SALOMEDSImpl_AttributeString::NewEmpty () const
+{
+ return new SALOMEDSImpl_AttributeString();
+}
+
+//=======================================================================
+//function : Restore
+//purpose :
+//=======================================================================
+void SALOMEDSImpl_AttributeString::Restore(const Handle(TDF_Attribute)& with)
+{
+ myString = Handle(SALOMEDSImpl_AttributeString)::DownCast (with)->Value ();
+}
+
+//=======================================================================
+//function : Paste
+//purpose :
+//=======================================================================
+
+void SALOMEDSImpl_AttributeString::Paste (const Handle(TDF_Attribute)& into,
+ const Handle(TDF_RelocationTable)& RT) const
+{
+ Handle(SALOMEDSImpl_AttributeString)::DownCast (into)->SetValue(myString);
+}
--- /dev/null
+// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// File : SALOMEDSImpl_AttributeIOR.hxx
+// Author : Sergey RUIN
+// Module : SALOME
+
+#ifndef _SALOMEDSImpl_AttributeString_HeaderFile
+#define _SALOMEDSImpl_AttributeString_HeaderFile
+
+#include <Standard_DefineHandle.hxx>
+#include <TDF_Attribute.hxx>
+#include <TCollection_AsciiString.hxx>
+#include <TCollection_ExtendedString.hxx>
+#include <TDF_Label.hxx>
+#include <Standard_GUID.hxx>
+#include "SALOMEDSImpl_GenericAttribute.hxx"
+
+class Handle(TDF_Attribute);
+class Handle(TDF_RelocationTable);
+
+DEFINE_STANDARD_HANDLE( SALOMEDSImpl_AttributeString, SALOMEDSImpl_GenericAttribute )
+
+class SALOMEDSImpl_AttributeString : public SALOMEDSImpl_GenericAttribute
+{
+private:
+
+ TCollection_ExtendedString myString;
+
+public:
+
+Standard_EXPORT static const Standard_GUID& GetID() ;
+
+Standard_EXPORT SALOMEDSImpl_AttributeString() :SALOMEDSImpl_GenericAttribute("AttributeString") {}
+
+Standard_EXPORT static Handle(SALOMEDSImpl_AttributeString) Set(const TDF_Label& L, const TCollection_ExtendedString& Val);
+Standard_EXPORT void SetValue (const TCollection_ExtendedString& S);
+Standard_EXPORT TCollection_ExtendedString Value() const { return myString; }
+
+Standard_EXPORT virtual TCollection_AsciiString Save() { return myString; }
+Standard_EXPORT virtual void Load(const TCollection_AsciiString& theValue) { myString = theValue; }
+
+Standard_EXPORT const Standard_GUID& ID() const;
+Standard_EXPORT void Restore(const Handle(TDF_Attribute)& with) ;
+Standard_EXPORT Handle_TDF_Attribute NewEmpty() const;
+Standard_EXPORT void Paste(const Handle(TDF_Attribute)& into,const Handle(TDF_RelocationTable)& RT) const;
+
+Standard_EXPORT ~SALOMEDSImpl_AttributeString() {}
+
+public:
+ DEFINE_STANDARD_RTTI( SALOMEDSImpl_AttributeString )
+};
+
+#endif
Standard_EXPORT static const Standard_GUID& GetID() ;
Standard_EXPORT static Handle_SALOMEDSImpl_AttributeTarget Set(const TDF_Label& label) ;
Standard_EXPORT SALOMEDSImpl_AttributeTarget();
-Standard_EXPORT void SALOMEDSImpl_AttributeTarget::Add(const Handle(SALOMEDSImpl_SObject)& theSO);
-Standard_EXPORT Handle(TColStd_HSequenceOfTransient) SALOMEDSImpl_AttributeTarget::Get();
-Standard_EXPORT void SALOMEDSImpl_AttributeTarget::Remove(const Handle(SALOMEDSImpl_SObject)& theSO);
+Standard_EXPORT void Add(const Handle(SALOMEDSImpl_SObject)& theSO);
+Standard_EXPORT Handle(TColStd_HSequenceOfTransient) Get();
+Standard_EXPORT void Remove(const Handle(SALOMEDSImpl_SObject)& theSO);
Standard_EXPORT TCollection_ExtendedString GetRelation() { return myRelation; }
Standard_EXPORT void SetRelation(const TCollection_ExtendedString& theRelation);
Standard_EXPORT TDF_AttributeList& GetVariables() { return myVariables; }
SALOMEDSImpl_AttributeTextColor::SALOMEDSImpl_AttributeTextColor()
:SALOMEDSImpl_GenericAttribute("AttributeTextColor")
{
- myValue = new TColStd_HArray1OfReal(1, 3, RealFirst());
+ myValue = new TColStd_HArray1OfReal(1, 3, 0.);
}
//=======================================================================
SALOMEDSImpl_AttributeTextHighlightColor::SALOMEDSImpl_AttributeTextHighlightColor()
:SALOMEDSImpl_GenericAttribute("AttributeTextHighlightColor")
{
- myValue = new TColStd_HArray1OfReal(1, 3, RealFirst());
+ myValue = new TColStd_HArray1OfReal(1, 3, 0.);
}
//=======================================================================
#ifndef __SALOMEDSIMPL_ATTRIBUTES__H__
#define __SALOMEDSIMPL_ATTRIBUTES__H__
+#ifdef WNT
+# ifdef SALOMEDSIMPL_EXPORTS
+# define SALOMEDSIMPL_EXPORT __declspec( dllexport )
+# else
+# define SALOMEDSIMPL_EXPORT __declspec( dllimport )
+# endif
+#else
+# define SALOMEDSIMPL_EXPORT
+#endif
+
#include <iostream>
-class LockProtection
+class SALOMEDSIMPL_EXPORT LockProtection
{
public :
LockProtection(const char *message) {
#include "SALOMEDSImpl_AttributeFlags.hxx"
#include "SALOMEDSImpl_AttributeGraphic.hxx"
#include "SALOMEDSImpl_AttributeParameter.hxx"
+#include "SALOMEDSImpl_AttributeString.hxx"
#define __AttributeTypeToGUIDForSObject \
if(theType == "AttributeFlags") return SALOMEDSImpl_AttributeFlags::GetID(); \
if(theType == "AttributeGraphic") return SALOMEDSImpl_AttributeGraphic::GetID(); \
if(theType == "AttributeReference") return SALOMEDSImpl_AttributeReference::GetID(); \
- if(theType == "AttributeParameter") return SALOMEDSImpl_AttributeParameter::GetID();
+ if(theType == "AttributeParameter") return SALOMEDSImpl_AttributeParameter::GetID(); \
+ if(theType == "AttributeString") return SALOMEDSImpl_AttributeString::GetID();
#define __FindOrCreateAttributeLocked(ClassName) if (strcmp(aTypeOfAttribute.ToCString(), #ClassName) == 0) { \
__FindOrCreateAttributeLocked(AttributeTableOfString) \
__FindOrCreateAttributeLocked(AttributePythonObject) \
__FindOrCreateAttributeLocked(AttributeParameter) \
+__FindOrCreateAttributeLocked(AttributeString) \
__FindOrCreateAttribute(AttributePersistentRef) \
__FindOrCreateAttribute(AttributeDrawable) \
__FindOrCreateAttribute(AttributeSelectable) \
/*!
Class which an interface to store the parameters of the objects
*/
-class SALOMEDSImpl_IParameters
+class Standard_EXPORT SALOMEDSImpl_IParameters
{
public:
SALOMEDSImpl_IParameters(const Handle(SALOMEDSImpl_AttributeParameter)& ap);
/*!
Returns all parameter names of the given entry
*/
- virtual std::vector<std::string> SALOMEDSImpl_IParameters::getAllParameterNames(const std::string& entry);
+ virtual std::vector<std::string> getAllParameterNames(const std::string& entry);
/*!
Returns all parameter values of the given entry
*/
- virtual std::vector<std::string> SALOMEDSImpl_IParameters::getAllParameterValues(const std::string& entry);
+ virtual std::vector<std::string> getAllParameterValues(const std::string& entry);
/*!
Returns a number of parameters of the given entry
if(aDriver == NULL) continue;
- bool isValidScript;
+ bool isValidScript = false;
long aStreamLength = 0;
Handle(SALOMEDSImpl_TMPFile) aStream = aDriver->DumpPython(this, isPublished, isValidScript, aStreamLength);
if ( !isValidScript )
#include <TColStd_SequenceOfAsciiString.hxx>
#include <TColStd_HSequenceOfAsciiString.hxx>
#include <TColStd_HSequenceOfTransient.hxx>
-#ifndef WNT
#include <NCollection_DataMap.hxx>
-#else
-#include <NCollection_DataMap1.hxx>
-#endif
//SALOMEDSImpl headers
#include "SALOMEDSImpl_SComponentIterator.hxx"
class SALOMEDSImpl_StudyManager;
class SALOMEDSImpl_GenericAttribute;
-#ifndef WNT
typedef NCollection_DataMap <TCollection_AsciiString, Handle_Standard_Transient> DataMapOfAsciiStringTransient;
typedef NCollection_DataMap <TCollection_AsciiString, TDF_Label> DataMapAsciiStringLabel;
-#else
-typedef NCollection_DataMap1 <TCollection_AsciiString, Handle_Standard_Transient> DataMapOfAsciiStringTransient;
-typedef NCollection_DataMap1 <TCollection_AsciiString, TDF_Label> DataMapAsciiStringLabel;
-#endif
class SALOMEDSImpl_Study : public MMgt_TShared
{
Standard_EXPORT virtual Handle(TColStd_HSequenceOfTransient) FindDependances(const Handle(SALOMEDSImpl_SObject)& anObject);
- Standard_EXPORT virtual Handle(SALOMEDSImpl_AttributeStudyProperties) SALOMEDSImpl_Study::GetProperties();
+ Standard_EXPORT virtual Handle(SALOMEDSImpl_AttributeStudyProperties) GetProperties();
Standard_EXPORT virtual TCollection_AsciiString GetLastModificationDate();
if (aLocked) aStudy->GetProperties()->SetLocked(false);
Handle(SALOMEDSImpl_StudyBuilder) SB= aStudy->NewBuilder();
- map<char*, SALOMEDSImpl_Driver*> aMapTypeDriver;
+ map<string, SALOMEDSImpl_Driver*> aMapTypeDriver; // IPAL13339
if(aStudy.IsNull()) {
_errorCode = "Study is null";
{
typedef unsigned char TOctet;
- virtual size_t Size() = 0;
+ Standard_EXPORT virtual size_t Size() = 0;
- virtual TOctet* Data();
+ Standard_EXPORT virtual TOctet* Data();
- virtual TOctet& Get(size_t) = 0;
+ Standard_EXPORT virtual TOctet& Get(size_t) = 0;
DEFINE_STANDARD_RTTI( SALOMEDSImpl_TMPFile );
};
TCollection_AsciiString SALOMEDSImpl_Tool::GetDirFromPath(const TCollection_AsciiString& thePath) {
if (thePath.IsEmpty()) return "";
OSD_Path aPath = OSD_Path(thePath);
- TCollection_AsciiString aDirString(aPath.Trek());
+ TCollection_AsciiString aDirString;
+ /*Unix platform don't use <disk> assignment in <path> string
+ but we must to add it for WNT case*/
+ TCollection_AsciiString disk = aPath.Disk();
+ if(disk.Length()) aDirString.AssignCat(disk);
+ aDirString.AssignCat(aPath.Trek());
aDirString.ChangeAll('|','/');
return aDirString;
}
// Class attributes initialisation, for class method BaseTraceCollector::run
BaseTraceCollector* BaseTraceCollector::_singleton = 0;
-pthread_mutex_t BaseTraceCollector::_singletonMutex = PTHREAD_MUTEX_INITIALIZER ;
+#ifndef WNT
+pthread_mutex_t BaseTraceCollector::_singletonMutex;
+#else
+pthread_mutex_t BaseTraceCollector::_singletonMutex =
+ PTHREAD_MUTEX_INITIALIZER;
+#endif
sem_t BaseTraceCollector::_sem;
int BaseTraceCollector::_threadToClose = 0;
pthread_t* BaseTraceCollector::_threadId = 0; // used to control single run
#ifndef _BASETRACECOLLECTOR_HXX_
#define _BASETRACECOLLECTOR_HXX_
+#include "SALOME_LocalTrace.hxx"
+
#include <pthread.h>
#include <semaphore.h>
-
-#if defined SALOMELOCALTRACE_EXPORTS
-#if defined WIN32
-#define SALOMELOCALTRACE_EXPORT __declspec( dllexport )
-#else
-#define SALOMELOCALTRACE_EXPORT
-#endif
-#else
-#if defined WNT
-#define SALOMELOCALTRACE_EXPORT __declspec( dllimport )
-#else
-#define SALOMELOCALTRACE_EXPORT
-#endif
-#endif
-
//! See derived Classes in SALOMELocalTrace for usage without CORBA,
//! see derived Classes in SALOMETraceCollector for usage with CORBA.
sem_init(&_sem,0,0); // to wait until run thread is initialized
pthread_t traceThread;
- int bid;
+ int bid = 0;
int re2 = pthread_create(&traceThread, NULL,
FileTraceCollector::run, (void *)bid);
sem_wait(&_sem);
#ifndef _FILETRACECOLLECTOR_HXX_
#define _FILETRACECOLLECTOR_HXX_
+#include "SALOME_LocalTrace.hxx"
+
#include <string>
#include "LocalTraceBufferPool.hxx"
#include "BaseTraceCollector.hxx"
#ifndef WNT
#include <dlfcn.h>
#else
+#include <windows.h>
#endif
//#define _DEVDEBUG_
// --- start a trace Collector
- char* traceKind = getenv("SALOME_trace");
+ char* traceKind;
+ bool isNotDefined = false;
+ if ( getenv("SALOME_trace") )
+ traceKind = getenv("SALOME_trace");
+ else
+ isNotDefined = true; // mkr : 27.11.2006 : PAL13967 - Distributed supervision graphs - Problem with "SALOME_trace"
+
assert(traceKind);
//cerr<<"SALOME_trace="<<traceKind<<endl;
- if (strcmp(traceKind,"local")==0)
+ if ( isNotDefined || strcmp(traceKind,"local")==0 )
{
_myThreadTrace = LocalTraceCollector::instance();
}
}
else // --- try a dynamic library
{
- void* handle;
#ifndef WNT
+ void* handle;
string impl_name = string ("lib") + traceKind
+ string("TraceCollector.so");
handle = dlopen( impl_name.c_str() , RTLD_LAZY ) ;
#else
+ HINSTANCE handle;
string impl_name = string ("lib") + traceKind + string(".dll");
- handle = dlopen( impl_name.c_str() , 0 ) ;
+ handle = LoadLibrary( impl_name.c_str() );
#endif
if ( handle )
{
typedef BaseTraceCollector * (*FACTORY_FUNCTION) (void);
+#ifndef WNT
FACTORY_FUNCTION TraceCollectorFactory =
(FACTORY_FUNCTION) dlsym(handle, "SingletonInstance");
- char *error ;
- if ( (error = dlerror() ) != NULL)
- {
+#else
+ FACTORY_FUNCTION TraceCollectorFactory =
+ (FACTORY_FUNCTION)GetProcAddress(handle, "SingletonInstance");
+#endif
+ if ( !TraceCollectorFactory )
+ {
cerr << "Can't resolve symbol: SingletonInstance" <<endl;
- cerr << "dlerror: " << error << endl;
- assert(error == NULL); // to give file and line
- exit(1); // in case assert is deactivated
+#ifndef WNT
+ cerr << "dlerror: " << dlerror() << endl;
+#endif
+ exit( 1 );
}
_myThreadTrace = (TraceCollectorFactory) ();
}
#ifndef _LOCALTRACEBUFFERPOOL_HXX_
#define _LOCALTRACEBUFFERPOOL_HXX_
+#include "SALOME_LocalTrace.hxx"
+
#define TRACE_BUFFER_SIZE 256 // number of entries in circular buffer
// must be power of 2
#define MAX_TRACE_LENGTH 256 // messages are truncated at this size
sem_init(&_sem,0,0); // to wait until run thread is initialized
pthread_t traceThread;
- int bid;
int re2 = pthread_create(&traceThread, NULL,
- LocalTraceCollector::run, (void *)bid);
+ LocalTraceCollector::run, NULL);
sem_wait(&_sem);
_singleton = myInstance; // _singleton known only when init done
}
#ifndef _LOCALTRACECOLLECTOR_HXX_
#define _LOCALTRACECOLLECTOR_HXX_
+#include "SALOME_LocalTrace.hxx"
+
#include <string>
#include "LocalTraceBufferPool.hxx"
#include "BaseTraceCollector.hxx"
salomeinclude_HEADERS = \
utilities.h \
LocalTraceBufferPool.hxx \
- BaseTraceCollector.hxx
+ BaseTraceCollector.hxx \
+ SALOME_LocalTrace.hxx
lib_LTLIBRARIES = libSALOMELocalTrace.la
FileTraceCollector.cxx \
FileTraceCollector.hxx \
LocalTraceBufferPool.cxx \
- LocalTraceBufferPool.hxx
+ LocalTraceBufferPool.hxx \
+ SALOME_LocalTrace.hxx
libSALOMELocalTrace_la_LDFLAGS = -no-undefined -version-info=0:0:0
libSALOMELocalTrace_la_CPPFLAGS = -I$(srcdir)/../Basics
--- /dev/null
+// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//
+//
+// File : SALOME_LocalTrace.hxx
+// Author : Alexander A. BORODIN
+// Module : SALOME
+
+#ifndef _SALOME_LOCALTRACE_HXX_
+#define _SALOME_LOCALTRACE_HXX_
+
+#ifdef WNT
+ #if defined SALOMELOCALTRACE_EXPORTS
+ #if defined WIN32
+ #define SALOMELOCALTRACE_EXPORT __declspec( dllexport )
+ #else
+ #define SALOMELOCALTRACE_EXPORT
+ #endif
+ #else
+ #if defined WIN32
+ #define SALOMELOCALTRACE_EXPORT __declspec( dllimport )
+ #else
+ #define SALOMELOCALTRACE_EXPORT
+ #endif
+ #endif
+#else
+ #define SALOMELOCALTRACE_EXPORT
+#endif
+
+#endif
\ No newline at end of file
#include <sstream>
#include <fstream>
#include <cstdlib>
-#include <CORBA.h>
+#include <omniORB4/CORBA.h>
using namespace std;
sem_init(&_sem,0,0); // to wait until run thread is initialized
pthread_t traceThread;
- int bid;
+ int bid = 0;
int re2 = pthread_create(&traceThread, NULL,
SALOMETraceCollector::run, (void *)bid);
sem_wait(&_sem);
extern "C"
{
+ SALOMETRACECOLLECTOR_EXPORT
BaseTraceCollector *SingletonInstance(void)
{
BaseTraceCollector *instance = SALOMETraceCollector::instance();
#define _SALOMETRACECOLLECTOR_HXX_
#include <string>
-#include <CORBA.h>
+#include <omniORB4/CORBA.h>
#include "BaseTraceCollector.hxx"
#include "LocalTraceBufferPool.hxx"
//! See LocalTraceCollector instead of SALOMETraceCollector,
//! for usage without CORBA
-#if defined SALOMETRACECOLLECTOR_EXPORTS
-#if defined WIN32
-#define SALOMETRACECOLLECTOR_EXPORT __declspec( dllexport )
-#else
-#define SALOMETRACECOLLECTOR_EXPORT
-#endif
-#else
#if defined WNT
-#define SALOMETRACECOLLECTOR_EXPORT __declspec( dllimport )
+# if defined SALOMETRACECOLLECTOR_EXPORTS
+# define SALOMETRACECOLLECTOR_EXPORT __declspec( dllexport )
+# else
+# define SALOMETRACECOLLECTOR_EXPORT
+# endif
#else
-#define SALOMETRACECOLLECTOR_EXPORT
-#endif
+# define SALOMETRACECOLLECTOR_EXPORT
#endif
class SALOMETRACECOLLECTOR_EXPORT SALOMETraceCollector:
#ifndef _TRACECOLLECTOR_WAITFORSERVERREADINESS_HXX_
#define _TRACECOLLECTOR_WAITFORSERVERREADINESS_HXX_
-#include <CORBA.h>
+#include <omniORB4/CORBA.h>
#include <string>
CORBA::Object_ptr TraceCollector_WaitForServerReadiness(CORBA::ORB_ptr theOrb,
#endif
#include <stdlib.h>
+#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
using namespace std;
MESSAGE("#### TMP" << aTmpDir.ToCString());
- OSD_Protection aProtection(OSD_RW, OSD_RWX, OSD_RX, OSD_RX);
+ //OSD_Protection aProtection(OSD_RW, OSD_RWX, OSD_RX, OSD_RX);
+ OSD_Protection aProtection(OSD_RWXD, OSD_RWX, OSD_RX, OSD_RX );
aDir.Build(aProtection);
return aTmpDir.ToCString();
if(!anOSDFile.Exists()) continue;
OSD_Protection aProtection = anOSDFile.Protection();
- aProtection.SetUser(OSD_RW);
+ aProtection.SetUser(OSD_RWD);
+ //aProtection.SetSystem(OSD_RW);
anOSDFile.SetProtection(aProtection);
anOSDFile.Remove();
if(IsDirDeleted) {
OSD_Path aPath(aDirName);
OSD_Directory aDir(aPath);
- OSD_FileIterator anIterator(aPath, '*');
+ OSD_FileIterator* anIterator = new OSD_FileIterator(aPath, '*');
- if(aDir.Exists() && !anIterator.More()) aDir.Remove();
+ if(aDir.Exists() && !anIterator->More())
+ {
+ delete anIterator;
+ aDir.Remove();
+ }
}
}
aCurrentPos += 8;
TCollection_AsciiString aFullPath = aTmpDir + aFileName;
+#ifdef WNT
+ ofstream aFile(aFullPath.ToCString(), ios::binary);
+#else
ofstream aFile(aFullPath.ToCString());
+#endif
aFile.write((char *)(aBuffer+aCurrentPos), aFileSize);
aFile.close();
aCurrentPos += aFileSize;
#include CORBA_SERVER_HEADER(SALOMEDS)
#ifdef WNT
-#include <SALOME_WNT.hxx>
+ #if defined TOOLSDS_EXPORTS
+ #if defined WIN32
+ #define TOOLSDS_EXPORT __declspec( dllexport )
+ #else
+ #define TOOLSDS_EXPORT
+ #endif
+ #else
+ #if defined WIN32
+ #define TOOLSDS_EXPORT __declspec( dllimport )
+ #else
+ #define TOOLSDS_EXPORT
+ #endif
+ #endif
#else
-#define SALOME_WNT_EXPORT
+ #define TOOLSDS_EXPORT
#endif
-class SALOME_WNT_EXPORT SALOMEDS_Tool
+class TOOLSDS_EXPORT SALOMEDS_Tool
{
-
public:
// Returns the unique temporary directory, that is defined in SALOME_TMP_DIR if this variable is set
// Module : SALOME
// $Header$
-#define private protected
+#ifndef WNT
+# define private protected
+#endif
#include "utilities.h"
#include "SALOME_TestComponent_i.hxx"
#include <stdio.h>
#define _SALOME_TESTCOMPONENT_I_HXX_
#include <iostream>
+
+#include "SALOME_Component_i.hxx"
+
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SALOME_TestComponent)
-#include "SALOME_Component_i.hxx"
class Engines_TestComponent_i:
public POA_Engines::TestComponent,
from omniORB import CORBA
import CosNaming
import Engines
+from Utils_Identity import getShortHostName
#initialise the ORB
sys.exit(1)
#resolve the name /Containers.dir/FactoryServerPy.object
-myMachine=string.split(os.getenv( "HOSTNAME" ),'.')
-machineName= myMachine[0]
+machineName=getShortHostName()
containerName = "FactoryServerPy"
name = [CosNaming.NameComponent("Containers","dir"),
CosNaming.NameComponent(machineName,"dir"),
Utils_SINGLETON.hxx \
Utils_DESTRUCTEUR_GENERIQUE.hxx \
Utils_ExceptHandlers.hxx \
- Utils_Mutex.hxx
+ Utils_Mutex.hxx \
+ SALOME_Utils.hxx
# Scripts to be exported
dist_salomescript_DATA =\
#ifndef _OPUTIL_HXX
#define _OPUTIL_HXX
-#if defined UTILS_EXPORTS
-#if defined WIN32
-#define UTILS_EXPORT __declspec( dllexport )
-#else
-#define UTILS_EXPORT
-#endif
-#else
-#if defined WNT
-#define UTILS_EXPORT __declspec( dllimport )
-#else
-#define UTILS_EXPORT
-#endif
-#endif
+#include <SALOME_Utils.hxx>
#include <string>
--- /dev/null
+// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//
+//
+// File : SALOME_Utils.hxx
+// Author : Alexander A. BORODIN
+// Module : SALOME
+
+#ifndef _SALOME_UTILS_HXX_
+#define _SALOME_UTILS_HXX_
+
+#ifdef WNT
+# if defined UTILS_EXPORTS
+# define UTILS_EXPORT __declspec( dllexport )
+# else
+# define UTILS_EXPORT __declspec( dllimport )
+# endif
+#else
+# define UTILS_EXPORT
+#endif
+
+#endif
# ifndef SALOME_STRING
# define SALOME_STRING
+#include "SALOME_Utils.hxx"
+
# include <string>
# include <sstream>
-class SALOME_STRING : public string
+class UTILS_EXPORT SALOME_STRING : public string
{
private :
ostringstream _s ;
# if !defined ( __Utils_CommException_H__ )
# define __Utils_CommException_H__ )
-# include "Utils_SALOME_Exception.hxx"
+#include "SALOME_Utils.hxx"
+
+#include "Utils_SALOME_Exception.hxx"
class UTILS_EXPORT CommException : public SALOME_Exception
{
#ifndef _UTILS_CORBAEXCEPTION_HXX_
#define _UTILS_CORBAEXCEPTION_HXX_
+#include "SALOME_Utils.hxx"
+
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SALOME_Exception)
# if !defined( __DESTRUCTEUR_GENERIQUE__H__ )
# define __DESTRUCTEUR_GENERIQUE__H__
-# include <list>
+#include "SALOME_Utils.hxx"
+
+#include <list>
#include <cassert>
-# include <CORBA.h>
+#include <omniORB4/CORBA.h>
//# include "utilities.h"
/*!\class DESTRUCTEUR_GENERIQUE_
* -# an object method to execute the destruction : operator()().
*/
-#if defined UTILS_EXPORTS
-#if defined WIN32
-#define UTILS_EXPORT __declspec( dllexport )
-#else
-#define UTILS_EXPORT
-#endif
-#else
-#if defined WNT
-#define UTILS_EXPORT __declspec( dllimport )
-#else
-#define UTILS_EXPORT
-#endif
-#endif
-
-class DESTRUCTEUR_GENERIQUE_
+class UTILS_EXPORT DESTRUCTEUR_GENERIQUE_
{
public :
- UTILS_EXPORT static std::list<DESTRUCTEUR_GENERIQUE_*> *Destructeurs;
+ static std::list<DESTRUCTEUR_GENERIQUE_*> *Destructeurs;
virtual ~DESTRUCTEUR_GENERIQUE_() {}//!< virtual destructor
- UTILS_EXPORT static const int Ajout( DESTRUCTEUR_GENERIQUE_ &objet );//!< adds a destruction object to the list of destructions
- UTILS_EXPORT virtual void operator()( void )=0 ;//!< performs the destruction
-} ;
+ static const int Ajout( DESTRUCTEUR_GENERIQUE_ &objet );//!< adds a destruction object to the list of destructions
+ virtual void operator()( void )=0 ;//!< performs the destruction
+};
/*!\class DESTRUCTEUR_DE_
#ifndef Utils_ExceptHandlers_HeaderFile
#define Utils_ExceptHandlers_HeaderFile
-#include <stdexcept>
+#include <SALOME_Utils.hxx>
-#if defined UTILS_EXPORTS
-#if defined WIN32
-#define UTILS_EXPORT __declspec( dllexport )
-#else
-#define UTILS_EXPORT
-#endif
-#else
-#if defined WNT
-#define UTILS_EXPORT __declspec( dllimport )
-#else
-#define UTILS_EXPORT
-#endif
-#endif
+#include <stdexcept>
typedef void (*PVF)();
const char* get_uname( void )
{
- char* hostName = new char[256];
- DWORD nSize = 256;
- ASSERT(GetComputerName(hostName, &nSize));
- return hostName;
+ static std::string hostName(256, 0);
+ static DWORD nSize = hostName.length();
+ static int res = ::GetComputerNameEx(ComputerNameDnsFullyQualified, &hostName[0], &nSize);
+ ASSERT( res );
+ return hostName.c_str();
}
const char* get_adip( void )
{
- return get_uname();
+ //#include <Nspapi.h>
+ //#include <Svcguid.h>
+ //static GUID sType = SVCID_HOSTNAME;
+ //static CSADDR_INFO* ips = new CSADDR_INFO[8]; // in case multiple IP addresses are returned
+ //static DWORD nSize = 1024;
+ //static std::string uname = get_uname();
+ //static int res = ::GetAddressByName( NS_DEFAULT, &sType, &uname[0], 0, 0, 0, ips, &nSize, 0, 0 );
+ //if ( res )
+ // return ips[0].LocalAddr.lpSockaddr->sa_data;
+
+ static hostent* he = ::gethostbyname( get_uname() );
+ if ( he && he->h_addr_list && he->h_length >0 ) {
+ static char str[16];
+ unsigned i1 = (unsigned char)he->h_addr_list[0][0];
+ unsigned i2 = (unsigned char)he->h_addr_list[0][1];
+ unsigned i3 = (unsigned char)he->h_addr_list[0][2];
+ unsigned i4 = (unsigned char)he->h_addr_list[0][3];
+ sprintf ( str, "%03u.%03u.%03u.%03u", i1, i2, i3, i4 );
+ return str;
+ }
+ return "<unknown>";
}
const char* const get_pwname( void )
{
- DWORD dwSize = 256 + 1;
- char* retVal = new char[256];
- ASSERT(GetUserName ( retVal, &dwSize ));
- return retVal;
+ static std::string retVal(256, 0);
+ static DWORD dwSize = retVal.length() + 1;
+ static int res = GetUserName( &retVal[0], &dwSize );
+ ASSERT( res );
+ return retVal.c_str();
}
PSID getuid() {
//delete [] (char*)_dir ;
//(char*&)_dir = NULL ;
free((char*)_dir);
-
+#ifndef WIN32
+ // free the memory only on Unix
+ // becasue at Windows it is the same static variable
+ // (function get_adip() returns the same char* as get_uname() )
delete [] (char*)_adip ;
+#endif
(char*&)_adip = NULL ;
+
}
/*------------*/
# if !defined( __IDENTITE_H__ )
# define __IDENTITE_H__
+#include <SALOME_Utils.hxx>
+
extern "C"
{
# include <stdlib.h>
#endif
}
-#if defined UTILS_EXPORTS
-#if defined WIN32
-#define UTILS_EXPORT __declspec( dllexport )
-#else
-#define UTILS_EXPORT
-#endif
-#else
-#if defined WNT
-#define UTILS_EXPORT __declspec( dllimport )
-#else
-#define UTILS_EXPORT
-#endif
-#endif
class UTILS_EXPORT Identity
{
import sys
import os
import socket
-import pwd
+
+if not sys.platform == "win32":
+ import pwd
+
import time
import string
self._name = name
self._pid = os.getpid()
self._machine = socket.gethostname()
- self._adip = socket.gethostbyname(self._machine) # IP adress
- self._uid = os.getuid()
- list = pwd.getpwuid(self._uid)
- self._pwname = list[0] # user name
+ self._adip = socket.gethostbyname(self._machine) # IP adress
+ if sys.platform == "win32":
+ self._uid = os.getpid()
+ self._pwname = os.environ["USER"]
+ else:
+ self._uid = os.getuid()
+ list = pwd.getpwuid(self._uid)
+ self._pwname = list[0] # user name
+
self._tc_start = time.time()
self._cstart = time.ctime(self._tc_start)
self._cdir = os.getcwd()
#ifndef Utils_Mutex_HeaderFile
#define Utils_Mutex_HeaderFile
-#include <pthread.h>
+#include "SALOME_Utils.hxx"
-#if defined UTILS_EXPORTS
-#if defined WIN32
-#define UTILS_EXPORT __declspec( dllexport )
-#else
-#define UTILS_EXPORT
-#endif
-#else
-#if defined WNT
-#define UTILS_EXPORT __declspec( dllimport )
-#else
-#define UTILS_EXPORT
-#endif
-#endif
+#include <pthread.h>
class UTILS_EXPORT Utils_Mutex
{
# if ! defined( __ORB_INIT_HXX__ )
# define __ORB_INIT_HXX__
-# include "CORBA.h"
-
-#include "Utils_CommException.hxx"
+#include "SALOME_Utils.hxx"
+#include "omniORB4/CORBA.h"
-#if defined UTILS_EXPORTS
-#if defined WIN32
-#define UTILS_EXPORT __declspec( dllexport )
-#else
-#define UTILS_EXPORT
-#endif
-#else
-#if defined WNT
-#define UTILS_EXPORT __declspec( dllimport )
-#else
-#define UTILS_EXPORT
-#endif
-#endif
+#include "Utils_CommException.hxx"
/*!
* Ce composant prend en charge la connexion et la deconnexion a l'orb
#if !defined( __Utils_SALOME_Exception_hxx__ )
#define __Utils_SALOME_Exception_hxx__
+//#include "SALOME_Utils.hxx"
+
# include <exception>
# include <iostream>
# define LOCALIZED(message) #message
#endif
-#if defined UTILS_EXPORTS
-#if defined WIN32
-#define UTILS_EXPORT __declspec( dllexport )
-#else
-#define UTILS_EXPORT
-#endif
-#else
-#if defined WNT
-#define UTILS_EXPORT __declspec( dllimport )
+//swig tool on Linux doesn't pass defines from header SALOME_Utils.hxx
+//therefore (temporary solution) defines are placed below
+
+#ifdef WNT
+# if defined UTILS_EXPORTS
+# define UTILS_EXPORT __declspec( dllexport )
+# else
+# define UTILS_EXPORT __declspec( dllimport )
+# define LOCALIZED(message) #message
+# endif
#else
-#define UTILS_EXPORT
-#endif
+# define UTILS_EXPORT
#endif
class UTILS_EXPORT SALOME_Exception : public std::exception
# if !defined( __SINGLETON__H__ )
# define __SINGLETON__H__
+#include "SALOME_Utils.hxx"
+
# include "Utils_DESTRUCTEUR_GENERIQUE.hxx"
# include <list>
--- /dev/null
+// KERNEL Utils : common utils for KERNEL
+// Copyright (C) 2003 CEA
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org or email : webmaster.salome@opencascade.org
+
+#ifndef _UTILS_SIGNALSHANDLER_H_
+#define _UTILS_SIGNALSHANDLER_H_
+
+#include "SALOME_Utils.hxx"
+
+#include <map>
+typedef void (*TSigHandler)(int);
+
+
+class UTILS_EXPORT Utils_SignalsHandler{
+ public:
+ Utils_SignalsHandler();
+ ~Utils_SignalsHandler();
+
+ TSigHandler GetSigHandler(int theSigId);
+ TSigHandler SetSigHandler(int theSigId, TSigHandler theSigHandler);
+ typedef std::map<int,TSigHandler> TSigHandlerCont;
+
+ private:
+ TSigHandlerCont mySigHandlerCont;
+};
+
+
+class UTILS_EXPORT Utils_CASSignalsHandler: private Utils_SignalsHandler{
+ public:
+ Utils_CASSignalsHandler();
+};
+
+
+#endif
// File : Utils_Timer.hxx
// Module : SALOME
+#include "SALOME_Utils.hxx"
+
#include <stdlib.h>
#include <time.h>
#define _POSIX_
#endif
-class Utils_Timer {
+class UTILS_EXPORT Utils_Timer {
public:
Utils_Timer();
virtual ~Utils_Timer();