Changeset 13615
- Timestamp:
- Jun 4, 2007, 11:23:37 AM (19 years ago)
- Location:
- trunk/Ohana
- Files:
-
- 2 added
- 5 edited
-
configure.tcsh (modified) (12 diffs)
-
src/opihi/Makefile.Common (modified) (1 diff)
-
src/opihi/cmd.data/Makefile (modified) (1 diff)
-
src/opihi/cmd.data/dbconnect.c (added)
-
src/opihi/cmd.data/dbselect.c (added)
-
src/opihi/cmd.data/init.c (modified) (2 diffs)
-
src/opihi/include/data.h (modified) (1 diff)
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 -
trunk/Ohana/src/opihi/Makefile.Common
r12280 r13615 4 4 5 5 BASE_CFLAGS = $(CFLAGS) 6 BASE_CPPFLAGS = $(CPPFLAGS) -I$(INC) -I$(DESTINC) $(INCDIRS) -D$(ARCH) 6 BASE_CPPFLAGS = $(CPPFLAGS) -I$(INC) -I$(DESTINC) $(INCDIRS) -D$(ARCH) 7 7 BASE_LDFLAGS = $(LDFLAGS) -L$(LIB) -L$(DESTLIB) $(LIBDIRS) $(LIBFLAGS) 8 8 -
trunk/Ohana/src/opihi/cmd.data/Makefile
r12879 r13615 38 38 $(SRC)/dimendown.$(ARCH).o \ 39 39 $(SRC)/dimenup.$(ARCH).o \ 40 $(SRC)/dbconnect.$(ARCH).o \ 41 $(SRC)/dbselect.$(ARCH).o \ 40 42 $(SRC)/erase.$(ARCH).o \ 41 43 $(SRC)/extract.$(ARCH).o \ -
trunk/Ohana/src/opihi/cmd.data/init.c
r13479 r13615 18 18 int cut PROTO((int, char **)); 19 19 int datafile PROTO((int, char **)); 20 int dbconnect PROTO((int, char **)); 21 int dbselect PROTO((int, char **)); 20 22 int delete PROTO((int, char **)); 21 23 int device PROTO((int, char **)); … … 132 134 {"cut", cut, "extract a cut across an image"}, 133 135 {"datafile", datafile, "define file to read vectors"}, 136 {"dbconnect", dbconnect, "setup mysql db connection"}, 137 {"dbselect", dbselect, "extract vectors from mysql database table"}, 134 138 {"delete", delete, "delete vectors or matrices"}, 135 139 {"device", device, "set / get current graphics device"}, -
trunk/Ohana/src/opihi/include/data.h
r13479 r13615 165 165 166 166 int read_table_vectors (int argc, char **argv, char *extname); 167 168 void *db_getConnection (); 169 167 170 # endif 168 171
Note:
See TracChangeset
for help on using the changeset viewer.
