diff options
author | Omar Vega Ramos <ovruni@gnu.org.pe> | 2016-03-06 16:49:41 -0500 |
---|---|---|
committer | Omar Vega Ramos <ovruni@gnu.org.pe> | 2016-03-06 16:49:41 -0500 |
commit | f74c34395b5945763f7698d64ee27bdeb4cfa79e (patch) | |
tree | 68ffea8e7a8dabe1394fce9981d0ed13da58a310 /libre/abiword/command-plugin.m4 | |
parent | 2e662157db4f6cf3c0f57bbbefc679bb3330ec91 (diff) |
abiword-3.0.1-5.parabola1: Fix command plugin
Diffstat (limited to 'libre/abiword/command-plugin.m4')
-rw-r--r-- | libre/abiword/command-plugin.m4 | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/libre/abiword/command-plugin.m4 b/libre/abiword/command-plugin.m4 new file mode 100644 index 000000000..dd010adf6 --- /dev/null +++ b/libre/abiword/command-plugin.m4 @@ -0,0 +1,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]) + |