summaryrefslogtreecommitdiff
path: root/packages/icewm/icewm-1.2.20/configure.patch
blob: d6071bf26097f5727fd286c5b9a4ab533d24779f (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
--- icewm-1.2.20/configure.in.orig	2006-06-17 18:03:43.000000000 -0600
+++ icewm-1.2.20/configure.in	2006-06-17 18:03:45.000000000 -0600
@@ -426,32 +426,43 @@
      AC_MSG_ERROR("xfreetype or core fonts must be enabled")
   fi
   if test "$enable_xfreetype" != "no" -o "$enable_xfreetype" = "implied"; then
-    AC_PATH_PROG(XFT_CONFIG, xft-config,, ${with_xft_arg-${PATH}})
-    if test "${XFT_CONFIG}" != ""; then
-      XFT_CFLAGS=`${XFT_CONFIG} --cflags`
-      XFT_LIBS=`${XFT_CONFIG} --libs`
-      AC_DEFINE(CONFIG_XFREETYPE, 2, [Define to enable XFreeType support.])
-      CORE_CFLAGS="${CORE_CFLAGS} $XFT_CFLAGS"
-      CORE_LIBS="${CORE_LIBS} $XFT_LIBS"
-      features="${features} xfreetype"
-    else
-      AC_CHECK_HEADERS(X11/Xft/Xft.h,
-      [ AC_CHECK_LIB(Xft, XftDrawCreate,
-        [ AC_DEFINE(CONFIG_XFREETYPE, 1, [Define to enable XFreeType support.])
-          CORE_LIBS="${CORE_LIBS} -lXft"
-          enable_corefonts=yes
-          features="${features} xfreetype" ],
-        [ if test "$enable_xfreetype" != "implied"; then
-            AC_MSG_ERROR([Xft support has been requested but libraries were not found.
+      AC_PATH_PROG(PKG_CONFIG, pkg-config)
+
+      if test "${PKG_CONFIG}" != ""; then
+          XFT_CFLAGS=`${PKG_CONFIG} xft --cflags`
+          XFT_LIBS=`${PKG_CONFIG} xft --libs`
+          AC_DEFINE(CONFIG_XFREETYPE, 2, [Define to enable XFreeType support.])
+          CORE_CFLAGS="${CORE_CFLAGS} $XFT_CFLAGS"
+          CORE_LIBS="${CORE_LIBS} $XFT_LIBS"
+          features="${features} xfreetype"
+      else
+        AC_PATH_PROG(XFT_CONFIG, xft-config,, ${with_xft_arg-${PATH}})
+        if test "${XFT_CONFIG}" != ""; then
+          XFT_CFLAGS=`${XFT_CONFIG} --cflags`
+          XFT_LIBS=`${XFT_CONFIG} --libs`
+          AC_DEFINE(CONFIG_XFREETYPE, 2, [Define to enable XFreeType support.])
+          CORE_CFLAGS="${CORE_CFLAGS} $XFT_CFLAGS"
+          CORE_LIBS="${CORE_LIBS} $XFT_LIBS"
+          features="${features} xfreetype"
+        else
+          AC_CHECK_HEADERS(X11/Xft/Xft.h,
+          [ AC_CHECK_LIB(Xft, XftDrawCreate,
+            [ AC_DEFINE(CONFIG_XFREETYPE, 1, [Define to enable XFreeType support.])
+              CORE_LIBS="${CORE_LIBS} -lXft"
+              enable_corefonts=yes
+              features="${features} xfreetype" ],
+            [ if test "$enable_xfreetype" != "implied"; then
+                AC_MSG_ERROR([Xft support has been requested but libraries were not found.
   *** Configure your X server to support XFreeType.
   *** Information about how to do this can be found in RELNOTES for XFree86.])
-          fi ])],
-      [ if test "$enable_xfreetype" != "implied"; then
-          AC_MSG_ERROR([Xft support has been requested but headers were not found.
+              fi ])],
+            [ if test "$enable_xfreetype" != "implied"; then
+                AC_MSG_ERROR([Xft support has been requested but headers were not found.
   *** Configure your X server to support XFreeType.
   *** Information about how to do this can be found in RELNOTES for XFree86.])
-          fi ])
-    fi
+              fi ])
+        fi
+      fi
   fi
 
   if test "$enable_corefonts" = "yes"; then