File: aclocal.m4

package info (click to toggle)
gworkspace 0.9.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 20,832 kB
  • sloc: objc: 69,382; sh: 488; makefile: 39
file content (56 lines) | stat: -rw-r--r-- 1,169 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
AC_DEFUN(AC_CHECK_PDFKIT,[
  
  GNUSTEP_SH_EXPORT_ALL_VARIABLES=yes
  . "$GNUSTEP_MAKEFILES/GNUstep.sh"
  unset GNUSTEP_SH_EXPORT_ALL_VARIABLES

  OLD_CFLAGS=$CFLAGS  
  CFLAGS="-xobjective-c `gnustep-config --objc-flags`"

  OLD_LDFLAGS="$LD_FLAGS"
  LDFLAGS="$LDFLAGS `gnustep-config --gui-libs`"
  OLD_LIBS="$LIBS"
  LIBS="$LIBS -lPDFKit"

  AC_MSG_CHECKING([for PDFKit])

  AC_LINK_IFELSE(
          AC_LANG_PROGRAM(
                  [[#include <Foundation/Foundation.h>
                    #include <AppKit/AppKit.h>
                    #include <PDFKit/PDFDocument.h>]],
                  [[[[PDFDocument class]];]]),
	  $1;
	  have_pdfkit=yes,
	  $2;
	  have_pdfkit=no)

  LIBS="$OLD_LIBS"
  LDFLAGS="$OLD_LDFLAGS"
  CFLAGS="$OLD_CFLAGS"

  AC_MSG_RESULT($have_pdfkit)
])


AC_DEFUN(AC_CHECK_PDFKIT_DARWIN,[
  AC_MSG_CHECKING([for PDFKit])
  PDF_H="PDFKit/PDFDocument.h"
  PDF_H_PATH="$GNUSTEP_SYSTEM_HEADERS/$PDF_H"

  if test -e $PDF_H_PATH; then
    have_pdfkit=yes
  else 
    PDF_H_PATH="$GNUSTEP_LOCAL_HEADERS/$PDF_H"
    if test -e $PDF_H_PATH; then
      have_pdfkit=yes
    else 
      have_pdfkit=no
    fi
  fi
  
  AC_MSG_RESULT($have_pdfkit)
])