@@ -462,11 +462,11 @@ find_or_install()
462
462
printf " $this_script : Checking whether $package executable $executable in PATH is version < $minimum_version ... "
463
463
if [[ " $package_version_in_path " < " $package (GNU Bison) $minimum_version " ]]; then
464
464
printf " yes.\n"
465
- export YACC=" $package_install_path /bin/yacc "
466
- # Halt the recursion and signal that there are no prerequisites to build
467
- stack_push dependency_pkg " none "
468
- stack_push dependency_exe " none "
469
- stack_push dependency_path " none "
465
+ export YACC=" $package_install_path /bin/$executable "
466
+ # Trigger 'find_or_install m4' and subsequent build of $package
467
+ stack_push dependency_pkg " m4 "
468
+ stack_push dependency_exe " m4 "
469
+ stack_push dependency_path ` ./build m4 --default --query-path `
470
470
else
471
471
printf " no.\n"
472
472
printf " $this_script : Using the $package executable $executable found in the PATH.\n"
@@ -487,7 +487,7 @@ find_or_install()
487
487
fi
488
488
489
489
else # $package not in PATH and not yet installed by this script
490
- # Trigger 'find_or_install bison ' and subsequent build of $package
490
+ # Trigger 'find_or_install m4 ' and subsequent build of $package
491
491
stack_push dependency_pkg " m4"
492
492
stack_push dependency_exe " m4"
493
493
stack_push dependency_path ` ./build m4 --default --query-path`
@@ -665,6 +665,9 @@ find_or_install()
665
665
elif [[ $package == " flex" ]]; then
666
666
echo " $this_script : export FLEX=$package_install_path /bin/$executable "
667
667
export FLEX=" $package_install_path /bin/$executable "
668
+ elif [[ $package == " m4" ]]; then
669
+ echo " $this_script : export M4=$package_install_path /bin/$executable "
670
+ export M4=" $package_install_path /bin/$executable "
668
671
elif [[ $package == " gcc" ]]; then
669
672
echo " $this_script : export FC=$package_install_path /bin/gfortran"
670
673
export FC=" $package_install_path /bin/gfortran"
@@ -849,6 +852,14 @@ report_results()
849
852
echo " export PATH=\" $bison_install_path /bin\" :\$ PATH " >> setup.sh
850
853
echo " fi " >> setup.sh
851
854
fi
855
+ m4_install_path=` ./build m4 --default --query-path`
856
+ if [[ -x " $m4_install_path /bin/yacc" ]]; then
857
+ echo " if [[ -z \"\$ PATH\" ]]; then " >> setup.sh
858
+ echo " export PATH=\" $m4_install_path /bin\" " >> setup.sh
859
+ echo " else " >> setup.sh
860
+ echo " export PATH=\" $m4_install_path /bin\" :\$ PATH " >> setup.sh
861
+ echo " fi " >> setup.sh
862
+ fi
852
863
setup_sh_location=$install_path
853
864
$SUDO mv setup.sh $install_path || setup_sh_location=${PWD}
854
865
echo " *** Before using caf, cafrun, or build, please execute the following command ***"
0 commit comments