;==============================================================================
;
;  setting IDL global system-variable '!pommelib' with the path/file of the
;  appropiate shared library.
;
;  * this version fits the environment at GFZ Potsdam, Section 2.3, please
;    customize the ':initpomme' file for your needs.
;
;  2006-Jan-27. Martin Rother.
;==============================================================================

   ;---------------------------------------------------------------------------
   ; CUSTOMIZE
   ;---------------------------------------------------------------------------

   pomme_base = '/home/mag/rother/src/gmf/CF/ME/Pomme/Pomme3/I/Interface/'
   solaris_so = 'pomme_idl_sol.so'
   linux_so   = 'pomme_idl_linux.so'

   ;---------------------------------------------------------------------------
   ; create with an empty string
   ;---------------------------------------------------------------------------

   defsysv, '!pommelib', ''          

   ;---------------------------------------------------------------------------
   ; setting string depending of current op-sys version -- of course the 
   ; library is expected to exist and the path should fit...
   ;---------------------------------------------------------------------------

   CASE !version.arch OF                                                   &$
    'sparc':                                                                $
     CASE !version.os_name OF                                              &$
      'Solaris': !pommelib = pomme_base+solaris_so                         &$
      ELSE:      stop, 'unexpected arch/os_name combination '+              $
                       !version.arch+'/'+!version.os_name                  &$
     ENDCASE                                                               &$
    'x86':                                                                  $
      CASE !version.os_name OF                                             &$
       'linux':                                                             $
        CASE   !version.memory_bits OF                                     &$
         32:   !pommelib = pomme_base+linux_so                             &$
         64:   stop, 'pomme library for 64-bit x86/Linux does not exist!'  &$
         ELSE: stop, 'unexpected arch/os_name/memory_bit combination '+     $
                     !version.arch+'/'+                                     $
                     !version.os_name+'/'+                                  $
                     strtrim(!version.memory_bits,2)                       &$
        ENDCASE                                                            &$
      ELSE: stop, 'unexpected os_name: '+!version.os_name                  &$
      ENDCASE                                                              &$
     ELSE: stop, 'unexpected arch: '+!version.arch                         &$
   ENDCASE

   IF NOT file_test(!pommelib, /regular, /read) then                        $
      stop, !pommelib+' not found'

.r pomme_init
.r pomme_calc
.r pomme_control

;==============================================================================
