Changeset 1056 for trunk/Configure


Ignore:
Timestamp:
May 29, 2009, 10:26:07 AM (15 years ago)
Author:
garnier
Message:

en teste

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Configure

    r1004 r1056  
    1919#
    2020
    21 # $Id: Configure,v 1.112 2009/01/22 14:26:31 bmorgan Exp $
    22 #
    23 # Generated on Thu 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]
    2424
    2525cat >/tmp/c1$$ <<EOF
     
    304304g4vis_use_openglqt='n'
    305305#END QT VIS DRIVER OPTIONS
     306#INITIALIZE G4MAKE
     307g4make=""
     308#END G4MAKE INITIALIZATION
    306309
    307310: Find the basic shell for Bourne shell scripts
     
    12641267                *) n='-n' c='';;
    12651268                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 "*"
    12751281        fi
    12761282        $rm -f foo1 foo2
     
    23772383        if test -x "/usr/bin/moc" ; then
    23782384            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
    23792390            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"
    23962395        else
    23972396            echo "checking for moc... no"
     
    25392538        #
    25402539        # 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.
    25412542        #
    25422543        g4_qt_bin_dir=\$g4_qt_dir/bin
    25432544        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
    25522572        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
     2592Qt moc was found as \$user_moc and has major version \$g4_qt_found_moc_major_version.
     2593This does not match the version of the detected Qt install
     2594which is \$g4_qt_major_ver.
     2595Please enter the full path to the moc program which matches this Qt
     2596version, or type '-' to CANCEL the Qt checks.
     2597EOM\`
     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
    25632631        ## THIS IS POINT AT WHICH TO DO FALLBACK TESTS I.E DOES
    25642632        ## COMPILATION OF SMALL TEST PROGRAM WORK - THEN HEADERS AND
     
    26042672
    26052673            g4_qt_moc=\$g4_qtmoc
     2674
    26062675            g4_qt_is_configured=yes
    26072676        else
     
    31863255
    31873256g4message=`cat <<EOM
    3188 Specify the path where are the Geant4 data libraries
     3257Specify the path where the Geant4 data libraries
    31893258
    31903259$g4data_alllibs
     
    61766245#
    61776246# 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.
    61796250#
    61806251if 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
     6252if test "x$g4ui_build_qt_session" = "xy" ; then
     6253    # Query the user to see if build of Qt GL module is needed
    61826254    g4message=`cat <<EOM
    61836255
     
    62636335        fi #END TEST g4_havegoodqt = no (for user prompt)
    62646336    fi #END TEST g4vis_build_openglqt_driver (whether to build at all)
     6337else # 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
     6342fi #END TEST g4ui_build_qt_session (dependency on Qt UI module)
    62656343fi #END TEST g4ui_none = n AND g4vis_none=n
    62666344
     
    63926470#END OF GDML/XERCES PROBE
    63936471
     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
    63946482echo " "
    63956483
    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
     6484g4_make_loc="no"
     6485g4_gmake_loc="no"
     6486
     6487g4_make_program=make
     6488g4_gmake_program=gmake
     6489
     6490g4_check_make_msg="Checking for $g4_make_program..."
     6491g4_check_gmake_msg="Checking for $g4_gmake_program..."
     6492
     6493g4_make_isgnu="no"
     6494g4_gmake_isgnu="no"
     6495
     6496g4_make_dirs=`echo $PATH | sed 's/\:/ /g'`
     6497
     6498# Check for 'make' on all systems
     6499g4_make_loc=`./loc $g4_make_program no $g4_make_dirs`
     6500echo "$g4_check_make_msg $g4_make_loc"
     6501
     6502
     6503# On anything but Windows, check for gmake as well
     6504if 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"
     6507fi
     6508 
     6509
     6510# Now see if make/gmake are GNU make.
     6511if 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"
     6523fi
     6524
     6525if 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
    64786535                ;;
    64796536        esac
    6480 
    6481 fi
    6482 
     6537        echo "Checking if gmake is GNU make... $g4_gmake_isgnu"
     6538    fi
     6539fi
     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
     6545if test "x$g4_gmake_loc" != "xno" -a "x$g4_gmake_isgnu" = "xyes" ; then
     6546    g4make=$g4_gmake_loc
     6547elif test "x$g4_make_loc" != "xno" -a "x$g4_make_isgnu" = "xyes" ; then
     6548    g4make=$g4_make_loc
     6549else
     6550    g4_got_user_make="no"
     6551    while test "x$g4_got_user_make" = "xno"; do
     6552        g4message=`cat << EOM
     6553
     6554    G4MAKE
     6555
     6556A GNU make program could not be located on your system.
     6557Please enter the full path to the GNU make program you
     6558want to use:
     6559EOM`
     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
     6579fi
    64836580
    64846581
Note: See TracChangeset for help on using the changeset viewer.