configure.ac: use preprocessor to detect libpqos version
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Sat, 27 May 2017 13:05:45 +0000 (15:05 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Sat, 27 May 2017 13:05:45 +0000 (15:05 +0200)
No need to run the program.

configure.ac

index 11fb9ab..5ed0ab3 100644 (file)
@@ -4428,14 +4428,14 @@ fi
 if test "x$with_libpqos" = "xyes"; then
   SAVE_CPPFLAGS="$CPPFLAGS"
   CPPFLAGS="$CPPFLAGS $with_libpqos_cppflags"
-  AC_RUN_IFELSE(
+  AC_PREPROC_IFELSE(
     [
-      AC_LANG_PROGRAM(
+      AC_LANG_SOURCE(
         [[
           #include <pqos.h>
-        ]],
-        [[
-          return !(PQOS_VERSION >= 106)
+          #if PQOS_VERSION < 106
+          #error "required PQOS version >= 1.06"
+          #endif
         ]]
       )
     ],