IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 17, 2007, 9:55:36 AM (19 years ago)
Author:
eugene
Message:

various updates suggested by RHL, Johannes, Nicolas, Arno

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psconfig/pschecklibs

    r12497 r12839  
    3131endif
    3232
    33 # set paths for PSVERSION
     33# set install paths for PSVERSION
    3434set libdir  = `source psconfig.sh --libs $PSVERSION`
    3535set incdir  = `source psconfig.sh --include $PSVERSION`
    3636
     37# make these directories
     38mkdir -p $libdir
     39mkdir -p $incdir
     40
    3741# I supplement this list with LD_LIBRARY_PATH below
    38 set syslibpath = "/lib /usr/lib /usr/X11R6/lib /usr/openwin/lib /usr/local/lib"
     42set syslibpath = "/lib /usr/lib /usr/X11R6/lib /usr/local/lib "
    3943set needlibs   = ""
    4044set needlibs   = "$needlibs png"
     
    5256set needlibs   = "$needlibs m"
    5357
    54 # /usr/local/include/libpng is really pretty lame...
    55 set sysincpath = "/usr/include /usr/local/include /usr/X11R6/include /usr/openwin/include /usr/local/include/libpng"
    56 
     58# I supplement this list with CPATH below
     59set sysincpath = "/usr/include /usr/local/include /usr/X11R6/include "
    5760set needincs = ""
    5861set needincs = "$needincs X11/Xatom.h"
     
    103106set needincs = "$needincs time.h"
    104107set needincs = "$needincs unistd.h"
    105 set needincs = "$needincs values.h"
    106108set needincs = "$needincs zlib.h"
    107109
    108110# XXX need to have options for non-ANSI includes? (ie, varargs.h)
     111# set needincs = "$needincs values.h" - this only provides values already defined in limits.h?
    109112# set needincs = "$needincs libxml/parser.h"
    110113# set needincs = "$needincs cfuncs.h" - from non-ANSI option in ohana.h
     
    118121set sys=`uname -s`
    119122set ranlib = "ranlib"
     123set dlltype = "so"
    120124switch ($sys)
    121125 case IRIX64:
     
    130134   endif
    131135   # sun (at least) seems to need the socket library (linux does not)
     136   set syslibpath = "$syslibpath /usr/openwin/lib"
     137   set sysincpath = "$sysincpath /usr/openwin/include"
    132138   set needlibs = "$needlibs libsocket libnsl"
    133139   set ranlib = "touch"
     
    141147    set syslibpath = "/lib64 /usr/lib64 /usr/X11R6/lib64 $syslibpath"
    142148   endif
     149   breaksw;
     150 case Darwin:
     151   set arch="darwin";
     152   set mach=`uname -m`
     153   if ("$mach" == "i386") then
     154    set arch="darwin_x86";
     155   endif
     156   set syslibpath = "$syslibpath /sw/lib /usr/local/lib/mysql"
     157   set sysincpath = "$sysincpath /sw/include /usr/include/sys"
     158   set dlltype = dylib
    143159   breaksw;
    144160 case HP-UX:
     
    169185    foreach g ( $libdir $libpath $syslibpath )
    170186        if (! -e $g) continue
    171         set name = $g/lib$f.a
    172         if (-e $name[1]) goto got_lib;
    173         set name = $g/lib$f.so*
    174         if (-e $name[1]) goto got_lib;
     187        set name = $g/lib$f.a
     188        if (-e $name[1]) goto got_lib;
     189        set name = $g/lib$f.$dlltype
     190        if (-e $name[1]) goto got_lib;
     191    end
     192    # if we find a .so.N without a matching .so, we link this in
     193    # the installed libdir
     194    foreach g ( $libpath $syslibpath )
     195        set name = $g/lib$f.$dlltype*
     196        echo "libname: $name"
     197        if (-e $name[1]) then
     198          echo "making link to numbers .$dlltype library $libdir/lib$f.$dlltype"
     199          ln -s $name[$#name] $libdir/lib$f.$dlltype
     200          if ($status) exit 1
     201          goto got_lib
     202        endif
    175203    end
    176204    echo "missing lib$f"
     
    185213foreach f ( ncurses curses termcap )
    186214    foreach g ( $libdir $libpath $syslibpath )
    187         set name = $g/lib$f.a
    188         if (-e $name[1]) goto got_curses;
    189         set name = $g/lib$f.so*
    190         if (-e $name[1]) goto got_curses;
     215        set name = $g/lib$f.a
     216        if (-e $name[1]) goto got_curses;
     217        set name = $g/lib$f.$dlltype
     218        if (-e $name[1]) goto got_curses;
     219    end
     220    # if we find a .so.N without a matching .so, we link this in
     221    # the installed libdir
     222    foreach g ( $libpath $syslibpath )
     223        set name = $g/lib$f.$dlltype*
     224        if ($#name > 0) then
     225          echo "making link to numbers .$dlltype library $libdir/lib$f.$dlltype"
     226          ln -s $name[$#name] $libdir/lib$f.$dlltype
     227          goto got_curses;
     228        endif
    191229    end
    192230end
Note: See TracChangeset for help on using the changeset viewer.