- Initial commit laying out skel for new xmlsave plugin.
Another commit fixing arising errors _could_ follow (but maybe not, if I've been good enough ;-)). git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@628 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
dd6085a0a6
commit
4f9a12003a
17 changed files with 1949 additions and 7 deletions
60
plugins/xmlsave/m4/compilerflags.m4
Normal file
60
plugins/xmlsave/m4/compilerflags.m4
Normal file
|
@ -0,0 +1,60 @@
|
|||
dnl **************************************************
|
||||
dnl Copyright (C) 2004 Matteo Settenvini
|
||||
dnl **************************************************
|
||||
|
||||
dnl ---------- AC_CHECK_CXXFLAG ---------------------
|
||||
dnl This macro checks if a particular flag for the
|
||||
dnl C++ compiler works. If it is so, it puts the flag
|
||||
dnl into the first macro parameter.
|
||||
dnl Example of usage : AC_CHECK_CXXFLAG([CXXFLAGS],[Wall])
|
||||
dnl -------------------------------------------------
|
||||
AC_DEFUN([AC_CHECK_CXXFLAG],
|
||||
[ if test -z "$1" -o -z "$2"; then
|
||||
AC_MSG_FAILURE([Wrong parameters passed to the m4 macro.
|
||||
Please contact the package mantainer.])
|
||||
fi
|
||||
AC_REQUIRE([AC_PROG_CXX])dnl
|
||||
AC_MSG_CHECKING([whether $CXX supports the -$2 flag])
|
||||
ac_check_cxxflags=$CXXFLAGS
|
||||
CXXFLAGS="-$2"
|
||||
AC_LANG_PUSH([C++])
|
||||
AC_COMPILE_IFELSE(
|
||||
AC_LANG_PROGRAM([], [return 0;]),
|
||||
[AC_MSG_RESULT([yes])
|
||||
CXXFLAGS="$ac_check_cxxflags"
|
||||
$1="-$2 $[$1]" ],
|
||||
[AC_MSG_RESULT([no])
|
||||
CXXFLAGS=$ac_check_cxxflags ]
|
||||
)
|
||||
AC_LANG_POP
|
||||
])dnl ------- AC_CHECK_CXXFLAG ----------------------
|
||||
|
||||
|
||||
|
||||
dnl ---------- AC_CHECK_CFLAG ---------------------
|
||||
dnl This macro checks if a particular flag for the
|
||||
dnl C compiler works. If it is so, it adds the flag
|
||||
dnl into the first macro parameter.
|
||||
dnl Example of usage : AC_CHECK_CFLAG([CFLAGS],[Wall])
|
||||
dnl -------------------------------------------------
|
||||
AC_DEFUN([AC_CHECK_CFLAG],
|
||||
[ if test -z "$1" -o -z "$2"; then
|
||||
AC_MSG_FAILURE([Wrong parameters passed to the m4 macro.
|
||||
Please contact the package mantainer.])
|
||||
fi
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_MSG_CHECKING([whether $CC supports the -$2 flag])
|
||||
ac_check_cflags=$CFLAGS
|
||||
CFLAGS="-$2"
|
||||
AC_LANG_PUSH([C])
|
||||
AC_COMPILE_IFELSE(
|
||||
AC_LANG_PROGRAM([], [return 0;]),
|
||||
[AC_MSG_RESULT([yes])
|
||||
CFLAGS="$ac_check_cflags"
|
||||
$1="-$2 $[$1]" ],
|
||||
[AC_MSG_RESULT([no])
|
||||
CFLAGS=$ac_check_cflags ]
|
||||
)
|
||||
AC_LANG_POP
|
||||
])dnl ------- AC_CHECK_CFLAG ----------------------
|
||||
|
31
plugins/xmlsave/m4/linkingflags.m4
Normal file
31
plugins/xmlsave/m4/linkingflags.m4
Normal file
|
@ -0,0 +1,31 @@
|
|||
dnl **************************************************
|
||||
dnl Copyright (C) 2004 Matteo Settenvini
|
||||
dnl **************************************************
|
||||
|
||||
dnl ---------- AX_CHECK_LDFLAG ---------------------
|
||||
dnl This macro checks if a particular flag for the
|
||||
dnl C++ compiler works. If it is so, it adds the flag
|
||||
dnl to the end of the first parameter.
|
||||
dnl Example of usage : AC_CHECK_LDFLAG([LDFLAGS],[--as-needed])
|
||||
dnl -------------------------------------------------
|
||||
AC_DEFUN([AC_CHECK_LDFLAG],
|
||||
[ if test -z "$1" -o -z "$2"; then
|
||||
AC_MSG_FAILURE([Wrong parameters passed to the m4 macro.
|
||||
Please contact the package mantainer.])
|
||||
fi
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_MSG_CHECKING([whether the linker supports the $2 flag])
|
||||
ac_check_ldflags=$LDFLAGS
|
||||
LDFLAGS="-Wl,$2"
|
||||
AC_LANG_PUSH([C])
|
||||
AC_LINK_IFELSE(
|
||||
AC_LANG_PROGRAM([], [return 0;]),
|
||||
[AC_MSG_RESULT([yes])
|
||||
LDFLAGS=$ac_check_ldflags
|
||||
$1="-Wl,$2 $[$1]" ],
|
||||
[AC_MSG_RESULT([no])
|
||||
LDFLAGS=$ac_check_ldflags ]
|
||||
)
|
||||
AC_LANG_POP
|
||||
])dnl ------- AC_CHECK_LDFLAG ----------------------
|
||||
|
81
plugins/xmlsave/m4/sgpemv2-dirs.m4
Normal file
81
plugins/xmlsave/m4/sgpemv2-dirs.m4
Normal file
|
@ -0,0 +1,81 @@
|
|||
dnl m4/sgpemv2-dirs.m4 - Copyright 2005, 2006, University
|
||||
dnl of Padova, dept. of Pure and Applied
|
||||
dnl Mathematics
|
||||
dnl
|
||||
dnl This file is part of SGPEMv2.
|
||||
dnl
|
||||
dnl This is free software; you can redistribute it and/or modify
|
||||
dnl it under the terms of the GNU General Public License as published by
|
||||
dnl the Free Software Foundation; either version 2 of the License, or
|
||||
dnl (at your option) any later version.
|
||||
dnl
|
||||
dnl SGPEMv2 is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
dnl GNU General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU General Public License
|
||||
dnl along with SGPEMv2; if not, write to the Free Software
|
||||
dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
dnl ---------- AC_PROG_SGPEMV2 ---------------------
|
||||
dnl
|
||||
dnl Synopsis: AC_PROG_SGPEMV2([min_version])
|
||||
dnl
|
||||
dnl This macro checks if sgpemv2 is installed, and
|
||||
dnl AC_SUBSTs the following variables:
|
||||
dnl
|
||||
dnl SGPEMV2_CFLAGS -> necessary includes for compiling
|
||||
dnl plugins
|
||||
dnl SGPEMV2_LIBS -> libraries to link against when
|
||||
dnl building a loadable plugin
|
||||
dnl SGPEMV2_POLICIES_DIR -> global policies directory
|
||||
dnl SGPEMV2_PLUGINS_DIR -> global plugins directory
|
||||
dnl
|
||||
dnl This is particularly useful for plugin installation.
|
||||
dnl It takes a parameter which is the minimal version
|
||||
dnl installed of sgpemv2 this macro checks for.
|
||||
dnl The parameter is mandatory.
|
||||
dnl
|
||||
dnl Example of usage: AC_PROG_SGPEMV2([0.1])
|
||||
dnl ------------------------------------------------
|
||||
AC_DEFUN([AC_PROG_SGPEMV2],
|
||||
[
|
||||
PKG_PROG_PKG_CONFIG([0.20])
|
||||
|
||||
if test "x$1" = "x"; then
|
||||
AC_MSG_FAILURE([Wrong number of parameters passed to macro AC@&t@_PROG_SGPEMV2. Please contact this package mantainer.])
|
||||
fi
|
||||
|
||||
_pkg_sgpemv2_module="sgpemv2 >= $1"
|
||||
|
||||
PKG_CHECK_MODULES([SGPEMV2], [$_pkg_sgpemv2_module],
|
||||
:, AC_MSG_ERROR([$SGPEMV2_PKG_ERRORS]))
|
||||
|
||||
AC_MSG_CHECKING([for sgpemv2 compiler flags])
|
||||
AC_MSG_RESULT([$SGPEMV2_CFLAGS])
|
||||
|
||||
AC_MSG_CHECKING([for sgpemv2 linking flags])
|
||||
AC_MSG_RESULT([$SGPEMV2_LIBS])
|
||||
|
||||
AC_MSG_CHECKING([for sgpemv2 policies default installation directory])
|
||||
SGPEMV2_POLICIES_DIR=`$PKG_CONFIG --variable=policies_dir "$_pkg_sgpemv2_module" 2>/dev/null`
|
||||
if test "x$SGPEMV2_POLICIES_DIR" = "x"; then
|
||||
AC_MSG_ERROR([Unable to retrieve value])
|
||||
else
|
||||
AC_MSG_RESULT([$SGPEMV2_POLICIES_DIR])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for sgpemv2 plugins default installation directory])
|
||||
SGPEMV2_PLUGINS_DIR=`$PKG_CONFIG --variable=plugins_dir "$_pkg_sgpemv2_module" 2>/dev/null`
|
||||
if test "x$SGPEMV2_PLUGINS_DIR" = "x"; then
|
||||
AC_MSG_ERROR([Unable to retrieve value])
|
||||
else
|
||||
AC_MSG_RESULT([$SGPEMV2_PLUGINS_DIR])
|
||||
fi
|
||||
|
||||
AC_SUBST([SGPEMV2_POLICIES_DIR])
|
||||
AC_SUBST([SGPEMV2_PLUGINS_DIR])
|
||||
|
||||
])dnl ------- AC_PROG_SGPEMV2 ----------------------
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue