IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 19, 2007, 1:03:48 PM (19 years ago)
Author:
eugene
Message:

added CPATH, fix order on paths

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psconfig/psconfig.sh

    r12150 r12496  
    9797setenv PSVERSION $args[1]
    9898
     99if ($?CPATH == 0) setenv CPATH
    99100if ($?LD_LIBRARY_PATH == 0) setenv LD_LIBRARY_PATH
    100101if ($?PKG_CONFIG_PATH == 0) setenv PKG_CONFIG_PATH
     
    204205endif
    205206
     207# set CPATH, used to find include files
     208set incdir  = {$PSCONFDIR}/{$PSCONFIG}/include
     209set newpath = ""
     210set pathlist = `echo $CPATH | tr ':' '\n'`
     211foreach name ($pathlist)
     212  echo $name | grep $PSCONFDIR > /dev/null
     213  if ($status == 0) continue
     214  if ($newpath == "") then
     215    set newpath = {$name}:
     216  else
     217    set newpath = {$newpath}{$name}:
     218  endif
     219end
     220if ("$PSCONFIG" == "none") then
     221  if ("$newpath" == "") then
     222    unsetenv CPATH
     223  else
     224    setenv CPATH {$newpath}
     225  endif
     226else
     227  if ("$newpath" == "") then
     228    setenv CPATH {$incdir}:
     229  else
     230    setenv CPATH {$incdir}:{$newpath}
     231  endif
     232endif
     233
     234# set LIBRARY_PATH and LD_LIBRARY_PATH, used to find libraries
    206235set libdir  = {$PSCONFDIR}/{$PSCONFIG}/lib
    207236set newpath = ""
     
    219248  if ("$newpath" == "") then
    220249    unsetenv LD_LIBRARY_PATH
     250    unsetenv LIBRARY_PATH
    221251  else
    222252    setenv LD_LIBRARY_PATH {$newpath}
     253    setenv LIBRARY_PATH {$newpath}
    223254  endif
    224255else
    225256  if ("$newpath" == "") then
    226257    setenv LD_LIBRARY_PATH {$libdir}:
     258    setenv LIBRARY_PATH {$libdir}:
    227259  else
    228260    setenv LD_LIBRARY_PATH {$libdir}:{$newpath}
     261    setenv LIBRARY_PATH {$libdir}:{$newpath}
    229262  endif
    230263endif
     
    291324  alias  psperlbuild perl Build.PL
    292325else
    293   alias  psconfigure configure --prefix={$PSCONFDIR}/{$PSCONFIG} --bindir=$bindir --libdir=$libdir --includedir={$PSCONFDIR}/{$PSCONFIG}/include --sysconfdir={$PSCONFDIR}/{$PSCONFIG}/etc --datadir={$PSCONFDIR}/share --mandir={$PSCONFDIR}/man
    294   alias  psautogen autogen.sh --bindir=$bindir --libdir=$libdir --mandir=$mandir --includedir={$PSCONFDIR}/{$PSCONFIG}/include --sysconfdir={$PSCONFDIR}/{$PSCONFIG}/etc --datadir={$PSCONFDIR}/share
     326  alias  psconfigure configure --prefix={$PSCONFDIR}/{$PSCONFIG} --bindir=$bindir --libdir=$libdir --mandir=$mandir --includedir=$incdir --sysconfdir={$PSCONFDIR}/{$PSCONFIG}/etc --datadir={$PSCONFDIR}/share
     327  alias  psautogen autogen.sh  --prefix={$PSCONFDIR}/{$PSCONFIG} --bindir=$bindir --libdir=$libdir --mandir=$mandir --includedir=$incdir --sysconfdir={$PSCONFDIR}/{$PSCONFIG}/etc --datadir={$PSCONFDIR}/share
    295328  alias  psperlbuild perl Build.PL --prefix {$PSCONFDIR}/{$PSCONFIG} --install_path script=$bindir --install_path arch=$bindir --install_path bin=$bindir --install_path lib=$libdir --install_path bindoc={$PSCONFDIR}/man/man1 --install_path libdoc={$PSCONFDIR}/man/man3
    296329  setenv ACLOCAL_FLAGS "-I $PSCONFDIR/share/aclocal"
Note: See TracChangeset for help on using the changeset viewer.