Changeset 884 for trunk/Configure
- Timestamp:
- Nov 14, 2008, 5:29:15 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Configure
r872 r884 19 19 # 20 20 21 # $Id: Configure,v 1.10 4 2008/07/03 14:17:16 bmorgan Exp $21 # $Id: Configure,v 1.107 2008/11/14 15:14:46 bmorgan Exp $ 22 22 # 23 # Generated on Thu Jul 3 14:50:17 BST 2008 [metaconfig 3.0 PL70]23 # Generated on Fri Nov 14 15:14:32 GMT 2008 [metaconfig 3.0 PL70] 24 24 25 25 cat >/tmp/c1$$ <<EOF … … 143 143 osname='' 144 144 osvers='' 145 g4_qt_cxxflags='' 146 g4_qt_gl_cxxflags='' 147 g4_qt_gl_libs='' 148 g4_qt_libs='' 149 g4_qt_moc='' 150 g4_qt_version='' 145 151 Author='' 146 152 Date='' … … 206 212 g4vis_xmhome='' 207 213 g4vis_xmlibs='' 208 g4_qtmochome=''209 g4_qtincdir=''210 g4_qtlibdir=''211 214 g4ui_build_qt_session='' 212 215 g4ui_use_qt='' … … 291 294 g4ui_build_qt_session='n' 292 295 g4ui_use_qt='n' 293 g4_qtmochome='' 294 g4_qtincdir='' 295 g4_qtlibdir='' 296 g4_qthome='' 296 297 #END QT UI OPTIONS 297 298 #INITIALIZE QT UI OPTIONS 298 299 g4ui_build_qt_session='n' 299 300 g4ui_use_qt='n' 300 g4_qtmochome=''301 g4_qtincdir=''302 g4_qtlibdir=''303 301 #END QT UI OPTIONS 304 302 #INITIALIZE QT VIS DRIVER OPTIONS 305 303 g4vis_build_openglqt_driver='n' 306 g4 ui_use_openglqt='n'304 g4vis_use_openglqt='n' 307 305 #END QT VIS DRIVER OPTIONS 308 306 … … 483 481 override='' 484 482 knowitall='' 485 echo "*********"486 echo `pwd`487 echo "*********"488 483 rm -f optdef.sh 489 484 cat >optdef.sh <<EOS … … 2236 2231 esac 2237 2232 2233 cat <<EOSC >qt 2234 $startsh 2235 # 2236 # Autoconf(ish) style check for Qt headers, libraries and moc application 2237 # 2238 2239 # 2240 # These are variables that the final unit generated script may use 2241 # 2242 with_qt_dir="\$qt_search_dir" 2243 2244 # 2245 # Only run if we haven't succesfully found Qt already 2246 # 2247 if test "x\$g4_qt_is_configured" = "x" ; then 2248 # 2249 # Flag specifying if we've configured Qt o.k. 2250 # 2251 g4_qt_is_configured="yes" # Optimism 2252 2253 # Flag to be set if any part of configuration fails 2254 g4_havegoodqt="yes" # Optimism 2255 2256 # Qt4 flag 2257 g4_is_qt4="no" 2258 2259 # Variables to be set 2260 g4_qt_include_dir='' 2261 g4_qt_lib_dir='' 2262 g4_qt_moc='' 2263 2264 g4_qt_version='' 2265 g4_qt_cxxflags='' 2266 g4_qt_gl_cxxflags='' 2267 g4_qt_libs='' 2268 g4_qt_gl_libs='' 2269 2270 # 2271 # User may supply a value for 'QTDIR' and in that case we ASSUME a 2272 # Trolltech style installation or a Mac Framework 2273 # 2274 if test "x\$with_qt_dir" != "x" ; then 2275 g4_qt_dir="\$with_qt_dir" 2276 g4_qt_possible_qt_include_dirs="\$with_qt_dir/include/QtCore 2277 \$with_qt_dir/include/Qt 2278 \`ls -dr \$with_qt_dir/include/qt*/QtCore 2>/dev/null\` 2279 \`ls -dr \$with_qt_dir/include/qt*/Qt 2>/dev/null\` 2280 \`ls -dr \$with_qt_dir/include/qt* 2>/dev/null\` 2281 \$with_qt_dir/include 2282 \$with_qt_dir/QtCore.framework/Headers" 2283 2284 # Check for qglobal.h 2285 g4_qglobal_loc=\`./loc qglobal.h no \$g4_qt_possible_qt_include_dirs\` 2286 2287 if test "x\$g4_qglobal_loc" = "xno" ; then 2288 g4_havegoodqt=no 2289 g4_qt_include_dir=no 2290 fi 2291 echo "checking for qglobal.h... \$g4_qglobal_loc" 2292 2293 if test "x\$g4_qglobal_loc" != "xno" ; then 2294 g4_qt_include_dir="\`dirname \$g4_qglobal_loc\`" 2295 fi 2296 2297 else 2298 # We use standard search paths... 2299 qt_direct_test_header="qglobal.h" 2300 2301 g4_qt_include_path_list=" 2302 \`ls -dr /Library/Frameworks/QtCore.framework/Headers 2>/dev/null\` 2303 \`ls -dr /System/Library/Frameworks/QtCore.framework/Headers 2>/dev/null\` 2304 /usr/include/QtCore 2305 \`ls -dr /usr/include/qt*/QtCore 2>/dev/null\` 2306 \`ls -dr /opt/qt*/include/QtCore 2>/dev/null\` 2307 \`ls -dr /usr/qt*/include/QtCore 2>/dev/null\` 2308 \`ls -dr /usr/qt/*/include/QtCore 2>/dev/null\` 2309 \`ls -dr /usr/include/qt/*/QtCore 2>/dev/null\` 2310 \`ls -dr /sw/include/QtCore 2>/dev/null\` 2311 \`ls -dr /sw/qt*/include/QtCore 2>/dev/null\` 2312 \`ls -dr /sw/qt/*/include/QtCore 2>/dev/null\` 2313 /usr/include 2314 \`ls -dr /usr/include/qt* 2>/dev/null\` 2315 \`ls -dr /opt/qt*/include 2>/dev/null\` 2316 \`ls -dr /usr/qt*/include 2>/dev/null\` 2317 \`ls -dr /usr/qt/*/include 2>/dev/null\` 2318 \`ls -dr /usr/include/qt/* 2>/dev/null\` 2319 \`ls -dr /sw/include 2>/dev/null\` 2320 \`ls -dr /sw/qt*/include 2>/dev/null\` 2321 \`ls -dr /sw/qt/*/include 2>/dev/null\` 2322 /usr/include/Qt 2323 \`ls -dr /usr/include/qt*/Qt 2>/dev/null\` 2324 \`ls -dr /opt/qt*/include/Qt 2>/dev/null\` 2325 \`ls -dr /usr/qt*/include/Qt 2>/dev/null\` 2326 \`ls -dr /usr/qt/*/include/Qt 2>/dev/null\` 2327 \`ls -dr /usr/include/qt/*/Qt 2>/dev/null\` 2328 \`ls -dr /sw/include/Qt 2>/dev/null\` 2329 \`ls -dr /sw/qt*/include/Qt 2>/dev/null\` 2330 \`ls -dr /sw/qt/*/include/Qt 2>/dev/null\` 2331 " 2332 2333 # Find ALL installed versions of qglobal.h 2334 for g4_qt_dir in \$g4_qt_include_path_list ; do 2335 if test -r "\$g4_qt_dir/\$qt_direct_test_header" ; then 2336 g4_qt_found_dirs="\$g4_qt_found_dirs \$g4_qt_dir" 2337 fi 2338 done 2339 2340 # Which one relates to the newest Qt? 2341 g4_qt_prev_ver=0 2342 for g4_qt_dir in \$g4_qt_found_dirs ; do 2343 g4_qt_this_ver=\`grep -w '#define QT_VERSION' \$g4_qt_dir/\$qt_direct_test_header | sed s/'#define QT_VERSION'//\` 2344 2345 if expr \$g4_qt_this_ver '>' \$g4_qt_prev_ver > /dev/null ; then 2346 g4_qt_include_dir=\$g4_qt_dir 2347 g4_qt_prev_ver=\$g4_qt_this_ver 2348 fi 2349 done 2350 2351 if test "x\$g4_qt_include_dir" = "x" ; then 2352 g4_qt_include_dir=no 2353 g4_havegoodqt=no 2354 fi 2355 2356 echo "checking for qglobal.h... \$g4_qt_include_dir/qglobal.h" 2357 fi # END TEST with_qt_dir is set 2358 2359 # 2360 # Result of above tests should have given us g4_qt_include_dir 2361 # We can now use this to check other things, taking care to deal with the 2362 # correct paths... 2363 # 2364 2365 # Immediate and obvious Darwin check... 2366 if test "x\`basename \$g4_qt_include_dir\`" = "xHeaders" ; then 2367 #check for moc 2368 if test -x "/usr/bin/moc" ; then 2369 g4_qt_moc="/usr/bin/moc" 2370 echo "checking for moc... \$g4_qt_moc" 2371 2372 g4_qt_dir=\`dirname \$g4_qt_include_dir\` 2373 g4_qt_dir=\`dirname \$g4_qt_dir\` 2374 2375 g4_qt_version="4" 2376 g4_qt_cxxflags="-I\$g4_qt_dir/QtCore.framework/Headers -I\$g4_qt_dir/QtGui.framework/Headers" 2377 g4_qt_gl_cxxflags="-I\$g4_qt_dir/QtOpenGl.framework/Headers" 2378 g4_qt_libs="-F\$g4_qt_dir -framework QtCore -framework QtGui" 2379 g4_qt_gl_libs="-framework QtOpenGL" 2380 else 2381 echo "checking for moc... no" 2382 g4_havegoodqt=no 2383 fi 2384 else 2385 # Probably have Unix-style installation, in which case estimated 2386 # 'QTDIR' equivalent is $with_qt_dir if supplied, or directory 2387 # one level below the 'include' directory in \$g4_qt_include_dir 2388 if test "x\$with_qt_dir" = "x" ; then 2389 # We need to strip g4_qt_include_dir, if it was found 2390 g4_qt_dir=\$g4_qt_include_dir 2391 2392 # Only do this IF there's an 'include' in the path name! 2393 if test "x\`echo \$g4_qt_dir | grep include\`" != "x" ; then 2394 while test "x\`basename \$g4_qt_dir\`" != "xinclude" ; 2395 do 2396 g4_qt_dir=\`dirname \$g4_qt_dir\` 2397 done 2398 fi 2399 2400 #Now should be one level above equivalent QTDIR 2401 g4_qt_dir=\`dirname \$g4_qt_dir\` 2402 fi 2403 2404 # At this point, we need get Qt version of detected qglobal.h because 2405 # Qt3/4 libraries MAY be installed alongside each other... 2406 qt_direct_test_header=qglobal.h 2407 g4_qt_major_ver=\`grep QT_VERSION_STR \$g4_qt_include_dir/\$qt_direct_test_header 2>/dev/null | sed 's/.* \"\([0-9]\)\..*\"/\1/'\` 2408 2409 # 2410 # We might have an odd install where our found qglobal.h #includes 2411 # the real qglobal... 2412 # 2413 if test "x\$g4_qt_major_ver" = "x" ; then 2414 # check for a #include of qglobal... 2415 possible_actual_qglobal=\`grep '#include.*qglobal' \$g4_qt_include_dir/\$qt_direct_test_header 2>/dev/null\` 2416 2417 if test "x\$possible_actual_qglobal" != "x" ; then 2418 #We did get something, and it's likely the include 2419 #will give us a relative path (but an ASSUMPTION at present) 2420 relative_path_to_qglobal=\`grep '#include.*qglobal' \$g4_qt_include_dir/\$qt_direct_test_header 2>/dev/null | sed 's/.*\"\(.*\)\"/\1/'\` 2421 2422 if test -r \$g4_qt_include_dir/\$relative_path_to_qglobal ; then 2423 g4_qt_major_ver=\`grep QT_VERSION_STR \$g4_qt_include_dir/\$relative_path_to_qglobal 2>/dev/null | sed 's/.* \"\([0-9]\)\..*\"/\1/'\` 2424 else 2425 g4_qt_major_ver=no 2426 g4_havegoodqt=no 2427 fi 2428 else 2429 g4_qt_major_ver=no 2430 g4_havegoodqt=no 2431 fi 2432 fi #END TEST odd qglobal includes qglobal behaviour 2433 2434 if test "x\$g4_qt_major_ver" = "x4" ; then 2435 g4_is_qt4=yes 2436 else 2437 g4_is_qt4=no 2438 fi 2439 echo "checking Qt major version... \$g4_qt_major_ver" 2440 2441 # 2442 # We also need to check for Qt4 installations with QtCore type 2443 # directory structures. That being the case, make sure we have 2444 # the extra headers.. 2445 # 2446 if test "x\`basename \$g4_qt_include_dir\`" = "xQtCore" ; then 2447 g4_qt_extra_headers="" 2448 g4_qt_gl_headers="" 2449 g4_qt_extra_packages="QtGui" 2450 g4_qt_gl_packages="QtOpenGL" 2451 2452 for i in \$g4_qt_extra_packages ; do 2453 if test -d "\`dirname \$g4_qt_include_dir\`/\$i" ; then 2454 echo "checking for \$i headers... yes" 2455 g4_qt_extra_headers="\$g4_qt_extra_headers \`dirname \$g4_qt_include_dir\`/\$i" 2456 else 2457 echo "checking for \$i headers... no" 2458 g4_havegoodqt=no 2459 fi 2460 done 2461 2462 for i in \$g4_qt_gl_packages ; do 2463 if test -d "\`dirname \$g4_qt_include_dir\`/\$i" ; then 2464 echo "checking for \$i headers... yes" 2465 g4_qt_gl_headers="\$g4_qt_gl_headers \`dirname \$g4_qt_include_dir\`/\$i" 2466 else 2467 echo "checking for \$i headers... no" 2468 g4_havegoodqt=no 2469 fi 2470 done 2471 2472 fi #END TEST QtCore style install 2473 2474 2475 # 2476 # Now check for appropriate library... 2477 # 2478 if test -d "\$g4_qt_dir/lib64" ; then 2479 g4_qt_lib_dir=\$g4_qt_dir/lib64 2480 else 2481 g4_qt_lib_dir=\$g4_qt_dir/lib 2482 fi 2483 2484 if test "x\$g4_is_qt4" = "xyes" ; then 2485 g4_qt_lib="\`ls \$g4_qt_lib_dir/libQtCore* 2> /dev/null | sed -n 1p | 2486 sed s@\$g4_qt_lib_dir/lib@@ | sed s@[.].*@@\`" 2487 2488 if test "x\$g4_qt_lib" = "x" ; then 2489 # We might be on Windows... 2490 g4_qt_lib="\`ls \$g4_qt_lib_dir/QtCore4.lib 2> /dev/null | sed -n 1p | sed s@\$g4_qt_lib_dir/@@\`" 2491 fi 2492 2493 if test "x\$g4_qt_lib" != "x" ; then 2494 echo "checking for QtCore library... \$g4_qt_lib" 2495 else 2496 echo "checking for QtCore library... no" 2497 g4_havegoodqt=no 2498 fi 2499 else 2500 g4_qt_lib="\`ls \$g4_qt_lib_dir/libqt-mt.* \$g4_qt_lib_dir/libqt.* 2> /dev/null | sed -n 1p | sed s@\$g4_qt_lib_dir/lib@@ | sed s@[.].*@@\`" 2501 2502 if test "x\$g4_qt_lib" != "x" ; then 2503 echo "checking for qt-mt or qt library... \$g4_qt_lib" 2504 2505 # On Darwin we also need libqui for Qt3 2506 if test "x\$osname" = "xdarwin" ; then 2507 g4_qt_lib_qui="\`ls \$g4_qt_lib_dir/libqui.* 2> /dev/null | 2508 sed -n 1p | sed s@\$g4_qt_lib_dir/lib@@ | 2509 sed s@[.].*@@\`" 2510 if test "x\$g4_qt_lib_qui" != "x" ; then 2511 echo "checking for qui library... yes" 2512 else 2513 echo "checking for qui library... no" 2514 g4_havegoodqt=no 2515 fi 2516 fi 2517 else 2518 echo "checking for qt-mt or qt library... no" 2519 g4_havegoodqt=no 2520 fi 2521 fi #END TEST for Qt4/3 libraries 2522 2523 # 2524 # Finally, we need to search for moc 2525 # 2526 g4_qt_bin_dir=\$g4_qt_dir/bin 2527 g4_qtmoc=no 2528 if test -x "\$g4_qt_bin_dir/moc" ; then 2529 g4_qtmoc="\$g4_qt_bin_dir/moc" 2530 elif test -x "\$g4_qt_bin_dir/moc-qt4" ; then 2531 g4_qtmoc="\$g4_qt_bin_dir/moc-qt4" 2532 elif test -x "\$g4_qt_bin_dir/qt4-moc" ; then 2533 g4_qtmoc="\$g4_qt_bin_dir/qt4-moc" 2534 else 2535 g4_havegoodqt=no 2536 fi 2537 echo "checking for moc... \$g4_qtmoc" 2538 2539 ## THIS IS POINT AT WHICH TO DO FALLBACK TESTS I.E DOES 2540 ## COMPILATION OF SMALL TEST PROGRAM WORK - THEN HEADERS AND 2541 ## LIBS ARE AUTOMATICALLY FOUND BY LINKER 2542 2543 # 2544 ## Finally, set output variables, raw for now 2545 # 2546 if test "x\$g4_havegoodqt" = "xyes" ; then 2547 g4_qt_version=\$g4_qt_major_ver 2548 2549 # Take care of Qt4 style header structure... 2550 if test "x\`basename \$g4_qt_include_dir\`" = "xQtCore"; then 2551 g4_qt_cxxflags="-I\`dirname \$g4_qt_include_dir\` -I\$g4_qt_include_dir" 2552 else 2553 g4_qt_cxxflags="-I\$g4_qt_include_dir" 2554 fi 2555 if test "x\$g4_is_qt4" = "xyes" ; then 2556 for i in \$g4_qt_extra_headers ; do 2557 g4_qt_cxxflags="\$g4_qt_cxxflags -I\$i" 2558 done 2559 for i in \$g4_qt_gl_headers ; do 2560 g4_qt_gl_cxxflags="\$g4_qt_gl_cxxflags -I\$i" 2561 done 2562 fi 2563 2564 g4_qt_libs="-L\$g4_qt_lib_dir" 2565 if test "x\$g4_qt_lib" = "xQtCore4.lib" ; then 2566 #We have Windows... 2567 g4_qt_libs="\$g4_qt_libs QtCore4.lib QtGui4.lib" 2568 g4_qt_gl_libs="QtOpenGL4.lib" 2569 else 2570 g4_qt_libs="\$g4_qt_libs -l\$g4_qt_lib" 2571 if test "x\$g4_is_qt4" = "xyes" ; then 2572 g4_qt_libs="\$g4_qt_libs -lQtGui" 2573 g4_qt_gl_libs="-lQtOpenGL" 2574 fi 2575 fi 2576 if test "x\$g4_qt_lib_qui" != "x" ; then 2577 g4_qt_libs="\$g4_qt_libs -lqui" 2578 fi 2579 2580 2581 g4_qt_moc=\$g4_qtmoc 2582 2583 g4_qt_is_configured=yes 2584 else 2585 g4_qt_is_configured='' 2586 fi 2587 fi #END TEST for Darwin Framework 2588 2589 else 2590 #Probably also want flags here to reset variables if requested 2591 echo "configure: Qt already configured, no recheck neccessary" 2592 fi #END TEST "x\$g4_qt_is_configured" = "x" 2593 2594 2595 echo "" 2596 echo "DEBUG#####" 2597 echo "g4_qt_cxxflags = \$g4_qt_cxxflags" 2598 echo "g4_qt_gl_cxxflags = \$g4_qt_gl_cxxflags" 2599 echo "g4_qt_libs = \$g4_qt_libs" 2600 echo "g4_qt_gl_libs = \$g4_qt_gl_libs" 2601 echo "g4_qt_moc = \$g4_qt_moc" 2602 echo "..." 2603 echo "g4_havegoodqt = \$g4_havegoodqt" 2604 echo "g4_qt_is_configured = \$g4_qt_is_configured" 2605 echo "##########" 2606 EOSC 2238 2607 : decide how portable to be 2239 2608 case "$d_portable" in … … 4309 4678 # 4310 4679 4311 # 4312 # We only perform the query/probe for Linux-g++ and Darwin-g++ systems.. 4313 # 4314 #if test "x$g4system" = "xLinux-g++" -o "x$g4system" = "xDarwin-g++" ; then 4315 4316 # Now, IF g4ui_none HAS NOT BEEN SET TO Y, proceed to the query/probe section 4680 # Checks applied for all systems ONLY IF g4ui_none HAS NOT BEEN SET TO y 4317 4681 if test "x$g4ui_none" = "xn" ; then 4318 4319 # Query the user to see if they want to build the Qt UI module 4320 4321 g4message=`cat << EOM 4322 4323 G4UI_BUILD_QT_SESSION 4324 G4UI_USE_QT 4682 # Query the user to see if build of Qt UI module is needed 4683 g4message=`cat <<EOM 4684 4685 G4UI_BUILD_QT_SESSION 4686 G4UI_USE_QT 4325 4687 4326 4688 Setting these variables will enable the building of the G4 Qt based 4327 4689 user interface module and the use of this module in your applications 4328 4690 respectively. 4329 The Qt headers, libraries and binaries are required to enable the4330 building of this module.4691 The Qt3 or Qt4 headers, libraries and moc application are required to enable 4692 the building of this module. 4331 4693 Do you want to enable build and use of this module? 4332 4694 EOM` 4333 4695 4334 # 4335 # read in the user response 4336 # 4337 dflt=$g4ui_build_qt_session 4338 rp=$g4message 4339 . ./myread 4340 gans=$ans 4341 4342 # 4343 # Check response 4344 # 4345 case $gans in 4346 n*|N*) 4347 g4ui_build_qt_session=n 4348 g4ui_use_qt=n 4349 ;; 4696 # Read in the user response 4697 dflt=$g4ui_build_qt_session 4698 rp=$g4message 4699 . ./myread 4700 gans=$ans 4701 4702 # Check response and take set variables as needed. 4703 case $gans in 4704 n*|N*) 4705 g4ui_build_qt_session=n 4706 g4ui_use_qt=n 4707 ;; 4350 4708 y*|Y*) 4351 g4ui_build_qt_session=y 4352 g4ui_use_qt=y 4353 ;; 4354 esac 4355 4356 4357 ######################################### 4358 4359 4360 ##################################################################### 4361 # Now, if we want to build/use the Qt UI module, we need to probe for 4362 # a Qt4 installation 4363 # 4364 if test "x$g4ui_build_qt_session" = "xy" ; then 4365 4366 echo " " 4367 g4_havegoodqt=no 4368 4369 # Look for qt4 moc 4370 g4_qtmochome=`./loc moc no $QTDIR/bin /usr/lib/qt4/bin /usr/lib/qt/bin /usr/local/qt/bin /usr/local/bin /usr/bin /bin /usr/share/qt4/bin /usr/X11R6/bin /sw/bin` 4371 if test "x$g4_qtmochome" = "xno" ; then 4372 # Look for qt3 moc 4373 g4_qtmochome=`./loc moc no /usr/lib/qt3/bin /usr/share/qt3/bin` 4374 fi 4375 4376 # if not found 4377 if test "x$g4_qtmochome" != "xno" ; then 4378 echo "checking Qt moc tool in... $g4_qtmochome" 4379 # check Qt version 4380 g4_qtver=`$g4_qtmochome 2>&1 -v | $sed 's/.* .Qt \([0-9]\)\..*/\1/' ` 4381 echo "checking Qt version... $g4_qtver" 4382 if test "x$g4_qtver" = "x3" || test "x$g4_qtver" = "x4" ;then 4383 4384 # checking includes first get QTDIR location, then qt$g4_qtver, sw, standard, shared, X11 4385 4386 incQtFiles=" $QTDIR/include /usr/include/qt$g4_qtver /usr/include/qt$g4_qtver/Qt /usr/lib/qt$g4_qtver/include /sw/include/qt /usr/lib/qt/include /usr/local/qt/include /usr/local/include /usr/include /usr/include/qt /usr/share/qt$g4_qtver/include /usr/X11R6/include /usr/X11R6/include/qt$g4_qtver /usr/X11R6/include/qt" 4387 4388 if test "X$g4osname" = "XDarwin" && test "X$g4_qtver" = "X4"; then 4389 incQtFiles="$incQtFiles /Library/Frameworks/QtCore.framework/Headers/" 4390 g4_qtincdir=`./loc qglobal.h no $incQtFiles` 4391 if test "x$g4_qtincdir" != "xno" ; then 4392 g4_qtincdir="/Library/Frameworks" 4393 fi 4394 else 4395 g4_qtincdir=`./loc qglobal.h no $incQtFiles` 4396 fi 4397 4398 4399 if test "x$g4_qtincdir" != "xno" ; then 4400 if test "x$g4_qtincdir" != "x/Library/Frameworks" ; then 4401 g4_qtincdir=`dirname $g4_qtincdir` 4402 fi 4403 echo "checking Qt includes dir in... $g4_qtincdir" 4404 4405 4406 # checking libs, includes first get QTDIR location, then qt$g4_qtver, sw, standard, shared, X11 4407 4408 libQtFiles="$QTDIR/lib $QTDIR/lib64 /usr/lib/qt$g4_qtver/lib /usr/lib/qt$g4_qtver/lib64 /usr/lib/qt$g4_qtver /usr/lib/qt$g4_qtver /sw/lib /sw/lib/qt /sw/lib/qt$g4_qtver /sw/lib/qt$g4_qtver/lib /usr/lib/qt/lib /usr/local/qt/lib /usr/local/lib /usr/lib /usr/lib/qt /usr/share/qt$g4_qtver/lib /usr/X11R6/lib/qt /usr/X11R6/lib/qt$g4_qtver /usr/X11R6/lib /usr/X11R6/lib/qt" 4409 4410 if test "X$g4osname" = "XDarwin" && test "X$g4_qtincdir" = "X/Library/Frameworks" ; then 4411 g4_qtlibdir=`./loc QtCore no /Library/Frameworks/QtCore.framework/Versions/$g4_qtver/ $libQtFiles` 4412 g4_qtlibdir=`dirname $g4_qtlibdir` 4413 g4_qtlibdir=`dirname $g4_qtlibdir` 4414 g4_qtlibdir=`dirname $g4_qtlibdir` 4415 else 4416 g4_qtlibdir=`./loc libqt* no $libQtFiles` 4417 fi 4418 if test "x$g4_qtlibdir" != "xno" ; then 4419 g4_qtlibdir=`dirname $g4_qtlibdir` 4420 echo "checking Qt lib dir in... $g4_qtlibdir" 4421 g4_havegoodqt=yes 4422 else 4423 echo "Failed to find Qt lib dir in : $libQtFiles" 4424 fi 4425 else 4426 echo "Failed to find Qt includes dir in : $incQtFiles" 4427 fi #END CHECK QTLIBS 4428 else 4429 echo "Qt $g4_qtver is not actually support with this driver" 4430 fi #END CHECK QTINC 4431 fi #END CHECK QTMOC 4432 # 4433 # END QT AUTOPROBE 4434 #################################################################### 4435 4436 4437 #################################################################### 4438 # Based on result of Qt autoprobe, we decide if user input is needed to 4439 # locate Qt... 4440 # 4441 if test "x$g4_havegoodqt" = "xno" ; then 4442 promptend="no" 4443 qthomeloc="the standard locations" 4444 4445 g4message=`cat << EOM 4446 4447 Autodetection failed to locate Qt on your system. 4448 Please enter the path to your Qt install (i.e. if Qt is installed 4449 in PATH/include/Qt, or PATH/include $PATH/include/qt, enter PATH), or type '-' to 4450 CANCEL the build of the Qt UI module. 4709 g4ui_build_qt_session=y 4710 g4ui_use_qt=y 4711 ;; 4712 esac 4713 4714 ########## 4715 4716 ########## 4717 # Now, if user chose to build module, we need to check for a Qt 4718 # installation 4719 # 4720 if test "x$g4ui_build_qt_session" = "xy" ; then 4721 echo " " 4722 # NB Have to supply arg to qt script, just blank in this case! 4723 qt_search_dir="" 4724 . ./qt 4725 4726 # If we didn't find Qt automatically, then ask user if they know 4727 # where it's installed... 4728 if test "x$g4_havegoodqt" = "xno" ; then 4729 promptend="no" 4730 user_qthome="the standard locations" 4731 4732 while test "x$promptend" = "xno" ; do 4733 g4message=`cat << EOM 4734 4735 Autodetection failed to locate Qt3 or Qt4 in $qthomeloc on your system. 4736 Please enter the path to your Qt3 OR Qt4 install (i.e. if Qt4 is installed 4737 in PATH/include/QT, PATH/include or PATH/include/qt4, enter PATH), 4738 or type '-' to CANCEL the build of the Qt UI module. 4451 4739 Qt path: 4452 4740 EOM` 4453 dflt="/usr" 4454 g4_qtmochome="/usr" 4455 fn='d~(-)' 4456 rp=$g4message 4457 . ./getfile 4458 4459 #Check for user cancellation 4460 if test "x$ans" = "x-" ; then 4461 g4ui_build_qt_session=n 4462 g4ui_use_qt=n 4463 echo "build/use of Qt UI module cancelled..." 4464 promptend=yes 4465 4466 else 4467 #We want to probe for Qt in the user supplied directory 4468 echo " " 4469 qthomeloc=$ans 4470 g4_havegoodqt=no 4471 4472 4473 # check for moc 4474 4475 g4_qtmochome=`./loc moc no $ans/bin` 4476 if test "x$g4_qtmochome" = "xno" ; then 4477 while test "x$promptend" = "xno" ; do 4478 g4message=`cat << EOM 4479 4480 Failed to locate Qt moc tool on your system. 4481 Please enter the path to your Qt moc tool install or type '-' to 4482 CANCEL the build of the Qt UI module. 4483 Qt moc path: 4484 EOM` 4485 fn='d~(-)' 4486 rp=$g4message 4487 . ./getfile 4488 4489 #Check for user cancellation 4490 if test "x$ans" = "x-" ; then 4491 g4ui_build_qt_session=n 4492 g4ui_use_qt=n 4493 echo "build/use of Qt UI module cancelled..." 4494 promptend=yes 4495 4496 else 4497 #We want to probe for Qt in the user supplied directory 4498 echo " " 4499 # check for moc 4500 g4_qtmochome=`./loc moc no $ans/bin` 4501 if test "x$g4_qtmochome" != "xno" ; then 4502 promptend=yes 4503 fi 4504 fi 4505 done 4506 fi # ASK FOR QT MOC 4507 if test "x$g4_qtmochome" != "xno" ; then 4508 echo "checking Qt moc tool in... $g4_qtmochome" 4509 fi 4510 4511 # if moc ok, then check for version 4512 if test "x$g4_qtmochome" != "xno" ; then 4513 g4_qtver=`$g4_qtmochome 2>&1 -v | $sed 's/.* .Qt \([0-9]\)\..*/\1/' ` 4514 echo "checking Qt version... $g4_qtver" 4515 4516 if test "x$g4_qtver" = "x3" || test "x$g4_qtver" = "x4";then 4517 4518 # if version ok check for includes 4519 # checking includes in qt$g4_qtver, then standard 4520 incQtFiles="$qthomeloc/lib/qt$g4_qtver/include $qthomeloc/include/qt$g4_qtver/Qt $qthomeloc/include/qt$g4_qtver $qthomeloc/include $qthomeloc/include/Qt " 4521 4522 if test "X$g4osname" = "XDarwin" && test "X$g4_qtver" = "X4"; then 4523 incQtFiles="$incQtFiles /Library/Frameworks/QtCore.framework/Headers/ $qthomeloc/QtCore.framework/Headers/" 4524 g4_qtincdir=`./loc qglobal.h no $incQtFiles` 4525 if test "x$g4_qtincdir" != "xno" ; then 4526 g4_qtincdir=`dirname $g4_qtincdir` 4527 g4_qtincdir=`dirname $g4_qtincdir` 4528 fi 4529 else 4530 g4_qtincdir=`./loc qglobal.h no $incQtFiles` 4531 fi 4532 if test "x$g4_qtincdir" = "xno" ; then 4533 while test "x$promptend" = "xno" ; do 4534 g4message=`cat << EOM 4535 4536 Failed to locate Qt include directory on your system. 4537 Please enter the path to your Qt include directory install or type '-' to 4538 CANCEL the build of the Qt UI module. 4539 Qt include path: 4540 EOM` 4541 fn='d~(-)' 4542 rp=$g4message 4543 . ./getfile 4544 4545 #Check for user cancellation 4546 if test "x$ans" = "x-" ; then 4547 g4ui_build_qt_session=n 4548 g4ui_use_qt=n 4549 echo "build/use of Qt UI module cancelled..." 4550 promptend=yes 4551 4552 else 4553 #We want to probe for Qt in the user supplied directory 4554 echo " " 4555 # check for include 4556 g4_qtincdir=`./loc qglobal.h no $ans` 4557 if test "x$g4_qtincdir" != "xno" ; then 4558 promptend=yes 4559 fi 4560 fi 4561 done 4562 fi # ASK FOR QT INC 4563 if test "x$g4_qtincdir" != "xno" ; then 4564 g4_qtincdir=`dirname $g4_qtincdir` 4565 echo "checking Qt inc dir in... $g4_qtincdir" 4566 fi 4567 # if qt inc ok, then check for libs 4568 if test "x$g4_qtincdir" != "xno" ; then 4569 4570 # checking libraries in qt$g4_qtver, then standard 4571 libQtFiles="$qthomeloc/lib/qt$g4_qtver/lib $qthomeloc/lib/qt$g4_qtver $qthomeloc/lib/qt$g4_qtver $qthomeloc/lib/qt$g4_qtver/lib64 $qthomeloc/lib $qthomeloc/lib64 $qthomeloc/lib/qt/lib $qthomeloc/lib/qt $qthomeloc/lib64" 4572 4573 if test "X$g4osname" = "XDarwin" && test "X$g4_qtincdir" = "X/Library/Frameworks" ; then 4574 g4_qtlibdir=`./loc QtCore no /Library/Frameworks/QtCore.framework/Versions/$g4_qtver/ $libQtFiles` 4575 g4_qtlibdir=`dirname $g4_qtlibdir` 4576 g4_qtlibdir=`dirname $g4_qtlibdir` 4577 g4_qtlibdir=`dirname $g4_qtlibdir` 4578 else 4579 g4_qtlibdir=`./loc libqt* no $libQtFiles` 4580 fi 4581 if test "x$g4_qtlibdir" = "xno" ; then 4582 while test "x$promptend" = "xno" ; do 4583 g4message=`cat << EOM 4584 4585 Failed to locate Qt lib directory on your system. 4586 Please enter the path to your Qt lib directory install or type '-' to 4587 CANCEL the build of the Qt UI module. 4588 Qt library path: 4589 EOM` 4590 fn='d~(-)' 4591 rp=$g4message 4592 . ./getfile 4593 4594 #Check for user cancellation 4595 if test "x$ans" = "x-" ; then 4596 g4ui_build_qt_session=n 4597 g4ui_use_qt=n 4598 echo "build/use of Qt UI module cancelled..." 4599 promptend=yes 4600 4601 else 4602 #We want to probe for Qt in the user supplied directory 4603 echo " " 4604 # check for libraries 4605 if test "X$g4osname" = "XDarwin" && test "X$g4_qtincdir" = "X/Library/Frameworks" ; then 4606 g4_qtlibdir=`./loc QtCore* no $libQtFiles /Library/Frameworks/` 4607 else 4608 g4_qtlibdir=`./loc libqt* no $libQtFiles` 4609 fi 4610 if test "x$g4_qtlibdir" != "xno" ; then 4611 promptend=yes 4612 fi 4613 fi 4614 done 4615 fi # END OF LIB CHECK 4616 if test "x$g4_qtlibdir" != "xno" ; then 4617 g4_qtlibdir=`dirname $g4_qtlibdir` 4618 echo "checking Qt lib dir in... $g4_qtlibdir" 4619 promptend=yes 4620 g4_havegoodqt=yes 4621 fi 4622 4623 else # END OF INC CHECK 4624 g4_qtincdir=no 4625 fi 4626 else # END OF VERSION CHECK 4627 g4_qtmochome=no 4628 fi 4629 fi # END OF MOC CHECK 4630 4631 fi #END CHECK USER CANCELLATION 4632 4633 fi #END USER DIRECTED QT DETECTION 4634 4635 # 4636 #END QT USER INPUT PROBE 4637 #################################################################### 4638 4639 fi #END CHECK OF G4UI_BUILD_QT_SESSION=Y 4640 ########################################### 4641 4642 fi #END TEST G4UI_NONE=N 4643 #fi #END TEST G4SYSTEM = Linux-g++ OR Darwin-g++ 4644 ######################## 4741 dflt="" 4742 fn='d~(-)' 4743 rp=$g4message 4744 . ./getfile 4745 user_qthome=$ans 4746 4747 if test "x$user_qthome" = "x-" ; then 4748 # Cancel build... 4749 g4ui_build_qt_session=n 4750 g4ui_use_qt=n 4751 echo "configure: build/use of Qt UI module cancelled" 4752 promptend=yes 4753 else 4754 # Check for installation in user directory 4755 echo " " 4756 qt_search_dir=$user_qthome 4757 . ./qt 4758 4759 if test "x$g4_havegoodqt" = "xyes" ; then 4760 promptend=yes 4761 fi 4762 fi #END TEST user_qthome = - 4763 done #END while promptend=no (for user input of Qt install) 4764 fi #END TEST g4_havegoodqt = no (for user prompt) 4765 fi #END TEST g4ui_build_qt_session (whether to build at all) 4766 fi #END TEST g4ui_none = n 4767 4645 4768 echo " " 4646 4769 case "$g4vis_none" in … … 5921 6044 # BEGIN QTVIS/QT PROBE 5922 6045 # 5923 6046 # Because the vis driver only works with UI, only probe if g4ui_none is 6047 # NOT set AND also that g4vis_none is NOT set 5924 6048 # 5925 # We only run on a Linux-g++ or Darwin-g++ system 5926 # 5927 if test "x$g4system" = "xLinux-g++" -o "x$g4system" = "xDarwin-g++" ; then 5928 5929 # Only proceed further if g4vis_none is not set 5930 if test "x$g4vis_none" = "xn" ; then 5931 #Query the user on whether to activate the module 5932 g4message=`cat << EOM 5933 5934 G4VIS_BUILD_OPENGLQT_DRIVER 5935 G4VIS_USE_OPENGLQT 5936 5937 Setting these variables will enable the building of the G4 OpenGL Qt based 6049 if test "x$g4ui_none" = "xn" -a "x$g4vis_none" = "xn" ; then 6050 # Query the user to see if build of Qt UI module is needed 6051 g4message=`cat <<EOM 6052 6053 G4UI_BUILD_OPENGLQT_DRIVER 6054 G4UI_USE_OPENGLQT 6055 6056 Setting these variables will enable the building of the G4 OpenGL Qt based 5938 6057 visualisation driver and the use of this driver in your applications 5939 6058 respectively. 5940 The Qt headers, libraries and binaries are required to enable the5941 building of this module.6059 The Qt3 or Qt4 headers, libraries and moc application are required to enable 6060 the building of this module. 5942 6061 Do you want to enable build and use of this module? 5943 6062 EOM` 5944 5945 #Read the user response 5946 dflt=$g4vis_build_openglqt_driver 5947 rp=$g4message 5948 . ./myread 5949 gans=$ans 5950 5951 # 5952 # Check response 5953 # 5954 case $gans in 5955 n*|N*) 5956 g4vis_build_openglqt_driver=n 6063 6064 # Read in the user response 6065 dflt=$g4vis_build_openglqt_driver 6066 rp=$g4message 6067 . ./myread 6068 gans=$ans 6069 6070 # Check response and take set variables as needed. 6071 case $gans in 6072 n*|N*) 6073 g4vis_build_openglqt_driver=n 5957 6074 g4vis_use_openglqt=n 5958 5959 5960 6075 ;; 6076 y*|Y*) 6077 g4vis_build_openglqt_driver=y 5961 6078 g4vis_use_openglqt=y 5962 6079 ;; 5963 esac 5964 5965 ################### 5966 5967 5968 5969 #################################################################### 5970 # Now, if we have selected to build the driver, we need to check for 5971 # a Qt installation, which may have been done for use by the UI 5972 # module... 5973 # 5974 if test "x$g4vis_build_openglqt_driver" = "xy" ; then 5975 5976 #Now check whether g4_qthome has been set previously - if it hasn't 5977 #proceed to probe for Qt... (assume it's unfiltered, i.e. not 5978 #set to '' by earlier probe if it was /usr or /usr/local 5979 if test "x$g4_qtmochome" != "x" && test "x$g4_qtlibdir" != "x" && test "x$g4_qtincdir" != "x" ; then 5980 echo " " 5981 echo "configure: Qt preconfigured, no recheck neccessary" 5982 else 5983 ################################################################# 5984 #We repeat the search used for the UI module 5985 5986 echo " " 5987 g4_havegoodqt=no 5988 5989 # Look for qt4 moc 5990 g4_qtmochome=`./loc moc no $QTDIR/bin /usr/lib/qt4/bin /usr/lib/qt/bin /usr/local/qt/bin /usr/local/bin /usr/bin /bin /usr/share/qt4/bin /usr/X11R6/bin /sw/bin` 5991 if test "x$g4_qtmochome" = "xno" ; then 5992 # Look for qt3 moc 5993 g4_qtmochome=`./loc moc no /usr/lib/qt3/bin /usr/share/qt3/bin` 5994 fi 5995 5996 # if not found 5997 if test "x$g4_qtmochome" != "xno" ; then 5998 echo "checking Qt moc tool in... $g4_qtmochome" 5999 # check Qt version 6000 g4_qtver=`$g4_qtmochome 2>&1 -v | $sed 's/.* .Qt \([0-9]\)\..*/\1/' ` 6001 echo "checking Qt version... $g4_qtver" 6002 if test "x$g4_qtver" = "x3" || test "x$g4_qtver" = "x4" ;then 6003 6004 # checking includes first get QTDIR location, then qt$g4_qtver, sw, standard, shared, X11 6005 6006 incQtFiles=" $QTDIR/include /usr/include/qt$g4_qtver /usr/include/qt$g4_qtver/Qt /usr/lib/qt$g4_qtver/include /sw/include/qt /usr/lib/qt/include /usr/local/qt/include /usr/local/include /usr/include /usr/include/qt /usr/share/qt$g4_qtver/include /usr/X11R6/include /usr/X11R6/include/qt$g4_qtver /usr/X11R6/include/qt" 6007 6008 if test "X$g4osname" = "XDarwin" && test "X$g4_qtver" = "X4"; then 6009 incQtFiles="$incQtFiles /Library/Frameworks/QtCore.framework/Headers/" 6010 g4_qtincdir=`./loc qglobal.h no $incQtFiles` 6011 if test "x$g4_qtincdir" != "xno" ; then 6012 g4_qtincdir="/Library/Frameworks" 6013 fi 6014 else 6015 g4_qtincdir=`./loc qglobal.h no $incQtFiles` 6016 fi 6017 6018 6019 if test "x$g4_qtincdir" != "xno" ; then 6020 if test "x$g4_qtincdir" != "x/Library/Frameworks" ; then 6021 g4_qtincdir=`dirname $g4_qtincdir` 6022 fi 6023 echo "checking Qt includes dir in... $g4_qtincdir" 6024 6025 6026 # checking libs, includes first get QTDIR location, then qt$g4_qtver, sw, standard, shared, X11 6027 6028 libQtFiles="$QTDIR/lib $QTDIR/lib64 /usr/lib/qt$g4_qtver/lib /usr/lib/qt$g4_qtver/lib64 /usr/lib/qt$g4_qtver /usr/lib/qt$g4_qtver /sw/lib /sw/lib/qt /sw/lib/qt$g4_qtver /sw/lib/qt$g4_qtver/lib /usr/lib/qt/lib /usr/local/qt/lib /usr/local/lib /usr/lib /usr/lib/qt /usr/share/qt$g4_qtver/lib /usr/X11R6/lib/qt /usr/X11R6/lib/qt$g4_qtver /usr/X11R6/lib /usr/X11R6/lib/qt" 6029 6030 if test "X$g4osname" = "XDarwin" && test "X$g4_qtincdir" = "X/Library/Frameworks" ; then 6031 g4_qtlibdir=`./loc QtCore no /Library/Frameworks/QtCore.framework/Versions/$g4_qtver/ $libQtFiles` 6032 g4_qtlibdir=`dirname $g4_qtlibdir` 6033 g4_qtlibdir=`dirname $g4_qtlibdir` 6034 g4_qtlibdir=`dirname $g4_qtlibdir` 6035 else 6036 g4_qtlibdir=`./loc libqt* no $libQtFiles` 6037 fi 6038 if test "x$g4_qtlibdir" != "xno" ; then 6039 g4_qtlibdir=`dirname $g4_qtlibdir` 6040 echo "checking Qt lib dir in... $g4_qtlibdir" 6041 g4_havegoodqt=yes 6042 else 6043 echo "Failed to find Qt lib dir in : $libQtFiles" 6044 fi 6045 else 6046 echo "Failed to find Qt includes dir in : $incQtFiles" 6047 fi #END CHECK QTLIBS 6048 else 6049 echo "Qt $g4_qtver is not actually support with this driver" 6050 fi #END CHECK QTINC 6051 fi #END CHECK QTVER 6052 fi # END OF PRECONFIG 6053 # 6054 # END QT AUTOPROBE 6055 #################################################################### 6056 6057 6058 6059 6060 6061 6062 #################################################################### 6063 # Based on result of Qt autoprobe, we decide if user input is needed to 6064 # locate Qt... 6065 # 6066 if test "x$g4_havegoodqt" = "xno" ; then 6067 promptend="no" 6068 qthomeloc="the standard locations" 6069 6070 g4message=`cat << EOM 6071 6072 Autodetection failed to locate Qt on your system. 6073 Please enter the path to your Qt install (i.e. if Qt is installed 6074 in PATH/include/Qt, or PATH/include $PATH/include/qt, enter PATH), or type '-' to 6075 CANCEL the build of the Qt UI module. 6080 esac 6081 6082 ########## 6083 6084 ########## 6085 # Now, if user chose to build module, we need to check for a Qt 6086 # installation 6087 # 6088 if test "x$g4vis_build_openglqt_driver" = "xy" ; then 6089 echo " " 6090 # NB Have to supply arg to qt script, just blank in this case! 6091 qt_search_dir="" 6092 . ./qt 6093 6094 # If we didn't find Qt automatically, then ask user if they know 6095 # where it's installed... 6096 if test "x$g4_havegoodqt" = "xno" ; then 6097 promptend="no" 6098 user_qthome="the standard locations" 6099 6100 while test "x$promptend" = "xno" ; do 6101 g4message=`cat << EOM 6102 6103 Autodetection failed to locate Qt3 or Qt4 in $qthomeloc on your system. 6104 Please enter the path to your Qt3 OR Qt4 install (i.e. if Qt4 is installed 6105 in PATH/include/QT, PATH/include or PATH/include/qt4, enter PATH), 6106 or type '-' to CANCEL the build of the Qt UI module. 6076 6107 Qt path: 6077 6108 EOM` 6078 dflt="/usr" 6079 g4_qtmochome="/usr" 6109 dflt="" 6080 6110 fn='d~(-)' 6081 rp=$g4message 6082 . ./getfile 6083 6084 #Check for user cancellation 6085 if test "x$ans" = "x-" ; then 6086 g4ui_build_qt_session=n 6087 g4ui_use_qt=n 6088 echo "build/use of Qt UI module cancelled..." 6089 promptend=yes 6090 6091 else 6092 #We want to probe for Qt in the user supplied directory 6093 echo " " 6094 qthomeloc=$ans 6095 g4_havegoodqt=no 6096 6097 6098 # check for moc 6099 6100 g4_qtmochome=`./loc moc no $ans/bin` 6101 if test "x$g4_qtmochome" = "xno" ; then 6102 while test "x$promptend" = "xno" ; do 6103 g4message=`cat << EOM 6104 6105 Failed to locate Qt moc tool on your system. 6106 Please enter the path to your Qt moc tool install or type '-' to 6107 CANCEL the build of the Qt UI module. 6108 Qt moc path: 6109 EOM` 6110 fn='d~(-)' 6111 rp=$g4message 6112 . ./getfile 6113 6114 #Check for user cancellation 6115 if test "x$ans" = "x-" ; then 6116 g4ui_build_qt_session=n 6117 g4ui_use_qt=n 6118 echo "build/use of Qt UI module cancelled..." 6119 promptend=yes 6120 6121 else 6122 #We want to probe for Qt in the user supplied directory 6123 echo " " 6124 # check for moc 6125 g4_qtmochome=`./loc moc no $ans/bin` 6126 if test "x$g4_qtmochome" != "xno" ; then 6127 promptend=yes 6128 fi 6129 fi 6130 done 6131 fi # ASK FOR QT MOC 6132 if test "x$g4_qtmochome" != "xno" ; then 6133 echo "checking Qt moc tool in... $g4_qtmochome" 6134 fi 6135 6136 # if moc ok, then check for version 6137 if test "x$g4_qtmochome" != "xno" ; then 6138 g4_qtver=`$g4_qtmochome 2>&1 -v | $sed 's/.* .Qt \([0-9]\)\..*/\1/' ` 6139 echo "checking Qt version... $g4_qtver" 6140 6141 if test "x$g4_qtver" = "x3" || test "x$g4_qtver" = "x4";then 6142 6143 # if version ok check for includes 6144 # checking includes in qt$g4_qtver, then standard 6145 incQtFiles="$qthomeloc/lib/qt$g4_qtver/include $qthomeloc/include/qt$g4_qtver/Qt $qthomeloc/include/qt$g4_qtver $qthomeloc/include $qthomeloc/include/Qt " 6146 6147 if test "X$g4osname" = "XDarwin" && test "X$g4_qtver" = "X4"; then 6148 incQtFiles="$incQtFiles /Library/Frameworks/QtCore.framework/Headers/ $qthomeloc/QtCore.framework/Headers/" 6149 g4_qtincdir=`./loc qglobal.h no $incQtFiles` 6150 if test "x$g4_qtincdir" != "xno" ; then 6151 g4_qtincdir=`dirname $g4_qtincdir` 6152 g4_qtincdir=`dirname $g4_qtincdir` 6153 fi 6154 else 6155 g4_qtincdir=`./loc qglobal.h no $incQtFiles` 6156 fi 6157 if test "x$g4_qtincdir" = "xno" ; then 6158 while test "x$promptend" = "xno" ; do 6159 g4message=`cat << EOM 6160 6161 Failed to locate Qt include directory on your system. 6162 Please enter the path to your Qt include directory install or type '-' to 6163 CANCEL the build of the Qt UI module. 6164 Qt include path: 6165 EOM` 6166 fn='d~(-)' 6167 rp=$g4message 6168 . ./getfile 6169 6170 #Check for user cancellation 6171 if test "x$ans" = "x-" ; then 6172 g4ui_build_qt_session=n 6173 g4ui_use_qt=n 6174 echo "build/use of Qt UI module cancelled..." 6175 promptend=yes 6176 6177 else 6178 #We want to probe for Qt in the user supplied directory 6179 echo " " 6180 # check for include 6181 g4_qtincdir=`./loc qglobal.h no $ans` 6182 if test "x$g4_qtincdir" != "xno" ; then 6183 promptend=yes 6184 fi 6185 fi 6186 done 6187 fi # ASK FOR QT INC 6188 if test "x$g4_qtincdir" != "xno" ; then 6189 g4_qtincdir=`dirname $g4_qtincdir` 6190 echo "checking Qt inc dir in... $g4_qtincdir" 6191 fi 6192 # if qt inc ok, then check for libs 6193 if test "x$g4_qtincdir" != "xno" ; then 6194 6195 # checking libraries in qt$g4_qtver, then standard 6196 libQtFiles="$qthomeloc/lib/qt$g4_qtver/lib $qthomeloc/lib/qt$g4_qtver $qthomeloc/lib/qt$g4_qtver $qthomeloc/lib/qt$g4_qtver/lib64 $qthomeloc/lib $qthomeloc/lib64 $qthomeloc/lib/qt/lib $qthomeloc/lib/qt $qthomeloc/lib64" 6197 6198 if test "X$g4osname" = "XDarwin" && test "X$g4_qtincdir" = "X/Library/Frameworks" ; then 6199 g4_qtlibdir=`./loc QtCore no /Library/Frameworks/QtCore.framework/Versions/$g4_qtver/ $libQtFiles` 6200 g4_qtlibdir=`dirname $g4_qtlibdir` 6201 g4_qtlibdir=`dirname $g4_qtlibdir` 6202 g4_qtlibdir=`dirname $g4_qtlibdir` 6203 else 6204 g4_qtlibdir=`./loc libqt* no $libQtFiles` 6205 fi 6206 if test "x$g4_qtlibdir" = "xno" ; then 6207 while test "x$promptend" = "xno" ; do 6208 g4message=`cat << EOM 6209 6210 Failed to locate Qt lib directory on your system. 6211 Please enter the path to your Qt lib directory install or type '-' to 6212 CANCEL the build of the Qt UI module. 6213 Qt library path: 6214 EOM` 6215 fn='d~(-)' 6216 rp=$g4message 6217 . ./getfile 6218 6219 #Check for user cancellation 6220 if test "x$ans" = "x-" ; then 6221 g4ui_build_qt_session=n 6222 g4ui_use_qt=n 6223 echo "build/use of Qt UI module cancelled..." 6224 promptend=yes 6225 6226 else 6227 #We want to probe for Qt in the user supplied directory 6228 echo " " 6229 # check for libraries 6230 if test "X$g4osname" = "XDarwin" && test "X$g4_qtincdir" = "X/Library/Frameworks" ; then 6231 g4_qtlibdir=`./loc QtCore* no $libQtFiles /Library/Frameworks/` 6232 else 6233 g4_qtlibdir=`./loc libqt* no $libQtFiles` 6234 fi 6235 if test "x$g4_qtlibdir" != "xno" ; then 6236 promptend=yes 6237 fi 6238 fi 6239 done 6240 fi # END OF LIB CHECK 6241 if test "x$g4_qtlibdir" != "xno" ; then 6242 g4_qtlibdir=`dirname $g4_qtlibdir` 6243 echo "checking Qt lib dir in... $g4_qtlibdir" 6244 promptend=yes 6245 g4_havegoodqt=yes 6246 fi 6247 6248 else # END OF INC CHECK 6249 g4_qtincdir=no 6250 fi 6251 else # END OF VERSION CHECK 6252 g4_qtmochome=no 6253 fi 6254 fi # END OF MOC CHECK 6255 6256 fi #END CHECK USER CANCELLATION 6257 6258 fi #END USER DIRECTED QT DETECTION 6259 # 6260 #END QT USER INPUT PROBE 6261 #################################################################### 6262 6263 fi #END TEST G4VIS_BUILD_OPENGLQT_DRIVER = y 6264 6265 6266 # 6267 # Put a filter in here on /usr and /usr/local as QTHOME in line 6268 # with other paths - done here as this is the last place QT is 6269 # checked for 6270 #DEACTIVATED AT PRESENT BECAUSE OF USE OF MOC 6271 # 6272 #if test "x$g4_qthome" = "x/usr" -o "x$g4_qthome" = "x/usr/local" ; then 6273 # g4_qthome="" 6274 #fi 6275 6276 6277 fi #END TEST G4VIS_NONE IS N 6278 6279 fi #END TEST G4SYSTEM IS Linux-g++ OR Darwin-g++ 6280 6281 # 6282 # END OF QTVIS/QT PROBE 6111 rp=$g4message 6112 . ./getfile 6113 user_qthome=$ans 6114 6115 if test "x$user_qthome" = "x-" ; then 6116 # Cancel build... 6117 g4vis_build_openglqt_driver=n 6118 g4vis_use_openglqt=n 6119 echo "configure: build/use of Qt OpenGl driver cancelled" 6120 promptend=yes 6121 else 6122 # Check for installation in user directory 6123 echo " " 6124 qt_search_dir=$user_qthome 6125 . ./qt 6126 6127 if test "x$g4_havegoodqt" = "xyes" ; then 6128 promptend=yes 6129 fi 6130 fi #END TEST user_qthome = - 6131 done #END while promptend=no (for user input of Qt install) 6132 fi #END TEST g4_havegoodqt = no (for user prompt) 6133 fi #END TEST g4vis_build_openglqt_driver (whether to build at all) 6134 fi #END TEST g4ui_none = n AND g4vis_none=n 6283 6135 6284 6136 # 6285 6137 # BEGIN GDML/XERCESC PROBE 6286 # 6138 # 6287 6139 6288 6140 # Set default build option to no … … 6699 6551 g4_make='$g4_make' 6700 6552 g4_make_version='$g4_make_version' 6701 g4_qtmochome='$g4_qtmochome' 6702 g4_qtincdir='$g4_qtincdir' 6703 g4_qtlibdir='$g4_qtlibdir' 6553 g4_qt_cxxflags='$g4_qt_cxxflags' 6554 g4_qt_gl_cxxflags='$g4_qt_gl_cxxflags' 6555 g4_qt_gl_libs='$g4_qt_gl_libs' 6556 g4_qt_libs='$g4_qt_libs' 6557 g4_qt_moc='$g4_qt_moc' 6558 g4_qt_version='$g4_qt_version' 6704 6559 g4abladata='$g4abladata' 6705 6560 g4base='$g4base'
Note: See TracChangeset
for help on using the changeset viewer.