changeset 24678:aa9c29f48718

configure.ac: Only check for psapi library when compiling for Windows. * configure.ac: Check host_os before calling AC_CHECK_LIB([psapi]).
author Rik <rik@octave.org>
date Fri, 02 Feb 2018 14:16:30 -0800
parents 69b89e81d3d3
children a3e67a9e7be5
files configure.ac
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/configure.ac	Fri Feb 02 22:31:29 2018 +0100
+++ b/configure.ac	Fri Feb 02 14:16:30 2018 -0800
@@ -1527,6 +1527,13 @@
   ;;
 esac
 
+## Windows-specific module used for winqueryreg function
+case $host_os in
+  msdosmsvc | mingw*)
+    AC_CHECK_LIB([psapi], [EnumProcessModules])
+  ;;
+esac
+
 ## Cygwin kluge for getrusage.
 AC_CHECK_FUNCS([getrusage])
 case $host_os in
@@ -1978,9 +1985,6 @@
   AC_SUBST(X11_LIBS)
 fi
 
-## FIXME: This check should probably be for Windows only.
-AC_CHECK_LIB([psapi], [EnumProcessModules])
-
 ### Check for the Carbon framework on macOS systems
 
 OCTAVE_HAVE_FRAMEWORK([Carbon],