Changeset 13615 for trunk/Ohana/configure.tcsh
- Timestamp:
- Jun 4, 2007, 11:23:37 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/configure.tcsh (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/configure.tcsh
r12875 r13615 150 150 151 151 if (! $?CPPFLAGS) then 152 set CPPFLAGS = 152 set CPPFLAGS = "" 153 153 endif 154 if ($pedantic) set CPPFLAGS = "$CPPFLAGS -Wall -Werror"155 if ($memcheck) set CPPFLAGS = "$CPPFLAGS -DOHANA_MEMORY"154 if ($pedantic) set CPPFLAGS = "$CPPFLAGS-Wall -Werror " 155 if ($memcheck) set CPPFLAGS = "$CPPFLAGS-DOHANA_MEMORY " 156 156 157 157 if (! $?LDFLAGS) then … … 169 169 set needlibs = "$needlibs m" 170 170 171 # /usr/local/include/libpng is really pretty lame... 171 set optlibs = "" 172 set optlibs = "$optlibs mysqlclient" 173 172 174 set sysincpath = "/usr/include /usr/local/include /usr/X11R6/include" 173 175 … … 211 213 set needincs = "$needincs zlib.h" 212 214 215 set optincs = "" 216 set optincs = "$optincs mysql.h" 217 213 218 # XXX need to have options for non-ANSI includes? (ie, varargs.h) 214 219 # set needincs = "$needincs cfuncs.h" - from non-ANSI option in ohana.h … … 304 309 # check for basic libraries 305 310 echo "" 306 echo "searching for needed external libraries..."311 echo "searching for required external libraries..." 307 312 set faillibs = "" 308 313 set libflags = "" … … 310 315 set nonomatch 311 316 foreach f ( $needlibs ) 312 foreach g ( $ syslibpath $libdir $libpath )317 foreach g ( $libpath $libdir $syslibpath ) 313 318 set name = $g/lib$f.a 314 319 if (-e $name[1]) goto got_lib; … … 335 340 # check for termcap, curses, etc 336 341 foreach f ( ncurses curses termcap ) 337 foreach g ( $ syslibpath $libdir $libpath )342 foreach g ( $libpath $libdir $syslibpath ) 338 343 set name = $g/lib$f.a 339 344 if (-e $name[1]) goto got_curses; … … 356 361 echo "$libflags" | grep -- "-l$f " > /dev/null 357 362 if ($status) then 358 set libflags = "$libflags-l$f "363 set libflags = "$libflags-l$f " 359 364 endif 360 365 … … 366 371 endif 367 372 373 # check for optional libraries 374 echo "" 375 echo "searching for optional external libraries..." 376 foreach f ( $optlibs ) 377 foreach g ( $libpath $libdir $syslibpath ) 378 set name = $g/lib$f.a 379 if (-e $name[1]) goto got_optlib; 380 set name = $g/lib$f.$dlltype 381 if (-e $name[1]) goto got_optlib; 382 set name = $g/*/lib$f.a 383 if (-e $name[1]) goto got_optlib; 384 set name = $g/*/lib$f.$dlltype 385 if (-e $name[1]) goto got_optlib; 386 end 387 echo "missing lib$f; skipping" 388 continue 389 got_optlib: 390 echo "found lib$f ($name[1])" 391 set gotlibdir = `dirname $name[1]` 392 echo "$libdirs" | grep -- "-L$gotlibdir " > /dev/null 393 if ($status) then 394 set libdirs = "$libdirs-L$gotlibdir " 395 endif 396 echo "$libflags" | grep -- "-l$f " > /dev/null 397 if ($status) then 398 set libflags = "$libflags-l$f " 399 endif 400 end 401 368 402 # add the CPATH 369 403 if ($?CPATH) then … … 373 407 endif 374 408 375 # check for headers (including in subdirectories)409 # check for required headers (including in subdirectories) 376 410 echo "" 377 echo "searching for needed external header files..."411 echo "searching for required external header files..." 378 412 set failincs = "" 379 413 set incdirs = "" … … 382 416 set name = "$g/$f" 383 417 if (-e $name) goto got_inc; 418 set nonomatch 419 set name = $g/*/$f 420 echo "$name" | grep "*" > /dev/null 421 if (! $status) continue 422 unset nonomatch 423 if (-e $name[1]) goto got_inc; 384 424 end 385 425 echo "missing $f" … … 387 427 continue 388 428 got_inc: 389 echo "found $f ($name[1])" 390 echo "$incdirs" | grep -- "-I$g " > /dev/null 391 if ($status) then 392 set incdirs = "$incdirs-I$g " 429 set gotinc = $name[1] 430 echo "found $f ($gotinc)" 431 set gotincdir = `dirname $name[1]` 432 if (`dirname $f` != ".") then 433 set gotincdir = `dirname $gotincdir` 434 endif 435 echo "$incdirs" | grep -- "-I$gotincdir " > /dev/null 436 if ($status) then 437 set incdirs = "$incdirs-I$gotincdir " 393 438 endif 394 439 end … … 399 444 exit 1 400 445 endif 446 447 # check for optional headers (including in subdirectories) 448 echo "" 449 echo "searching for optional external header files..." 450 foreach f ( $optincs ) 451 foreach g ( $incdir $incpath $sysincpath ) 452 set name = "$g/$f" 453 if (-e $name) goto got_optinc; 454 set nonomatch 455 set name = $g/*/$f 456 echo "$name" | grep "*" > /dev/null 457 if (! $status) continue 458 unset nonomatch 459 if (-e $name[1]) goto got_optinc; 460 end 461 echo "missing $f; skipping" 462 continue 463 got_optinc: 464 set gotinc = $name[1] 465 echo "found $f ($gotinc)" 466 set gotincdir = `dirname $name[1]` 467 if (`dirname $f` != ".") then 468 set gotincdir = `dirname $gotincdir` 469 endif 470 echo "$incdirs" | grep -- "-I$gotincdir " > /dev/null 471 if ($status) then 472 set incdirs = "$incdirs-I$gotincdir " 473 endif 474 set haveflag = `echo $f | tr '[:lower:]' '[:upper:]' | tr '.' '_'` 475 set CPPFLAGS = "$CPPFLAGS-DHAVE_$haveflag " 476 end 401 477 402 478 echo
Note:
See TracChangeset
for help on using the changeset viewer.
