summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8d886d1)
raw | patch | inline | side by side (parent: 8d886d1)
author | tweenk <tweenk@users.sourceforge.net> | |
Thu, 19 Feb 2009 22:49:38 +0000 (22:49 +0000) | ||
committer | tweenk <tweenk@users.sourceforge.net> | |
Thu, 19 Feb 2009 22:49:38 +0000 (22:49 +0000) |
invocation.
acinclude.m4 | patch | blob | history | |
configure.ac | patch | blob | history | |
m4/ink_svn_snapshot_build.m4 | [new file with mode: 0644] | patch | blob |
src/Makefile_insert | patch | blob | history |
diff --git a/acinclude.m4 b/acinclude.m4
index 13d49c51ffa0f1260a2e0cf143564c30e80d8501..61148f6b4b34b8f08e5316829f6229fe5631c5ca 100644 (file)
--- a/acinclude.m4
+++ b/acinclude.m4
m4_include([m4/ac_define_dir.m4])
m4_include([m4/ax_openmp.m4])
m4_include([m4/relaytool.m4])
+m4_include([m4/ink_svn_snapshot_build.m4])
diff --git a/configure.ac b/configure.ac
index 869c4d265b2bb56994728147e75cf86b9b09ee7d..ab12503ea712ea996a2045c242fa46c61828b383 100644 (file)
--- a/configure.ac
+++ b/configure.ac
dnl version is going to be called until about the time we release it
dnl (whereas we always know what the previous version was called).
AC_CANONICAL_HOST
-AC_CONFIG_SRCDIR(src/main.cpp)
+AC_CONFIG_SRCDIR([src/main.cpp])
AM_INIT_AUTOMAKE([dist-zip dist-bzip2 tar-pax])
AC_ARG_ENABLE([lsb], AS_HELP_STRING([--enable-lsb], [LSB-compatible build configuration]), [
AC_PROG_CXX
AM_PROG_CC_STDC
AM_PROG_AS
+AC_PROG_RANLIB
AC_HEADER_STDC
+INK_SVN_SNAPSHOT_BUILD
dnl These next few lines are needed only while libcroco is in our source tree.
AC_PROG_CC
dnl Honor aclocal flags
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
-AC_PROG_RANLIB
-
dnl Verify our GCC version
if test "x$GXX" = "xyes"; then
AC_MSG_CHECKING([GNU compiler version])
dnl ******************************
dnl Check for OpenMP
+dnl Replace this with AC_OPENMP once it's possible to use Autoconf 2.62
dnl ******************************
-
AX_OPENMP([openmp_ok=yes],[openmp_ok=no])
-AC_MSG_CHECKING([for OpenMP support])
-dnl a bit odd, but AX_OPENMP does its own check message, so we're not wrapping it at the moment
-AC_MSG_RESULT([$openmp_ok])
if test "x$openmp_ok" = "xyes"; then
dnl We have it, now set up the flags
CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS"
AC_CHECK_HEADER(omp.h)
fi
-
dnl ******************************
dnl Check for libpng
dnl ******************************
diff --git a/m4/ink_svn_snapshot_build.m4 b/m4/ink_svn_snapshot_build.m4
--- /dev/null
@@ -0,0 +1,14 @@
+# Check for SVN snapshot build
+# (c) 2009 Krzysztof KosiĆski
+# Released under GNU GPL; see the file COPYING for more information
+
+AC_DEFUN([INK_SVN_SNAPSHOT_BUILD],
+[
+ AC_CACHE_CHECK([for SVN snapshot build], ink_cv_svn_snapshot_build,
+ [ink_cv_svn_snapshot_build=no
+ if which svn > /dev/null && test -e $srcdir/.svn/entries; then
+ ink_cv_svn_snapshot_build=yes
+ fi
+ ])
+ AM_CONDITIONAL([USE_SVN_VERSION], [test "x$ink_cv_svn_snapshot_build" = "xyes"])
+])
diff --git a/src/Makefile_insert b/src/Makefile_insert
index 7a43a59c5c4ee92c95b412a6cd7a10c88f182c9a..e654ca13661bdda28121e0e85b09d2f3fef08cb2 100644 (file)
--- a/src/Makefile_insert
+++ b/src/Makefile_insert
icon-size.h \
id-clash.cpp id-clash.h \
ige-mac-menu.h ige-mac-menu.c \
- inkscape-stock.cpp inkscape-stock.h\
inkscape.cpp inkscape.h inkscape-private.h \
interface.cpp interface.h \
isinf.h \
libinkversion_a_SOURCES = inkscape-version.cpp inkscape-version.h
-# Hack: make inkscape-version.cpp a phony target.
-# Create the version file every time "make" is invoked. Overwrite it only
-# if it changes. Watch the backslashes!
-inkscape-version.cpp:
+if USE_SVN_VERSION
+inkscape_version_deps = $(top_srcdir)/.svn/entries
+endif
+
+# If this is an SVN snapshot build, regenerate this file every time
+# someone updates the SVN working directory.
+inkscape-version.cpp: $(inkscape_version_deps)
VER_PREFIX="$(VERSION)"; \
if test -x "$(srcdir)/.svn" -a ! -z `which svn`; then \
VER_SVNREV=" r`svn info $(srcdir) | sed -n -e '/^Revision:/s/Revision: \(.*\)/\1/p'`"; \
mv inkscape-version.new.cpp inkscape-version.cpp; \
fi; \
echo $$VERSION
-.PHONY: inkscape-version.cpp
# ######################
# ### CxxTest stuff ####