File: plugin.m4

package info (click to toggle)
abiword 3.0.7~dfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 64,700 kB
  • sloc: cpp: 477,933; ansic: 16,754; makefile: 5,834; xml: 3,993; yacc: 1,818; lex: 1,104; perl: 812; python: 413; php: 183; sh: 169
file content (47 lines) | stat: -rw-r--r-- 1,140 bytes parent folder | download | duplicates (4)
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
command_deps="no"

if test "$enable_command" != ""; then
    if test "$TOOLKIT" != "gtk"; then
		command_deps="no"
		AC_MSG_WARN([command plugin: only supported on UNIX/gtk platforms])
	else 
		# stolen from the original plugin.m4 in abiword-plugins
		AC_CHECK_HEADER(readline/readline.h,[
				AC_CHECK_HEADER(readline/history.h,[
						AC_CHECK_LIB(readline,readline,[
								command_deps="yes"
						],[     AC_CHECK_LIB(readline,rl_initialize,[
										command_deps="yes"

								],,)
						],)
				])
		])
	fi
fi

if test "$enable_command" = "yes" || \
   test "$command_deps" = "yes"; then

if test "$enable_command_builtin" = "yes"; then
AC_MSG_ERROR([command plugin: static linking not supported])
fi

AC_MSG_CHECKING([command plugin: for readline and friends])
if test "$command_deps" != "yes"; then
	AC_MSG_ERROR([no])
else
	AC_MSG_RESULT([yes])
        COMMAND_LIBS="-lreadline -lhistory $COMMAND_LIBS"
fi

test "$enable_command" = "auto" && PLUGINS="$PLUGINS command"

COMMAND_CFLAGS="$COMMAND_CFLAGS "'${PLUGIN_CFLAGS}'
COMMAND_LIBS="$COMMAND_LIBS "'${PLUGIN_LIBS}'

fi

AC_SUBST([COMMAND_CFLAGS])
AC_SUBST([COMMAND_LIBS])