summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a4869d1)
raw | patch | inline | side by side (parent: a4869d1)
author | tweenk <tweenk@users.sourceforge.net> | |
Fri, 13 Feb 2009 01:47:46 +0000 (01:47 +0000) | ||
committer | tweenk <tweenk@users.sourceforge.net> | |
Fri, 13 Feb 2009 01:47:46 +0000 (01:47 +0000) |
acinclude.m4 | patch | blob | history | |
configure.ac | patch | blob | history | |
m4/Makefile.am | patch | blob | history | |
m4/ac_define_dir.m4 | [new file with mode: 0644] | patch | blob |
src/extension/dependency.cpp | patch | blob | history | |
src/extension/dependency.h | patch | blob | history | |
src/io/resource.cpp | patch | blob | history | |
src/io/resource.h | patch | blob | history | |
src/path-prefix.h | patch | blob | history |
diff --git a/acinclude.m4 b/acinclude.m4
index b730d0d607dce10d0310c0cf0379e5fb1de74178..13d49c51ffa0f1260a2e0cf143564c30e80d8501 100644 (file)
--- a/acinclude.m4
+++ b/acinclude.m4
-dnl Usage: RELAYTOOL(LIBRARY_NAME, LIBS, CFLAGS, ACTION-IF-WEAK-LINK-IS-POSSIBLE)
-
-dnl Example:
-dnl RELAYTOOL("gtkspell", GTKSPELL_LIBS, GTKSPELL_CFLAGS, gtkspell_weak=yes)
-dnl Will modify GTKSPELL_LIBS to include a call to relaytool if available
-dnl or if not, will modify GTKSPELL_CFLAGS to include -D switches to define
-dnl libgtkspell_is_present=1 and libgtkspell_symbol_is_present=1
-
-AC_DEFUN([RELAYTOOL], [
- if test -z "$RELAYTOOL_PROG"; then
- AC_PATH_PROG(RELAYTOOL_PROG, relaytool, no)
- fi
-
- AC_MSG_CHECKING(whether we can weak link $1)
-
- _RELAYTOOL_PROCESSED_NAME=`echo "$1" | sed 's/-/_/g;s/\./_/g;'`
- _RELAYTOOL_UPPER_NAME=`echo $_RELAYTOOL_PROCESSED_NAME | tr '[[:lower:]]' '[[:upper:]]'`
-
- if test "$RELAYTOOL_PROG" = "no"; then
- AC_MSG_RESULT(no)
- $3="-DRELAYTOOL_${_RELAYTOOL_UPPER_NAME}='static const int lib${_RELAYTOOL_PROCESSED_NAME}_is_present = 1; static int __attribute__((unused)) lib${_RELAYTOOL_PROCESSED_NAME}_symbol_is_present(char *m) { return 1; }' $$3"
- else
- AC_MSG_RESULT(yes)
- $2=`echo $$2|sed 's/\`/\\\\\`/g;'`
- $2="-Wl,--gc-sections \`relaytool --relay $1 $$2\`"
- $3="-DRELAYTOOL_${_RELAYTOOL_UPPER_NAME}='extern int lib${_RELAYTOOL_PROCESSED_NAME}_is_present; extern int lib${_RELAYTOOL_PROCESSED_NAME}_symbol_is_present(char *s);' $$3"
- $4
- fi
-])
-
-# ===========================================================================
-# http://autoconf-archive.cryp.to/ax_openmp.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_OPENMP([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
-#
-# DESCRIPTION
-#
-# This macro tries to find out how to compile programs that use OpenMP a
-# standard API and set of compiler directives for parallel programming
-# (see http://www-unix.mcs/)
-#
-# On success, it sets the OPENMP_CFLAGS/OPENMP_CXXFLAGS/OPENMP_F77FLAGS
-# output variable to the flag (e.g. -omp) used both to compile *and* link
-# OpenMP programs in the current language.
-#
-# NOTE: You are assumed to not only compile your program with these flags,
-# but also link it with them as well.
-#
-# If you want to compile everything with OpenMP, you should set:
-#
-# CFLAGS="$CFLAGS $OPENMP_CFLAGS"
-# #OR# CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS"
-# #OR# FFLAGS="$FFLAGS $OPENMP_FFLAGS"
-#
-# (depending on the selected language).
-#
-# The user can override the default choice by setting the corresponding
-# environment variable (e.g. OPENMP_CFLAGS).
-#
-# ACTION-IF-FOUND is a list of shell commands to run if an OpenMP flag is
-# found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it is
-# not found. If ACTION-IF-FOUND is not specified, the default action will
-# define HAVE_OPENMP.
-#
-# LAST MODIFICATION
-#
-# 2008-04-12
-#
-# COPYLEFT
-#
-# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
-#
-# 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 3 of the License, 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, see <http://www.gnu.org/licenses/>.
-#
-# As a special exception, the respective Autoconf Macro's copyright owner
-# gives unlimited permission to copy, distribute and modify the configure
-# scripts that are the output of Autoconf when processing the Macro. You
-# need not follow the terms of the GNU General Public License when using
-# or distributing such scripts, even though portions of the text of the
-# Macro appear in them. The GNU General Public License (GPL) does govern
-# all other use of the material that constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the Autoconf
-# Macro released by the Autoconf Macro Archive. When you make and
-# distribute a modified version of the Autoconf Macro, you may extend this
-# special exception to the GPL to apply to your modified version as well.
-
-AC_DEFUN([AX_OPENMP], [
-AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX
-
-AC_CACHE_CHECK([for OpenMP flag of _AC_LANG compiler], ax_cv_[]_AC_LANG_ABBREV[]_openmp, [save[]_AC_LANG_PREFIX[]FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
-ax_cv_[]_AC_LANG_ABBREV[]_openmp=unknown
-# Flags to try: -fopenmp (gcc), -openmp (icc), -mp (SGI & PGI),
-# -xopenmp (Sun), -omp (Tru64), -qsmp=omp (AIX), none
-ax_openmp_flags="-fopenmp -openmp -mp -xopenmp -omp -qsmp=omp none"
-if test "x$OPENMP_[]_AC_LANG_PREFIX[]FLAGS" != x; then
- ax_openmp_flags="$OPENMP_[]_AC_LANG_PREFIX[]FLAGS $ax_openmp_flags"
-fi
-for ax_openmp_flag in $ax_openmp_flags; do
- case $ax_openmp_flag in
- none) []_AC_LANG_PREFIX[]FLAGS=$save[]_AC_LANG_PREFIX[] ;;
- *) []_AC_LANG_PREFIX[]FLAGS="$save[]_AC_LANG_PREFIX[]FLAGS $ax_openmp_flag" ;;
- esac
- AC_TRY_LINK_FUNC(omp_set_num_threads,
- [ax_cv_[]_AC_LANG_ABBREV[]_openmp=$ax_openmp_flag; break])
-done
-[]_AC_LANG_PREFIX[]FLAGS=$save[]_AC_LANG_PREFIX[]FLAGS
-])
-if test "x$ax_cv_[]_AC_LANG_ABBREV[]_openmp" = "xunknown"; then
- m4_default([$2],:)
-else
- if test "x$ax_cv_[]_AC_LANG_ABBREV[]_openmp" != "xnone"; then
- OPENMP_[]_AC_LANG_PREFIX[]FLAGS=$ax_cv_[]_AC_LANG_ABBREV[]_openmp
- fi
- m4_default([$1], [AC_DEFINE(HAVE_OPENMP,1,[Define if OpenMP is enabled])])
-fi
-])dnl AX_OPENMP
+m4_include([m4/ac_define_dir.m4])
+m4_include([m4/ax_openmp.m4])
+m4_include([m4/relaytool.m4])
diff --git a/configure.ac b/configure.ac
index 26bc11c7350bb76421999162d37a570216bd01d6..c5c9952c165fd5a77d9c93e4adf7ad2dae6ce72a 100644 (file)
--- a/configure.ac
+++ b/configure.ac
AM_CONDITIONAL(USE_MMX, test x$use_mmx_asm = xyes)
-dnl Figure out where the datadir actually is
-dnl http://autoconf-archive.cryp.to/ac_define_dir.html
-prefix_NONE=
-exec_prefix_NONE=
-test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
-test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
-dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn
-dnl refers to ${prefix}. Thus we have to use `eval' twice.
-eval runtime_datadir="${datadir}"
-eval runtime_datadir="${runtime_datadir}"
-test "$prefix_NONE" && prefix=NONE
-test "$exec_prefix_NONE" && exec_prefix=NONE
-
-inkscape_sharedir="${runtime_datadir}/${PACKAGE_NAME}"
-
dnl Define our data paths for config.h
-AC_SUBST(INKSCAPE_DATADIR)
-AC_DEFINE_UNQUOTED([INKSCAPE_DATADIR], "${runtime_datadir}",
- [Base data directory -- only path-prefix.h should use it!])
-AC_SUBST(PACKAGE_LOCALE_DIR)
-AC_DEFINE_UNQUOTED([PACKAGE_LOCALE_DIR], "${runtime_datadir}/locale",
- [Localization directory])
-AC_SUBST(INKSCAPE_LIBDIR)
-AC_DEFINE_UNQUOTED([INKSCAPE_LIBDIR], "${prefix}/lib",
- [Base library directory -- only path-prefix.h should use it!])
-
-dnl Have to add module makefiles (lauris)
+AC_DEFINE_DIR([INKSCAPE_DATADIR], [datadir], [Base data directory])
+AC_DEFINE_DIR([PACKAGE_LOCALE_DIR], [localedir], [Locatization directory])
AC_CONFIG_FILES([
Makefile
diff --git a/m4/Makefile.am b/m4/Makefile.am
index 3343be6c528a91d69ffe2db009b74800d5e5c06f..6817876cbf5f4943305af156660a20d88e759778 100644 (file)
--- a/m4/Makefile.am
+++ b/m4/Makefile.am
-EXTRA_DIST=codeset.m4 glibc21.m4 isc-posix.m4 progtest.m4 gettext.m4 \
- iconv.m4 lcmessage.m4 relaytool.m4
+EXTRA_DIST = \
+ ac_define_dir.m4 \
+ ax_openmp.m4 \
+ codeset.m4 \
+ gettext.m4 \
+ glibc21.m4 \
+ iconv.m4 \
+ isc-posix.m4 \
+ lcmessage.m4 \
+ progtest.m4 \
+ relaytool.m4
diff --git a/m4/ac_define_dir.m4 b/m4/ac_define_dir.m4
--- /dev/null
+++ b/m4/ac_define_dir.m4
@@ -0,0 +1,49 @@
+# ===========================================================================
+# http://autoconf-archive.cryp.to/ac_define_dir.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AC_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION])
+#
+# DESCRIPTION
+#
+# This macro sets VARNAME to the expansion of the DIR variable, taking
+# care of fixing up ${prefix} and such.
+#
+# VARNAME is then offered as both an output variable and a C preprocessor
+# symbol.
+#
+# Example:
+#
+# AC_DEFINE_DIR([DATADIR], [datadir], [Where data are placed to.])
+#
+# LAST MODIFICATION
+#
+# 2008-04-12
+#
+# COPYLEFT
+#
+# Copyright (c) 2008 Stepan Kasal <kasal@ucw.cz>
+# Copyright (c) 2008 Andreas Schwab <schwab@suse.de>
+# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
+# Copyright (c) 2008 Alexandre Oliva
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved.
+
+AC_DEFUN([AC_DEFINE_DIR], [
+ prefix_NONE=
+ exec_prefix_NONE=
+ test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+ test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn
+dnl refers to ${prefix}. Thus we have to use `eval' twice.
+ eval ac_define_dir="\"[$]$2\""
+ eval ac_define_dir="\"$ac_define_dir\""
+ AC_SUBST($1, "$ac_define_dir")
+ AC_DEFINE_UNQUOTED($1, "$ac_define_dir", [$3])
+ test "$prefix_NONE" && prefix=NONE
+ test "$exec_prefix_NONE" && exec_prefix=NONE
+])
index de656201c4dea7b783eee2c9d76d66eeb77c9ee7..a83cac88d039cb430256fc76b00c7c0495a679c6 100644 (file)
"executable",
"file",
"extension",
- "plugin",
};
// These strings are for XML attribute comparisons and should not be translated
looked up in the database. If the extension is found, and it is
not deactivated, the dependency passes.
- If the type is \c TYPE_PLUGIN then the path for the plugin is found
- using the Glib::Module routines. When the path is found, then there
- is a check to see if the file exists using the \c file_test function.
-
If the type is \c TYPE_EXECUTABLE or \c TYPE_FILE things are getting
even more interesting because now the \c _location variable is also
taken into account. First, the difference between the two is that
if (myext->deactivated()) return FALSE;
break;
}
- case TYPE_PLUGIN: {
- if (!Glib::Module::get_supported()) {
- return FALSE;
- }
-
- std::string path = Glib::Module::build_path(INKSCAPE_PLUGINDIR, _string);
- if (!Glib::file_test(path, Glib::FILE_TEST_EXISTS))
- return FALSE;
- break;
- }
case TYPE_EXECUTABLE:
case TYPE_FILE: {
Glib::FileTest filetest = Glib::FILE_TEST_EXISTS;
index b76e304072e45372a9fd639c821071daaf397d42..829912dc315ca8bdea0b63cd9f435d65480c2526 100644 (file)
TYPE_EXECUTABLE, /**< Look for an executable */
TYPE_FILE, /**< Look to make sure a file exists */
TYPE_EXTENSION, /**< Make sure a specific extension is loaded and functional */
- TYPE_PLUGIN, /**< Look for a library to be loaded as a plugin */
TYPE_CNT /**< Number of types */
};
/** \brief Storing the type of this particular dependency. */
diff --git a/src/io/resource.cpp b/src/io/resource.cpp
index f7542855ee09124f2c44c71deea5b1d33c769f84..1f6f8459c60b4738bdc37fb2ff67958565fda3d7 100644 (file)
--- a/src/io/resource.cpp
+++ b/src/io/resource.cpp
case MARKERS: temp = INKSCAPE_MARKERSDIR; break;
case PALETTES: temp = INKSCAPE_PALETTESDIR; break;
case PATTERNS: temp = INKSCAPE_PATTERNSDIR; break;
- case PLUGINS: temp = INKSCAPE_PLUGINDIR; break;
case SCREENS: temp = INKSCAPE_SCREENSDIR; break;
case TEMPLATES: temp = INKSCAPE_TEMPLATESDIR; break;
case TUTORIALS: temp = INKSCAPE_TUTORIALSDIR; break;
case MARKERS: name = "markers"; break;
case PALETTES: name = "palettes"; break;
case PATTERNS: name = "patterns"; break;
- case PLUGINS: name = "plugins"; break;
case TEMPLATES: name = "templates"; break;
default: return get_path(SYSTEM, type, filename);
}
diff --git a/src/io/resource.h b/src/io/resource.h
index 0be8ab8e6e573e446ae9798209cdabeb0fa69d2a..a5269899f3b78180318e8d0e68c0b5aba2970237 100644 (file)
--- a/src/io/resource.h
+++ b/src/io/resource.h
MARKERS,
PALETTES,
PATTERNS,
- PLUGINS,
SCREENS,
TEMPLATES,
TUTORIALS,
diff --git a/src/path-prefix.h b/src/path-prefix.h
index 447ddcf85dd81254642ed05081b9e896b345ae8f..b2ff6ff88a11d203d626dc1fd4347f2a101387af 100644 (file)
--- a/src/path-prefix.h
+++ b/src/path-prefix.h
# define INKSCAPE_PATTERNSDIR BR_DATADIR( "/inkscape/patterns" )
# define INKSCAPE_SCREENSDIR BR_DATADIR( "/inkscape/screens" )
# define INKSCAPE_TUTORIALSDIR BR_DATADIR( "/inkscape/tutorials" )
-# define INKSCAPE_PLUGINDIR BR_LIBDIR( "/inkscape/plugins" )
# define INKSCAPE_TEMPLATESDIR BR_DATADIR( "/inkscape/templates" )
# define INKSCAPE_UIDIR BR_DATADIR( "/inkscape/ui" )
//CREATE V0.1 support
# define INKSCAPE_PATTERNSDIR WIN32_DATADIR("share\\patterns")
# define INKSCAPE_SCREENSDIR WIN32_DATADIR("share\\screens")
# define INKSCAPE_TUTORIALSDIR WIN32_DATADIR("share\\tutorials")
-# define INKSCAPE_PLUGINDIR WIN32_DATADIR("plugins")
# define INKSCAPE_TEMPLATESDIR WIN32_DATADIR("share\\templates")
# define INKSCAPE_UIDIR WIN32_DATADIR("share\\ui")
//CREATE V0.1 WIN32 support
# define INKSCAPE_PATTERNSDIR "Contents/Resources/patterns"
# define INKSCAPE_SCREENSDIR "Contents/Resources/screens"
# define INKSCAPE_TUTORIALSDIR "Contents/Resources/tutorials"
-# define INKSCAPE_PLUGINDIR "Contents/Resources/plugins"
# define INKSCAPE_TEMPLATESDIR "Contents/Resources/templates"
# define INKSCAPE_UIDIR "Contents/Resources/ui"
//CREATE V0.1 support
# define INKSCAPE_PATTERNSDIR INKSCAPE_DATADIR "/inkscape/patterns"
# define INKSCAPE_SCREENSDIR INKSCAPE_DATADIR "/inkscape/screens"
# define INKSCAPE_TUTORIALSDIR INKSCAPE_DATADIR "/inkscape/tutorials"
-# define INKSCAPE_PLUGINDIR INKSCAPE_LIBDIR "/inkscape/plugins"
# define INKSCAPE_TEMPLATESDIR INKSCAPE_DATADIR "/inkscape/templates"
# define INKSCAPE_UIDIR INKSCAPE_DATADIR "/inkscape/ui"
//CREATE V0.1 support