d30ae64
diff -up torque/acinclude.m4.cleanup torque/acinclude.m4
d30ae64
--- torque/acinclude.m4.cleanup	2021-01-28 16:14:17.000000000 -0500
6ea1f98
+++ torque/acinclude.m4	2021-04-13 14:14:09.320271814 -0400
d30ae64
@@ -20,12 +20,14 @@ dnl
d30ae64
 AC_DEFUN([AC_DECL_H_ERRNO],
d30ae64
 [AC_CACHE_CHECK([for h_errno declaration in netdb.h],
d30ae64
   ac_cv_decl_h_errno,
d30ae64
-[AC_TRY_COMPILE([#include <sys/types.h>
d30ae64
+[AC_COMPILE_IFELSE({AC_LANG_SOURCE([[
d30ae64
+#include <sys/types.h>
d30ae64
 #ifdef HAVE_UNISTD_H
d30ae64
 #include <unistd.h>
d30ae64
 #endif
d30ae64
 #include <netdb.h>
d30ae64
-], [int _ZzQ = (int)(h_errno + 1);],
d30ae64
+int _ZzQ = (int)(h_errno + 1);
d30ae64
+]]),
d30ae64
   ac_cv_decl_h_errno=yes, ac_cv_decl_h_errno=no)])
d30ae64
 if test $ac_cv_decl_h_errno = yes; then
d30ae64
   AC_DEFINE(H_ERRNO_DECLARED, 1,
d30ae64
@@ -183,7 +185,7 @@ AC_CHECK_MEMBER(struct stat64.st_mode,
d30ae64
 #include <sys/stat.h>
d30ae64
 #include <unistd.h>])
d30ae64
 
d30ae64
-AC_MSG_CHECKING([if largefile compiles (looking at you, OSX)])
d30ae64
+AC_MSG_CHECKING([if largefile compiles])
d30ae64
 AC_COMPILE_IFELSE([AC_LANG_SOURCE([ 
d30ae64
 #include <sys/types.h>
d30ae64
 #include <sys/stat.h>
d30ae64
diff -up torque/buildutils/ac_c_bigendian_cross.m4.cleanup torque/buildutils/ac_c_bigendian_cross.m4
d30ae64
--- torque/buildutils/ac_c_bigendian_cross.m4.cleanup	2021-01-28 16:14:17.000000000 -0500
6ea1f98
+++ torque/buildutils/ac_c_bigendian_cross.m4	2021-04-13 14:14:09.320271814 -0400
d30ae64
@@ -19,18 +19,18 @@ AC_DEFUN([AC_C_BIGENDIAN_CROSS],
d30ae64
 [AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian,
d30ae64
 [ac_cv_c_bigendian=unknown
d30ae64
 # See if sys/param.h defines the BYTE_ORDER macro.
d30ae64
-AC_TRY_COMPILE([#include <sys/types.h>
d30ae64
-#include <sys/param.h>], [
d30ae64
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
d30ae64
+#include <sys/param.h>]], [[
d30ae64
 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
d30ae64
  bogus endian macros
d30ae64
-#endif], [# It does; now see whether it defined to BIG_ENDIAN or not.
d30ae64
+#endif]])],[# It does; now see whether it defined to BIG_ENDIAN or not.
d30ae64
 AC_TRY_COMPILE([#include <sys/types.h>
d30ae64
 #include <sys/param.h>], [
d30ae64
 #if BYTE_ORDER != BIG_ENDIAN
d30ae64
  not big endian
d30ae64
-#endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)])
d30ae64
+#endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)],[])
d30ae64
 if test $ac_cv_c_bigendian = unknown; then
d30ae64
-AC_TRY_RUN([main () {
d30ae64
+AC_RUN_IFELSE([AC_LANG_SOURCE([[main () {
d30ae64
   /* Are we little or big endian?  From Harbison&Steele.  */
d30ae64
   union
d30ae64
   {
d30ae64
@@ -39,8 +39,7 @@ AC_TRY_RUN([main () {
d30ae64
   } u;
d30ae64
   u.l = 1;
d30ae64
   exit (u.c[sizeof (long) - 1] == 1);
d30ae64
-}], ac_cv_c_bigendian=no, ac_cv_c_bigendian=yes,
d30ae64
-[ echo $ac_n "cross-compiling... " 2>&AC_FD_MSG ])
d30ae64
+}]])],[ac_cv_c_bigendian=no],[ac_cv_c_bigendian=yes],[ echo $ac_n "cross-compiling... " 2>&AS_MESSAGE_FD ])
d30ae64
 fi])
d30ae64
 if test $ac_cv_c_bigendian = unknown; then
d30ae64
 AC_MSG_CHECKING(to probe for byte ordering)
d30ae64
@@ -57,18 +56,18 @@ EOF
d30ae64
 ] if test -f conftest.c ; then
d30ae64
      if ${CC-cc} -c conftest.c -o conftest.o && test -f conftest.o ; then
d30ae64
         if test `grep -l BIGenDianSyS conftest.o` ; then
d30ae64
-           echo $ac_n ' big endian probe OK, ' 1>&AC_FD_MSG
d30ae64
+           echo $ac_n ' big endian probe OK, ' 1>&AS_MESSAGE_FD
d30ae64
 	   ac_cv_c_bigendian=yes
d30ae64
         fi
d30ae64
         if test `grep -l LiTTleEnDian conftest.o` ; then
d30ae64
-           echo $ac_n ' little endian probe OK, ' 1>&AC_FD_MSG
d30ae64
+           echo $ac_n ' little endian probe OK, ' 1>&AS_MESSAGE_FD
d30ae64
 	   if test $ac_cv_c_bigendian = yes ; then
d30ae64
 	    ac_cv_c_bigendian=unknown;
d30ae64
            else
d30ae64
             ac_cv_c_bigendian=no
d30ae64
            fi
d30ae64
         fi
d30ae64
-	echo $ac_n 'guessing bigendian ...  ' >&AC_FD_MSG
d30ae64
+	echo $ac_n 'guessing bigendian ...  ' >&AS_MESSAGE_FD
d30ae64
      fi
d30ae64
   fi
d30ae64
 AC_MSG_RESULT($ac_cv_c_bigendian)
d30ae64
diff -up torque/buildutils/acx_pthread.m4.cleanup torque/buildutils/acx_pthread.m4
d30ae64
--- torque/buildutils/acx_pthread.m4.cleanup	2021-01-28 16:14:17.000000000 -0500
6ea1f98
+++ torque/buildutils/acx_pthread.m4	2021-04-13 14:14:09.320271814 -0400
d30ae64
@@ -56,7 +56,7 @@ dnl @license GPLWithACException
d30ae64
 AC_DEFUN([ACX_PTHREAD], [
d30ae64
 AC_REQUIRE([AC_CANONICAL_HOST])
d30ae64
 AC_LANG_SAVE
d30ae64
-AC_LANG_C
d30ae64
+AC_LANG([C])
d30ae64
 acx_pthread_ok=no
d30ae64
 
d30ae64
 # We used to check for pthread.h first, but this fails if pthread.h
d30ae64
diff -up torque/buildutils/ax_cflags_gcc_option.m4.cleanup torque/buildutils/ax_cflags_gcc_option.m4
d30ae64
--- torque/buildutils/ax_cflags_gcc_option.m4.cleanup	2021-01-28 16:14:17.000000000 -0500
6ea1f98
+++ torque/buildutils/ax_cflags_gcc_option.m4	2021-04-13 14:14:09.320271814 -0400
d30ae64
@@ -87,15 +87,14 @@ AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_gcc_o
d30ae64
 AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for gcc m4_ifval($2,$2,-option)],
d30ae64
 VAR,[VAR="no, unknown"
d30ae64
  AC_LANG_SAVE
d30ae64
- AC_LANG_C
d30ae64
+ AC_LANG([C])
d30ae64
  ac_save_[]FLAGS="$[]FLAGS"
d30ae64
 for ac_arg dnl
d30ae64
 in "-pedantic -Werror % m4_ifval($2,$2,-option)"  dnl   GCC
d30ae64
    "-pedantic % m4_ifval($2,$2,-option) %% no, obsolete"  dnl new GCC
d30ae64
    #
d30ae64
 do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
d30ae64
-   AC_TRY_COMPILE([],[return 0;],
d30ae64
-   [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
d30ae64
+   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[return 0;]])],[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break],[])
d30ae64
 done
d30ae64
  FLAGS="$ac_save_[]FLAGS"
d30ae64
  AC_LANG_RESTORE
d30ae64
@@ -123,15 +122,14 @@ AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_gcc
d30ae64
 AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for gcc m4_ifval($2,$2,-option)],
d30ae64
 VAR,[VAR="no, unknown"
d30ae64
  AC_LANG_SAVE
d30ae64
- AC_LANG_CPLUSPLUS
d30ae64
+ AC_LANG([C++])
d30ae64
  ac_save_[]FLAGS="$[]FLAGS"
d30ae64
 for ac_arg dnl
d30ae64
 in "-pedantic -Werror % m4_ifval($2,$2,-option)"  dnl   GCC
d30ae64
    "-pedantic % m4_ifval($2,$2,-option) %% no, obsolete"  dnl new GCC
d30ae64
    #
d30ae64
 do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
d30ae64
-   AC_TRY_COMPILE([],[return 0;],
d30ae64
-   [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
d30ae64
+   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[return 0;]])],[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break],[])
d30ae64
 done
d30ae64
  FLAGS="$ac_save_[]FLAGS"
d30ae64
  AC_LANG_RESTORE
d30ae64
@@ -158,15 +156,14 @@ AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_gcc_o
d30ae64
 AC_CACHE_CHECK([m4_ifval($2,$2,FLAGS) for gcc m4_ifval($1,$1,-option)],
d30ae64
 VAR,[VAR="no, unknown"
d30ae64
  AC_LANG_SAVE
d30ae64
- AC_LANG_C
d30ae64
+ AC_LANG([C])
d30ae64
  ac_save_[]FLAGS="$[]FLAGS"
d30ae64
 for ac_arg dnl
d30ae64
 in "-pedantic -Werror % m4_ifval($1,$1,-option)"  dnl   GCC
d30ae64
    "-pedantic % m4_ifval($1,$1,-option) %% no, obsolete"  dnl new GCC
d30ae64
    #
d30ae64
 do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
d30ae64
-   AC_TRY_COMPILE([],[return 0;],
d30ae64
-   [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
d30ae64
+   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[return 0;]])],[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break],[])
d30ae64
 done
d30ae64
  FLAGS="$ac_save_[]FLAGS"
d30ae64
  AC_LANG_RESTORE
d30ae64
@@ -194,15 +191,14 @@ AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_gcc
d30ae64
 AC_CACHE_CHECK([m4_ifval($2,$2,FLAGS) for gcc m4_ifval($1,$1,-option)],
d30ae64
 VAR,[VAR="no, unknown"
d30ae64
  AC_LANG_SAVE
d30ae64
- AC_LANG_CPLUSPLUS
d30ae64
+ AC_LANG([C++])
d30ae64
  ac_save_[]FLAGS="$[]FLAGS"
d30ae64
 for ac_arg dnl
d30ae64
 in "-pedantic -Werror % m4_ifval($1,$1,-option)"  dnl   GCC
d30ae64
    "-pedantic % m4_ifval($1,$1,-option) %% no, obsolete"  dnl new GCC
d30ae64
    #
d30ae64
 do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
d30ae64
-   AC_TRY_COMPILE([],[return 0;],
d30ae64
-   [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
d30ae64
+   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[return 0;]])],[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break],[])
d30ae64
 done
d30ae64
  FLAGS="$ac_save_[]FLAGS"
d30ae64
  AC_LANG_RESTORE
d30ae64
diff -up torque/buildutils/tac_tcltk.m4.cleanup torque/buildutils/tac_tcltk.m4
d30ae64
--- torque/buildutils/tac_tcltk.m4.cleanup	2021-01-28 16:14:17.000000000 -0500
6ea1f98
+++ torque/buildutils/tac_tcltk.m4	2021-04-13 14:14:09.320271814 -0400
d30ae64
@@ -215,7 +215,7 @@ fi
d30ae64
 
d30ae64
 
d30ae64
 AC_ARG_WITH(tclatrsep,
d30ae64
-    AC_HELP_STRING([--with-tclatrsep=CHAR],[set the Tcl attribute separator character
d30ae64
+    AS_HELP_STRING([--with-tclatrsep=CHAR],[set the Tcl attribute separator character
d30ae64
                         this will default to "." if unspecified]),
d30ae64
     [tcl_atrsep="${withval}"], [tcl_atrsep="."])
d30ae64
 if test "$TCL" = "1" ; then
d30ae64
diff -up torque/buildutils/tcl.m4.cleanup torque/buildutils/tcl.m4
d30ae64
--- torque/buildutils/tcl.m4.cleanup	2021-01-28 16:14:17.000000000 -0500
6ea1f98
+++ torque/buildutils/tcl.m4	2021-04-13 14:14:09.320271814 -0400
d30ae64
@@ -44,7 +44,7 @@ AC_DEFUN([TEA_PATH_TCLCONFIG], [
d30ae64
     if test x"${no_tcl}" = x ; then
d30ae64
 	# we reset no_tcl in case something fails here
d30ae64
 	no_tcl=true
d30ae64
-	AC_ARG_WITH(tcl, AC_HELP_STRING([--with-tcl],[directory containing tcl configuration (tclConfig.sh)]), with_tclconfig=${withval})
d30ae64
+	AC_ARG_WITH(tcl, AS_HELP_STRING([--with-tcl],[directory containing tcl configuration (tclConfig.sh)]), with_tclconfig=${withval})
d30ae64
 	AC_MSG_CHECKING([for Tcl configuration])
d30ae64
 	AC_CACHE_VAL(ac_cv_c_tclconfig,[
d30ae64
 
d30ae64
@@ -141,7 +141,7 @@ AC_DEFUN([TEA_PATH_TKCONFIG], [
d30ae64
     if test x"${no_tk}" = x ; then
d30ae64
 	# we reset no_tk in case something fails here
d30ae64
 	no_tk=true
d30ae64
-	AC_ARG_WITH(tk, AC_HELP_STRING([--with-tk],[directory containing tk configuration (tkConfig.sh)]), with_tkconfig=${withval})
d30ae64
+	AC_ARG_WITH(tk, AS_HELP_STRING([--with-tk],[directory containing tk configuration (tkConfig.sh)]), with_tkconfig=${withval})
d30ae64
 	AC_MSG_CHECKING([for Tk configuration])
d30ae64
 	AC_CACHE_VAL(ac_cv_c_tkconfig,[
d30ae64
 
d30ae64
@@ -440,7 +440,7 @@ AC_DEFUN([TEA_ENABLE_THREADS], [
d30ae64
 		# Check a little harder for __pthread_mutex_init in the
d30ae64
 		# same library, as some systems hide it there until
d30ae64
 		# pthread.h is defined.	 We could alternatively do an
d30ae64
-		# AC_TRY_COMPILE with pthread.h, but that will work with
d30ae64
+		# AC_COMPILE_IFELSE with pthread.h, but that will work with
d30ae64
 		# libpthread really doesn't exist, like AIX 4.2.
d30ae64
 		# [Bug: 4359]
d30ae64
 		AC_CHECK_LIB(pthread, __pthread_mutex_init,
d30ae64
@@ -621,8 +621,10 @@ AC_DEFUN([TEA_ENABLE_LANGINFO], [
d30ae64
     fi
d30ae64
     AC_MSG_CHECKING([whether to use nl_langinfo])
d30ae64
     if test "$langinfo_ok" = "yes"; then
d30ae64
-	AC_TRY_COMPILE([#include <langinfo.h>],
d30ae64
-		[nl_langinfo(CODESET);],[langinfo_ok=yes],[langinfo_ok=no])
d30ae64
+	AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
d30ae64
+		#include <langinfo.h>
d30ae64
+		nl_langinfo(CODESET);]]),
d30ae64
+		langinfo_ok=yes , langinfo_ok=no])
d30ae64
 	if test "$langinfo_ok" = "no"; then
d30ae64
 	    langinfo_ok="no (could not compile with nl_langinfo)";
d30ae64
 	fi
d30ae64
@@ -1626,7 +1628,8 @@ dnl AC_CHECK_TOOL(AR, ar, :)
d30ae64
 
d30ae64
     if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
d30ae64
 	AC_MSG_CHECKING([sys/exec.h])
d30ae64
-	AC_TRY_COMPILE([#include <sys/exec.h>],[
d30ae64
+	AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
d30ae64
+	    #include <sys/exec.h>
d30ae64
 	    struct exec foo;
d30ae64
 	    unsigned long seek;
d30ae64
 	    int flag;
d30ae64
@@ -1637,13 +1640,14 @@ dnl AC_CHECK_TOOL(AR, ar, :)
d30ae64
 #endif
d30ae64
 	    flag = (foo.a_magic == OMAGIC);
d30ae64
 	    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
d30ae64
-    ], tcl_ok=usable, tcl_ok=unusable)
d30ae64
+    ]]), tcl_ok=usable, tcl_ok=unusable])
d30ae64
 	AC_MSG_RESULT([$tcl_ok])
d30ae64
 	if test $tcl_ok = usable; then
d30ae64
 	    AC_DEFINE(USE_SYS_EXEC_H)
d30ae64
 	else
d30ae64
 	    AC_MSG_CHECKING([a.out.h])
d30ae64
-	    AC_TRY_COMPILE([#include <a.out.h>],[
d30ae64
+	    AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
d30ae64
+		#include <a.out.h>
d30ae64
 		struct exec foo;
d30ae64
 		unsigned long seek;
d30ae64
 		int flag;
d30ae64
@@ -1654,13 +1658,14 @@ dnl AC_CHECK_TOOL(AR, ar, :)
d30ae64
 #endif
d30ae64
 		flag = (foo.a_magic == OMAGIC);
d30ae64
 		return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
d30ae64
-	    ], tcl_ok=usable, tcl_ok=unusable)
d30ae64
+	    ]]), tcl_ok=usable, tcl_ok=unusable])
d30ae64
 	    AC_MSG_RESULT([$tcl_ok])
d30ae64
 	    if test $tcl_ok = usable; then
d30ae64
 		AC_DEFINE(USE_A_OUT_H)
d30ae64
 	    else
d30ae64
 		AC_MSG_CHECKING([sys/exec_aout.h])
d30ae64
-		AC_TRY_COMPILE([#include <sys/exec_aout.h>],[
d30ae64
+		AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
d30ae64
+		    #include <sys/exec_aout.h>
d30ae64
 		    struct exec foo;
d30ae64
 		    unsigned long seek;
d30ae64
 		    int flag;
d30ae64
@@ -1671,7 +1676,7 @@ dnl AC_CHECK_TOOL(AR, ar, :)
d30ae64
 #endif
d30ae64
 		    flag = (foo.a_midmag == OMAGIC);
d30ae64
 		    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
d30ae64
-		], tcl_ok=usable, tcl_ok=unusable)
d30ae64
+		]]), tcl_ok=usable, tcl_ok=unusable])
d30ae64
 		AC_MSG_RESULT([$tcl_ok])
d30ae64
 		if test $tcl_ok = usable; then
d30ae64
 		    AC_DEFINE(USE_SYS_EXEC_AOUT_H)
d30ae64
@@ -1913,7 +1918,7 @@ int main() {
d30ae64
 
d30ae64
 AC_DEFUN([TEA_MISSING_POSIX_HEADERS], [
d30ae64
     AC_MSG_CHECKING([dirent.h])
d30ae64
-    AC_TRY_LINK([#include <sys/types.h>
d30ae64
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
d30ae64
 #include <dirent.h>], [
d30ae64
 #ifndef _POSIX_SOURCE
d30ae64
 #   ifdef __Lynx__
d30ae64
@@ -1932,7 +1937,7 @@ d = opendir("foobar");
d30ae64
 entryPtr = readdir(d);
d30ae64
 p = entryPtr->d_name;
d30ae64
 closedir(d);
d30ae64
-], tcl_ok=yes, tcl_ok=no)
d30ae64
+]])], [tcl_ok=yes], [tcl_ok=no])
d30ae64
 
d30ae64
     if test $tcl_ok = no; then
d30ae64
 	AC_DEFINE(NO_DIRENT_H)
d30ae64
@@ -2165,8 +2170,8 @@ AC_DEFUN([TEA_TIME_HANDLER], [
d30ae64
 
d30ae64
     AC_MSG_CHECKING([tm_tzadj in struct tm])
d30ae64
     AC_CACHE_VAL(tcl_cv_member_tm_tzadj,
d30ae64
-	AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_tzadj;],
d30ae64
-	    tcl_cv_member_tm_tzadj=yes, tcl_cv_member_tm_tzadj=no))
d30ae64
+	AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <time.h>], [struct tm tm; tm.tm_tzadj;]]),
d30ae64
+	    tcl_cv_member_tm_tzadj=yes, tcl_cv_member_tm_tzadj=no]))
d30ae64
     AC_MSG_RESULT([$tcl_cv_member_tm_tzadj])
d30ae64
     if test $tcl_cv_member_tm_tzadj = yes ; then
d30ae64
 	AC_DEFINE(HAVE_TM_TZADJ)
d30ae64
@@ -2174,8 +2179,8 @@ AC_DEFUN([TEA_TIME_HANDLER], [
d30ae64
 
d30ae64
     AC_MSG_CHECKING([tm_gmtoff in struct tm])
d30ae64
     AC_CACHE_VAL(tcl_cv_member_tm_gmtoff,
d30ae64
-	AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_gmtoff;],
d30ae64
-	    tcl_cv_member_tm_gmtoff=yes, tcl_cv_member_tm_gmtoff=no))
d30ae64
+	AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <time.h>], [struct tm tm; tm.tm_gmtoff;]]),
d30ae64
+	    tcl_cv_member_tm_gmtoff=yes, tcl_cv_member_tm_gmtoff=no]))
d30ae64
     AC_MSG_RESULT([$tcl_cv_member_tm_gmtoff])
d30ae64
     if test $tcl_cv_member_tm_gmtoff = yes ; then
d30ae64
 	AC_DEFINE(HAVE_TM_GMTOFF)
d30ae64
@@ -2187,11 +2192,11 @@ AC_DEFUN([TEA_TIME_HANDLER], [
d30ae64
     #
d30ae64
     AC_MSG_CHECKING([long timezone variable])
d30ae64
     AC_CACHE_VAL(tcl_cv_var_timezone,
d30ae64
-	AC_TRY_COMPILE([#include <time.h>],
d30ae64
+	AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <time.h>],
d30ae64
 	    [extern long timezone;
d30ae64
 	    timezone += 1;
d30ae64
-	    exit (0);],
d30ae64
-	    tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no))
d30ae64
+	    exit (0);]]),
d30ae64
+	    tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no]))
d30ae64
     AC_MSG_RESULT([$tcl_cv_timezone_long])
d30ae64
     if test $tcl_cv_timezone_long = yes ; then
d30ae64
 	AC_DEFINE(HAVE_TIMEZONE_VAR)
d30ae64
@@ -2201,11 +2206,11 @@ AC_DEFUN([TEA_TIME_HANDLER], [
d30ae64
 	#
d30ae64
 	AC_MSG_CHECKING([time_t timezone variable])
d30ae64
 	AC_CACHE_VAL(tcl_cv_timezone_time,
d30ae64
-	    AC_TRY_COMPILE([#include <time.h>],
d30ae64
+	    AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <time.h>],
d30ae64
 		[extern time_t timezone;
d30ae64
 		timezone += 1;
d30ae64
-		exit (0);],
d30ae64
-		tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no))
d30ae64
+		exit (0);]]),
d30ae64
+		tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no]))
d30ae64
 	AC_MSG_RESULT([$tcl_cv_timezone_time])
d30ae64
 	if test $tcl_cv_timezone_time = yes ; then
d30ae64
 	    AC_DEFINE(HAVE_TIMEZONE_VAR)
d30ae64
@@ -2372,8 +2377,7 @@ AC_DEFUN([TEA_TCL_LINK_LIBS], [
d30ae64
 AC_DEFUN([TEA_TCL_EARLY_FLAG],[
d30ae64
     AC_CACHE_VAL([tcl_cv_flag_]translit($1,[A-Z],[a-z]),
d30ae64
 	AC_TRY_COMPILE([$2], $3, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no,
d30ae64
-	    AC_TRY_COMPILE([[#define ]$1[ 1
d30ae64
-]$2], $3,
d30ae64
+	    AC_TRY_COMPILE([[#define ]$1[ 1]$2], $3,
d30ae64
 		[tcl_cv_flag_]translit($1,[A-Z],[a-z])=yes,
d30ae64
 		[tcl_cv_flag_]translit($1,[A-Z],[a-z])=no)))
d30ae64
     if test ["x${tcl_cv_flag_]translit($1,[A-Z],[a-z])[}" = "xyes"] ; then
d30ae64
@@ -2436,9 +2440,12 @@ AC_DEFUN([TEA_TCL_64BIT_FLAGS], [
d30ae64
 	# Now check for auxiliary declarations
d30ae64
 	AC_MSG_CHECKING([for struct dirent64])
d30ae64
 	AC_CACHE_VAL(tcl_cv_struct_dirent64,[
d30ae64
-	    AC_TRY_COMPILE([#include <sys/types.h>
d30ae64
-#include <sys/dirent.h>],[struct dirent64 p;],
d30ae64
-		tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no)])
d30ae64
+	    AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
d30ae64
+#include <sys/types.h>
d30ae64
+#include <sys/dirent.h>
d30ae64
+struct dirent64 p;
d30ae64
+        ]]),
d30ae64
+		tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no])])
d30ae64
 	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
d30ae64
 	    AC_DEFINE(HAVE_STRUCT_DIRENT64)
d30ae64
 	fi
d30ae64
@@ -2446,9 +2453,11 @@ AC_DEFUN([TEA_TCL_64BIT_FLAGS], [
d30ae64
 
d30ae64
 	AC_MSG_CHECKING([for struct stat64])
d30ae64
 	AC_CACHE_VAL(tcl_cv_struct_stat64,[
d30ae64
-	    AC_TRY_COMPILE([#include <sys/stat.h>],[struct stat64 p;
d30ae64
-],
d30ae64
-		tcl_cv_struct_stat64=yes,tcl_cv_struct_stat64=no)])
d30ae64
+	    AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
d30ae64
+#include <sys/stat.h>
d30ae64
+struct stat64 p;
d30ae64
+        ]]),
d30ae64
+		tcl_cv_struct_stat64=yes,tcl_cv_struct_stat64=no])])
d30ae64
 	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
d30ae64
 	    AC_DEFINE(HAVE_STRUCT_STAT64)
d30ae64
 	fi
d30ae64
@@ -2456,9 +2465,11 @@ AC_DEFUN([TEA_TCL_64BIT_FLAGS], [
d30ae64
 
d30ae64
 	AC_MSG_CHECKING([for off64_t])
d30ae64
 	AC_CACHE_VAL(tcl_cv_type_off64_t,[
d30ae64
-	    AC_TRY_COMPILE([#include <sys/types.h>],[off64_t offset;
d30ae64
-],
d30ae64
-		tcl_cv_type_off64_t=yes,tcl_cv_type_off64_t=no)])
d30ae64
+	    AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
d30ae64
+#include <sys/types.h>
d30ae64
+off64_t offset;
d30ae64
+	]])},
d30ae64
+		tcl_cv_type_off64_t=yes,tcl_cv_type_off64_t=no])])
d30ae64
 	if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
d30ae64
 	    AC_DEFINE(HAVE_TYPE_OFF64_T)
d30ae64
 	fi
d30ae64
@@ -2898,7 +2909,7 @@ AC_DEFUN([TEA_PRIVATE_TCL_HEADERS], [
d30ae64
 AC_DEFUN([TEA_PUBLIC_TCL_HEADERS], [
d30ae64
     AC_MSG_CHECKING([for Tcl public headers])
d30ae64
 
d30ae64
-    AC_ARG_WITH(tclinclude, AC_HELP_STRING([--with-tclinclude],[directory containing the public Tcl header files]), with_tclinclude=${withval})
d30ae64
+    AC_ARG_WITH(tclinclude, AS_HELP_STRING([--with-tclinclude],[directory containing the public Tcl header files]), with_tclinclude=${withval})
d30ae64
 
d30ae64
     AC_CACHE_VAL(ac_cv_c_tclh, [
d30ae64
 	# Use the value from --with-tclinclude, if it was given
d30ae64
@@ -3027,7 +3038,7 @@ AC_DEFUN([TEA_PRIVATE_TK_HEADERS], [
d30ae64
 AC_DEFUN([TEA_PUBLIC_TK_HEADERS], [
d30ae64
     AC_MSG_CHECKING([for Tk public headers])
d30ae64
 
d30ae64
-    AC_ARG_WITH(tkinclude, AC_HELP_STRING([--with-tkinclude],[directory containing the public Tk header files.]), with_tkinclude=${withval})
d30ae64
+    AC_ARG_WITH(tkinclude, AS_HELP_STRING([--with-tkinclude],[directory containing the public Tk header files.]), with_tkinclude=${withval})
d30ae64
 
d30ae64
     AC_CACHE_VAL(ac_cv_c_tkh, [
d30ae64
 	# Use the value from --with-tkinclude, if it was given
d30ae64
@@ -3222,7 +3233,7 @@ AC_DEFUN([TEA_PATH_CONFIG], [
d30ae64
     if test x"${no_$1}" = x ; then
d30ae64
 	# we reset no_$1 in case something fails here
d30ae64
 	no_$1=true
d30ae64
-	AC_ARG_WITH($1, AC_HELP_STRING([--with-$1],[directory containing $1 configuration ($1Config.sh)]), with_$1config=${withval})
d30ae64
+	AC_ARG_WITH($1, AS_HELP_STRING([--with-$1],[directory containing $1 configuration ($1Config.sh)]), with_$1config=${withval})
d30ae64
 	AC_MSG_CHECKING([for $1 configuration])
d30ae64
 	AC_CACHE_VAL(ac_cv_c_$1config,[
d30ae64
 
d30ae64
diff -up torque/configure.ac.cleanup torque/configure.ac
6ea1f98
--- torque/configure.ac.cleanup	2021-04-13 14:14:09.313271761 -0400
6ea1f98
+++ torque/configure.ac	2021-04-13 14:36:29.125464515 -0400
d30ae64
@@ -32,14 +32,15 @@ dnl Updated to use m4
d30ae64
 dnl added library functionality to testing
d30ae64
 dnl by John Rosenquist (jrosenquist@adaptivecomputing.com)
d30ae64
 
d30ae64
-AC_PREREQ(2.53)
d30ae64
-AC_INIT([torque], [6.1.3], [torqueusers@supercluster.org])
d30ae64
+AC_PREREQ([2.69])
d30ae64
+AC_INIT([torque],[6.1.3],[torqueusers@supercluster.org])
d30ae64
 AC_REVISION($Revision$)
d30ae64
 AC_CONFIG_SRCDIR([src/cmds/qrun.c])
d30ae64
 AC_CONFIG_AUX_DIR([buildutils])
d30ae64
 AC_CANONICAL_HOST
d30ae64
 AC_CONFIG_MACRO_DIR([buildutils])
d30ae64
 
d30ae64
+AC_PROG_CC
d30ae64
 AC_PROG_CXX
d30ae64
 m4_ifdef([AM_PROG_AR], [
d30ae64
     AM_PROG_AR
d30ae64
@@ -58,7 +59,7 @@ m4_ifdef([HAVE_CHECK],
d30ae64
   [AM_INIT_AUTOMAKE([-Wall -Werror -Wno-unsupported foreign 1.9.6])])
d30ae64
 
d30ae64
 AM_PROG_CC_C_O
d30ae64
-CC="$CXX"
d30ae64
+# CC="$CXX"
d30ae64
 CCLD="$CXX"
d30ae64
 AC_SUBST([CCLD])
d30ae64
 LIBTOOLFLAGS="--tag=CXX"
d30ae64
@@ -82,7 +83,7 @@ gccwarnings=yes
d30ae64
 dnl  Instead of putting a long list of defines on the command line
d30ae64
 dnl  for each compile, use a file called "pbs_config.h" that will
d30ae64
 dnl  be created in the include directory.
d30ae64
-AM_CONFIG_HEADER([src/include/pbs_config.h])
d30ae64
+AC_CONFIG_HEADERS([src/include/pbs_config.h])
d30ae64
 
d30ae64
 dnl
d30ae64
 dnl Find our git revision hash for program outputs
d30ae64
@@ -672,14 +673,14 @@ dnl
d30ae64
 AC_CHECK_PROGS(AR,ar,exit)
d30ae64
 
d30ae64
 dnl wrapped libtool macro to remove annoying warning message
d30ae64
-AC_PROG_LIBTOOL
d30ae64
-TAC_PROG_LIBTOOL_PATCH
d30ae64
+# LT_INIT
d30ae64
+# TAC_PROG_LIBTOOL_PATCH
d30ae64
 
d30ae64
 AC_PROG_LN_S
d30ae64
 
d30ae64
 
d30ae64
 dnl  needed for scheduler.basl
d30ae64
-AM_PROG_LEX
d30ae64
+AC_PROG_LEX(noyywrap)
d30ae64
 AC_PROG_YACC
d30ae64
 
d30ae64
 
d30ae64
@@ -723,7 +724,7 @@ dnl  and TAC_SYS_LARGEFILE
d30ae64
 dnl
d30ae64
 AC_MSG_CHECKING([whether to compile with debugging symbols])
d30ae64
 AC_ARG_WITH([debug],
d30ae64
-  AC_HELP_STRING([--with-debug], [compile with debugging symbols]),
d30ae64
+  AS_HELP_STRING([--with-debug],[compile with debugging symbols]),
d30ae64
   DEBUG_SYMBOLS=$withval, DEBUG_SYMBOLS="yes")
d30ae64
 AC_MSG_RESULT([DEBUG_SYMBOLS=$DEBUG_SYMBOLS])
d30ae64
 dnl  remove -O* and add -g
d30ae64
@@ -795,7 +796,8 @@ LIBS="$LIBS $PTHREAD_LIBS"
d30ae64
 dnl
d30ae64
 dnl we need libxml2
d30ae64
 dnl
d30ae64
-xmlLib=`xml2-config --libs | sed 's/-L@<:@^@<:@:space:@:>@@:>@* //g;s/-l//'`
d30ae64
+xmlLib=xml2
d30ae64
+# `xml2-config --libs | sed 's/-L@<:@^@<:@:space:@:>@@:>@* //g;s/-l//'`
d30ae64
 
d30ae64
 dnl skip the first two chars because its -l<libname>
d30ae64
 AC_CHECK_LIB(${xmlLib}, xmlGetProp,
d30ae64
@@ -804,9 +806,10 @@ AC_CHECK_LIB(${xmlLib}, xmlGetProp,
d30ae64
 
d30ae64
 
d30ae64
 dnl find zlib
d30ae64
-AC_CHECK_LIB(z, gzopen,
d30ae64
-  [],
d30ae64
-  [AC_MSG_ERROR([TORQUE needs zlib-devel in order to build]) ])
d30ae64
+AC_CHECK_LIB(z, gzopen,[LIBS="$LIBS -lz"], [AC_MSG_ERROR(could not find zlib)])
d30ae64
+# AC_CHECK_LIB(z, gzopen,
d30ae64
+#   [],
d30ae64
+#  [AC_MSG_ERROR([TORQUE needs zlib-devel in order to build]) ])
d30ae64
 
d30ae64
 
d30ae64
 dnl ###########################################
6ea1f98
@@ -858,6 +861,7 @@ dnl
d30ae64
 
d30ae64
 AC_HEADER_DIRENT
6ea1f98
 AC_HEADER_STDC
d30ae64
+
d30ae64
 AC_HEADER_SYS_WAIT
d30ae64
 
d30ae64
 AC_CHECK_HEADERS([arpa/inet.h fcntl.h float.h limits.h malloc.h netdb.h \
6ea1f98
@@ -1368,8 +1372,7 @@ dnl Add the ability to link against the
d30ae64
 dnl
d30ae64
 dnl --with-pmix
d30ae64
 AC_ARG_WITH([pmix],
d30ae64
-            [AC_HELP_STRING([--with-pmix(=DIR)],
d30ae64
-                            [Build PMIx support.  DIR can either be left off, or be a valid directory name. Supplying a valid directory name adds DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])])
d30ae64
+            [AS_HELP_STRING([--with-pmix(=DIR)],[Build PMIx support.  DIR can either be left off, or be a valid directory name. Supplying a valid directory name adds DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])])
d30ae64
 
d30ae64
 AC_MSG_CHECKING([if user requested PMIx support($with_pmix)])
d30ae64
 AS_IF([test -z "$with_pmix" || test "$with_pmix" = "no"],
6ea1f98
@@ -2421,7 +2424,7 @@ dnl modulefiles
d30ae64
 AC_MSG_CHECKING([whether to install modulefiles])
d30ae64
 
d30ae64
 AC_ARG_WITH(modulefiles,
d30ae64
-    AC_HELP_STRING([--with-modulefiles@<:@=DIR@:>@], [use modulefiles in specified directory [[/etc/modulefiles]]]),
d30ae64
+    AS_HELP_STRING([--with-modulefiles@<:@=DIR@:>@],[use modulefiles in specified directory [[/etc/modulefiles]]]),
d30ae64
 [], [with_modulefiles="no"])
d30ae64
 if test "$with_modulefiles" != 'no'; then
d30ae64
   if test "$with_modulefiles" = 'yes'; then
6ea1f98
@@ -2530,7 +2533,7 @@ fi
d30ae64
 AC_CHECK_FUNC(ntohl, [ :],
d30ae64
   AC_MSG_CHECKING([for ntohl in arpa/inet.h])
d30ae64
   torque_cv_ntohl_needs_arpa_inet_h="no"
d30ae64
-  AC_TRY_COMPILE([
d30ae64
+  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
d30ae64
   #ifdef HAVE_SYS_TYPES_H
d30ae64
   #include <sys/types.h>
d30ae64
   #endif
6ea1f98
@@ -2540,9 +2543,8 @@ AC_CHECK_FUNC(ntohl, [ :],
d30ae64
   #ifdef HAVE_ARPA_INET_H
d30ae64
   #include <arpa/inet.h>
d30ae64
   #endif
d30ae64
-  ],[exit(ntohl(0));],
d30ae64
-    [torque_cv_ntohl_needs_arpa_inet_h="yes"
d30ae64
-     AC_DEFINE_UNQUOTED([NTOHL_NEEDS_ARPA_INET_H],1,[Define if ntohl() is declared in arpa/inet.h])])
d30ae64
+  ]], [[exit(ntohl(0));]])],[torque_cv_ntohl_needs_arpa_inet_h="yes"
d30ae64
+     AC_DEFINE_UNQUOTED([NTOHL_NEEDS_ARPA_INET_H],1,[Define if ntohl() is declared in arpa/inet.h])],[])
d30ae64
   AC_MSG_RESULT($torque_cv_ntohl_needs_arpa_inet_h)
d30ae64
 )
d30ae64
 
6ea1f98
@@ -2672,7 +2674,7 @@ AC_DEFINE_UNQUOTED([PBS_CFLAGS],"${CFLAG
d30ae64
 
d30ae64
 AC_CONFIG_FILES([torque.spec:buildutils/torque.spec.in])
d30ae64
 #The output files are alphabetically ordered by src then check test files
d30ae64
-AC_OUTPUT(buildutils/pbs_mkdirs
d30ae64
+AC_CONFIG_FILES([buildutils/pbs_mkdirs
d30ae64
 	  buildutils/self-extract-head-sh
d30ae64
 	  buildutils/modulefiles
d30ae64
 	  buildutils/modulefiles.vers
6ea1f98
@@ -2727,7 +2729,8 @@ AC_OUTPUT(buildutils/pbs_mkdirs
d30ae64
 	  src/drmaa/Doxyfile
d30ae64
 	  src/pam/Makefile
d30ae64
 
d30ae64
-)
d30ae64
+])
d30ae64
+AC_OUTPUT
d30ae64
 
d30ae64
 echo
d30ae64
 echo "Building components: server=$build_server mom=$build_mom clients=$build_clients