- Issue #3718: Use AC_ARG_VAR to set MACHDEP in configure.ac.
diff --git a/Misc/NEWS b/Misc/NEWS
index 108857b..c58ab66 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -547,6 +547,8 @@
 Build
 -----
 
+- Issue #3718: Use AC_ARG_VAR to set MACHDEP in configure.ac.
+
 - Issue #17031: Fix running regen in cross builds.
 
 - Issue #3754: fix typo in pthread AC_CACHE_VAL.
diff --git a/configure b/configure
index 6edeb11..b881602 100755
--- a/configure
+++ b/configure
@@ -810,6 +810,7 @@
       ac_precious_vars='build_alias
 host_alias
 target_alias
+MACHDEP
 CC
 CFLAGS
 LDFLAGS
@@ -1484,6 +1485,7 @@
                           default on supported compilers)
 
 Some influential environment variables:
+  MACHDEP     name for machine-dependent library files
   CC          C compiler command
   CFLAGS      C compiler flags
   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
diff --git a/configure.ac b/configure.ac
index 15bd43c..b555f27 100644
--- a/configure.ac
+++ b/configure.ac
@@ -348,7 +348,7 @@
 ##                           [Use (OpenStep|Rhapsody) dynamic linker]))
 ##
 # Set name for machine-dependent library files
-AC_SUBST(MACHDEP)
+AC_ARG_VAR([MACHDEP], [name for machine-dependent library files])
 AC_MSG_CHECKING(MACHDEP)
 if test -z "$MACHDEP"
 then