IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 12496 for trunk/psconfig


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

added CPATH, fix order on paths

Location:
trunk/psconfig
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psconfig/pschecklibs

    r12142 r12496  
    167167set nonomatch
    168168foreach f ( $needlibs )
    169     foreach g ( $syslibpath $libdir $libpath )
     169    foreach g ( $libdir $libpath $syslibpath )
    170170        if (! -e $g) continue
    171171        set name = $g/lib$f.a
     
    184184# check for termcap, curses, etc
    185185foreach f ( ncurses curses termcap )
    186     foreach g ( $syslibpath $libdir $libpath )
     186    foreach g ( $libdir $libpath $syslibpath )
    187187        set name = $g/lib$f.a
    188188        if (-e $name[1]) goto got_curses;
     
    207207endif   
    208208
     209# add the CPATH
     210if ($?CPATH) then
     211  set incpath = `echo $CPATH | tr ':' ' '`
     212else
     213  set incpath = ""
     214endif
     215
    209216# check for headers
    210217echo ""
     
    213220set incdirs = ""
    214221foreach f ( $needincs )
    215   foreach g ( $sysincpath $incdir )
     222  foreach g ( $incdir $incpath $sysincpath )
    216223    set name = "$g/$f"
    217224    if (-e $name) goto got_inc;
  • 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.