Index: src/GNUmakefile.am =================================================================== --- src/GNUmakefile.am (revision 21238) +++ src/GNUmakefile.am (working copy) @@ -1,4 +1,4 @@ -SUBDIRS = config tools af text other pkg wp bindings +SUBDIRS = config tools af text other pkg plugins wp bindings EXTRA_DIST = README.TXT Makefile Index: configure.ac =================================================================== --- configure.ac (revision 21238) +++ configure.ac (working copy) @@ -74,8 +74,7 @@ AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET -AC_PROG_RANLIB -dnl AC_PROG_LIBTOOL +AC_PROG_LIBTOOL AM_ACLOCAL_INCLUDE(ac-helpers) dnl Detect our platform (unix, win32, etc) @@ -150,6 +149,22 @@ fi ],[]) +# +# Plugins +# + +ABI_ALL_PLUGINS="m4_include([plugins.m4])" +AC_SUBST(ABI_ALL_PLUGINS) + +#AWK_SPLIT_WHITESPACE="awk 'BEGIN { i = 1 } { n = split($0,a,\" \"); while (i <= n) {print a[i]; i++;} }'" +ABI_PLUGIN_LIST="opendocument" +AC_ARG_ENABLE(plugins, [ --enable-plugins Which plugins to build], +[ + ABI_PLUGIN_LIST="${ABI_PLUGIN_LIST} ${enableval}" +]) +AC_SUBST(ABI_PLUGIN_LIST) + + if test "$PLATFORM" = "unix"; then ABI_FE="Unix" ABI_BE="$ABI_FE" @@ -251,7 +266,6 @@ AC_LANG_C ABI_FRIBIDI - ABI_PLUGINS dnl The resource manager is a class (XAP_ResourceManager) designed to handle @@ -556,6 +570,7 @@ src/wp/impexp/win/GNUmakefile src/wp/impexp/xp/GNUmakefile ]) + AC_CONFIG_FILES([ src/wp/main/GNUmakefile src/wp/main/xp/GNUmakefile @@ -595,6 +610,9 @@ user/wp/strings/GNUmakefile user/wp/templates/GNUmakefile ]) + +AC_CONFIG_FILES(m4_include([plugins-output-files.m4])) + AC_OUTPUT echo " " @@ -674,6 +692,7 @@ installing in: ${prefix} + plugins: ${ABI_PLUGIN_LIST} EOF Index: autogen.sh =================================================================== --- autogen.sh (revision 21238) +++ autogen.sh (working copy) @@ -17,6 +17,19 @@ olddir=`pwd` cd $srcdir +# find plugins +# all dirs in src/plugins are a plugin +(cd src/plugins && find . -maxdepth 1 -type d | grep -v '^.$' | grep -v '^\./\.' | sed 's|^./||' | xargs echo) > plugins.m4 + +# find plugin makefiles +find src/plugins -name GNUmakefile.am | sed 's,\.am,,g' > plugins-output-files.m4 + +echo "Running libtoolize" +libtoolize --force --copy || { + echo "error: libtoolize failed" + exit 1 +} + automake --version | perl -ne 'if (/\(GNU automake\) (([0-9]+).([0-9]+))/) {print; if ($2 < 1 || ($2 == 1 && $3 < 4)) {exit 1;}}' if [ $? -ne 0 ]; then