File: aspell.m4

package info (click to toggle)
librcc 0.2.9-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 2,424 kB
  • ctags: 1,243
  • sloc: sh: 10,110; ansic: 8,736; xml: 523; makefile: 133
file content (44 lines) | stat: -rw-r--r-- 870 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
# This file is part of GNOME Translate.
#
# Copyright (C) 2004 Jean-Yves Lefort.
#
# As a special exception to the GNOME Translate licensing terms,
# Jean-Yves Lefort gives unlimited permission to copy, distribute and
# modify this file.

dnl AM_PATH_ASPELL([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
dnl
AC_DEFUN([AM_PATH_ASPELL],
[ASPELL_CFLAGS=""
ASPELL_LIBS="-laspell"

ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $ASPELL_CFLAGS"
LIBS="$LIBS $ASPELL_LIBS"

AC_MSG_CHECKING([for Aspell])
AC_RUN_IFELSE([
#include <aspell.h>

int main() {
  new_aspell_config;

  exit(0);
}
], [found=yes], [found=no], [found=yes])
AC_MSG_RESULT($found)

CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"

if test $found = yes; then
	ifelse([$1],, :, [$1])
else
	ASPELL_CFLAGS=""
	ASPELL_LIBS=""
	ifelse([$2],, :, [$2])
fi

AC_SUBST(ASPELL_CFLAGS)
AC_SUBST(ASPELL_LIBS)])