Changeset 1056 for trunk/Configure
- Timestamp:
- May 29, 2009, 10:26:07 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Configure
r1004 r1056 19 19 # 20 20 21 # $Id: Configure,v 1.11 2 2009/01/22 14:26:31bmorgan Exp $22 # 23 # Generated on T hu Jan 22 14:06:57 GMT 2009 [metaconfig 3.0 PL70]21 # $Id: Configure,v 1.116 2009/05/26 17:37:44 bmorgan Exp $ 22 # 23 # Generated on Tue May 26 18:39:05 BST 2009 [metaconfig 3.0 PL70] 24 24 25 25 cat >/tmp/c1$$ <<EOF … … 304 304 g4vis_use_openglqt='n' 305 305 #END QT VIS DRIVER OPTIONS 306 #INITIALIZE G4MAKE 307 g4make="" 308 #END G4MAKE INITIALIZATION 306 309 307 310 : Find the basic shell for Bourne shell scripts … … 1264 1267 *) n='-n' c='';; 1265 1268 esac 1266 cat <<FOO 1267 They are not compatible! You are probably running ksh on a non-USG system. 1268 I'll have to use $echo instead of the builtin, since Bourne shell doesn't 1269 have echo built in and we may have to run some Bourne shell scripts. That 1270 means I'll have to use '$n$c' to suppress newlines now. 1271 1272 FOO 1273 $echo $n "The star should be here-->$c" 1274 $echo "*" 1269 #We suppress the following message to avoid problems where the system points 1270 #sh to dash (Ubuntu). If you have problems with echo, uncomment the cat and 1271 #two $echo s to see if you're warned!! 1272 # cat <<FOO 1273 #They are not compatible! You are probably running ksh on a non-USG system. 1274 #I'll have to use $echo instead of the builtin, since Bourne shell doesn't 1275 #have echo built in and we may have to run some Bourne shell scripts. That 1276 #means I'll have to use '$n$c' to suppress newlines now. 1277 # 1278 #FOO 1279 # $echo $n "The star should be here-->$c" 1280 # $echo "*" 1275 1281 fi 1276 1282 $rm -f foo1 foo2 … … 2377 2383 if test -x "/usr/bin/moc" ; then 2378 2384 g4_qt_moc="/usr/bin/moc" 2385 echo "checking for moc... \$g4_qt_moc" 2386 2387 g4_qt_dir=\`dirname \$g4_qt_include_dir\` 2388 g4_qt_dir=\`dirname \$g4_qt_dir\` 2389 2379 2390 g4_qt_version="4" 2380 # checking moc version 2381 g4_qt_moc_major_version=\`\$g4_qt_moc -v 2>&1|sed 's/^.*(Qt \(.*\)\..*\..*)/\1/'\` 2382 echo "checking for moc... found \$g4_qt_moc version \$g4_qt_moc_major_version" 2383 if test "\$g4_qt_version" = "\$g4_qt_moc_major_version" ; then 2384 g4_qt_dir=\`dirname \$g4_qt_include_dir\` 2385 g4_qt_dir=\`dirname \$g4_qt_dir\` 2386 2387 g4_qt_version="4" 2388 g4_qt_cxxflags="-I\$g4_qt_dir/QtCore.framework/Headers -I\$g4_qt_dir/QtGui.framework/Headers" 2389 g4_qt_gl_cxxflags="-I\$g4_qt_dir/QtOpenGl.framework/Headers" 2390 g4_qt_libs="-F\$g4_qt_dir -framework QtCore -framework QtGui" 2391 g4_qt_gl_libs="-framework QtOpenGL" 2392 else 2393 echo "moc version (\$g4_qt_moc_major_version) is not compatible with previous founded Qt (\$g4_qt_ver) version. Please update/move \$g4_qt_moc to Qt \$g4_qt_ver compatible version" 2394 g4_havegoodqt=no 2395 fi 2391 g4_qt_cxxflags="-I\$g4_qt_dir/QtCore.framework/Headers -I\$g4_qt_dir/QtGui.framework/Headers" 2392 g4_qt_gl_cxxflags="-I\$g4_qt_dir/QtOpenGl.framework/Headers" 2393 g4_qt_libs="-F\$g4_qt_dir -framework QtCore -framework QtGui" 2394 g4_qt_gl_libs="-framework QtOpenGL" 2396 2395 else 2397 2396 echo "checking for moc... no" … … 2539 2538 # 2540 2539 # Finally, we need to search for moc 2540 # We use prior knowledge of the detected Qt version to 2541 # try and grab the correct moc straight off. 2541 2542 # 2542 2543 g4_qt_bin_dir=\$g4_qt_dir/bin 2543 2544 g4_qtmoc=no 2544 if test -x "\$g4_qt_bin_dir/moc" ; then 2545 g4_qtmoc="\$g4_qt_bin_dir/moc" 2546 elif test -x "\$g4_qt_bin_dir/moc-qt4" ; then 2547 g4_qtmoc="\$g4_qt_bin_dir/moc-qt4" 2548 elif test -x "\$g4_qt_bin_dir/qt4-moc" ; then 2549 g4_qtmoc="\$g4_qt_bin_dir/qt4-moc" 2550 else 2551 g4_havegoodqt=no 2545 g4_qt_cross_check_moc=no 2546 2547 if test "x\$g4_is_qt4" = "xyes" ; then 2548 # Try the qt4 variants first... 2549 if test -x "\$g4_qt_bin_dir/moc-qt4" ; then 2550 g4_qtmoc="\$g4_qt_bin_dir/moc-qt4" 2551 elif test -x "\$g4_qt_bin_dir/qt4-moc" ; then 2552 g4_qtmoc="\$g4_qt_bin_dir/qt4-moc" 2553 elif test -x "\$g4_qt_bin_dir/moc" ; then 2554 g4_qtmoc="\$g4_qt_bin_dir/moc" 2555 g4_qt_cross_check_moc=yes 2556 else 2557 g4_havegoodqt=no 2558 fi 2559 else 2560 # We've probably got Qt3, so check for 2561 # the qt3 variants first 2562 if test -x "\$g4_qt_bin_dir/moc-qt3" ; then 2563 g4_qtmoc="\$g4_qt_bin_dir/moc-qt3" 2564 elif test -x "\$g4_qt_bin_dir/qt3-moc" ; then 2565 g4_qtmoc="\$g4_qt_bin_dir/qt3-moc" 2566 elif test -x "\$g4_qt_bin_dir/moc" ; then 2567 g4_qtmoc="\$g4_qt_bin_dir/moc" 2568 g4_qt_cross_check_moc=yes 2569 else 2570 g4_havegoodqt=no 2571 fi 2552 2572 fi 2553 # checking moc version 2554 g4_qt_moc_major_version=\`\$g4_qtmoc -v 2>&1|sed 's/^.*(Qt \(.*\)\..*\..*)/\1/'\` 2555 echo "checking for moc... found \$g4_qtmoc version \$g4_qt_moc_major_version" 2556 2557 if test "\$g4_qt_major_ver" = "\$g4_qt_moc_major_version" ; then 2558 g4_havegoodqt=yes 2559 else 2560 echo "moc version (\$g4_qt_moc_major_version) is not compatible with previous founded Qt (\$g4_qt_major_ver) version. Please update/move \$g4_qt_moc to Qt \$g4_qt_major_ver compatible version" 2561 g4_havegoodqt=no 2562 fi 2573 echo "checking for moc... \$g4_qtmoc" 2574 2575 # 2576 # If pure 'moc' was found, cross check its version 2577 # against previously detected Qt major version 2578 # 2579 if test "x\$g4_qt_cross_check_moc" = "xyes" ; then 2580 $echo $n "Checking \$g4_qtmoc major version is \$g4_qt_major_ver... $c" 2581 # Grab version of found moc 2582 g4_qt_found_moc_major_version=\`\$g4_qtmoc -v 2>&1 | sed -s 's/^.*(Qt \([0-9]\)\..*/\1/'\` 2583 if test "x\$g4_qt_found_moc_major_version" != "x\$g4_qt_major_ver" ; then 2584 # We need to ask the user where correct moc is 2585 $echo "no" 2586 promptend="no" 2587 user_moc="\$g4_qtmoc" 2588 2589 while test "x\$promptend" = "xno" ; do 2590 echo " " 2591 g4message=\`cat << EOM 2592 Qt moc was found as \$user_moc and has major version \$g4_qt_found_moc_major_version. 2593 This does not match the version of the detected Qt install 2594 which is \$g4_qt_major_ver. 2595 Please enter the full path to the moc program which matches this Qt 2596 version, or type '-' to CANCEL the Qt checks. 2597 EOM\` 2598 dflt="\$user_moc" 2599 rp=\$g4message 2600 . ./myread 2601 2602 # Check for user cancellation 2603 if test "x\$ans" = "x-" ; then 2604 g4_havegoodqt="no" 2605 g4_qtmoc="" 2606 promptend="yes" 2607 else 2608 user_moc="\$ans" 2609 if test -x "\$user_moc" ; then 2610 g4_qt_found_moc_major_version=\`\$user_moc -v 2>&1 | sed -s 's/^.*(Qt \([0-9]\)\..*/\1/'\` 2611 if test "x\$g4_qt_found_moc_major_version" != "x\$g4_qt_major_ver" ; then 2612 echo "Checking if \$user_moc version is \$g4_qt_major_ver... no" 2613 else 2614 echo "Checking if \$user_moc version is \$g4_qt_major_ver... yes" 2615 g4_qtmoc=\$user_moc 2616 promptend=yes 2617 fi 2618 else 2619 echo "warning: \$user_moc is not executable." 2620 user_moc="<null>" 2621 g4_qt_found_moc_major_version="<null>" 2622 fi 2623 fi 2624 # We need to ask the user where correct moc is 2625 done 2626 else 2627 $echo "yes" 2628 fi 2629 fi 2630 2563 2631 ## THIS IS POINT AT WHICH TO DO FALLBACK TESTS I.E DOES 2564 2632 ## COMPILATION OF SMALL TEST PROGRAM WORK - THEN HEADERS AND … … 2604 2672 2605 2673 g4_qt_moc=\$g4_qtmoc 2674 2606 2675 g4_qt_is_configured=yes 2607 2676 else … … 3186 3255 3187 3256 g4message=`cat <<EOM 3188 Specify the path where arethe Geant4 data libraries3257 Specify the path where the Geant4 data libraries 3189 3258 3190 3259 $g4data_alllibs … … 6176 6245 # 6177 6246 # Because the vis driver only works with UI, only probe if g4ui_none is 6178 # NOT set AND also that g4vis_none is NOT set 6247 # NOT set AND g4vis_none is NOT set. 6248 # Also, Qt vis driver has dependency on Qt UI module - so only ask if 6249 # build is required IF Qt UI was selected. 6179 6250 # 6180 6251 if test "x$g4ui_none" = "xn" -a "x$g4vis_none" = "xn" ; then 6181 # Query the user to see if build of Qt UI module is needed 6252 if test "x$g4ui_build_qt_session" = "xy" ; then 6253 # Query the user to see if build of Qt GL module is needed 6182 6254 g4message=`cat <<EOM 6183 6255 … … 6263 6335 fi #END TEST g4_havegoodqt = no (for user prompt) 6264 6336 fi #END TEST g4vis_build_openglqt_driver (whether to build at all) 6337 else # TEST g4ui_build_qt_session 6338 # Because we can 'drop through' this test on repeat 6339 # running Configure, force build and use to n 6340 g4vis_build_openglqt_driver=n 6341 g4vis_use_openglqt=n 6342 fi #END TEST g4ui_build_qt_session (dependency on Qt UI module) 6265 6343 fi #END TEST g4ui_none = n AND g4vis_none=n 6266 6344 … … 6392 6470 #END OF GDML/XERCES PROBE 6393 6471 6472 # 6473 # Configure which make to use... 6474 # On WIN32, we have to watch for cygwin/Matlab clash 6475 # Here, cygwin supplies make, Matlab 'gmake', but we must select 6476 # cygwin make. 6477 # 6478 # Yes, we could use Loc's built in make, but want full control 6479 # for now.... 6480 # 6481 6394 6482 echo " " 6395 6483 6396 case "$g4make" in 6397 '') 6398 g4make=gmake 6399 ;; 6400 esac 6401 6402 echo "" 6403 6404 g4_gmake_version=`(gmake -v) 2>/dev/null` 6405 case $g4_gmake_version in 6406 GNU*) 6407 g4_gmake=y 6408 ;; 6409 *) 6410 g4_gmake=n 6411 ;; 6412 esac 6413 6414 g4_make_version=`(make -v) 2>/dev/null` 6415 case $g4_make_version in 6416 GNU*) 6417 g4_make=y 6418 ;; 6419 *) 6420 g4_make=n 6421 ;; 6422 esac 6423 6424 if [ $g4_gmake = y ] ; then 6425 6426 g4make=gmake 6427 6428 g4message=`cat << EOM 6429 6430 G4MAKE 6431 6432 You have GNU make which could be used to build GEANT4. 6433 You can select your own 'make' program if you want. 6434 EOM` 6435 6436 fi 6437 6438 if [ $g4_gmake = n ] && [ $g4_make = y ] ; then 6439 6440 g4make=make 6441 6442 g4message=`cat << EOM 6443 6444 G4MAKE 6445 6446 You have GNU make which could be used to build GEANT4. 6447 You can select your own 'make' program if you want. 6448 EOM` 6449 6450 fi 6451 6452 if [ $g4_gmake = n ] && [ $g4_make = n ] ; then 6453 6454 g4make=none 6455 6456 g4message=`cat << EOM 6457 6458 G4MAKE 6459 6460 You have NO GNU make which could be used to build GEANT4. 6461 Please select your own 'make' program compatible with GNU make. 6462 EOM` 6463 6464 dflt=$g4make 6465 rp=$g4message 6466 6467 6468 . ./myread 6469 gans=$ans 6470 6471 case $gans in 6472 6473 '') 6474 g4make=$dflt 6475 ;; 6476 *) 6477 g4make=$gans 6484 g4_make_loc="no" 6485 g4_gmake_loc="no" 6486 6487 g4_make_program=make 6488 g4_gmake_program=gmake 6489 6490 g4_check_make_msg="Checking for $g4_make_program..." 6491 g4_check_gmake_msg="Checking for $g4_gmake_program..." 6492 6493 g4_make_isgnu="no" 6494 g4_gmake_isgnu="no" 6495 6496 g4_make_dirs=`echo $PATH | sed 's/\:/ /g'` 6497 6498 # Check for 'make' on all systems 6499 g4_make_loc=`./loc $g4_make_program no $g4_make_dirs` 6500 echo "$g4_check_make_msg $g4_make_loc" 6501 6502 6503 # On anything but Windows, check for gmake as well 6504 if test "x$g4osname" != "xWIN32" ; then 6505 g4_gmake_loc=`./loc $g4_gmake_program no $g4_make_dirs` 6506 echo "$g4_check_gmake_msg $g4_gmake_loc" 6507 fi 6508 6509 6510 # Now see if make/gmake are GNU make. 6511 if test "x$g4_make_loc" != "xno" ; then 6512 g4_make_version=`$g4_make_loc -v 2>/dev/null` 6513 6514 case $g4_make_version in 6515 GNU*) 6516 g4_make_isgnu=yes 6517 ;; 6518 *) 6519 g4_make_isgnu=no 6520 ;; 6521 esac 6522 echo "Checking if make is GNU make... $g4_make_isgnu" 6523 fi 6524 6525 if test "x$g4osname" != "xWIN32" ; then 6526 if test "x$g4_gmake_loc" != "xno" ; then 6527 g4_gmake_version=`$g4_gmake_loc -v 2>/dev/null` 6528 6529 case $g4_gmake_version in 6530 GNU*) 6531 g4_gmake_isgnu=yes 6532 ;; 6533 *) 6534 g4_gmake_isgnu=no 6478 6535 ;; 6479 6536 esac 6480 6481 fi 6482 6537 echo "Checking if gmake is GNU make... $g4_gmake_isgnu" 6538 fi 6539 fi 6540 6541 # Now perform selection on following logic 6542 # 1) If we have gmake AND it's GNU make, use that 6543 # 2) If we have make AND it's GNU make, use that 6544 # 3) If none of the above, prompt user for path to make program 6545 if test "x$g4_gmake_loc" != "xno" -a "x$g4_gmake_isgnu" = "xyes" ; then 6546 g4make=$g4_gmake_loc 6547 elif test "x$g4_make_loc" != "xno" -a "x$g4_make_isgnu" = "xyes" ; then 6548 g4make=$g4_make_loc 6549 else 6550 g4_got_user_make="no" 6551 while test "x$g4_got_user_make" = "xno"; do 6552 g4message=`cat << EOM 6553 6554 G4MAKE 6555 6556 A GNU make program could not be located on your system. 6557 Please enter the full path to the GNU make program you 6558 want to use: 6559 EOM` 6560 dflt=$g4make 6561 rp=$g4message 6562 . ./myread 6563 gans=$ans 6564 6565 #Check if this is GNU make... 6566 g4_user_make_version=`$gans -v 2>/dev/null` 6567 6568 case $g4_user_make_version in 6569 "GNU Make"*) 6570 echo "Checking that $gans is GNU Make... yes" 6571 g4make=$gans 6572 g4_got_user_make=yes 6573 ;; 6574 *) 6575 echo "Checking that $gans is GNU Make... no" 6576 ;; 6577 esac 6578 done 6579 fi 6483 6580 6484 6581
Note: See TracChangeset
for help on using the changeset viewer.