db-move: moved d-spy from [testing] to [extra] (x86_64)
[arch-packages.git] / abiword / trunk / command-plugin.m4
blobdd010adf6dd939f2eaff46d574d15feec3c4d158
1 command_deps="no"
3 if test "$enable_command" != ""; then
4     if test "$TOOLKIT" != "gtk"; then
5                 command_deps="no"
6                 AC_MSG_WARN([command plugin: only supported on UNIX/gtk platforms])
7         else 
8                 # stolen from the original plugin.m4 in abiword-plugins
9                 AC_CHECK_HEADER(readline/readline.h,[
10                                 AC_CHECK_HEADER(readline/history.h,[
11                                                 AC_CHECK_LIB(readline,readline,[
12                                                                 command_deps="yes"
13                                                 ],[     AC_CHECK_LIB(readline,rl_initialize,[
14                                                                                 command_deps="yes"
16                                                                 ],,)
17                                                 ],)
18                                 ])
19                 ])
20         fi
23 if test "$enable_command" = "yes" || \
24    test "$command_deps" = "yes"; then
26 if test "$enable_command_builtin" = "yes"; then
27 AC_MSG_ERROR([command plugin: static linking not supported])
30 AC_MSG_CHECKING([command plugin: for readline and friends])
31 if test "$command_deps" != "yes"; then
32         AC_MSG_ERROR([no])
33 else
34         AC_MSG_RESULT([yes])
35         COMMAND_LIBS="-lreadline -lhistory $COMMAND_LIBS"
38 test "$enable_command" = "auto" && PLUGINS="$PLUGINS command"
40 COMMAND_CFLAGS="$COMMAND_CFLAGS "'${PLUGIN_CFLAGS}'
41 COMMAND_LIBS="$COMMAND_LIBS "'${PLUGIN_LIBS}'
45 AC_SUBST([COMMAND_CFLAGS])
46 AC_SUBST([COMMAND_LIBS])