IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 5997


Ignore:
Timestamp:
Jan 15, 2006, 9:04:36 AM (21 years ago)
Author:
eugene
Message:

more robust check for curses, termcap; added libflags

Location:
trunk/Ohana
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/Configure.in

    r5899 r5997  
    2222# seem to be ok on most linux distributions)
    2323XINC    = XINCDIR
    24 XLIB    = -LXLIBDIR
     24XLIB    = XLIBDIR
     25TLIB    = TLIBFLAG
    2526
    2627# prefered C compiler
  • trunk/Ohana/configure

    r5940 r5997  
    9292   endif
    9393   # XXX old solaris needed termcap for readline
    94    set archlib = "libsocket libnsl libtermcap"
     94   set archlib = "libsocket libnsl"
    9595   breaksw;
    9696 case Linux:
     
    118118set inc = $prefix/include/$arch
    119119set lib = $prefix/lib/$arch
     120if ($?LD_LIBRARY_PATH) then
     121  set libpath = `echo $LD_LIBRARY_PATH | tr ':' ' '`
     122else
     123  set libpath = ""
     124endif
    120125
    121126# check for basic libraries
    122127set fail = 0
    123128foreach f ( libpng libz libjpeg libreadline $archlib )
    124     foreach g ( /usr/lib $lib )
     129    foreach g ( /usr/lib $lib $libpath )
    125130        set name = "$g/$f.a"
    126131        if (-e $name) then
     
    140145end
    141146
     147# check for termcap, curses, etc
     148set tlibflag = ""
     149foreach f ( libncurses libcurses libtermcap )
     150      foreach g ( /usr/lib $lib $libpath )
     151        set name = "$g/$f.a"
     152        if (-e $name) then
     153            echo "found $name"
     154            set tlibflag = "-l$f"
     155            goto got_curses;
     156        endif
     157        set name = "$g/$f.so"
     158        if (-e $name) then
     159            echo "found $name"
     160            set tlibflag = "-l$f"
     161            goto got_curses;
     162        endif
     163    end
     164end
     165if ("$tlibflag" == "") then
     166  echo "missing a valid curses library"
     167  set fail = 1
     168endif
     169
     170got_curses:
     171
    142172if ($fail) then
    143173  echo "your installation is missing some important libraries"
     
    149179set fail = 0
    150180foreach f ( libX11.a )
    151     foreach g ( /usr/lib $lib /usr/X11R6/lib /usr/openwin/lib )
     181    foreach g ( /usr/lib $lib $libpath /usr/X11R6/lib /usr/openwin/lib )
    152182        set name = "$g/$f"
    153183        if (-e $name) then
     
    271301mv Configure.tmp Configure.in.tmp
    272302
    273 cat Configure.in.tmp | sed "s|ROOTDIR|$root|" | sed "s|XINCDIR|$xinc|" | sed "s|XLIBDIR|$xlib|" | sed "s|OPTFLAGS|$optflags $pedantic|" > Configure
     303cat Configure.in.tmp | sed "s|ROOTDIR|$root|" | sed "s|XINCDIR|$xinc|" | sed "s|XLIBDIR|$xlib|" | sed "s|TLIBFLAG|$tlibflag|" | sed "s|OPTFLAGS|$optflags $pedantic|" > Configure
     304rm -f Configure.in.tmp Configure.tmp
    274305
    275306echo ""
Note: See TracChangeset for help on using the changeset viewer.