[PATCH 1 of 2] PR1120: Added --with-cacao-src-dir option
Stefan Ring
stefan at complang.tuwien.ac.at
Mon Sep 24 13:35:02 PDT 2012
# HG changeset patch
# User sr
# Date 1346570315 -7200
# Node ID df433f22394fccfedf8853e17e29cd66ebc0dc37
# Parent b374a4e01497602745d1ff4adf89a47c347f30e5
PR1120: Added --with-cacao-src-dir option
2012-09-02 Stefan Ring <stefan at complang.tuwien.ac.at>
* configure.ac: Added --with-cacao-src-dir option, along the lines
of Mercurial rev 66ad418c7b91 from icedtea6.
* acinclude: New macro IT_WITH_CACAO_SRC_DIR.
* Makefile.am: Copy CACAO sources when USE_ALT_CACAO_SRC_DIR is
used.
diff -r b374a4e01497 -r df433f22394f Makefile.am
--- a/Makefile.am Wed Sep 19 21:36:08 2012 +0100
+++ b/Makefile.am Sun Sep 02 09:18:35 2012 +0200
@@ -1068,6 +1068,8 @@
stamps/download-cacao.stamp:
if BUILD_CACAO
if !USE_SYSTEM_CACAO
+if USE_ALT_CACAO_SRC_DIR
+else
if USE_ALT_CACAO_SRC_ZIP
ln -sf $(ALT_CACAO_SRC_ZIP) $(CACAO_SRC_ZIP)
endif
@@ -1089,6 +1091,7 @@
fi
endif
endif
+endif
mkdir -p stamps
touch $@
@@ -1268,6 +1271,14 @@
stamps/extract-cacao.stamp: stamps/download-cacao.stamp
if BUILD_CACAO
if !USE_SYSTEM_CACAO
+if USE_ALT_CACAO_SRC_DIR
+ set -e ; \
+ if ! test -d cacao/cacao ; \
+ then \
+ mkdir cacao ; \
+ cp -rL $(ALT_CACAO_SRC_DIR) cacao/cacao ; \
+ fi
+else
set -e ; \
if ! test -d cacao/cacao ; \
then \
@@ -1280,6 +1291,7 @@
fi
endif
endif
+endif
mkdir -p stamps
touch $@
diff -r b374a4e01497 -r df433f22394f acinclude.m4
--- a/acinclude.m4 Wed Sep 19 21:36:08 2012 +0100
+++ b/acinclude.m4 Sun Sep 02 09:18:35 2012 +0200
@@ -805,7 +805,7 @@
AC_MSG_ERROR([Invalid CACAO source zip specified: ${ALT_CACAO_SRC_ZIP}])
fi
],
- [
+ [
ALT_CACAO_SRC_ZIP="not specified"
])
AM_CONDITIONAL(USE_ALT_CACAO_SRC_ZIP, test "x${ALT_CACAO_SRC_ZIP}" != "xnot specified")
@@ -813,6 +813,27 @@
AC_SUBST(ALT_CACAO_SRC_ZIP)
])
+AC_DEFUN([IT_WITH_CACAO_SRC_DIR],
+[
+ AC_MSG_CHECKING(for a CACAO source directory)
+ AC_ARG_WITH([cacao-src-dir],
+ [AS_HELP_STRING(--with-cacao-src-dir,specify the location of the CACAO sources)],
+ [
+ ALT_CACAO_SRC_DIR=${withval}
+ if test "x${ALT_CACAO_SRC_DIR}" = "xno"; then
+ ALT_CACAO_SRC_DIR="not specified"
+ elif ! test -d ${ALT_CACAO_SRC_DIR} ; then
+ AC_MSG_ERROR([Invalid CACAO source dir specified: ${ALT_CACAO_SRC_DIR}])
+ fi
+ ],
+ [
+ ALT_CACAO_SRC_DIR="not specified"
+ ])
+ AM_CONDITIONAL(USE_ALT_CACAO_SRC_DIR, test "x${ALT_CACAO_SRC_DIR}" != "xnot specified")
+ AC_MSG_RESULT(${ALT_CACAO_SRC_DIR})
+ AC_SUBST(ALT_CACAO_SRC_DIR)
+])
+
AC_DEFUN([IT_ENABLE_HG],
[
AC_REQUIRE([IT_WITH_PROJECT])
diff -r b374a4e01497 -r df433f22394f configure.ac
--- a/configure.ac Wed Sep 19 21:36:08 2012 +0100
+++ b/configure.ac Sun Sep 02 09:18:35 2012 +0200
@@ -148,6 +148,7 @@
IT_ENABLE_CACAO
IT_WITH_CACAO_HOME
IT_WITH_CACAO_SRC_ZIP
+IT_WITH_CACAO_SRC_DIR
IT_ENABLE_JAMVM
IT_WITH_JAMVM_SRC_ZIP
More information about the distro-pkg-dev
mailing list