summaryrefslogtreecommitdiff
path: root/extra/libotf/libotf-0.9.16-pkgconf.patch
blob: 36115bb32ddbca66f237c07a7c3ec154db1552a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
diff -rauN libotf-0.9.16/configure.ac libotf-0.9.16-pkgconf-patch/configure.ac
--- libotf-0.9.16/configure.ac	2018-01-24 00:01:37.000000000 +0100
+++ libotf-0.9.16-pkgconf-patch/configure.ac	2019-11-26 20:06:12.782289945 +0100
@@ -50,13 +50,24 @@
 
 # Check for Freetype2 usability.
 AC_CHECK_PROG(HAVE_FREETYPE_CONFIG, freetype-config, yes)
-if test "x$HAVE_FREETYPE_CONFIG" = "xyes"; then
-  FREETYPE_INC=`freetype-config --cflags`
+AC_CHECK_PROG(HAVE_PKGCONF, pkgconf, yes)
+if test "x$HAVE_FREETYPE_CONFIG" = "xyes" -o "x$HAVE_PKGCONF" = "xyes"; then
+  if test "x$HAVE_FREETYPE_CONFIG" = "xyes"; then
+    FREETYPE_INC=`freetype-config --cflags`
+  fi
+  if test "x$HAVE_PKGCONF" = "xyes"; then
+    FREETYPE_INC=`pkgconf --cflags freetype2`
+  fi
   CPPFLAGS="$CPPFLAGS $FREETYPE_INC"
   AC_CHECK_HEADER(ft2build.h, HAVE_FREETYPE=yes,
   			      HAVE_FREETYPE=no CPPFLAGS=$save_CPPFLAGS)
   if test "x$HAVE_FREETYPE" = "xyes" ; then
-    FREETYPE_LD_FLAGS=`freetype-config --libs`;
+    if test "x$HAVE_FREETYPE_CONFIG" = "xyes"; then
+      FREETYPE_LD_FLAGS=`freetype-config --libs`;
+    fi
+    if test "x$HAVE_PKGCONF" = "xyes"; then
+      FREETYPE_LD_FLAGS=`pkgconf --libs freetype2`;
+    fi
     LIBS="$LIBS $FREETYPE_LD_FLAGS"
     AC_CHECK_LIB(freetype, FT_Init_FreeType, HAVE_FREETYPE=yes,
     			   		     HAVE_FREETYPE=no)