[chronojump] Fix win32 build with autotools
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Fix win32 build with autotools
- Date: Wed, 23 Jan 2013 01:26:03 +0000 (UTC)
commit f49d825c23470ffe87749fa4c5da5652190deeba
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Wed Jan 23 02:21:15 2013 +0100
Fix win32 build with autotools
CesarPlayer/Makefile.am | 4 +-
Makefile.am | 12 ++---
autogen.sh | 33 +++--------
chronojump_server/Makefile.am | 1 +
configure.ac | 54 ++++++++-----------
m4/shamrock/expansions.m4 | 50 +++++++++++++++++
m4/shamrock/gnome-doc.m4 | 23 ++++++++
m4/shamrock/i18n.m4 | 10 ++++
m4/shamrock/mono.m4 | 120 +++++++++++++++++++++++++++++++++++++++++
m4/shamrock/monodoc.m4 | 25 +++++++++
m4/shamrock/nunit.m4 | 29 ++++++++++
m4/shamrock/programs.m4 | 13 +++++
m4/shamrock/util.m4 | 11 ++++
m4/shave/shave | 109 +++++++++++++++++++++++++++++++++++++
m4/shave/shave-libtool | 109 +++++++++++++++++++++++++++++++++++++
m4/shave/shave-libtool.in | 109 +++++++++++++++++++++++++++++++++++++
m4/shave/shave.in | 109 +++++++++++++++++++++++++++++++++++++
m4/shave/shave.m4 | 102 ++++++++++++++++++++++++++++++++++
po/Makefile.am | 2 -
src/Makefile.am | 4 +-
20 files changed, 861 insertions(+), 68 deletions(-)
---
diff --git a/CesarPlayer/Makefile.am b/CesarPlayer/Makefile.am
index b9d4db7..dcf1d12 100644
--- a/CesarPlayer/Makefile.am
+++ b/CesarPlayer/Makefile.am
@@ -2,7 +2,7 @@
EXTRA_DIST =
if ENABLE_DEBUG
-ASSEMBLY_COMPILER_COMMAND = $(GMCS)
+ASSEMBLY_COMPILER_COMMAND = $(MCS)
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -unsafe -warn:4 -optimize+ -debug -define:DEBUG
ASSEMBLY = bin/Debug/CesarPlayer.dll
ASSEMBLY_MDB = $(ASSEMBLY).mdb
@@ -17,7 +17,7 @@ CESARPLAYER_DLL_CONFIG = $(BUILD_DIR)/CesarPlayer.dll.config
endif
if ENABLE_RELEASE
-ASSEMBLY_COMPILER_COMMAND = $(GMCS)
+ASSEMBLY_COMPILER_COMMAND = $(MCS)
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -unsafe -warn:4 -optimize+
ASSEMBLY = bin/Release/CesarPlayer.dll
ASSEMBLY_MDB = $(ASSEMBLY).mdb
diff --git a/Makefile.am b/Makefile.am
index a47f396..5a4886f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,13 +2,11 @@ EXTRA_DIST = m4 expansions.m4
ACLOCAL_AMFLAGS = -I m4
-if ENABLE_DEBUG
- SUBDIRS = chronopic-firmware chronojump_server chronopic-tests \
- src po manual chronopic-firmware libcesarplayer CesarPlayer
-endif
-if ENABLE_RELEASE
- SUBDIRS = chronopic-firmware chronojump_server chronopic-tests \
- libcesarplayer CesarPlayer src po manual
+SUBDIRS = chronopic-firmware \
+ libcesarplayer CesarPlayer src po manual
+
+if OSTYPE_LINUX
+ SUBDIRS += chronopic-tests chronojump_server
endif
# Build ChangeLog from GIT history
diff --git a/autogen.sh b/autogen.sh
index 4295c68..d1cb822 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -8,6 +8,7 @@ CONFIGURE=configure.ac
: ${AUTOHEADER=autoheader}
: ${AUTOMAKE=automake}
: ${LIBTOOLIZE=libtoolize}
+: ${INTLTOOLIZE=intltoolize}
: ${ACLOCAL=aclocal}
: ${LIBTOOL=libtool}
@@ -17,30 +18,9 @@ test -z "$srcdir" && srcdir=.
ORIGDIR=`pwd`
cd $srcdir
TEST_TYPE=-f
-aclocalinclude="-I . $ACLOCAL_FLAGS"
+aclocalinclude="-I m4/shamrock -I m4/shave $ACLOCAL_FLAGS"
+conf_flags="--enable-maintainer-mode"
-DIE=0
-
-($AUTOCONF --version) < /dev/null > /dev/null 2>&1 || {
- echo
- echo "You must have autoconf installed to compile $PROJECT."
- echo "Download the appropriate package for your distribution,"
- echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
- DIE=1
-}
-
-($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
- echo
- echo "You must have automake installed to compile $PROJECT."
- echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.4.tar.gz"
- echo "(or a newer version if it is available)"
- DIE=1
-}
-
-if test "$DIE" -eq 1; then
- exit 1
-fi
-
#test $TEST_TYPE $FILE || {
# echo "You must run this script in the top-level $PROJECT directory"
# exit 1
@@ -57,7 +37,12 @@ esac
(grep "^AM_PROG_LIBTOOL" $CONFIGURE >/dev/null) && {
echo "Running $LIBTOOLIZE ..."
- $LIBTOOLIZE --force --copy
+ $LIBTOOLIZE --force --copy --automake
+}
+
+(grep "^IT_PROG_INTLTOOL" $CONFIGURE >/dev/null) && {
+ echo "Running $INTLTOOLIZE ..."
+ $INTLTOOLIZE --force --copy --automake
}
echo "Running $ACLOCAL $aclocalinclude ..."
diff --git a/chronojump_server/Makefile.am b/chronojump_server/Makefile.am
index 1d323a6..449d8af 100644
--- a/chronojump_server/Makefile.am
+++ b/chronojump_server/Makefile.am
@@ -57,6 +57,7 @@ REFERENCES = \
Mono.Posix
DLL_REFERENCES =
+PROGRAMFILES =
CLEANFILES = $(PROGRAMFILES)
diff --git a/configure.ac b/configure.ac
index ba14613..6874b19 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,8 +3,10 @@ dnl Process this file with autoconf to produce a configure script.
AC_PREREQ([2.54])
AC_INIT([chronojump], [1.0.0])
AM_INIT_AUTOMAKE([foreign])
+AM_MAINTAINER_MODE
AC_CONFIG_MACRO_DIR([m4])
+AC_SUBST([ACLOCAL_AMFLAGS], ["-I m4/shamrock -I m4/shave \${ACLOCAL_FLAGS}"])
AM_PROG_LIBTOOL
@@ -23,24 +25,27 @@ SHAMROCK_EXPAND_DATADIR
AC_PROG_INSTALL
-dnl Check for C# compiler
-AC_PATH_PROG(CSC, csc, no)
-if test "x$CSC" = "xno"; then
- AC_PATH_PROG(MCS, gmcs, no)
- if test "x$MCS" = "xno"; then
- AC_PATH_PROG(MCS2, gmcs2,no)
- if test "x$MCS2" = "xno"; then
- AC_MSG_ERROR([You need to install a C-sharp compiler])
- else
- AC_SUBST(GMCS,[gmcs2])
- fi
-
- else
- AC_SUBST(GMCS,[gmcs])
- fi
-else
- AC_SUBST(GMCS,[csc])
-fi
+dnl Mono and C# compiler
+dnl Check first for a 4.0 compiler or than fallback to 2.0
+SHAMROCK_CHECK_MONO_MODULE(2.4.0)
+PKG_CHECK_EXISTS([mono >= 2.8],
+ [SHAMROCK_FIND_MONO_4_0_COMPILER
+ SHAMROCK_CHECK_MONO_4_0_GAC_ASSEMBLIES([
+ System.Data
+ Mono.Cairo
+ Mono.Posix
+ Mono.Data.Sqlite
+ ])]
+,
+ [SHAMROCK_FIND_MONO_2_0_COMPILER
+ SHAMROCK_CHECK_MONO_2_0_GAC_ASSEMBLIES([
+ System.Data
+ Mono.Cairo
+ Mono.Posix
+ Mono.Data.Sqlite
+ ])])
+AC_SUBST(MCS, ["$MCS"])
+SHAMROCK_FIND_MONO_RUNTIME
dnl Check for gettext utils
AC_PATH_PROG(MSGFMT, msgfmt, no)
@@ -104,18 +109,6 @@ PKG_CHECK_MODULES(CESARPLAYER, [gtk+-2.0 >= 2.8 gdk-2.0 gio-2.0 glib-2.0 gstream
AC_SUBST(CESARPLAYER_CFLAGS)
AC_SUBST(CESARPLAYER_LIBS)
-dnl Check for Mono assemblies that we need
-needed_dlls="Mono.Data.Sqlite Mono.Posix"
-for i in $needed_dlls; do
- AC_MSG_CHECKING([for $i.dll])
- if test ! \( -e `$PKG_CONFIG --variable=prefix mono`/lib/mono/2.0/$i.dll -o -e `$PKG_CONFIG --variable=prefix mono`/lib64/mono/2.0//$i.dll \); then
- AC_MSG_ERROR([missing required mono 2.0 DLL: $i.dll])
- else
- AC_MSG_RESULT([found])
- fi
-done
-
-
AC_CONFIG_FILES([
Makefile
chronopic-firmware/Makefile
@@ -132,7 +125,6 @@ src/chronojump
src/chronojump_mini
src/chronojump.desktop
libcesarplayer/Makefile
-libcesarplayer/src/Makefile
CesarPlayer/Makefile
CesarPlayer/AssemblyInfo.cs
CesarPlayer/CesarPlayer.dll.config
diff --git a/m4/shamrock/expansions.m4 b/m4/shamrock/expansions.m4
new file mode 100644
index 0000000..ba62356
--- /dev/null
+++ b/m4/shamrock/expansions.m4
@@ -0,0 +1,50 @@
+AC_DEFUN([SHAMROCK_EXPAND_LIBDIR],
+[
+ expanded_libdir=`(
+ case $prefix in
+ NONE) prefix=$ac_default_prefix ;;
+ *) ;;
+ esac
+ case $exec_prefix in
+ NONE) exec_prefix=$prefix ;;
+ *) ;;
+ esac
+ eval echo $libdir
+ )`
+ AC_SUBST(expanded_libdir)
+])
+
+AC_DEFUN([SHAMROCK_EXPAND_BINDIR],
+[
+ expanded_bindir=`(
+ case $prefix in
+ NONE) prefix=$ac_default_prefix ;;
+ *) ;;
+ esac
+ case $exec_prefix in
+ NONE) exec_prefix=$prefix ;;
+ *) ;;
+ esac
+ eval echo $bindir
+ )`
+ AC_SUBST(expanded_bindir)
+])
+
+AC_DEFUN([SHAMROCK_EXPAND_DATADIR],
+[
+ case $prefix in
+ NONE) prefix=$ac_default_prefix ;;
+ *) ;;
+ esac
+
+ case $exec_prefix in
+ NONE) exec_prefix=$prefix ;;
+ *) ;;
+ esac
+
+ expanded_datadir=`(eval echo $datadir)`
+ expanded_datadir=`(eval echo $expanded_datadir)`
+
+ AC_SUBST(expanded_datadir)
+])
+
diff --git a/m4/shamrock/gnome-doc.m4 b/m4/shamrock/gnome-doc.m4
new file mode 100644
index 0000000..e7340e9
--- /dev/null
+++ b/m4/shamrock/gnome-doc.m4
@@ -0,0 +1,23 @@
+AC_DEFUN([SHAMROCK_CHECK_GNOME_DOC_UTILS],
+[
+ AC_ARG_ENABLE([user-help],
+ AC_HELP_STRING([--enable-user-help], [Enable building the user-help [[default=auto]]]),,
+ enable_user_help=auto)
+
+ if test "x$enable_user_help" = "xauto"; then
+ PKG_CHECK_MODULES(GNOME_DOC_UTILS,
+ gnome-doc-utils,
+ enable_user_help=yes, enable_user_help=no)
+ elif test "x$enable_user_help" = "xyes"; then
+ PKG_CHECK_MODULES(GNOME_DOC_UTILS, gnome-doc-utils)
+ fi
+
+ # GNOME_DOC_INIT sets ENABLE_SK, but if we have disabled
+ # user docs, then this needs to be defined manually.
+ AM_CONDITIONAL(ENABLE_SK, false)
+ if test "x$enable_user_help" = "xyes"; then
+ GNOME_DOC_INIT([$1], enable_user_help=yes, enable_user_help=no)
+ fi
+
+ AM_CONDITIONAL(HAVE_GNOME_DOC_UTILS, test "x$enable_user_help" = "xyes")
+])
diff --git a/m4/shamrock/i18n.m4 b/m4/shamrock/i18n.m4
new file mode 100644
index 0000000..e632647
--- /dev/null
+++ b/m4/shamrock/i18n.m4
@@ -0,0 +1,10 @@
+AC_DEFUN([SHAMROCK_CONFIGURE_I18N],
+[
+ ALL_LINGUAS=`grep -v '^#' $srcdir/po/LINGUAS | $SED ':a;N;$!ba;s/\n/ /g; s/[ ]+/ /g' | xargs`
+ GETTEXT_PACKAGE=$1
+ AC_SUBST(GETTEXT_PACKAGE)
+ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext Package])
+ AM_GLIB_GNU_GETTEXT
+ AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/po/LINGUAS'])
+])
+
diff --git a/m4/shamrock/mono.m4 b/m4/shamrock/mono.m4
new file mode 100644
index 0000000..cb6d832
--- /dev/null
+++ b/m4/shamrock/mono.m4
@@ -0,0 +1,120 @@
+AC_DEFUN([SHAMROCK_FIND_MONO_1_0_COMPILER],
+[
+ SHAMROCK_FIND_PROGRAM_OR_BAIL(MCS, mcs)
+])
+
+AC_DEFUN([SHAMROCK_FIND_MONO_2_0_COMPILER],
+[
+ SHAMROCK_FIND_PROGRAM_OR_BAIL(MCS, gmcs)
+])
+
+AC_DEFUN([SHAMROCK_FIND_MONO_4_0_COMPILER],
+[
+ SHAMROCK_FIND_PROGRAM_OR_BAIL(MCS, dmcs)
+])
+
+AC_DEFUN([SHAMROCK_FIND_MONO_4_0_COMPILER_NOBAIL],
+[
+ SHAMROCK_FIND_PROGRAM(MCS, dmcs, no)
+])
+
+AC_DEFUN([SHAMROCK_FIND_MONO_RUNTIME],
+[
+ SHAMROCK_FIND_PROGRAM_OR_BAIL(MONO, mono)
+])
+
+AC_DEFUN([_SHAMROCK_CHECK_MONO_MODULE],
+[
+ PKG_CHECK_MODULES(MONO_MODULE, $1 >= $2)
+])
+
+AC_DEFUN([SHAMROCK_CHECK_MONO_MODULE],
+[
+ _SHAMROCK_CHECK_MONO_MODULE(mono, $1)
+])
+
+AC_DEFUN([SHAMROCK_CHECK_MONO2_MODULE],
+[
+ _SHAMROCK_CHECK_MONO_MODULE(mono-2, $1)
+])
+
+AC_DEFUN([_SHAMROCK_CHECK_MONO_MODULE_NOBAIL],
+[
+ PKG_CHECK_MODULES(MONO_MODULE, $2 >= $1,
+ HAVE_MONO_MODULE=yes, HAVE_MONO_MODULE=no)
+ AC_SUBST(HAVE_MONO_MODULE)
+])
+
+AC_DEFUN([SHAMROCK_CHECK_MONO_MODULE_NOBAIL],
+[
+ _SHAMROCK_CHECK_MONO_MODULE_NOBAIL(mono, $1)
+])
+
+AC_DEFUN([SHAMROCK_CHECK_MONO2_MODULE_NOBAIL],
+[
+ _SHAMROCK_CHECK_MONO_MODULE_NOBAIL(mono-2, $1)
+])
+
+AC_DEFUN([_SHAMROCK_CHECK_MONO_GAC_ASSEMBLIES],
+[
+ for asm in $(echo "$*" | cut -d, -f3- | sed 's/\,/ /g')
+ do
+ AC_MSG_CHECKING([for Mono $2 GAC for $asm.dll])
+ if test \
+ -e "$($PKG_CONFIG --variable=libdir $1)/mono/$2/$asm.dll" -o \
+ -e "$($PKG_CONFIG --variable=prefix $1)/lib/mono/$2/$asm.dll"; \
+ then \
+ AC_MSG_RESULT([found])
+ else
+ AC_MSG_RESULT([not found])
+ AC_MSG_ERROR([missing required Mono $2 assembly: $asm.dll])
+ fi
+ done
+])
+
+AC_DEFUN([SHAMROCK_CHECK_MONO_1_0_GAC_ASSEMBLIES],
+[
+ _SHAMROCK_CHECK_MONO_GAC_ASSEMBLIES(mono, 1.0, $*)
+])
+
+AC_DEFUN([SHAMROCK_CHECK_MONO_2_0_GAC_ASSEMBLIES],
+[
+ _SHAMROCK_CHECK_MONO_GAC_ASSEMBLIES(mono, 2.0, $*)
+])
+
+AC_DEFUN([SHAMROCK_CHECK_MONO2_2_0_GAC_ASSEMBLIES],
+[
+ _SHAMROCK_CHECK_MONO_GAC_ASSEMBLIES(mono-2, 2.0, $*)
+])
+
+AC_DEFUN([SHAMROCK_CHECK_MONO_4_0_GAC_ASSEMBLIES],
+[
+ _SHAMROCK_CHECK_MONO_GAC_ASSEMBLIES(mono, 4.0, $*)
+])
+
+AC_DEFUN([SHAMROCK_CHECK_MONO2_4_0_GAC_ASSEMBLIES],
+[
+ _SHAMROCK_CHECK_MONO_GAC_ASSEMBLIES(mono-2, 4.0, $*)
+])
+
+AC_DEFUN([SHAMROCK_CHECK_MONO2_4_0_GAC_ASSEMBLIES],
+[
+SHAMROCK_CHECK_MONO_MODULE(2.4.0)
+ AC_CHECK_PROG(MCS, gmcs, yes)
+ if test "x$MCS" = "xyes"; then
+ AC_SUST(MCS)
+ SHAMROCK_CHECK_MONO_2_0_GAC_ASSEMBLIES([
+ System.Data
+ Mono.Cairo
+ Mono.Posix
+ ])
+ else
+ SHAMROCK_FIND_MONO_2_0_COMPILER
+ SHAMROCK_CHECK_MONO_2_0_GAC_ASSEMBLIES([
+ System.Data
+ Mono.Cairo
+ Mono.Posix
+ ])
+ fi
+SHAMROCK_FIND_MONO_RUNTIME
+])
diff --git a/m4/shamrock/monodoc.m4 b/m4/shamrock/monodoc.m4
new file mode 100644
index 0000000..891ac74
--- /dev/null
+++ b/m4/shamrock/monodoc.m4
@@ -0,0 +1,25 @@
+AC_DEFUN([SHAMROCK_CHECK_MONODOC],
+[
+ AC_ARG_ENABLE(docs, AC_HELP_STRING([--disable-docs],
+ [Do not build documentation]), , enable_docs=yes)
+
+ if test "x$enable_docs" = "xyes"; then
+ AC_PATH_PROG(MONODOCER, monodocer, no)
+ if test "x$MONODOCER" = "xno"; then
+ AC_MSG_ERROR([You need to install monodoc, or pass --disable-docs to configure to skip documentation installation])
+ fi
+
+ AC_PATH_PROG(MDASSEMBLER, mdassembler, no)
+ if test "x$MDASSEMBLER" = "xno"; then
+ AC_MSG_ERROR([You need to install mdassembler, or pass --disable-docs to configure to skip documentation installation])
+ fi
+
+ DOCDIR=`$PKG_CONFIG monodoc --variable=sourcesdir`
+ AC_SUBST(DOCDIR)
+ AM_CONDITIONAL(BUILD_DOCS, true)
+ else
+ AC_MSG_NOTICE([not building ${PACKAGE} API documentation])
+ AM_CONDITIONAL(BUILD_DOCS, false)
+ fi
+])
+
diff --git a/m4/shamrock/nunit.m4 b/m4/shamrock/nunit.m4
new file mode 100644
index 0000000..4d57d00
--- /dev/null
+++ b/m4/shamrock/nunit.m4
@@ -0,0 +1,29 @@
+AC_DEFUN([SHAMROCK_CHECK_NUNIT],
+[
+ NUNIT_REQUIRED=2.4.7
+
+ AC_ARG_ENABLE(tests, AC_HELP_STRING([--enable-tests], [Enable NUnit tests]),
+ enable_tests=$enableval, enable_tests="no")
+
+ if test "x$enable_tests" = "xno"; then
+ do_tests=no
+ AM_CONDITIONAL(ENABLE_TESTS, false)
+ else
+ PKG_CHECK_MODULES(NUNIT, nunit >= $NUNIT_REQUIRED,
+ do_tests="yes", do_tests="no")
+
+ AC_SUBST(NUNIT_LIBS)
+ AM_CONDITIONAL(ENABLE_TESTS, test "x$do_tests" = "xyes")
+
+ if test "x$do_tests" = "xno"; then
+ PKG_CHECK_MODULES(NUNIT, mono-nunit >= 2.4,
+ do_tests="yes", do_tests="no")
+
+ AC_SUBST(NUNIT_LIBS)
+ AM_CONDITIONAL(ENABLE_TESTS, test "x$do_tests" = "xyes")
+
+ if test "x$do_tests" = "xno"; then
+ AC_MSG_WARN([Could not find nunit: tests will not be available]) fi
+ fi
+ fi
+])
diff --git a/m4/shamrock/programs.m4 b/m4/shamrock/programs.m4
new file mode 100644
index 0000000..412a7a6
--- /dev/null
+++ b/m4/shamrock/programs.m4
@@ -0,0 +1,13 @@
+AC_DEFUN([SHAMROCK_FIND_PROGRAM],
+[
+ AC_PATH_PROG($1, $2, $3)
+ AC_SUBST($1)
+])
+
+AC_DEFUN([SHAMROCK_FIND_PROGRAM_OR_BAIL],
+[
+ SHAMROCK_FIND_PROGRAM($1, $2, no)
+ if test "x$$1" = "xno"; then
+ AC_MSG_ERROR([You need to install '$2'])
+ fi
+])
diff --git a/m4/shamrock/util.m4 b/m4/shamrock/util.m4
new file mode 100644
index 0000000..de85ba9
--- /dev/null
+++ b/m4/shamrock/util.m4
@@ -0,0 +1,11 @@
+AC_DEFUN([SHAMROCK_CONCAT],
+[
+ $1="$$1 $$2"
+])
+
+AC_DEFUN([SHAMROCK_CONCAT_MODULE],
+[
+ SHAMROCK_CONCAT($1_CFLAGS, $2_CFLAGS)
+ SHAMROCK_CONCAT($1_LIBS, $2_LIBS)
+])
+
diff --git a/m4/shave/shave b/m4/shave/shave
new file mode 100644
index 0000000..826780b
--- /dev/null
+++ b/m4/shave/shave
@@ -0,0 +1,109 @@
+#!/bin/sh
+#
+# Copyright (c) 2009, Damien Lespiau <damien lespiau gmail com>
+#
+# Permission is hereby granted, free of charge, to any person
+# obtaining a copy of this software and associated documentation
+# files (the "Software"), to deal in the Software without
+# restriction, including without limitation the rights to use,
+# copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following
+# conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+# OTHER DEALINGS IN THE SOFTWARE.
+
+# we need sed
+SED=/bin/sed
+if test -z "$SED" ; then
+SED=sed
+fi
+
+lt_unmangle ()
+{
+ last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_\-\.]*_la-##'`
+}
+
+# the tool to wrap (cc, cxx, ar, ranlib, ..)
+tool="$1"
+shift
+
+# the reel tool (to call)
+REEL_TOOL="$1"
+shift
+
+pass_through=0
+preserved_args=
+while test "$#" -gt 0; do
+ opt="$1"
+ shift
+
+ case $opt in
+ --shave-mode=*)
+ mode=`echo $opt | $SED -e 's/[-_a-zA-Z0-9]*=//'`
+ ;;
+ -o)
+ lt_output="$1"
+ preserved_args="$preserved_args $opt"
+ ;;
+ -out:*|/out:*)
+ lt_output="${opt#*:}"
+ preserved_args="$preserved_args $opt"
+ ;;
+ *)
+ preserved_args="$preserved_args $opt"
+ ;;
+ esac
+done
+
+# mode=link is handled in the libtool wrapper
+case "$mode,$tool" in
+link,*)
+ pass_through=1
+ ;;
+*,cxx)
+ Q=" CXX "
+ ;;
+*,cc)
+ Q=" CC "
+ ;;
+*,fc)
+ Q=" FC "
+ ;;
+*,f77)
+ Q=" F77 "
+ ;;
+*,objc)
+ Q=" OBJC "
+ ;;
+*,mcs)
+ Q=" MCS "
+ ;;
+*,*)
+ # should not happen
+ Q=" CC "
+ ;;
+esac
+
+lt_unmangle "$lt_output"
+output=$last_result
+
+if test -z $V; then
+ if test $pass_through -eq 0; then
+ echo "$Q$output"
+ fi
+ $REEL_TOOL $preserved_args
+else
+ echo $REEL_TOOL $preserved_args
+ $REEL_TOOL $preserved_args
+fi
diff --git a/m4/shave/shave-libtool b/m4/shave/shave-libtool
new file mode 100644
index 0000000..18389a8
--- /dev/null
+++ b/m4/shave/shave-libtool
@@ -0,0 +1,109 @@
+#!/bin/sh
+#
+# Copyright (c) 2009, Damien Lespiau <damien lespiau gmail com>
+#
+# Permission is hereby granted, free of charge, to any person
+# obtaining a copy of this software and associated documentation
+# files (the "Software"), to deal in the Software without
+# restriction, including without limitation the rights to use,
+# copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following
+# conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+# OTHER DEALINGS IN THE SOFTWARE.
+
+# we need sed
+SED=/bin/sed
+if test -z "$SED" ; then
+SED=sed
+fi
+
+lt_unmangle ()
+{
+ last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_\-\.]*_la-##'`
+}
+
+# the real libtool to use
+LIBTOOL="$1"
+shift
+
+# if 1, don't print anything, the underlaying wrapper will do it
+pass_though=0
+
+# scan the arguments, keep the right ones for libtool, and discover the mode
+preserved_args=
+
+# have we seen the --tag option of libtool in the command line ?
+tag_seen=0
+
+while test "$#" -gt 0; do
+ opt="$1"
+ shift
+
+ case $opt in
+ --mode=*)
+ mode=`echo $opt | $SED -e 's/[-_a-zA-Z0-9]*=//'`
+ preserved_args="$preserved_args $opt"
+ ;;
+ -o)
+ lt_output="$1"
+ preserved_args="$preserved_args $opt"
+ ;;
+ --tag=*)
+ tag_seen=1
+ preserved_args="$preserved_args $opt"
+ ;;
+ *)
+ preserved_args="$preserved_args $opt"
+ ;;
+ esac
+done
+
+case "$mode" in
+compile)
+ # shave will be called and print the actual CC/CXX/LINK line
+ preserved_args="$preserved_args --shave-mode=$mode"
+ pass_though=1
+ ;;
+link)
+ preserved_args="$preserved_args --shave-mode=$mode"
+ Q=" LINK "
+ ;;
+*)
+ # let's u
+ # echo "*** libtool: Unimplemented mode: $mode, fill a bug report"
+ ;;
+esac
+
+lt_unmangle "$lt_output"
+output=$last_result
+
+# automake does not add a --tag switch to its libtool invocation when
+# assembling a .s file and rely on libtool to infer the right action based
+# on the compiler name. As shave is using CC to hook a wrapper, libtool gets
+# confused. Let's detect these cases and add a --tag=CC option.
+tag=""
+if test $tag_seen -eq 0 -a x"$mode" = xcompile; then
+ tag="--tag=CC"
+fi
+
+if test -z $V; then
+ if test $pass_though -eq 0; then
+ echo "$Q$output"
+ fi
+ $LIBTOOL --silent $tag $preserved_args
+else
+ echo $LIBTOOL $tag $preserved_args
+ $LIBTOOL $tag $preserved_args
+fi
diff --git a/m4/shave/shave-libtool.in b/m4/shave/shave-libtool.in
new file mode 100644
index 0000000..54ebd69
--- /dev/null
+++ b/m4/shave/shave-libtool.in
@@ -0,0 +1,109 @@
+#!/bin/sh
+#
+# Copyright (c) 2009, Damien Lespiau <damien lespiau gmail com>
+#
+# Permission is hereby granted, free of charge, to any person
+# obtaining a copy of this software and associated documentation
+# files (the "Software"), to deal in the Software without
+# restriction, including without limitation the rights to use,
+# copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following
+# conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+# OTHER DEALINGS IN THE SOFTWARE.
+
+# we need sed
+SED= SED@
+if test -z "$SED" ; then
+SED=sed
+fi
+
+lt_unmangle ()
+{
+ last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_\-\.]*_la-##'`
+}
+
+# the real libtool to use
+LIBTOOL="$1"
+shift
+
+# if 1, don't print anything, the underlaying wrapper will do it
+pass_though=0
+
+# scan the arguments, keep the right ones for libtool, and discover the mode
+preserved_args=
+
+# have we seen the --tag option of libtool in the command line ?
+tag_seen=0
+
+while test "$#" -gt 0; do
+ opt="$1"
+ shift
+
+ case $opt in
+ --mode=*)
+ mode=`echo $opt | $SED -e 's/[-_a-zA-Z0-9]*=//'`
+ preserved_args="$preserved_args $opt"
+ ;;
+ -o)
+ lt_output="$1"
+ preserved_args="$preserved_args $opt"
+ ;;
+ --tag=*)
+ tag_seen=1
+ preserved_args="$preserved_args $opt"
+ ;;
+ *)
+ preserved_args="$preserved_args $opt"
+ ;;
+ esac
+done
+
+case "$mode" in
+compile)
+ # shave will be called and print the actual CC/CXX/LINK line
+ preserved_args="$preserved_args --shave-mode=$mode"
+ pass_though=1
+ ;;
+link)
+ preserved_args="$preserved_args --shave-mode=$mode"
+ Q=" LINK "
+ ;;
+*)
+ # let's u
+ # echo "*** libtool: Unimplemented mode: $mode, fill a bug report"
+ ;;
+esac
+
+lt_unmangle "$lt_output"
+output=$last_result
+
+# automake does not add a --tag switch to its libtool invocation when
+# assembling a .s file and rely on libtool to infer the right action based
+# on the compiler name. As shave is using CC to hook a wrapper, libtool gets
+# confused. Let's detect these cases and add a --tag=CC option.
+tag=""
+if test $tag_seen -eq 0 -a x"$mode" = xcompile; then
+ tag="--tag=CC"
+fi
+
+if test -z $V; then
+ if test $pass_though -eq 0; then
+ echo "$Q$output"
+ fi
+ $LIBTOOL --silent $tag $preserved_args
+else
+ echo $LIBTOOL $tag $preserved_args
+ $LIBTOOL $tag $preserved_args
+fi
diff --git a/m4/shave/shave.in b/m4/shave/shave.in
new file mode 100644
index 0000000..490d6c5
--- /dev/null
+++ b/m4/shave/shave.in
@@ -0,0 +1,109 @@
+#!/bin/sh
+#
+# Copyright (c) 2009, Damien Lespiau <damien lespiau gmail com>
+#
+# Permission is hereby granted, free of charge, to any person
+# obtaining a copy of this software and associated documentation
+# files (the "Software"), to deal in the Software without
+# restriction, including without limitation the rights to use,
+# copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following
+# conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+# OTHER DEALINGS IN THE SOFTWARE.
+
+# we need sed
+SED= SED@
+if test -z "$SED" ; then
+SED=sed
+fi
+
+lt_unmangle ()
+{
+ last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_\-\.]*_la-##'`
+}
+
+# the tool to wrap (cc, cxx, ar, ranlib, ..)
+tool="$1"
+shift
+
+# the reel tool (to call)
+REEL_TOOL="$1"
+shift
+
+pass_through=0
+preserved_args=
+while test "$#" -gt 0; do
+ opt="$1"
+ shift
+
+ case $opt in
+ --shave-mode=*)
+ mode=`echo $opt | $SED -e 's/[-_a-zA-Z0-9]*=//'`
+ ;;
+ -o)
+ lt_output="$1"
+ preserved_args="$preserved_args $opt"
+ ;;
+ -out:*|/out:*)
+ lt_output="${opt#*:}"
+ preserved_args="$preserved_args $opt"
+ ;;
+ *)
+ preserved_args="$preserved_args $opt"
+ ;;
+ esac
+done
+
+# mode=link is handled in the libtool wrapper
+case "$mode,$tool" in
+link,*)
+ pass_through=1
+ ;;
+*,cxx)
+ Q=" CXX "
+ ;;
+*,cc)
+ Q=" CC "
+ ;;
+*,fc)
+ Q=" FC "
+ ;;
+*,f77)
+ Q=" F77 "
+ ;;
+*,objc)
+ Q=" OBJC "
+ ;;
+*,mcs)
+ Q=" MCS "
+ ;;
+*,*)
+ # should not happen
+ Q=" CC "
+ ;;
+esac
+
+lt_unmangle "$lt_output"
+output=$last_result
+
+if test -z $V; then
+ if test $pass_through -eq 0; then
+ echo "$Q$output"
+ fi
+ $REEL_TOOL $preserved_args
+else
+ echo $REEL_TOOL $preserved_args
+ $REEL_TOOL $preserved_args
+fi
diff --git a/m4/shave/shave.m4 b/m4/shave/shave.m4
new file mode 100644
index 0000000..40e47f4
--- /dev/null
+++ b/m4/shave/shave.m4
@@ -0,0 +1,102 @@
+dnl Make automake/libtool output more friendly to humans
+dnl
+dnl Copyright (c) 2009, Damien Lespiau <damien lespiau gmail com>
+dnl
+dnl Permission is hereby granted, free of charge, to any person
+dnl obtaining a copy of this software and associated documentation
+dnl files (the "Software"), to deal in the Software without
+dnl restriction, including without limitation the rights to use,
+dnl copy, modify, merge, publish, distribute, sublicense, and/or sell
+dnl copies of the Software, and to permit persons to whom the
+dnl Software is furnished to do so, subject to the following
+dnl conditions:
+dnl
+dnl The above copyright notice and this permission notice shall be
+dnl included in all copies or substantial portions of the Software.
+dnl
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+dnl EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+dnl OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+dnl NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+dnl HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+dnl WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+dnl OTHER DEALINGS IN THE SOFTWARE.
+dnl
+dnl SHAVE_INIT([shavedir],[default_mode])
+dnl
+dnl shavedir: the directory where the shave scripts are, it defaults to
+dnl $(top_builddir)
+dnl default_mode: (enable|disable) default shave mode. This parameter
+dnl controls shave's behaviour when no option has been
+dnl given to configure. It defaults to disable.
+dnl
+dnl * SHAVE_INIT should be called late in your configure.(ac|in) file (just
+dnl before AC_CONFIG_FILE/AC_OUTPUT is perfect. This macro rewrites CC and
+dnl LIBTOOL, you don't want the configure tests to have these variables
+dnl re-defined.
+dnl * This macro requires GNU make's -s option.
+
+AC_DEFUN([_SHAVE_ARG_ENABLE],
+[
+ AC_ARG_ENABLE([shave],
+ AS_HELP_STRING(
+ [--enable-shave],
+ [use shave to make the build pretty [[default=$1]]]),,
+ [enable_shave=$1]
+ )
+])
+
+AC_DEFUN([SHAVE_INIT],
+[
+ dnl you can tweak the default value of enable_shave
+ m4_if([$2], [enable], [_SHAVE_ARG_ENABLE(yes)], [_SHAVE_ARG_ENABLE(no)])
+
+ if test x"$enable_shave" = xyes; then
+ dnl where can we find the shave scripts?
+ m4_if([$1],,
+ [shavedir="$ac_pwd"],
+ [shavedir="$ac_pwd/$1"])
+ AC_SUBST(shavedir)
+
+ dnl make is now quiet
+ AC_SUBST([MAKEFLAGS], [-s])
+ AC_SUBST([AM_MAKEFLAGS], ['`test -z $V && echo -s`'])
+
+ dnl we need sed
+ AC_CHECK_PROG(SED,sed,sed,false)
+
+ dnl substitute libtool
+ SHAVE_SAVED_LIBTOOL=$LIBTOOL
+ LIBTOOL="${SHELL} ${shavedir}/shave-libtool '${SHAVE_SAVED_LIBTOOL}'"
+ AC_SUBST(LIBTOOL)
+
+ dnl substitute cc/cxx
+ SHAVE_SAVED_CC=$CC
+ SHAVE_SAVED_CXX=$CXX
+ SHAVE_SAVED_FC=$FC
+ SHAVE_SAVED_F77=$F77
+ SHAVE_SAVED_OBJC=$OBJC
+ SHAVE_SAVED_MCS=$MCS
+ CC="${SHELL} ${shavedir}/shave cc ${SHAVE_SAVED_CC}"
+ CXX="${SHELL} ${shavedir}/shave cxx ${SHAVE_SAVED_CXX}"
+ FC="${SHELL} ${shavedir}/shave fc ${SHAVE_SAVED_FC}"
+ F77="${SHELL} ${shavedir}/shave f77 ${SHAVE_SAVED_F77}"
+ OBJC="${SHELL} ${shavedir}/shave objc ${SHAVE_SAVED_OBJC}"
+ MCS="${SHELL} ${shavedir}/shave mcs ${SHAVE_SAVED_MCS}"
+ AC_SUBST(CC)
+ AC_SUBST(CXX)
+ AC_SUBST(FC)
+ AC_SUBST(F77)
+ AC_SUBST(OBJC)
+ AC_SUBST(MCS)
+
+ V=@
+ else
+ V=1
+ fi
+ Q='$(V:1=)'
+ AC_SUBST(V)
+ AC_SUBST(Q)
+])
+
diff --git a/po/Makefile.am b/po/Makefile.am
index 98427ff..339eaf4 100644
--- a/po/Makefile.am
+++ b/po/Makefile.am
@@ -5,8 +5,6 @@ EXTRA_DIST =
CLEANFILES = $(GMO_FILES)
-include $(top_srcdir)/Makefile.include
-
PACKAGE = @PACKAGE@
BUILD_DIR = GMO
INSTALL_DIR = $(DESTDIR)$(prefix)/share/locale
diff --git a/src/Makefile.am b/src/Makefile.am
index f3c65ed..8d82212 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -3,7 +3,7 @@ EXTRA_DIST = chronojump_mini.cs ../images/report_web_style.css angle/*
if ENABLE_DEBUG
-ASSEMBLY_COMPILER_COMMAND = $(GMCS)
+ASSEMBLY_COMPILER_COMMAND = $(MCS)
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -nowarn:169,649 -optimize+ -debug -define:DEBUG
ASSEMBLY = bin/Debug/Chronojump.exe
ASSEMBLY_MDB = $(ASSEMBLY).mdb
@@ -20,7 +20,7 @@ CESARPLAYER_DLL_MDB=$(BUILD_DIR)/CesarPlayer.dll.mdb
endif
if ENABLE_RELEASE
-ASSEMBLY_COMPILER_COMMAND = $(GMCS)
+ASSEMBLY_COMPILER_COMMAND = $(MCS)
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -nowarn:169,649 -optimize+
ASSEMBLY = bin/Release/Chronojump.exe
ASSEMBLY_MDB =
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]