File: xft.m4

package info (click to toggle)
xine-ui 0.99.14%2Bhg20251015-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 8,996 kB
  • sloc: ansic: 73,410; sh: 1,923; makefile: 543; perl: 109; sed: 16; xml: 9
file content (70 lines) | stat: -rw-r--r-- 2,362 bytes parent folder | download | duplicates (11)
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
69
70
dnl xft.m4
dnl Copyright (c) 2002 Henrik Kinnunen (fluxgen at linuxmail.org)
dnl Large changes for xine-ui usage: 2004 Daniel Caujolle-Bert (f1rmb@users.sourceforge.net)

dnl Permission is hereby granted, free of charge, to any person obtaining a
dnl copy of this software and associated documentation files (the "Software"),
dnl to deal in the Software without restriction, including without limitation
dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
dnl and/or sell copies of the Software, and to permit persons to whom the 
dnl Software is furnished to do so, subject to the following conditions:

dnl The above copyright notice and this permission notice shall be included in 
dnl all copies or substantial portions of the Software. 

dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL 
dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
dnl DEALINGS IN THE SOFTWARE.

dnl AM_PATH_XFT2([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
AC_DEFUN([AM_PATH_XFT2],
[

  if test "x$PKG_CONFIG" = "xno" ; then
    AC_PATH_PROG(XFT_CONFIG, xft-config, no)
    if test "x$XFT_CONFIG" = "xno" ; then
      ifelse([$2], , :, [$2])
    else
      XFT_CFLAGS=`$XFT_CONFIG --cflags`
      XFT_LIBS=`$XFT_CONFIG --libs`
      ifelse([$1], , :, [$1])
    fi
  else
    XFT_CFLAGS=`$PKG_CONFIG --cflags xft`
    XFT_LIBS=`$PKG_CONFIG --libs xft`
    ifelse([$1], , :, [$1])
  fi

])

dnl AM_PATH_XFT(default-value, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for Xft, and define XFT_CFLAGS and XFT_LIBS
AC_DEFUN([AM_PATH_XFT],
[
  AC_ARG_ENABLE(xft, [  --enable-xft            Xft (antialias) support (default=$1)],
    [ if test "x$enableval" = "xyes"; then
        TRY_XFT=yes
      else
	TRY_XFT=no
      fi
    ],
      TRY_XFT=$1
  )

  if test "x$TRY_XFT" = "xyes"; then
    AC_MSG_RESULT(yes)
    AM_PATH_XFT2([$2],
		 [$3]
		 AC_MSG_RESULT([Cant find Xft libraries! Disabling Xft]))
  else
    AC_MSG_RESULT(no)
	[$3]
  fi

  AC_SUBST(XFT_CFLAGS)
  AC_SUBST(XFT_LIBS)
])