File: fltk.m4

package info (click to toggle)
flamp 2.2.14-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,204 kB
  • sloc: cpp: 35,035; ansic: 5,806; sh: 4,264; makefile: 243
file content (65 lines) | stat: -rw-r--r-- 2,542 bytes parent folder | download | duplicates (2)
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
AC_DEFUN([AC_CHECK_FLTK], [
  AC_ARG_VAR([FLTK_CONFIG], [Path to fltk-config utility])
  AC_ARG_VAR([FLTK_CFLAGS], [C compiler flags for FLTK, overriding fltk-config])
  AC_ARG_VAR([FLTK_LIBS], [linker flags for FLTK, overriding fltk-config])

  if test "x$FLTK_CFLAGS" = "x" && test "x$FLTK_LIBS" = "x"; then
      if test "x$FLTK_CONFIG" = "x"; then
          AC_PATH_PROG([FLTK_CONFIG], [fltk-config], [no])
      else
          AC_MSG_CHECKING([for fltk-config])
          AC_MSG_RESULT([$FLTK_CONFIG])
      fi
      if test "$FLTK_CONFIG" = "no"; then
          AC_MSG_ERROR([
  *** The fltk-config script could not be found. Please install the development
  *** headers and libraries for FLTK 1.3.x, FLTK 1.4.x, or set PATH to the directory that
  *** contains fltk-config.
          ])
      fi
      HAVE_FLTK_API_VERSION=no
      FLTK_API_VERSION="`$FLTK_CONFIG --api-version`"
      if test $? -ne 0; then
          AC_MSG_ERROR([$FLTK_CONFIG failed])
      fi
      if test "x$FLTK_API_VERSION" = "x1.3" ||
         test "x$FLTK_API_VERSION" = "x1.4"; then
          HAVE_FLTK_API_VERSION=yes
      fi

      FLTK_VERSION="`$FLTK_CONFIG --version`"
      FLAMP_FLTK_API_MAJOR=${FLTK_VERSION%%.*}

      FLAMP_FLTK_API_MINOR=${FLTK_VERSION#*.};
      FLAMP_FLTK_API_MINOR=${FLAMP_FLTK_API_MINOR%%.*}

      FLAMP_FLTK_API_PATCH=${FLTK_VERSION#*.};
      FLAMP_FLTK_API_PATCH=${FLAMP_FLTK_API_PATCH#*.};

      if test "${HAVE_FLTK_API_VERSION}" = "no"; then
          AC_MSG_ERROR([
  *** The version of FLTK found on your system provides API version $FLTK_API_VERSION.
  *** To build $PACKAGE you need a FLTK version that provides API 1.3.
          ])
      fi

      FLTK_CFLAGS=`$FLTK_CONFIG --cxxflags`
      if test "x$ac_cv_static" != "xyes"; then
          FLTK_LIBS=`$FLTK_CONFIG --ldflags --use-images`
      else
          FLTK_LIBS=`$FLTK_CONFIG --ldstaticflags --use-images`
      fi
  else
      AC_MSG_NOTICE([not checking for FLTK])
  fi
  AC_SUBST([FLTK_CFLAGS])
  AC_SUBST([FLTK_LIBS])
  AC_DEFINE_UNQUOTED([FLTK_BUILD_VERSION], ["`$FLTK_CONFIG --version`"], [FLTK version])
  AC_DEFINE_UNQUOTED([FLAMP_FLTK_API_MAJOR], [$FLAMP_FLTK_API_MAJOR], [FLTK API major version])
  AC_DEFINE_UNQUOTED([FLAMP_FLTK_API_MINOR], [$FLAMP_FLTK_API_MINOR], [FLTK API minor version])
  AC_DEFINE_UNQUOTED([FLAMP_FLTK_API_PATCH], [$FLAMP_FLTK_API_PATCH], [FLTK API patch])

  AC_ARG_VAR([FLUID], [Fast Light User-Interface Designer])
  AC_CHECK_PROG([FLUID], [fluid], [fluid])
  AM_CONDITIONAL([HAVE_FLUID], [test -n "$FLUID"])
])