]> granicus.if.org Git - graphviz/commitdiff
Autotools: Make ann file check cross-compilation friendly
authorNehal J Wani <nehaljw.kkd1@gmail.com>
Sat, 7 Jan 2023 11:41:40 +0000 (11:41 +0000)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 7 Jan 2023 22:53:34 +0000 (14:53 -0800)
Resolves https://gitlab.com/graphviz/graphviz/-/issues/2335

configure.ac

index 49e027fcdb64a233bf801d5f02f5c27a87808366..c3c50951480ca4105c6784a38530911585d162ee 100644 (file)
@@ -1925,7 +1925,7 @@ else
     AC_SUBST([ANN_LIBS])
   ],[
     # fall back discovery for the Debian ecosystem which does not ship an ann.pc
-    AC_CHECK_FILE(/usr/include/ANN/ANN.h, [
+    AS_IF([test -f /usr/include/ANN/ANN.h], [
       ANN_CFLAGS= # nothing required
       AC_CHECK_LIB(ann, ann_visit_pts, [
         ANN_LIBS=-lann