summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/xetexdir/tests.ac
blob: 505a7fada0367a029e21ee80375c7448d1f08dfc (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Extra configure tests to support XeTeX

AC_DEFUN([AC_HAS_CARBON], [
#
#   Check for Carbon framework on Mac OS X
#
  _cppflags=$CPPFLAGS _ldflags=$LDFLAGS
  AC_MSG_CHECKING([for Apple Carbon framework])
  AC_TRY_COMPILE(
    [
#include <Carbon/Carbon.h>
      ], [
ATSUStyle style;
    ],
    [ AC_MSG_RESULT(yes)
      AC_DEFINE(HAVE_CARBON, 1, [Define if you have Carbon])
      LDCARBON="-framework Carbon"
      has_carbon=yes
    ],
    [ AC_MSG_RESULT(no)
      LDCARBON=
      has_carbon=no
    ]
  )
])

AC_DEFUN([AC_HAS_QUICKTIME], [
#
#   Check for QuickTime framework on Mac OS X
#
  _cppflags=$CPPFLAGS _ldflags=$LDFLAGS
  AC_MSG_CHECKING([for Apple QuickTime framework])
  AC_TRY_COMPILE(
    [
#include <QuickTime/QuickTime.h>
      ], [
ImageDescriptionHandle h;
    ],
    [ AC_MSG_RESULT(yes)
      AC_DEFINE(HAVE_QUICKTIME, 1, [Define if you have QuickTime])
      LDQUICKTIME="-framework QuickTime"
      has_quicktime=yes
    ],
    [ AC_MSG_RESULT(no)
      LDQUICKTIME=
      has_quicktime=no
    ]
  )
])

AC_DEFUN([AC_HAS_LIBFONTCONFIG], [
#
#   Check for libfontconfig
#
  _cppflags=$CPPFLAGS _ldflags=$LDFLAGS
  AC_ARG_WITH(fontconfig,
    [  --with-fontconfig=DIR   use fontconfig include/library files from DIR],
    [
if test -d "$withval"; then
  FONTCONFIGCPPFLAGS="-I$withval/include"
  LDFONTCONFIG="-L$withval/lib"
  CPPFLAGS="$CPPFLAGS $FONTCONFIGCPPFLAGS"
  LDFLAGS="$LDFLAGS $LDFONTCONFIG"
fi
    ]
  )
  AC_MSG_CHECKING([for fontconfig header files])
  AC_TRY_COMPILE(
    [
#include <fontconfig/fontconfig.h>
      ], [
FcObjectSet *os;
    ],
    [ AC_MSG_RESULT(yes)
      AC_CHECK_LIB(fontconfig, FcInit, [
        AC_DEFINE(HAVE_LIBFONTCONFIG, 1, [Define if you have libfontconfig])
        LDFONTCONFIG="$LDFONTCONFIG -lfontconfig"
      ])
    ],
    [ AC_MSG_RESULT(no)
      FONTCONFIGCPPFLAGS=
      LDFONTCONFIG=
    ]
  )
])