diff --git a/README.new b/README.new index 4fe830285..248567aef 100644 --- a/README.new +++ b/README.new @@ -162,3 +162,7 @@ Lmod 8.7+ * Issue #714: Adding "=encoding UTF-8" to pod generation (8.7.46) * Issue #716: Must only add KSH_SUPPORT to zsh when both $orig_zsh_version and $zsh_fpath have non-null values (8.7.47) * Issue #716: Use correct shell foo +W.I.P: + (8.7.48) * Collect configure error to end of configure. + + diff --git a/configure b/configure index 4adc9c2ca..8872ef2ff 100755 --- a/configure +++ b/configure @@ -3460,6 +3460,8 @@ FOLLOW_READLINK () echo $myprog } +ERR_MSG="" +FOUND_ERROR= @@ -4385,7 +4387,8 @@ if test ${with_lua+y} then : withval=$with_lua; PATH_TO_LUA="$withval" if test ${PATH_TO_LUA:0:1} != '/' ; then - echo "Path to lua must be absolute" + echo + echo "ERROR: Path to lua must be absolute!" exit 1 fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: PATH_TO_LUA=$with_lua" >&5 @@ -4408,7 +4411,8 @@ if test ${with_luac+y} then : withval=$with_luac; PATH_TO_LUAC="$withval" if test ${PATH_TO_LUAC:0:1} != '/' ; then - echo "Path to luac must be absolute" + echo + echo "ERROR: Path to luac must be absolute" exit 1 fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: PATH_TO_LUAC=$with_luac" >&5 @@ -4565,7 +4569,11 @@ fi if test "$ac_cv_header_tcl_h" != yes ; then rm -f makefile - as_fn_error $? "Unable to build Lmod without tcl.h. Please install the tcl devel package or configure --with-fastTCLInterp=no to not require tcl.h" "$LINENO" 5 + FOUND_ERROR=yes + MSG="Unable to build Lmod without tcl.h. Please install the tcl devel package or configure --with-fastTCLInterp=no to not require tcl.h" + ERR_MSG="$ERR_MSG||$MSG" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $MSG" >&5 +printf "%s\n" "$as_me: $MSG" >&6;} fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing Tcl_CreateInterp" >&5 printf %s "checking for library containing Tcl_CreateInterp... " >&6; } @@ -4658,14 +4666,17 @@ PATH_TO_SRC=$SRCDIR -if test $MODE != "user_default" ; then - mode=0$MODE +if test $MODE == "user_default" ; then + mode=0755 EXEC_BITS=$(( 0111 & $mode )); if test $EXEC_BITS = 0; then +MSG="MODE must have at least one executable bit set (Not MODE=$MODE) +Please try setting mode to 755 or 750 or 700 or similar." + + echo "$MSG" echo - echo "MODE must have at least one executable bit set (Not MODE=$MODE)" - echo "Please try setting mode to 755 or 750 or 700 or similar." - echo +ERR_MSG="$ERR_MSG +$MSG" rm -f makefile exit 1 fi @@ -5667,6 +5678,20 @@ fi ##### LUA configuration -- end +if test "$FOUND_ERROR" = yes; then + echo + echo One or more errors found: + echo + echo Error Messages: + echo "------------------------------------------------------------" + echo $ERR_MSG | tr '|' '\n' | while read item; do + echo $item + done + echo "------------------------------------------------------------" + + rm -f makefile + exit 1; +fi # Extract the first word of "zsh", so it can be a program name with args. diff --git a/configure.ac b/configure.ac index e55bf3682..93defccf0 100644 --- a/configure.ac +++ b/configure.ac @@ -42,6 +42,8 @@ FOLLOW_READLINK () echo $myprog } +ERR_MSG="" +FOUND_ERROR= AC_SUBST(DUPLICATE_PATHS) AC_ARG_WITH(duplicatePaths, @@ -651,7 +653,8 @@ AC_ARG_WITH(lua, AS_HELP_STRING([--with-lua=ans],[absolute path to the lua interpreter to use [[lua]]]), PATH_TO_LUA="$withval" if test ${PATH_TO_LUA:0:1} != '/' ; then - echo "Path to lua must be absolute" + echo + echo "ERROR: Path to lua must be absolute!" exit 1 fi AC_MSG_RESULT([PATH_TO_LUA=$with_lua]) @@ -667,7 +670,8 @@ AC_ARG_WITH(luac, AS_HELP_STRING([--with-luac=ans],[absolute path to the luac interpreter to use [[luac]]]), PATH_TO_LUAC="$withval" if test ${PATH_TO_LUAC:0:1} != '/' ; then - echo "Path to luac must be absolute" + echo + echo "ERROR: Path to luac must be absolute" exit 1 fi AC_MSG_RESULT([PATH_TO_LUAC=$with_luac]) @@ -731,7 +735,10 @@ if test "$FAST_TCL_INTERP" = yes ; then if test "$ac_cv_header_tcl_h" != yes ; then rm -f makefile - AC_MSG_ERROR([Unable to build Lmod without tcl.h. Please install the tcl devel package or configure --with-fastTCLInterp=no to not require tcl.h]) + FOUND_ERROR=yes + MSG="Unable to build Lmod without tcl.h. Please install the tcl devel package or configure --with-fastTCLInterp=no to not require tcl.h" + ERR_MSG="$ERR_MSG||$MSG" + AC_MSG_NOTICE([$MSG]) fi AC_SEARCH_LIBS(Tcl_CreateInterp, [tcl] [tcl8.8] [tcl8.7] [tcl8.6] [tcl8.5],[], [rm -f makefile; AC_MSG_ERROR([Unable to build Lmod with -ltcl Please install the tcl devel package or configure --with-fastTCLInterp=no to not require the tcl library])], [$TCL_LIBS]) @@ -763,14 +770,17 @@ AC_SUBST(PATH_TO_HASHSUM) AC_SUBST(PATH_TO_PAGER) AC_SUBST(PATH_TO_TCLSH) -if test $MODE != "user_default" ; then - mode=0$MODE +if test $MODE == "user_default" ; then + mode=0755 EXEC_BITS=$(( 0111 & $mode )); if test $EXEC_BITS = 0; then +MSG="MODE must have at least one executable bit set (Not MODE=$MODE) +Please try setting mode to 755 or 750 or 700 or similar." + + echo "$MSG" echo - echo "MODE must have at least one executable bit set (Not MODE=$MODE)" - echo "Please try setting mode to 755 or 750 or 700 or similar." - echo +ERR_MSG="$ERR_MSG +$MSG" rm -f makefile exit 1 fi @@ -1060,6 +1070,20 @@ fi ##### LUA configuration -- end +if test "$FOUND_ERROR" = yes; then + echo + echo One or more errors found: + echo + echo Error Messages: + echo "------------------------------------------------------------" + echo $ERR_MSG | tr '|' '\n' | while read item; do + echo $item + done + echo "------------------------------------------------------------" + + rm -f makefile + exit 1; +fi AC_SUBST(ZSH_SITE_FUNCTIONS_DIRS) AC_PATH_PROG(ZSH, zsh)