# aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*- # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. # Do all the work for Automake. -*- Autoconf -*- # This macro actually does too much some checks are only needed if # your package does certain things. But this isn't really a big deal. # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 8 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... AC_PREREQ([2.52]) # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow # the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_MISSING_PROG(AMTAR, tar) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_][CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_][CC], defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_][CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_][CXX], defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl ]) ]) # Copyright 2002 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.6.3])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright 2001, 2002 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # # Check to make sure that the build environment is sane. # # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # -*- Autoconf -*- # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # AM_AUX_DIR_EXPAND # Copyright 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. # Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50]) AC_DEFUN([AM_AUX_DIR_EXPAND], [ # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. # Copyright 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # AM_PROG_INSTALL_STRIP # Copyright 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # serial 4 -*- Autoconf -*- # Copyright 1999, 2000, 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. echo '#include "conftest.h"' > conftest.c echo 'int i;' > conftest.h echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=conftest.c object=conftest.o \ depfile=conftest.Po tmpdepfile=conftest.TPo \ $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 && grep conftest.h conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then am_cv_$1_dependencies_compiler_type=$depmode break fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [rm -f .deps 2>/dev/null mkdir .deps 2>/dev/null if test -d .deps; then DEPDIR=.deps else # MS-DOS does not allow filenames that begin with a dot. DEPDIR=_deps fi rmdir .deps 2>/dev/null AC_SUBST([DEPDIR]) ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking Speeds up one-time builds --enable-dependency-tracking Do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. #serial 2 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue # Extract the definition of DEP_FILES from the Makefile without # running `make'. DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` test -z "$DEPDIR" && continue # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n -e '/^U = / s///p' < "$mf"` test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" # We invoke sed twice because it is the simplest approach to # changing $(DEPDIR) to its actual value in the expansion. for file in `sed -n -e ' /^DEP_FILES = .*\\\\$/ { s/^DEP_FILES = // :loop s/\\\\$// p n /\\\\$/ b loop p } /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright 2001 Free Software Foundation, Inc. -*- Autoconf -*- # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' doit: @echo done END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST(am__include) AC_SUBST(am__quote) AC_MSG_RESULT($_am_result) rm -f confinc confmf ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright 1997, 2000, 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 5 AC_PREREQ(2.52) # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([conditional \"$1\" was never defined. Usually this means the macro was only invoked conditionally.]) fi])]) # isc-posix.m4 serial 2 (gettext-0.11.2) dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. # This file is not needed with autoconf-2.53 and newer. Remove it in 2005. # This test replaces the one in autoconf. # Currently this macro should have the same name as the autoconf macro # because gettext's gettext.m4 (distributed in the automake package) # still uses it. Otherwise, the use in gettext.m4 makes autoheader # give these diagnostics: # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX undefine([AC_ISC_POSIX]) AC_DEFUN([AC_ISC_POSIX], [ dnl This test replaces the obsolescent AC_ISC_POSIX kludge. AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) ] ) # aclocal-include.m4 # # This macro adds the name macrodir to the set of directories # that `aclocal' searches for macros. # serial 1 dnl AM_ACLOCAL_INCLUDE(macrodir) AC_DEFUN([AM_ACLOCAL_INCLUDE], [ AM_CONDITIONAL(INSIDE_GNOME_COMMON, test x = y) test -n "$ACLOCAL_FLAGS" && ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" for k in $1 ; do ACLOCAL="$ACLOCAL -I $k" ; done ]) # Copyright (C) 2001 Sam Tobin-Hochstadt # This file is free software; you may copy and/or distribute it with # or without modifications, as long as this notice is preserved. # This software is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. # # The above license applies to THIS FILE ONLY, the abiword code # itself may be copied and distributed under the terms of the GNU # GPL, see COPYING for more details # # This file detects which of the AbiWord platforms we are currently # building on. The detection logic in question is mostly by Jeff # Hostetler, and is taken from the original AbiWord build system. # # Usage: ABI_DETECT_PLATFORM # The platform is then available in the PLATFORM variable. # # TODO Rewrite this to use $host, which is likely to be more accurate # and actually maintained. AC_DEFUN([ABI_DETECT_PLATFORM], [ dnl require that this is called, so we can make use of $GCC to test dnl whether we're using a gcc-variant or not. AC_REQUIRE([AC_PROG_CC]) # OS_NAME is the output of uname -s minus any forward slashes # (so we don't imply another level of depth). This is to solve # a problem with BSD/OS. In fact, it might be good to do this # to all uname results, so that one doesn't see "sun4/m" as an # architecture. The substitutions are taken from the Linux # kernel Makefile. The result of this is that even if you have # a Pentium Pro, you will see your bins in a "...i386" directory. # This doesn't mean it didn't use your optimizations. # this makes HP-UX look like "HP" (sed turns "HP-UX" into "HP" with the -.* pattern) OS_NAME=`uname -s | sed "s/\//-/" | sed "s/_/-/" | sed "s/-.*//g"` OS_RELEASE=`uname -r | sed "s/\//-/" | sed "s/[() ].*//g"` if test "$OS_NAME" = "CYGWIN32"; then OS_NAME="WIN32" fi if test "$OS_NAME" = "CYGWIN"; then OS_NAME="WIN32" fi if test "$OS_NAME" = "WIN32"; then CYGWIN_MAJOR_VERSION=`echo $(OS_RELEASE) | cut -d . -f 1` CYGWIN_MINOR_VERSION=`echo $(OS_RELEASE) | cut -d . -f 2` CYGWIN_REVISION=`echo $(OS_RELEASE) | cut -d . -f 3` fi # # Whether to use Darwin's @executable_path dynamic linker feature # EPATH_WV_BUILD_FLAGS="" AC_ARG_WITH(epath,[ --without-epath hardcode relative install path in libwv (MacOS X only)],[ if test "x$withval" = "xno"; then abi_epath=no elif test "$OS_NAME" = "Darwin"; then abi_epath=yes EPATH_WV_BUILD_FLAGS="EPATH_DYLIB=1" else AC_MSG_ERROR([* * * --with-epath is a MacOS X option * * *]) fi ],[ if test "$OS_NAME" = "Darwin"; then abi_epath=yes EPATH_WV_BUILD_FLAGS="EPATH_DYLIB=1" else abi_epath=no fi ]) AM_CONDITIONAL(ABI_EPATH_DYLIB,[test $abi_epath = yes]) AC_SUBST(EPATH_WV_BUILD_FLAGS) # # convenience option for building with fink installed... # AC_ARG_WITH(fink,[ --with-fink add /sw/... to CPP/LDFLAGS (Mac OSX)],[ if test "x$withval" != "xno"; then CPPFLAGS="$CPPFLAGS -I/sw/include" LDFLAGS="$LDFLAGS -L/sw/lib" fi ]) # # 1. Whether to consider using Cocoa API: # AC_ARG_ENABLE(Cocoa,[ --disable-Cocoa don't use Cocoa API (MacOSX builds only)],[ if [ test "x$enableval" = "xno" ]; then abi_gui_cocoa=no else abi_gui_cocoa=yes fi ],abi_gui_cocoa=yes) # # 2. Whether to consider using Carbon API: # # I scraped Carbon stuff (Hub) # # 3. Default to Cocoa, then Carbon, then GTK # (Values are equivalent to PLATFORM setting) # if [ test $abi_gui_cocoa = yes ]; then abi_gui=cocoa else abi_gui=unix fi # # 4. For Cocoa or Carbon, recognize Darwin as MACOSX; otherwise, recognize as FreeBSD # if test "$OS_NAME" = "Darwin"; then if [ test $abi_gui = unix ]; then OS_NAME=FreeBSD else OS_NAME=MACOSX fi fi # At this point, we now have the following info: # OS_NAME = something like 'Linux' # OS_RELEASE = something like '2.4.1' # Additionally, there may be info about Cygwin versions. dnl why not call AC_CANONICAL_HOST or AC_CANONICAL_SYSTEM and dnl use those values instead? case "$OS_NAME" in MACOSX) # the default for MacOS X is to no enable warnings with # the Apple-derived gcc. WARNING_CFLAGS="" ;; *BSD) WARNING_CFLAGS="-Wall -pedantic -ansi -D_BSD_SOURCE -pipe" ;; IRIX*) case "$GCC" in yes) WARNING_CFLAGS="-Wall -pedantic -ansi -D_POSIX_SOURCE -pipe" ;; no) # the default with the IRIX compiler is for warnings to be # on. You can turn individual warnings off using the # `-woff #' directive to the MIPSpro compiler. WARNING_CFLAGS="" ;; esac ;; SunOS) case "$GCC" in yes) # why -D_BSD_SOURCE? WARNING_CFLAGS="-Wall -pedantic -ansi -D_BSD_SOURCE -pipe" WARNING_CFLAGS="$WARNING_CFLAGS -D__EXTENSIONS__ -DSCANDIR_MISSING -DSunOS" ;; no) # the default with the SparcWorks 5.x and Forte 6.x and # later is for all warnings to be on. See the # -erroff and -errtags section of the cc man page. WARNING_CFLAGS="" ;; esac ;; OSF1) case "$GCC" in yes) WARNING_CFLAGS="-Wall -pedantic -ansi -D_POSIX_SOURCE -D_BSD_SOURCE -D_OSF_SOURCE -D_XOPEN_SOURCE_EXTENDED -DAES_SOURCE" ;; no) # the DEC/Compaq compiler has a plethora of options related # to warnings. Enabling `-portable' and then turning off # specific, annoying warnings may be the easiest way to go. # some versions of the compiler under 4.x might not have # supported `-portable', so leave WARNING_CFLAGS empty in # that case case "$OS_RELEASE" in V5*) no_msg='hexoctunsign,switchlong,valuepres' WARNING_CFLAGS="-portable -msg_disable $no_msg" no_msg='' ;; *) WARNING_CFLAGS="" ;; esac ;; esac ;; QNX|procnto) WARNING_CLFAGS="-w9 -ansi -D_POSIX_SOURCE" LDFLAGS="-lph -lphrender -lAp" ;; *) case "$GCC" in yes) WARNING_CFLAGS="-Wall -pedantic -ansi -D_POSIX_SOURCE" WARNING_CFLAGS="$WARNING_CFLAGS -D_BSD_SOURCE -pipe" ;; no) WARNING_CFLAGS="" ;; esac ;; esac # huge nasty case statement to actually pick the platform case "$OS_NAME" in WIN32) PLATFORM="win" ABISUITE_HOME="\$(pkgdatadir)" ;; Linux|AIX|*BSD|IRIX*|HP|OSF1|SunOS) PLATFORM="unix" ABISUITE_HOME="\$(pkgdatadir)" ;; QNX|procnto) PLATFORM="qnx" ABISUITE_HOME="\$(pkgdatadir)" ;; MACOSX) PLATFORM=$abi_gui ABISUITE_HOME="\$(pkgdatadir)" ;; BeOS) PLATFORM="beos" ABISUITE_HOME="\$(pkgdatadir)" ;; esac AC_SUBST(ABISUITE_HOME) if test "$PLATFORM" = "cocoa"; then BE_PLATFORM="unix" else BE_PLATFORM="$PLATFORM" fi AM_CONDITIONAL(BUILD_TTFTOOL,[test $BE_PLATFORM = unix]) AC_SUBST(PLATFORM) AC_SUBST(BE_PLATFORM) AC_SUBST(OS_NAME) AC_SUBST(WARNING_CFLAGS) ]) # test for glib2 AC_DEFUN([ABI_GLIB2],[ PKG_CHECK_MODULES(GLIB,glib-2.0 >= 2.0,[ dnl do we need to set these? abi_glib2=yes ],[ abi_glib2=no ]) if test $abi_glib2 = no; then AC_MSG_ERROR([$GLIB_PKG_ERRORS]) fi PKG_CHECK_MODULES(GMODULE,gmodule-2.0 >= 2.0,[ dnl do we need to set these? abi_gmodule2=yes ],[ abi_gmodule2=no ]) if test $abi_gmodule2 = no; then AC_MSG_ERROR([$GMODULE_PKG_ERRORS]) fi PKG_CHECK_MODULES(GTHREAD,gthread-2.0,[ dnl do we need to set these? abi_gthread2=yes ],[ abi_gthread2=no ]) if test $abi_gthread2 = no; then AC_MSG_ERROR([$GTHREAD_PKG_ERRORS]) else THREAD_CFLAGS="-DHAVE_THREADS=1 $GTHREAD_CFLAGS" THREAD_LIBS=$GTHREAD_LIBS fi AC_SUBST(THREAD_CFLAGS) AC_SUBST(THREAD_LIBS) AM_CONDITIONAL(HAVE_THREADS, test $abi_gthread2 = yes) ]) # test for gtk2 and libglade-2.0 AC_DEFUN([ABI_GTK2],[ ABI_GLIB2 PKG_CHECK_MODULES(GTK,[ gtk+-2.0 >= 2.2.0 libglade-2.0 >= 2.0.0 ],[ abi_gtk2=yes ],[ abi_gtk2=no ]) if test $abi_gtk2 = no; then AC_MSG_ERROR([$GTK_PKG_ERRORS]) else GTK_CFLAGS="$GTK_CFLAGS" #place holder #GTK_CFLAGS="$GTK_CFLAGS -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED" AC_SUBST(GTK_CFLAGS) fi dnl since gtk+ doesn't add the X libraries into its dependency list we dnl need to add them here dnl AC_PATH_X AC_PATH_XTRA GTK_LIBS="$GTK_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" ]) # Check for optional glib # Usage: # ABI_GLIB12_OPT(,) where = "no"|"yes" # # Pass "--with-glib=$abi_glib_opt" as option to peer wv's configure. AC_DEFUN([ABI_GLIB12_OPT], [ if [ test "x$2" = "xyes" ]; then abi_glib_opt=check else abi_glib_opt=required fi AC_ARG_WITH(glib,[ --with-glib[=DIR] Use glib (v1.2) [in DIR] ],[ if [ test "x$withval" = "xno" ]; then if [ test $abi_glib_opt = required ]; then AC_MSG_ERROR([* * * glib-1.2 is not optional! * * *]) fi abi_glib_opt=no elif [ test "x$withval" = "xyes" ]; then abi_glib_opt=required GLIB_DIR="" else abi_glib_opt=required GLIB_DIR="$withval" fi ],[ GLIB_DIR="" ]) if [ test $abi_glib_opt != no ]; then if [ test "x$GLIB_DIR" = "x" ]; then AC_PATH_PROG(GLIB_CONFIG,glib12-config, ,[$PATH]) else AC_PATH_PROG(GLIB_CONFIG,glib12-config, ,[$GLIB_DIR/bin:$PATH]) fi if [ test "x$GLIB_CONFIG" = "x" ]; then if [ test "x$GLIB_DIR" = "x" ]; then AC_PATH_PROG(GLIB_CONFIG,glib-config, ,[$PATH]) else AC_PATH_PROG(GLIB_CONFIG,glib-config, ,[$GLIB_DIR/bin:$PATH]) fi fi if [ test "x$GLIB_CONFIG" = "x" ]; then if [ test $abi_glib_opt = required ]; then AC_MSG_ERROR([* * * unable to find glib12-config or glib-config in path! * * *]) fi abi_glib_opt=no fi fi if [ test $abi_glib_opt != no ]; then if [ $GLIB_CONFIG --version > /dev/null 2>&1 ]; then abi_glib_opt_version=`$GLIB_CONFIG --version` abi_glib_opt_major=`echo $abi_glib_opt_version | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` abi_glib_opt_minor=`echo $abi_glib_opt_version | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` abi_glib_opt_micro=`echo $abi_glib_opt_version | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` abi_glib_opt_version="" if [ test $abi_glib_opt_major -eq 1 ]; then if [ test $abi_glib_opt_minor -eq 2 ]; then if [ test $abi_glib_opt_micro -ge "$1" ]; then abi_glib_opt_version="1.2.$abi_glib_opt_micro" fi fi fi if [ test "x$abi_glib_opt_version" = "x" ]; then if [ test $abi_glib_opt = required ]; then AC_MSG_ERROR([* * * glib version is incompatible! require at least "1.2.$1" * * *]) fi abi_glib_opt=no fi else AC_MSG_WARN([* * * problem obtaining glib version... * * *]) if [ test $abi_glib_opt = required ]; then AC_MSG_ERROR([* * * unable to determine glib version! * * *]) fi abi_glib_opt=no fi fi if [ test $abi_glib_opt != no ]; then dnl Pass "--with-glib=$abi_glib_opt" as option to peer wv's configure dnl if [ test "x$GLIB_DIR" = "x" ]; then abi_glib_opt=yes else abi_glib_opt="$GLIB_DIR" fi fi ]) # On unix, check for glib library. # On mac, check for glib, but it's optional; module support unnecessary. # Ensure that the version number of glib is >= 1.2.0 # Usage: # ABI_GLIB # AC_DEFUN([ABI_GLIB], [ dnl Perhaps this should be: dnl dnl if test "$BE_PLATFORM" = "unix"; then dnl dnl which would eliminate the cocoa distinction... ?? if test "$PLATFORM" = "unix"; then ABI_GLIB12_OPT(0,no) GMODULE_CFLAGS=`$GLIB_CONFIG --cflags gmodule` GMODULE_LIBS=`$GLIB_CONFIG --libs gmodule` AC_SUBST(GMODULE_CFLAGS) AC_SUBST(GMODULE_LIBS) elif test "$PLATFORM" = "mac"; then ABI_GLIB12_OPT(0,yes) if [ test "x$abi_glib_opt" = "xno" ]; then GLIB_CFLAGS="" GLIB_LIBS="" else GLIB_CFLAGS=`$GLIB_CONFIG --cflags` GLIB_LIBS=`$GLIB_CONFIG --libs` fi AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) elif test "$PLATFORM" = "cocoa"; then ABI_GLIB12_OPT(0,no) GLIB_CFLAGS=`$GLIB_CONFIG --cflags` GLIB_LIBS=`$GLIB_CONFIG --libs` AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) fi ]) dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page dnl also defines GSTUFF_PKG_ERRORS on error AC_DEFUN(PKG_CHECK_MODULES, [ succeeded=no if test -z "$PKG_CONFIG"; then AC_PATH_PROG(PKG_CONFIG, pkg-config, no) fi if test "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then AC_MSG_CHECKING(for $2) if $PKG_CONFIG --exists "$2" ; then AC_MSG_RESULT(yes) succeeded=yes AC_MSG_CHECKING($1_CFLAGS) $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` AC_MSG_RESULT($$1_CFLAGS) AC_MSG_CHECKING($1_LIBS) $1_LIBS=`$PKG_CONFIG --libs "$2"` AC_MSG_RESULT($$1_LIBS) else $1_CFLAGS="" $1_LIBS="" ## If we have a custom action on failure, don't print errors, but ## do set a variable so people can do so. $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` ifelse([$4], ,echo $$1_PKG_ERRORS,) fi AC_SUBST($1_CFLAGS) AC_SUBST($1_LIBS) else echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." echo "*** See http://www.freedesktop.org/software/pkgconfig" fi fi if test $succeeded = yes; then ifelse([$3], , :, [$3]) else ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) fi ]) # start: abi/ac-helpers/abi-thread.m4 # # Copyright (C) 2002 Francis James Franklin # Copyright (C) 2002 AbiSource, Inc # # This file is free software; you may copy and/or distribute it with # or without modifications, as long as this notice is preserved. # This software is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. # # The above license applies to THIS FILE ONLY, the abiword code # itself may be copied and distributed under the terms of the GNU # GPL, see COPYING for more details # # This file detects which of the AbiWord platforms we are currently # building on. The detection logic in question is mostly by Jeff # Hostetler, and is taken from the original AbiWord build system. # # Usage: ABI_THREAD AC_DEFUN([ABI_THREAD],[ AC_ARG_ENABLE(threads,[ --enable-threads use (posix) threads],[ if test "x$enableval" = "xno"; then abi_threads=no else abi_threads=yes fi ],[ abi_threads=check ]) if test $abi_threads != no; then AC_CHECK_HEADER(pthread.h,[ AC_CHECK_FUNC(pthread_create,[ abi_pthread_libs="" AC_CHECK_FUNC(pthread_yield,abi_pthread_yield=yes,abi_pthread_yield=no) ],[ AC_CHECK_LIB(pthread,pthread_exit,[ abi_pthread_libs="-lpthread" AC_CHECK_LIB(pthread,pthread_yield,[ abi_pthread_yield=yes ],[ abi_pthread_yield=no ]) ],[ AC_MSG_ERROR([* * * posix threads broken? * * *]) ]) ]) ],[ if test $abi_threads = yes; then AC_MSG_ERROR([* * * only posix threads supported currently * * *]) fi abi_threads=no ]) fi if test $abi_threads != no; then THREAD_CFLAGS="-DHAVE_THREADS=1 -DHAVE_POSIX_THREADS=1" THREAD_LIBS="$abi_pthread_libs" if test "x$abi_pthread_yield" = "xyes"; then THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_PTHREAD_YIELD=1" fi abi_threads=yes else THREAD_CFLAGS="" THREAD_LIBS="" fi AM_CONDITIONAL(HAVE_THREADS, test $abi_threads = yes) AC_SUBST(THREAD_CFLAGS) AC_SUBST(THREAD_LIBS) ]) # # end: abi/ac-helpers/abi-thread.m4 # # start: abi/ac-helpers/abi-iconv.m4 # # Copyright (C) 2002 Francis James Franklin # Copyright (C) 2002 AbiSource, Inc # # This file is free software; you may copy and/or distribute it with # or without modifications, as long as this notice is preserved. # This software is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. # # The above license applies to THIS FILE ONLY, the abiword code # itself may be copied and distributed under the terms of the GNU # GPL, see COPYING for more details # # This file detects which of the AbiWord platforms we are currently # building on. The detection logic in question is mostly by Jeff # Hostetler, and is taken from the original AbiWord build system. # # Usage: ABI_DETECT_ICONV AC_DEFUN([ABI_DETECT_ICONV], [ dnl iconv is simply the funnest dnl dnl 1. Very old platforms don't have it - fair enough. dnl 2. Old (and, alas, even some new) platforms have it broken. dnl 3. Some new platforms have it. dnl 4. Some people have libiconv installed. dnl 5. Some people want/need to use peer libiconv. abi_wv_iconv="" ABI_LIBICONV_DIR="" AC_ARG_WITH(libiconv,[ --with-libiconv=DIR use libiconv in DIR],[ if [ test "$withval" = "no" ]; then abi_libiconv=no elif [ test "$withval" = "yes" ]; then abi_libiconv=yes elif [ test "$withval" = "peer" ]; then abi_libiconv=peer else abi_libiconv=sys ABI_LIBICONV_DIR="$withval" fi ],[ abi_libiconv=check ]) if test $abi_libiconv = peer; then abi_iconv=peer else if test $abi_libiconv = sys; then _abi_cppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I$ABI_LIBICONV_DIR/include" fi # test for existence & nature of iconv.h AC_CHECK_HEADER(iconv.h,[ AC_TRY_COMPILE([ #include ],[ #ifndef _LIBICONV_VERSION * * /* not (or old?) libiconv */ * * #endif #if _LIBICONV_VERSION < 0x0107 * * /* old stuff */ * * #endif ],[ if test $abi_libiconv = no; then AC_MSG_ERROR([found libiconv - can I use it?]) fi abi_iconv=sys_libiconv ],[ if test $abi_libiconv = sys; then AC_MSG_ERROR([(usable) libiconv not found]) fi if test $abi_libiconv = yes; then AC_MSG_WARN([libiconv not found in system location]) abi_iconv=peer else abi_iconv=sys_iconv fi ]) ],[ abi_iconv=peer ]) if test $abi_libiconv = sys; then CPPFLAGS="$_abi_cppflags" fi fi LIBICONV_PEERDIR="$abi_rootdir/libiconv" if test $abi_iconv = peer; then AC_MSG_CHECKING(for libiconv in peer directory) if test -d $LIBICONV_PEERDIR; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) AC_MSG_ERROR([unable to use libiconv - no peer found]) fi abi_iconv_message="peer libiconv" ICONV_INCLUDES='-I$(top_builddir)/../libiconv/include' ICONV_LIBS='$(top_builddir)/../libiconv/lib/.libs/libiconv.a' abi_wv_iconv="--with-peer-iconv=abi" PEERDIRS="${PEERDIRS} ${LIBICONV_PEERDIR}" PEERS="${PEERS} libiconv" elif test $abi_iconv = sys_libiconv; then if test $abi_libiconv = sys; then abi_iconv_message="libiconv in -L$ABI_LIBICONV_DIR/lib -liconv" ICONV_INCLUDES="-I$ABI_LIBICONV_DIR/include" ICONV_LIBS="-L$ABI_LIBICONV_DIR/lib -liconv" abi_wv_iconv="--with-libiconv=$withval" else abi_iconv_message="libiconv in -liconv" ICONV_INCLUDES="" ICONV_LIBS="-liconv" abi_wv_iconv="--with-libiconv" fi else abi_iconv_message="system iconv" ICONV_INCLUDES="" ICONV_LIBS="" abi_wv_iconv="--without-libiconv" fi AC_SUBST(LIBICONV_PEERDIR) AC_SUBST(ICONV_INCLUDES) AC_SUBST(ICONV_LIBS) ]) # # end: abi/ac-helpers/abi-iconv.m4 # # start: abi/ac-helpers/abi-gnome.m4 # # Copyright (C) 2002-2003 AbiSource, Inc # # This file is free software; you may copy and/or distribute it with # or without modifications, as long as this notice is preserved. # This software is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. # # The above license applies to THIS FILE ONLY, the abiword code # itself may be copied and distributed under the terms of the GNU # GPL, see COPYING for more details # # This file detects which of the AbiWord platforms we are currently # building on. The detection logic in question is mostly by Jeff # Hostetler, and is taken from the original AbiWord build system. # # Usage: ABI_GNOME_QUICK AC_DEFUN([ABI_GNOME_QUICK], [ dnl Quick&Easy GNOME Detection gnome=false GNOME_CFLAGS="" GNOME_LIBS="" AC_ARG_ENABLE(gnome,[ --enable-gnome Turn on gnome ],[ if test "x$enableval" = "xyes"; then if test "$PLATFORM" != unix; then AC_MSG_ERROR([sorry: --enable-gnome supported only on UNIX platforms]) fi gnome=true fi ]) if test "$gnome" = true ; then NAUTILUS_CFLAGS="" NAUTILUS_LIBS="" PKG_CHECK_MODULES(GNOME,[ libbonobo-2.0 >= 2.0 libgnomeui-2.0 >= 2.0 libgnomeprint-2.2 >= 2.2.1 libgnomeprintui-2.2 >= 2.2.1 libglade-2.0 >= 2.0 ]) PKG_CHECK_MODULES(NAUTILUS,[ libnautilus >= 2.0 ],[ gnome_nautilus=yes ],[ gnome_nautilus=no ]) if test "x$gnome_nautilus" = "xyes"; then NAUTILUS_CFLAGS="$NAUTILUS_CFLAGS -DHAVE_NAUTILUS=1" fi GNOME_CFLAGS="$NAUTILUS_CFLAGS $GNOME_CFLAGS -DHAVE_GNOME=1" GNOME_LIBS="$NAUTILUS_LIBS $GNOME_LIBS" fi #GNOME_CFLAGS="-DGNOME_DISABLE_DEPRECATED $GNOME_CFLAGS" AC_SUBST(GNOME_CFLAGS) AC_SUBST(GNOME_LIBS) AM_CONDITIONAL(WITH_GNOME, test "x$gnome" = "xtrue") ]) # # end: abi/ac-helpers/abi-gnome.m4 # # start: abi/ac-helpers/abi-gucharmap.m4 # # Copyright (C) 2003 Dom Lachowicz # Copyright (C) 2003 AbiSource, Inc # # This file is free software; you may copy and/or distribute it with # or without modifications, as long as this notice is preserved. # This software is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. # # The above license applies to THIS FILE ONLY, the abiword code # itself may be copied and distributed under the terms of the GNU # GPL, see COPYING for more details # # Usage: ABI_GUCHARMAP dnl Check for gucharmap AC_DEFUN([ABI_GUCHARMAP], [ test_cmap=true have_cmap=false GUCHARMAP_CFLAGS="" GUCHARMAP_LIBS="" AC_ARG_ENABLE(cmap,[ --disable-gucharmap Turn off gucharmap ], [ if test "x$enableval" = "xno"; then test_cmap=false fi ]) if test "x$test_cmap" = "xtrue" ; then PKG_CHECK_MODULES(GUCHARMAP,[gucharmap >= 0.7, gucharmap < 1.3.0], [have_cmap=true], [have_cmap=false]) fi if test "x$have_cmap" = "xtrue" ; then GUCHARMAP_CFLAGS="$GUCHARMAP_CFLAGS -DUSE_GUCHARMAP" fi AC_SUBST(GUCHARMAP_CFLAGS) AC_SUBST(GUCHARMAP_LIBS) AM_CONDITIONAL(WITH_GUCHARMAP, test "x$cmap" = "xtrue") ]) # # end: abi/ac-helpers/abi-gucharmap.m4 # # start: abi/ac-helpers/abi-xft.m4 # # Copyright (C) 2002 AbiSource, Inc # # This file is free software; you may copy and/or distribute it with # or without modifications, as long as this notice is preserved. # This software is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. # # The above license applies to THIS FILE ONLY, the abiword code # itself may be copied and distributed under the terms of the GNU # GPL, see COPYING for more details # # This file detects which of the AbiWord platforms we are currently # building on. The detection logic in question is mostly by Jeff # Hostetler, and is taken from the original AbiWord build system. # # Usage: ABI_XFT_QUICK AC_DEFUN([ABI_XFT_QUICK], [ dnl Quick&Easy Xft2 Detection FREETYPE_CFLAGS="" FREETYPE_LIBS="" AC_SUBST(FREETYPE_CFLAGS) AC_SUBST(FREETYPE_LIBS) XFT_CFLAGS="" XFT_LIBS="" xft=true if test "$PLATFORM" != unix; then xft=false fi if test "x$xft" = "xtrue" ; then PKG_CHECK_MODULES(XFT,[xft >= 2.0 fontconfig >= 1.0]) XFT_CFLAGS="$XFT_CFLAGS" fi AC_SUBST(XFT_CFLAGS) AC_SUBST(XFT_LIBS) AM_CONDITIONAL(WITH_XFT, test "x$xft" = "xtrue") ]) # # end: abi/ac-helpers/abi-xft.m4 # # start: abi/ac-helpers/abi-spell.m4 # # Copyright (C) 2002 Francis James Franklin # Copyright (C) 2002 AbiSource, Inc # # This file is free software; you may copy and/or distribute it with # or without modifications, as long as this notice is preserved. # This software is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. # # The above license applies to THIS FILE ONLY, the abiword code # itself may be copied and distributed under the terms of the GNU # GPL, see COPYING for more details # # Usage: ABI_SPELL AC_DEFUN([ABI_SPELL],[ dnl Check for pspell SPELL_CFLAGS="" SPELL_LIBS="" abi_spell=check AC_ARG_ENABLE(enchant,[ --disable-enchant don't use enchant spell-wrapper],[ if test "x$enableval" = "xno"; then abi_spell=disenchanted fi ]) if test $abi_spell = check; then PKG_CHECK_MODULES(_abi_enchant,[enchant >= 0.4.0],[ abi_spell=enchant ],[ abi_spell=check ]) fi if test $abi_spell = enchant; then SPELL_CFLAGS="$_abi_enchant_CFLAGS -DHAVE_ENCHANT=1" SPELL_LIBS="$_abi_enchant_LIBS" abi_spell_message="enchant" else ABI_SPELL_CHECK fi AM_CONDITIONAL(WITH_ENCHANT,[test $abi_spell = enchant]) AM_CONDITIONAL(WITH_PSPELL, [test $abi_spell = pspell]) AM_CONDITIONAL(WITH_ISPELL, [test $abi_spell = ispell]) ]) AC_DEFUN([ABI_SPELL_CHECK],[ ABI_PSPELL_OPT(0.12.0,yes) if test "$abi_pspell_opt" = yes; then if test "$abi_gnu_aspell" = no; then abi_spell_message="pspell in system location" else abi_spell_message="GNU aspell in system location" fi abi_spell=psyspell elif test "$abi_pspell_opt" != no; then if test "$abi_gnu_aspell" = no; then abi_spell_message="pspell in $abi_pspell_opt" else abi_spell_message="GNU aspell in $abi_pspell_opt" fi abi_spell=pspell else abi_spell=ispell fi if test $abi_spell != ispell; then if test "$abi_gnu_aspell" = no; then abi_pspell_cflags="" abi_pspell_libs="-lpspell -lpspell-modules -lltdl" else abi_pspell_cflags="" dnl mg: if these were meant to be the same there wouldn't be dnl a need for both... change the second one if you like, dnl but leave abi_pspell_libs alone! dnl abi_pspell_libs="-lpspell -lpspell-common -lltdl" abi_aspell_libs="-laspell" fi if test $abi_spell = pspell; then abi_pspell_cflags="-I$abi_pspell_opt/include" abi_pspell_libs="-L$abi_pspell_opt/lib $abi_pspell_libs" _abi_cppflags="$CPPFLAGS" _abi_ldflags="$LDFLAGS" CPPFLAGS="$CPPFLAGS $abi_pspell_cflags" LDFLAGS="$LDFLAGS -L$abi_pspell_opt/lib" fi AC_CHECK_HEADER(pspell/pspell.h,[ abi_have_new_pspell_config=no abi_have_new_aspell_config=no abi_spell_default=no AC_CHECK_LIB(pspell,new_pspell_config,[ SPELL_LIBS="$abi_pspell_libs" SPELL_CFLAGS="$abi_pspell_cflags -DHAVE_PSPELL=1" abi_have_new_pspell_config=yes ],[ abi_have_new_pspell_config=no AC_CHECK_LIB(pspell,new_aspell_config,[ SPELL_LIBS="$abi_pspell_libs" SPELL_CFLAGS="$abi_pspell_cflags -DHAVE_PSPELL=1" abi_have_new_aspell_config=yes ],[ AC_CHECK_LIB(aspell,delete_aspell_config,[ SPELL_LIBS="$abi_aspell_libs" SPELL_CFLAGS="$abi_pspell_cflags -DHAVE_PSPELL=1" abi_have_new_aspell_config=yes ],[ abi_have_new_aspell_config=no abi_spell_default=yes ],$abi_aspell_libs) ],$abi_pspell_libs) ],$abi_pspell_libs) ],[ abi_spell_default=yes ]) if test $abi_spell_default = yes; then AC_MSG_WARN([* * * pspell not found in system location * * *]) fi if test $abi_spell = pspell; then CPPFLAGS="$_abi_cppflags" LDFLAGS="$_abi_ldflags" else abi_spell=pspell fi if test $abi_spell_default = yes; then abi_spell=ispell fi fi if test $abi_spell = ispell; then abi_spell_message="(ispell)" SPELL_CFLAGS="-DHAVE_ISPELL=1" fi AC_SUBST(SPELL_CFLAGS) AC_SUBST(SPELL_LIBS) ]) dnl Namespaces are "abi_pspell_*" and "_abi_pspell_*"; also "abi_gnu_aspell" dnl dnl Usage: dnl ABI_PSPELL_OPT(,[,"no"]) where = "no"|"yes" dnl dnl Defines: dnl abi_pspell_opt=[yes|no|DIR] dnl abi_pspell_config (if abi_pspell_opt != no) dnl abi_pspell_version (if abi_pspell_opt != no) dnl dnl abi_gnu_aspell=[yes|no] # Check for optional pspell AC_DEFUN([ABI_PSPELL_OPT], [ abi_pspell_config="" abi_pspell_version="" if [ test "x$2" = "xyes" ]; then abi_pspell_opt=check else abi_pspell_opt=required fi AC_ARG_ENABLE(pspell,[ --disable-pspell Use pspell [in DIR] ],[ if test "x$enableval" = "xno"; then if test $abi_pspell_opt = required; then AC_MSG_ERROR([* * * pspell is not optional! * * *]) else abi_pspell_opt=no fi else abi_pspell_opt=required fi ]) AC_ARG_WITH(pspell,[ --with-pspell[=DIR] Use pspell [in DIR] ],[ if test $abi_pspell_opt != no; then if test "x$withval" = "xno"; then if [ test $abi_pspell_opt = required ]; then AC_MSG_ERROR([* * * pspell is not optional! * * *]) fi abi_pspell_opt=no elif test "x$withval" = "xyes"; then abi_pspell_opt=required abi_pspell_dir="" else abi_pspell_opt=required abi_pspell_dir="$withval" fi fi ],[ abi_pspell_dir=$3 ]) if [ test $abi_pspell_opt != no ]; then if [ test "x$abi_pspell_dir" = "x" ]; then AC_PATH_PROG(abi_pspell_config,pspell-config, ,[$PATH]) else AC_PATH_PROG(abi_pspell_config,pspell-config, ,[$abi_pspell_dir/bin:$PATH]) fi if [ test "x$abi_pspell_config" = "x" ]; then if [ test $abi_pspell_opt = required ]; then AC_MSG_ERROR([* * * unable to find pspell-config in path! * * *]) fi abi_pspell_opt=no fi fi if [ test $abi_pspell_opt != no ]; then if [ $abi_pspell_config --version > /dev/null 2>&1 ]; then _abi_pspell_version="$1" _abi_pspell_major=`echo $_abi_pspell_version | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` _abi_pspell_minor=`echo $_abi_pspell_version | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` _abi_pspell_micro=`echo $_abi_pspell_version | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` AC_MSG_CHECKING(for pspell >= $_abi_pspell_major.$_abi_pspell_minor.$_abi_pspell_micro) abi_pspell_version="0`$abi_pspell_config --version | cut -d. -f1,2,3`" abi_pspell_major=`echo $abi_pspell_version | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` abi_pspell_minor=`echo $abi_pspell_version | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` abi_pspell_micro=`echo $abi_pspell_version | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` abi_pspell_version="" if [ test $abi_pspell_major -gt $_abi_pspell_major ]; then abi_pspell_version="$abi_pspell_major.$abi_pspell_minor.$abi_pspell_micro" elif [ test $abi_pspell_major -eq $_abi_pspell_major ]; then if [ test $abi_pspell_minor -gt $_abi_pspell_minor ]; then abi_pspell_version="$abi_pspell_major.$abi_pspell_minor.$abi_pspell_micro" elif [ test $abi_pspell_minor -eq $_abi_pspell_minor ]; then if [ test $abi_pspell_micro -ge $_abi_pspell_micro ]; then abi_pspell_version="$abi_pspell_major.$abi_pspell_minor.$abi_pspell_micro" fi fi fi abi_gnu_aspell="no" if [ test $abi_pspell_major -gt 0 ]; then abi_gnu_aspell="yes" elif [ test $abi_pspell_major -eq 0 ]; then if [ test $abi_pspell_minor -ge 50 ]; then abi_gnu_aspell="yes" fi fi if [ test "x$abi_pspell_version" = "x" ]; then if [ test $abi_pspell_opt = required ]; then AC_MSG_ERROR([* * * pspell version is incompatible! require at least "1.2.$1" * * *]) fi abi_pspell_opt=no AC_MSG_RESULT(no - $abi_pspell_major.$abi_pspell_minor.$abi_pspell_micro) else abi_real_pspell_version=`echo $abi_pspell_version | sed 's/00/0/'` AC_MSG_RESULT(yes - $abi_real_pspell_version) fi else AC_MSG_WARN([* * * problem obtaining pspell version... * * *]) if [ test $abi_pspell_opt = required ]; then AC_MSG_ERROR([* * * unable to determine pspell version! * * *]) fi abi_pspell_opt=no fi fi if [ test $abi_pspell_opt != no ]; then if [ test "x$abi_pspell_dir" = "x" ]; then abi_pspell_opt=yes else abi_pspell_opt="$abi_pspell_dir" fi fi ]) # # end: abi/ac-helpers/abi-pspell.m4 # # start: abi/ac-helpers/abi-fribidi.m4 # # Copyright (C) 2003 Francis James Franklin # Copyright (C) 2003 AbiSource, Inc # # This file is free software; you may copy and/or distribute it with # or without modifications, as long as this notice is preserved. # This software is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. # # The above license applies to THIS FILE ONLY, the abiword code # itself may be copied and distributed under the terms of the GNU # GPL, see COPYING for more details # # Usage: ABI_FRIBIDI AC_DEFUN([ABI_FRIBIDI],[ dnl detects fribidi FRIBIDI_CFLAGS="" FRIBIDI_LIBS="" PKG_CHECK_MODULES(FRIBIDI,[fribidi >= 0.10.4],[ abi_fribidi=yes ],[ echo "" echo "fribidi sources can be downloaded from SourceForge" echo "" echo " http://sourceforge.net/projects/fribidi" echo "" echo "Note: Don't use the fribidi source which is sometimes" echo " included with AbiWord since that version is for" echo " Windows only." AC_MSG_ERROR([* * * fribidi >= 0.10.4 is required * * *]) ]) FRIBIDI_CFLAGS="$FRIBIDI_CFLAGS" AC_SUBST(FRIBIDI_CFLAGS) AC_SUBST(FRIBIDI_LIBS) ]) # # end: abi/ac-helpers/abi-fribidi.m4 # # start: abi/ac-helpers/abi-plugins.m4 # # Copyright (C) 2003 Francis James Franklin # Copyright (C) 2003 AbiSource, Inc # # This file is free software; you may copy and/or distribute it with # or without modifications, as long as this notice is preserved. # This software is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. # # The above license applies to THIS FILE ONLY, the abiword code # itself may be copied and distributed under the terms of the GNU # GPL, see COPYING for more details # # Usage: ABI_PLUGINS AC_DEFUN([ABI_PLUGINS],[ dnl plugin configuration - if any PLUGIN_CFLAGS="" PLUGIN_LIBS="" PLUGIN_LIST="" PLUGIN_DEFS="" abi_builtin_plugins=no _abi_plugin_list="" AC_ARG_WITH(builtin_plugins,[ --with-builtin-plugins (experimental) compile-in a selection of plugins],[ if test "$withval" != "no"; then abi_builtin_plugins=yes PLUGIN_CFLAGS="-DABI_PLUGIN_BUILTIN=1" if test "$withval" != "yes"; then _abi_plugin_list=`echo $withval | tr ',' ' '` elif test -d ../abiword-plugins; then _abi_pwd=`pwd` cd ../abiword-plugins for i in `find . -name "*.a" -print`; do i=`dirname $i`; i=`dirname $i`; i=`dirname $i`; i=`basename $i`; if test "$i" != "."; then _abi_plugin_list="$_abi_plugin_list $i" fi done cd $_abi_pwd fi fi ]) if test $abi_builtin_plugins = yes; then dnl the real problem is, of course, PLUGIN_LIBS - the various libraries that dnl these depend on... for p in $_abi_plugin_list; do echo "configuring for plugin '"$p"':" case $p in abicommand) _abi_plugin_lib=AbiCommand ABI_COMMAND_LDFLAGS="" have_readline=unknown AC_CHECK_HEADER(readline/readline.h,[ AC_CHECK_HEADER(readline/history.h,[ AC_CHECK_LIB(readline,readline,[ have_readline=yes LDFLAGS="-ltermcap $LDFLAGS" ABI_COMMAND_LDFLAGS="-ltermcap $ABI_COMMAND_LDFLAGS" ],[ AC_CHECK_LIB(readline,rl_initialize,[ have_readline=yes LDFLAGS="-lcurses $LDFLAGS" ABI_COMMAND_LDFLAGS="-lcurses $ABI_COMMAND_LDFLAGS" ],have_readline=no,-lcurses) ],-ltermcap) ],have_readline=no) ],have_readline=no) if test $have_readline != yes; then AC_MSG_ERROR([abicommand: error - readline libs or hdrs not found]) else PLUGIN_LIBS="$PLUGIN_LIBS -lreadline -lhistory $ABI_COMMAND_LDFLAGS" fi ;; abigimp) _abi_plugin_lib=AbiGimp ;; aiksaurus) _abi_plugin_lib=AbiAikSaurus ;; babelfish) _abi_plugin_lib=AbiBabelfish ;; freetranslation) _abi_plugin_lib=AbiFreeTranslation ;; gda) _abi_plugin_lib=AbiGDA ;; gdict) _abi_plugin_lib=AbiGdict ;; google) _abi_plugin_lib=AbiGoogle ;; gypsython) _abi_plugin_lib=AbiGypsython ;; ots) _abi_plugin_lib=AbiOTS PKG_CHECK_MODULES(_abi_ots,libots-1 >= 0.2.0) PLUGIN_LIBS="$PLUGIN_LIBS $_abi_ots_LIBS" ;; referee) _abi_plugin_lib=AbiReferee ;; urldict) _abi_plugin_lib=AbiURLDict ;; wikipedia) _abi_plugin_lib=AbiWikipedia ;; applix) _abi_plugin_lib=AbiApplix ;; bz2abw) _abi_plugin_lib=AbiBZ2 ;; clarisworks) _abi_plugin_lib=AbiClarisWorks ;; coquille) _abi_plugin_lib=AbiCoquille ;; docbook) _abi_plugin_lib=AbiDocBook ;; eml) _abi_plugin_lib=AbiEML ;; AbiGdkPixbuf) _abi_plugin_lib=AbiGdkPixbuf ;; bmp) _abi_plugin_lib=AbiBMP ;; jpeg) _abi_plugin_lib=AbiJPEG PLUGIN_LIBS="$PLUGIN_LIBS -ljpeg" ;; librsvg) _abi_plugin_lib=AbiRSVG ;; magick) _abi_plugin_lib=AbiMagick ABI_MAGICKPP_OPT(5.4.0,no) PLUGIN_LIBS="$PLUGIN_LIBS `$abi_magickpp_config --ldflags` `$abi_magickpp_config --libs`" ;; wmf) _abi_plugin_lib=AbiWMF ;; hancom) _abi_plugin_lib=AbiHancom ;; hrtext) _abi_plugin_lib=AbiHRText ;; iscii-text) _abi_plugin_lib=AbiISCII ;; kword) _abi_plugin_lib=AbiKWord ;; latex) _abi_plugin_lib=AbiLaTeX ;; mif) _abi_plugin_lib=AbiMIF ;; mswrite) _abi_plugin_lib=AbiMSWrite ;; nroff) _abi_plugin_lib=AbiNroff ;; OpenWriter) _abi_plugin_lib=AbiOpenWriter PKG_CHECK_MODULES(_abi_openwriter,libgsf-1 >= 1.4.0) PLUGIN_LIBS="$PLUGIN_LIBS $_abi_openwriter_LIBS" ;; pdb) _abi_plugin_lib=AbiPalmDoc ;; psion) _abi_plugin_lib=AbiPsion ;; pw) _abi_plugin_lib=AbiPW ;; sdw) _abi_plugin_lib=AbiSDW PKG_CHECK_MODULES(_abi_sdw,libgsf-1 >= 1.4.0) PLUGIN_LIBS="$PLUGIN_LIBS $_abi_sdw_LIBS" ;; t602) _abi_plugin_lib=AbiT602 ;; wml) _abi_plugin_lib=AbiWML ;; wordperfect) _abi_plugin_lib=AbiWordPerfect PKG_CHECK_MODULES(_abi_wordperfect,libwpd-1 >= 0.5.0) PLUGIN_LIBS="$PLUGIN_LIBS $_abi_wordperfect_LIBS" ;; xhtml) _abi_plugin_lib=AbiXHTML ;; xsl-fo) _abi_plugin_lib=AbiXSLFO ;; shell) _abi_plugin_lib=AbiScriptHappy ;; *) AC_MSG_ERROR([I do not know plugin $p]) ;; esac _abi_plugin_name=`echo $p | tr '-' '_'` PLUGIN_LIST="$PLUGIN_LIST lib$_abi_plugin_lib.a" PLUGIN_DEFS="$PLUGIN_DEFS -DABIPGN_BUILTIN_`echo $_abi_plugin_name | tr '@<:@a-z@:>@' '@<:@A-Z@:>@'`=1" done fi AM_CONDITIONAL(BUILD_IN_PLUGINS,[test $abi_builtin_plugins = yes]) AC_SUBST(PLUGIN_CFLAGS) AC_SUBST(PLUGIN_LIBS) AC_SUBST(PLUGIN_LIST) AC_SUBST(PLUGIN_DEFS) ]) # # end: abi/ac-helpers/abi-plugins.m4 # dnl This is not plugin-specific. dnl Namespaces are "abi_magickpp_*" and "_abi_magickpp_*" dnl dnl Usage: dnl ABI_MAGICKPP_OPT(,) where = "no"|"yes" dnl dnl Defines: dnl abi_magickpp_opt=[yes|no|DIR] dnl abi_magickpp_config (if abi_magickpp_opt != no) dnl abi_magickpp_version (if abi_magickpp_opt != no) dnl # Check for optional ImageMagick++ AC_DEFUN([ABI_MAGICKPP_OPT], [ abi_magickpp_config="" abi_magickpp_version="" if [ test "x$2" = "xyes" ]; then abi_magickpp_opt=check else abi_magickpp_opt=required fi AC_ARG_WITH(ImageMagick,[ --with-ImageMagick[=DIR] Use ImageMagick [in DIR] ],[ if [ test "x$withval" = "xno" ]; then if [ test $abi_magickpp_opt = required ]; then AC_MSG_ERROR([* * * ImageMagick++ is not optional! * * *]) fi abi_magickpp_opt=no elif [ test "x$withval" = "xyes" ]; then abi_magickpp_opt=required abi_magickpp_dir="" else abi_magickpp_opt=required abi_magickpp_dir="$withval" fi ],[ abi_magickpp_dir="" ]) if [ test $abi_magickpp_opt != no ]; then if [ test "x$abi_magickpp_dir" = "x" ]; then AC_PATH_PROG(abi_magickpp_config,Magick++-config, ,[$PATH]) else AC_PATH_PROG(abi_magickpp_config,Magick++-config, ,[$abi_magickpp_dir/bin:$PATH]) fi if [ test "x$abi_magickpp_config" = "x" ]; then if [ test $abi_magickpp_opt = required ]; then AC_MSG_ERROR([* * * unable to find Magick++-config in path! * * *]) fi abi_magickpp_opt=no fi fi if [ test $abi_magickpp_opt != no ]; then if [ $abi_magickpp_config --version > /dev/null 2>&1 ]; then _abi_magickpp_version="$1" _abi_magickpp_major=`echo $_abi_magickpp_version | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` _abi_magickpp_minor=`echo $_abi_magickpp_version | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` _abi_magickpp_micro=`echo $_abi_magickpp_version | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` AC_MSG_CHECKING(for ImageMagick++ >= $_abi_magickpp_major.$_abi_magickpp_minor.$_abi_magickpp_micro) abi_magickpp_version=`$abi_magickpp_config --version` abi_magickpp_major=`echo $abi_magickpp_version | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` abi_magickpp_minor=`echo $abi_magickpp_version | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` abi_magickpp_micro=`echo $abi_magickpp_version | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` abi_magickpp_version="" if [ test $abi_magickpp_major -gt $_abi_magickpp_major ]; then abi_magickpp_version="$abi_magickpp_major.$abi_magickpp_minor.$abi_magickpp_micro" elif [ test $abi_magickpp_major -eq $_abi_magickpp_major ]; then if [ test $abi_magickpp_minor -gt $_abi_magickpp_minor ]; then abi_magickpp_version="$abi_magickpp_major.$abi_magickpp_minor.$abi_magickpp_micro" elif [ test $abi_magickpp_minor -eq $_abi_magickpp_minor ]; then if [ test $abi_magickpp_micro -ge $_abi_magickpp_micro ]; then abi_magickpp_version="$abi_magickpp_major.$abi_magickpp_minor.$abi_magickpp_micro" fi fi fi if [ test "x$abi_magickpp_version" = "x" ]; then if [ test $abi_magickpp_opt = required ]; then AC_MSG_ERROR([* * * ImageMagick++ version is incompatible! require at least "1.2.$1" * * *]) fi abi_magickpp_opt=no AC_MSG_RESULT(no - $abi_magickpp_major.$abi_magickpp_minor.$abi_magickpp_micro) else AC_MSG_RESULT(yes - $abi_magickpp_version) fi else AC_MSG_WARN([* * * problem obtaining ImageMagick++ version... * * *]) if [ test $abi_magickpp_opt = required ]; then AC_MSG_ERROR([* * * unable to determine ImageMagick++ version! * * *]) fi abi_magickpp_opt=no fi fi if [ test $abi_magickpp_opt != no ]; then if [ test "x$abi_magickpp_dir" = "x" ]; then abi_magickpp_opt=yes else abi_magickpp_opt="$abi_magickpp_dir" fi fi ]) # start: abi/ac-helpers/abi-c-inline.m4 # # Copyright (C) 2002 Francis James Franklin # Copyright (C) 2002 AbiSource, Inc # # This file is free software; you may copy and/or distribute it with # or without modifications, as long as this notice is preserved. # This software is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. # # The above license applies to THIS FILE ONLY, the abiword code # itself may be copied and distributed under the terms of the GNU # GPL, see COPYING for more details # # Usage: ABI_C_INLINE AC_DEFUN([ABI_C_INLINE],[ if test "$abi_c_inline" = ""; then dnl this test is the one used by autoconf in AC_C_INLINE dnl for _abi_kw in inline __inline__ __inline; do AC_TRY_COMPILE(, [} $_abi_kw foo() {], [abi_c_inline=$_abi_kw; break]) done if test "$abi_c_inline" != "inline"; then CFLAGS="-Dinline=$abi_c_inline $CFLAGS" AC_SUBST(CFLAGS) fi fi ]) # # end: abi/ac-helpers/abi-c-inline.m4 # # start: abi/ac-helpers/abi-xml-parser.m4 # # Copyright (C) 2002 Francis James Franklin # Copyright (C) 2002 AbiSource, Inc # Copyright (C) 1998-2000 Joe Orton # Copyright (C) 1998-2000 Sam Tobin-Hochstadt # # This file is free software; you may copy and/or distribute it with # or without modifications, as long as this notice is preserved. # This software is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. # # The above license applies to THIS FILE ONLY, the abiword code # itself may be copied and distributed under the terms of the GNU # GPL, see COPYING for more details # # This file detects which of the AbiWord platforms we are currently # building on. The detection logic in question is mostly by Jeff # Hostetler, and is taken from the original AbiWord build system. # # Usage: ABI_XML_PARSER # Check for XML parser. # Supports: # * libxml2 # * expat in -lexpat # * peer expat AC_DEFUN([ABI_XML_PARSER],[ if test "x$abi_xml" = "x"; then XML_CFLAGS="" XML_LIBS="" EXPAT_PEERDIR="" abi_wv_xml="" abi_xml=unknown ABI_XML_DIR= AC_ARG_WITH([libxml2],[ --with-libxml2 force use of libxml2 ],[ if test "x$withval" = "xno"; then abi_xml=expat abi_wv_xml="--with-expat" elif test "x$withval" = "xyes"; then abi_xml=xml2 abi_wv_xml="--with-libxml2" else abi_xml=xml2 ABI_XML_DIR="$withval" abi_wv_xml="--with-libxml2=$withval" fi ]) AC_ARG_WITH([expat],[ --with-expat force use of expat ],[ if test "x$withval" = "xno"; then if test $abi_xml != xml2; then AC_MSG_ERROR([* * * require either expat or libxml2 * * *]) fi abi_xml=xml2 abi_wv_xml="--with-libxml2" elif test "x$withval" = "xpeer"; then if test $abi_xml = xml2; then AC_MSG_ERROR([* * * don't specify both expat and libxml2 * * *]) fi abi_xml=peer abi_wv_xml="--with-expat=peer" elif test "x$withval" = "xyes"; then if test $abi_xml = xml2; then AC_MSG_ERROR([* * * don't specify both expat and libxml2 * * *]) fi abi_xml=expat abi_wv_xml="--with-expat" else if test $abi_xml = xml2; then AC_MSG_ERROR([* * * don't specify both expat and libxml2 * * *]) fi abi_xml=expat ABI_XML_DIR="$withval" abi_wv_xml="--with-expat=$withval" fi ]) dnl default to libxml2 dnl if test $abi_xml = unknown; then abi_xml=xml2 abi_wv_xml="--with-libxml2" fi dnl check for libxml2 dnl if test $abi_xml = xml2; then if test "x$ABI_XML_DIR" = "x"; then AC_PATH_PROG(ABI_XML_CONFIG,xml2-config, ,[$PATH]) else AC_PATH_PROG(ABI_XML_CONFIG,xml2-config, ,[$ABI_XML_DIR/bin:$PATH]) fi if test "x$ABI_XML_CONFIG" = "x"; then AC_MSG_ERROR([* * * unable to find xml2-config! require libxml2-devel * * *]) fi XML_CFLAGS="`$ABI_XML_CONFIG --cflags`" XML_LIBS="`$ABI_XML_CONFIG --libs`" abi_xml_parser_message="libxml2 in $XML_LIBS" fi dnl check for expat (installed library) dnl if test $abi_xml = expat; then if test "x$ABI_XML_DIR" != "x"; then _abi_cppflags="$CPPFLAGS" _abi_ldflags="$LDFLAGS" CPPFLAGS="$CPPFLAGS -I$ABI_XML_DIR/include" LDFLAGS="$LDFLAGS -L$ABI_XML_DIR/lib" fi AC_CHECK_HEADER(expat.h,[ AC_CHECK_LIB(expat,XML_Parse,[ XML_LIBS="-lexpat" ],[ AC_MSG_ERROR([* * * require expat-devel; or --with-expat=peer * * *]) ]) ],[ AC_MSG_ERROR([* * * require expat-devel; or --with-expat=peer * * *]) ]) if test "x$ABI_XML_DIR" != "x"; then CPPFLAGS="$_abi_cppflags" LDFLAGS="$_abi_ldflags" XML_CFLAGS="-I$ABI_XML_DIR/include" XML_LIBS="-L$ABI_XML_DIR/lib -lexpat" fi abi_xml_parser_message="expat in $XML_LIBS" fi dnl check for expat (peer) dnl if test $abi_xml = peer; then abi_xml=expat AC_MSG_CHECKING(for peer expat) if test -d "$abi_rootdir/expat"; then EXPAT_PEERDIR="$abi_rootdir/expat" AC_MSG_RESULT($EXPAT_PEERDIR) else AC_MSG_ERROR(peer expat not found) fi XML_CFLAGS="-I\$(top_builddir)/../expat/lib" XML_LIBS="\$(top_builddir)/../expat/lib/.libs/libexpat.a" abi_xml_parser_message="peer expat" PEERDIRS="${PEERDIRS} ${EXPAT_PEERDIR}" PEERS="${PEERS} expat" fi if test $abi_xml = expat; then AC_DEFINE(HAVE_EXPAT,1,[Define if you have expat]) else AC_DEFINE(HAVE_LIBXML2,1,[Define if you have libxml2]) fi AM_CONDITIONAL(HAVE_EXPAT, test $abi_xml = expat) AC_SUBST(XML_CFLAGS) AC_SUBST(XML_LIBS) AC_SUBST(EXPAT_PEERDIR) fi ]) # # end: abi/ac-helpers/abi-xml-parser.m4 # Copyright (C) 2001 Sam Tobin-Hochstadt # This file is free software; you may copy and/or distribute it with # or without modifications, as long as this notice is preserved. # This software is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. # The above license applies to THIS FILE ONLY, the abiword code # itself may be copied and distributed under the terms of the GNU # GPL, see COPYING for more details # Check for Wv library. # Supports: # * wv in -lwv # * Bundled wv if a directory name argument is passed # # Hacked from the abi-xml-parser.m4 code # # Usage: # ABI_WV # or # ABI_WV(wv-dir) AC_DEFUN([ABI_WV], [ _abi_wv_warning=no AC_ARG_WITH(sys_wv,[ --with-sys-wv Use system libwv],[ abi_sys_wv="$withval" ],[ abi_sys_wv=no ]) if test "$ABI_NEED_WV" = "yes"; then if test "x$abi_sys_wv" != "xno"; then if test "x$abi_epath" = "xyes"; then AC_MSG_ERROR([* * * system wv? I was expecting to build peer wv... * * *]) fi # check for a shared install # Thank goodness, or fjf, for using pkgconfig now. PKG_CHECK_MODULES(WV,[ wv-1.0 >= 1.0.0 ],[ abi_syswv=yes ],[ abi_syswv=no ]) if test $abi_syswv = no; then AC_MSG_ERROR([$WV_PKG_ERRORS]) else dnl should really put flags in here to ease up on the code WV_CFLAGS="$WV_CFLAGS" AC_SUBST(WV_CFLAGS) fi WV_LIBS="$WV_LIBS" AC_SUBST(WV_LIBS) abi_wv_message="$WV_LIBS" else # otherwise, use the sources given as an argument. [ this means the # peer dir for abi ] AC_MSG_CHECKING(for wv) if test "x$1" != "x" && test -d "$1"; then _abi_wv_pdir="$1" abi_wv_path=`cd $_abi_wv_pdir; pwd` AC_MSG_RESULT($abi_wv_path) else AC_MSG_ERROR([* * * wv was not found - I looked for it in "$1" * * *]) fi WV_CFLAGS="-I$abi_wv_path" if test "x$abi_epath" = "xyes"; then WV_LIBS="-L\$(top_builddir)/../wv -lwv" else WV_LIBS="\$(top_builddir)/../wv/libwv.a" fi abi_wv_message="supplied wv in $abi_wv_path" PEERDIRS="${PEERDIRS} $_abi_wv_pdir" PEERS="${PEERS} wv" fi AC_DEFINE(HAVE_WV, 1, [ Define if you have wv ]) else # Abi doesn't need wv... # abi_sys_wv=irrelevant WV_CFLAGS="" WV_LIBS="" fi AM_CONDITIONAL(LOCAL_WV,[test "x$abi_sys_wv" = "xno"]) AC_SUBST(WV_CFLAGS) AC_SUBST(WV_LIBS) ]) AC_DEFUN([ABI_WV_WARNING],[ echo "" echo "WARNING: building against wv as a system library is generally not recommended." echo " Compatibility of abi's source with the concurrent wv sources is" echo " maintained, and wv itself is developed in AbiSource's CVS repository." echo " " echo " No doubt you have your reasons; I'll trust you to figure out the" echo " awkward dependencies. If you have the corresponding wv sources handy," echo " try adding the source tree to header path, e.g.:" echo " " echo " ./configure ... CPPFLAGS=\"-I/home/me/src/wv-0.7.5\"" echo " " echo " Note: AbiWord-1.0.x requires a different version of libwv" echo "" ]) # start: abi/ac-helpers/abi-zlib.m4 # # Copyright (C) 2002 Francis James Franklin # Copyright (C) 2002 AbiSource, Inc # # This file is free software; you may copy and/or distribute it with # or without modifications, as long as this notice is preserved. # This software is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. # # The above license applies to THIS FILE ONLY, the abiword code # itself may be copied and distributed under the terms of the GNU # GPL, see COPYING for more details # # This file detects which of the AbiWord platforms we are currently # building on. The detection logic in question is mostly by Jeff # Hostetler, and is taken from the original AbiWord build system. # # Usage: ABI_ZLIB AC_DEFUN([ABI_ZLIB],[ dnl Check for zlib dnl Supports: dnl * zlib in system library locations dnl * Bundled zlib if a directory name argument is passed abi_wv_zlib="" abi_found_zlib="no" ABI_ZLIB_DIR="" AC_ARG_WITH(zlib,[ --with-zlib=DIR use zlib in DIR],[ if [ test "$withval" = "no" ]; then AC_MSG_ERROR([* * * zlib is required by AbiWord * * *]) elif [ test "$withval" = "yes" ]; then abi_zlib=check elif [ test "$withval" = "peer" ]; then abi_zlib=peer else abi_zlib=sys ABI_ZLIB_DIR="$withval" abi_wv_zlib="--with-zlib=$withval" fi ],[ abi_zlib=check ]) if test $abi_zlib = peer; then abi_z=peer else if test $abi_zlib = sys; then _abi_cppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I$ABI_ZLIB_DIR/include" fi AC_CHECK_HEADER(zlib.h,[ abi_z=sys ],[ if test $abi_zlib = sys; then AC_MSG_ERROR([* * * zlib not found in system location * * *]) fi abi_z=peer ]) if test $abi_zlib = sys; then CPPFLAGS="$_abi_cppflags" fi fi dnl ZLIB_PEERDIR="`cd ..; pwd`/zlib" if test $abi_z = peer; then AC_MSG_CHECKING(for zlib in peer directory) if test -d ../zlib; then if test -r ../zlib/libz.a; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) AC_MSG_ERROR([unable to use peer zlib - zlib/libz.a not found]) fi else AC_MSG_RESULT(no) AC_MSG_ERROR([unable to use zlib - no peer found]) fi abi_zlib_message="peer zlib" ZLIB_CFLAGS='-I$(top_srcdir)/../zlib' ZLIB_LIBS='$(top_srcdir)/../zlib/libz.a' dnl PEERDIRS="${PEERDIRS} ${ZLIB_PEERDIR}" dnl PEERS="${PEERS} zlib" dnl abi_wv_cppflags is add to CPPFLAGS for configuring wv dnl abi_wv_cppflags="$abi_wv_cppflags -I$ZLIB_PEERDIR" else if test $abi_zlib = sys; then abi_zlib_message="zlib in -L$ABI_ZLIB_DIR/lib -lz" ZLIB_CFLAGS="-I$ABI_ZLIB_DIR/include" ZLIB_LIBS="-L$ABI_ZLIB_DIR/lib -lz" else abi_zlib_message="zlib in -lz" ZLIB_CFLAGS="" ZLIB_LIBS="-lz" fi fi dnl AC_SUBST(ZLIB_PEERDIR) AC_SUBST(ZLIB_CFLAGS) AC_SUBST(ZLIB_LIBS) ]) # # end: abi/ac-helpers/abi-zlib.m4 # # start: abi/ac-helpers/abi-libpng.m4 # # Copyright (C) 2002 Francis James Franklin # Copyright (C) 2002 AbiSource, Inc # Copyright (C) 2001 Sam Tobin-Hochstadt # # This file is free software; you may copy and/or distribute it with # or without modifications, as long as this notice is preserved. # This software is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. # # The above license applies to THIS FILE ONLY, the abiword code # itself may be copied and distributed under the terms of the GNU # GPL, see COPYING for more details # # This file detects which of the AbiWord platforms we are currently # building on. The detection logic in question is mostly by Jeff # Hostetler, and is taken from the original AbiWord build system. # # Usage: ABI_LIBPNG AC_DEFUN([ABI_LIBPNG],[ dnl Check for libpng dnl Supports: dnl * libpng in system library locations dnl * Bundled libpng if a directory name argument is passed abi_wv_png="" abi_found_libpng="no" ABI_LIBPNG_DIR="" AC_ARG_WITH(libpng,[ --with-libpng=DIR use libpng in DIR],[ if test "$withval" = "no"; then AC_MSG_ERROR([* * * libpng is required by AbiWord * * *]) elif test "$withval" = "yes"; then abi_libpng=check elif test "$withval" = "peer"; then abi_libpng=peer else abi_libpng=sys ABI_LIBPNG_DIR="$withval" abi_wv_png="--with-png=$withval" fi ],[ abi_libpng=check ]) if test $abi_libpng = check; then PKG_CHECK_MODULES(LIBPNG,libpng12,[ abi_libpng=pkg abi_png=sys ],[ abi_libpng=check ]) fi if test $abi_libpng = peer; then abi_png=peer elif test $abi_libpng != pkg; then if test $abi_libpng = sys; then _abi_cppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS -I$ABI_LIBPNG_DIR/include" fi AC_CHECK_HEADER(png.h,[ abi_png=sys ],[ if test $abi_libpng = sys; then AC_MSG_ERROR([* * * libpng not found in system location * * *]) fi abi_png=peer ]) if test $abi_libpng = sys; then CPPFLAGS="$_abi_cppflags" fi fi LIBPNG_PEERDIR="`cd ..; pwd`/libpng" if test $abi_png = peer; then AC_MSG_CHECKING(for libpng in peer directory) if test -d ../libpng; then if test -r ../libpng/pngconf.h; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) AC_MSG_ERROR([unable to use peer libpng - libpng/pngconf.h not found]) fi else AC_MSG_RESULT(no) AC_MSG_ERROR([unable to use libpng - no peer found]) fi abi_libpng_message="peer libpng" LIBPNG_CFLAGS='-I$(top_srcdir)/../libpng' LIBPNG_LIBS='$(top_srcdir)/../libpng/libpng.a' PEERDIRS="${PEERDIRS} ${LIBPNG_PEERDIR}" PEERS="${PEERS} libpng" dnl abi_wv_cppflags is add to CPPFLAGS for configuring wv dnl abi_wv_cppflags="$abi_wv_cppflags -I$LIBPNG_PEERDIR" else if test $abi_libpng = sys; then abi_libpng_message="libpng in -L$ABI_LIBPNG_DIR/lib -lpng" LIBPNG_CFLAGS="-I$ABI_LIBPNG_DIR/include" LIBPNG_LIBS="-L$ABI_LIBPNG_DIR/lib -lpng" elif test $abi_libpng = pkg; then abi_libpng_message="libpng in $LIBPNG_LIBS" abi_wv_cppflags="$abi_wv_cppflags $LIBPNG_CFLAGS" else abi_libpng_message="libpng in -lpng" LIBPNG_CFLAGS="" LIBPNG_LIBS="-lpng" fi fi AC_SUBST(LIBPNG_PEERDIR) AC_SUBST(LIBPNG_CFLAGS) AC_SUBST(LIBPNG_LIBS) ]) # # end: abi/ac-helpers/abi-libpng.m4 # # start: abi/ac-helpers/abi-popt.m4 # # Copyright (C) 2002 Patrick Lam # # This file is free software; you may copy and/or distribute it with # or without modifications, as long as this notice is preserved. # This software is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. # # The above license applies to THIS FILE ONLY, the abiword code # itself may be copied and distributed under the terms of the GNU # GPL, see COPYING for more details # # This file detects which of the AbiWord platforms we are currently # building on. The detection logic in question is mostly by Jeff # Hostetler, and is taken from the original AbiWord build system. # # Usage: ABI_POPT AC_DEFUN([ABI_POPT],[ dnl Check for popt dnl Supports: dnl * popt in system library locations dnl * Bundled popt if a directory name argument is passed abi_found_popt="no" ABI_LIBPOPT_DIR="" AC_ARG_WITH(popt,[ --with-popt=DIR use popt in DIR],[ if [ test "$withval" = "no" ]; then AC_MSG_ERROR([* * * popt is required by AbiWord * * *]) elif [ test "$withval" = "yes" ]; then abi_libpopt=check elif [ test "$withval" = "peer" ]; then abi_libpopt=peer else abi_libpopt=sys ABI_LIBPOPT_DIR="$withval" fi ],[ abi_libpopt=check ]) if test $abi_libpopt = peer; then abi_popt=peer else if test $abi_libpopt = sys; then _abi_cppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I$ABI_LIBPOPT_DIR/include" fi AC_CHECK_HEADER(popt.h,[ abi_popt=sys ],[ if test $abi_libpopt = sys; then AC_MSG_ERROR([* * * libpopt not found in system location * * *]) fi abi_popt=peer ]) if test $abi_libpopt = sys; then CPPFLAGS="$_abi_cppflags" fi fi LIBPOPT_PEERDIR="$abi_rootdir/popt" if test $abi_popt = peer; then AC_MSG_CHECKING(for popt in peer directory) if test -d $LIBPOPT_PEERDIR; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) AC_MSG_ERROR([unable to use popt - no peer found]) fi abi_libpopt_message="peer popt" LIBPOPT_CFLAGS='-I$(top_srcdir)/../popt' LIBPOPT_LIBS='$(top_builddir)/../popt/.libs/libpopt.a' PEERDIRS="${PEERDIRS} ${LIBPOPT_PEERDIR}" PEERS="${PEERS} popt" else if test $abi_libpopt = sys; then abi_libpopt_message="libpopt in -L$ABI_LIBPOPT_DIR/lib -lpopt" LIBPOPT_CFLAGS="-I$ABI_LIBPOPT_DIR/include" LIBPOPT_LIBS="-L$ABI_LIBPOPT_DIR/lib -lpopt" else abi_libpopt_message="libpopt in -lpopt" LIBPOPT_CFLAGS="" LIBPOPT_LIBS="-lpopt" fi fi AC_SUBST(LIBPOPT_PEERDIR) AC_SUBST(LIBPOPT_CFLAGS) AC_SUBST(LIBPOPT_LIBS) ]) # # end: abi/ac-helpers/abi-popt.m4 # # Copyright (C) 2001 Sam Tobin-Hochstadt # Copyright (C) 2001 Hubert Figuiere # This file is free software; you may copy and/or distribute it with # or without modifications, as long as this notice is preserved. # This software is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. # The above license applies to THIS FILE ONLY, the abiword code # itself may be copied and distributed under the terms of the GNU # GPL, see COPYING for more details # Check for libjpeg # Supports: # * libjpeg in system library locations # # Hacked from the abi-libpng-parser.m4 code # # Usage: # ABI_LIBJPEG AC_DEFUN([ABI_LIBJPEG], [ abi_found_libjpeg="no" AC_ARG_WITH(libjpeg-prefix, [ --with-libjpeg-prefix=PFX Prefix where libjpeg is installed (optional)], libjpeg_prefix="$withval", libjpeg_prefix="") # check for library file using prefix if test "x$libjpeg_prefix" != "x"; then if test -f "$libjpeg_prefix/lib/libjpeg.a"; then good_libjpeg_prefix="yes" else good_libjpeg_prefix="no" fi fi # check for shared install, with or without prefix if test "$good_libjpeg_prefix" = "yes"; then saved_ldflags="$LDFLAGS" LDFLAGS="-L$libjpeg_prefix/lib" AC_CHECK_LIB(jpeg, jpeg_start_decompress, abi_libjpeg_libs="-L$libjpeg_prefix/lib -ljpeg" abi_found_libjpeg="yes", abi_found_libjpeg="no") LDFLAGS="$saved_ldflags" else if test "$abi_found_libjpeg" = "no"; then echo "checking for libjpeg" AC_CHECK_LIB(jpeg, jpeg_start_decompress, abi_libjpeg_libs="-ljpeg" abi_found_libjpeg="yes", abi_found_libjpeg="no") fi fi # check for header file if test "$abi_found_libjpeg" = "yes"; then if test "$good_libjpeg_prefix" = "yes"; then if test -f "$libjpeg_prefix/include/png.h"; then abi_found_libjpegincs="yes" else abi_found_libjpegincs="no" fi if test "$abi_found_libjpegincs" = "yes"; then LIBJPEG_LIBS="$abi_libjpeg_libs" LIBJPEG_CFLAGS="-I$libjpeg_prefix/include -DHAVE_LIBJPEG" fi else AC_CHECK_HEADER(jpeglib.h,abi_found_libjpegincs="yes") if test "$abi_found_libjpegincs" = "yes"; then LIBJPEG_LIBS="$abi_libjpeg_libs" LIBJPEG_CFLAGS="-DHAVE_LIBJPEG" fi fi fi if test "$abi_found_libjpeg" = "yes" -a "$abi_found_libjpegincs" = "yes"; then libjpeg="true" fi AC_SUBST(LIBJPEG_CFLAGS) AC_SUBST(LIBJPEG_LIBS) AM_CONDITIONAL(WITH_LIBJPEG, test "x$libjpeg" = "xtrue") ]) # start: abi/ac-helpers/abi-peer-config.m4 # # Copyright (C) 2002 AbiSource, Inc # # This file is free software; you may copy and/or distribute it with # or without modifications, as long as this notice is preserved. # This software is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. # # The above license applies to THIS FILE ONLY, the abiword code # itself may be copied and distributed under the terms of the GNU # GPL, see COPYING for more details # # Usage: ABI_PEER_CONFIG(,) AC_DEFUN([ABI_PEER_CONFIG],[ if test "$1" != "" -a "$2" != ""; then _abi_peer="$1" _abi_pdir="$2" _abi_bdir="../$_abi_peer" if ! test -e $_abi_bdir; then mkdir $_abi_bdir fi if test -d $_abi_bdir; then echo "" echo "configuring $_abi_peer: srcdir=$_abi_pdir, builddir=$_abi_bdir" echo "" config_flags='--disable-shared --enable-static' if test "$_abi_peer" = "wv"; then if test "$PLATFORM" = "qnx"; then config_flags="$config_flags --with-glib=no $abi_wv_xml $abi_wv_iconv $abi_wv_png $abi_wv_zlib" else config_flags="$config_flags --with-glib=glib2 $abi_wv_xml $abi_wv_iconv $abi_wv_png $abi_wv_zlib" fi (cd $_abi_bdir && CPPFLAGS="$CPPFLAGS $abi_wv_cppflags" LDFLAGS="$LDFLAGS" $_abi_pdir/configure $config_flags) elif test "$_abi_peer" = "expat"; then _expat_cppflags="-I`cd $_abi_bdir; pwd`/lib" (cd $_abi_bdir && CPPFLAGS="$CPPFLAGS $_expat_cppflags" $_abi_pdir/configure $config_flags) else if test "$_abi_peer" = "libiconv"; then config_flags="$config_flags --enable-extra-encodings" fi (cd $_abi_bdir && $_abi_pdir/configure $config_flags) fi echo "" else echo "" echo "error: unable to configure $_abi_peer in $_abi_bdir - no such directory" echo "" exit fi fi ]) # # end: abi/ac-helpers/abi-peer-config.m4 #