Changeset 12840 for trunk/Ohana/configure.tcsh
- Timestamp:
- Apr 17, 2007, 9:59:02 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/configure.tcsh (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/configure.tcsh
r12332 r12840 5 5 6 6 # we need to be able to list the required libraries for a given distribution 7 8 # libX11.a9 # libsocket.a10 # libnsl.a11 # libpng.a12 # libjpeg.a13 # libz.a14 # libreadline.a15 # libtermcap.a16 7 17 8 # evaluate command-line options … … 28 19 set datadir = "" 29 20 set sysconfdir = "" 21 set exec_prefix = "" 30 22 31 23 set root = "" … … 67 59 set prefix = `echo $1 | tr = ' ' | awk '{print $2}'` 68 60 endif 69 set exec_prefix = $prefix 61 breaksw; 62 case --exec-prefix* 63 if ("$1" == "--exec-prefix") then 64 shift 65 set exec_prefix = $1 66 else 67 set exec_prefix = `echo $1 | tr = ' ' | awk '{print $2}'` 68 endif 70 69 breaksw; 71 70 case --bindir* … … 88 87 if ("$1" == "--includedir") then 89 88 shift 90 set inc ludedir = $191 else 92 set inc ludedir = `echo $1 | tr = ' ' | awk '{print $2}'`89 set incdir = $1 90 else 91 set incdir = `echo $1 | tr = ' ' | awk '{print $2}'` 93 92 endif 94 93 breaksw; … … 131 130 if ($#args != 1) goto usage 132 131 132 if ("$exec_prefix" == "") then 133 set exec_prefix = $prefix 134 endif 135 136 # replace $exec_prefix in variables 137 #echo "setting libdir ($libdir)" 138 #set libdir = `echo $libdir | sed 's|\$exec_prefix|$exec_prefix|'` 139 133 140 # set values for CC, CFLAGS, CPPFLAGS, LDFLAGS 134 141 if (! $?CC) then … … 152 159 endif 153 160 154 set syslibpath = "/lib /usr/lib /usr/X11R6/lib /usr/openwin/lib /usr/local/lib" 155 set needlibs = "png z jpeg readline X11 pthread m" 161 set syslibpath = "/lib /usr/lib /usr/X11R6/lib /usr/local/lib" 162 set needlibs = "" 163 set needlibs = "$needlibs png" 164 set needlibs = "$needlibs z" 165 set needlibs = "$needlibs jpeg" 166 set needlibs = "$needlibs readline" 167 set needlibs = "$needlibs X11" 168 set needlibs = "$needlibs pthread" 169 set needlibs = "$needlibs m" 156 170 157 171 # /usr/local/include/libpng is really pretty lame... 158 set sysincpath = "/usr/include /usr/local/include /usr/X11R6/include /usr/openwin/include /usr/local/include/libpng"172 set sysincpath = "/usr/include /usr/local/include /usr/X11R6/include" 159 173 160 174 set needincs = "" … … 210 224 set sys=`uname -s` 211 225 set ranlib = "ranlib" 226 set dlltype = "so" 212 227 switch ($sys) 213 228 case IRIX64: … … 222 237 endif 223 238 # sun (at least) seems to need the socket library (linux does not) 239 set syslibpath = "$syslibpath /usr/openwin/lib" 240 set sysincpath = "$sysincpath /usr/openwin/include" 224 241 set needlibs = "$needlibs libsocket libnsl" 225 242 set ranlib = "touch" … … 234 251 endif 235 252 breaksw; 253 case Darwin: 254 set arch="darwin"; 255 set mach=`uname -m` 256 if ("$mach" == "i386") then 257 set arch="darwin_x86"; 258 endif 259 set syslibpath = "$syslibpath /sw/lib /usr/local/lib/mysql" 260 set sysincpath = "$sysincpath /sw/include /usr/include/sys" 261 set dlltype = dylib 262 breaksw; 236 263 case HP-UX: 237 264 set arch="hpux"; … … 247 274 set root = `pwd` 248 275 if ($prefix == "") set prefix = $root 249 if ($vararch) then 250 set inc = $prefix/include/$arch 251 set lib = $prefix/lib/$arch 252 else 253 set inc = $prefix/include 254 set lib = $prefix/lib 255 endif 276 277 # set the install include directory 278 if ($incdir == "") then 279 if ($vararch) then 280 set incdir = $prefix/include/$arch 281 else 282 set incdir = $prefix/include 283 endif 284 endif 285 286 # set the install lib directory 287 if ($libdir == "") then 288 if ($vararch) then 289 set libdir = $prefix/lib/$arch 290 else 291 set libdir = $prefix/lib 292 endif 293 endif 294 256 295 if ($?LD_LIBRARY_PATH) then 257 296 set libpath = `echo $LD_LIBRARY_PATH | tr ':' ' '` … … 268 307 set nonomatch 269 308 foreach f ( $needlibs ) 270 foreach g ( $syslibpath $lib $libpath ) 271 if (! -e $g) continue 272 set name = $g/lib$f.a 273 if (-e $name[1]) goto got_lib; 274 set name = $g/lib$f.so* 275 if (-e $name[1]) goto got_lib; 276 end 277 echo "missing lib$f" 278 set faillibs = "$faillibs lib$f" 279 continue 309 foreach g ( $syslibpath $libdir $libpath ) 310 set name = $g/lib$f.a 311 if (-e $name[1]) goto got_lib; 312 set name = $g/lib$f.$dlltype 313 if (-e $name[1]) goto got_lib; 314 end 315 echo "missing lib$f" 316 set faillibs = "$faillibs lib$f" 317 continue 280 318 got_lib: 281 echo "found lib$f ($name[$#name])" 282 echo "$libdirs" | grep -- "-L$g " > /dev/null 283 if ($status) then 284 set libdirs = "$libdirs-L$g " 285 endif 286 echo "$libflags" | grep -- "-l$f " > /dev/null 287 if ($status) then 288 set libflags = "$libflags-l$f " 289 endif 319 echo "found lib$f ($name[1])" 320 set gotlibdir = `dirname $name[1]` 321 echo "$libdirs" | grep -- "-L$gotlibdir " > /dev/null 322 if ($status) then 323 set libdirs = "$libdirs-L$gotlibdir " 324 endif 325 echo "$libflags" | grep -- "-l$f " > /dev/null 326 if ($status) then 327 set libflags = "$libflags-l$f " 328 endif 290 329 end 291 330 … … 293 332 # check for termcap, curses, etc 294 333 foreach f ( ncurses curses termcap ) 295 foreach g ( $syslibpath $lib $libpath )296 set name = $g/lib$f.a297 if (-e $name[1]) goto got_curses;298 set name = $g/lib$f.so* 299 if (-e $name[1]) goto got_curses;334 foreach g ( $syslibpath $libdir $libpath ) 335 set name = $g/lib$f.a 336 if (-e $name[1]) goto got_curses; 337 set name = $g/lib$f.$dlltype 338 if (-e $name[1]) goto got_curses; 300 339 end 301 340 end … … 324 363 endif 325 364 326 # check for headers 365 # add the CPATH 366 if ($?CPATH) then 367 set incpath = `echo $CPATH | tr ':' ' '` 368 else 369 set incpath = "" 370 endif 371 372 # check for headers (including in subdirectories) 327 373 echo "" 328 374 echo "searching for needed external header files..." … … 330 376 set incdirs = "" 331 377 foreach f ( $needincs ) 332 foreach g ( $ sysincpath $inc)378 foreach g ( $incdir $incpath $sysincpath ) 333 379 set name = "$g/$f" 334 380 if (-e $name) goto got_inc; … … 338 384 continue 339 385 got_inc: 340 echo "found $f ($name )"386 echo "found $f ($name[1])" 341 387 echo "$incdirs" | grep -- "-I$g " > /dev/null 342 388 if ($status) then … … 453 499 ./config.tools fixconf @CPPFLAGS@ "$CPPFLAGS" 454 500 ./config.tools fixconf @LDFLAGS@ "$LDFLAGS" 501 ./config.tools fixconf @DLLTYPE@ "$dlltype" 455 502 456 503 # other architecture dependent options
Note:
See TracChangeset
for help on using the changeset viewer.
