aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Grissiom <chaos.proton@gmail.com>2010-09-18 14:31:18 +0800
committerGravatar Grissiom <chaos.proton@gmail.com>2010-09-18 14:31:18 +0800
commitc08bae6aebc7489d531aaa9edaa4463eb82bdf19 (patch)
tree5d6e201699c06dc86d1fb18c03bf6ff78b31109e
parent3aa107c4ae8bc4bd41083ecee074732cb29a676b (diff)
configure xsel in configure phase
... and with the same arguments of fish
-rw-r--r--Makefile.in8
-rw-r--r--configure.ac14
2 files changed, 14 insertions, 8 deletions
diff --git a/Makefile.in b/Makefile.in
index f02763b2..f107745b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -349,13 +349,7 @@ test: $(PROGRAMS) fish_tests
# Build the xsel program, which is maintained in its own tarball
#
-${XSEL}:
- tar -xf ${XSEL}.tar.gz
-
-${XSEL}/Makefile: ${XSEL}
- cd ${XSEL} && ./configure
-
-${XSEL_BIN}: ${XSEL}/Makefile
+${XSEL_BIN}:
$(MAKE) -C ${XSEL} || echo "Failed to build xsel - either add the required dependencies or use './configure --without-xsel' to disable it."
diff --git a/configure.ac b/configure.ac
index b9132286..377ab5eb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,6 +11,11 @@
AC_INIT(fish,1.23.1,fish-users@lists.sf.net)
+#
+# preserve configure arguments for xsel
+#
+
+conf_arg=$@
#
# List of output variables produced by this configure script
@@ -200,7 +205,8 @@ AC_ARG_WITH(
xsel,
AC_HELP_STRING(
[--without-xsel],
- [do not build the xsel program needed for X clipboard integration]
+ [do not build the xsel program needed for X clipboard integration.
+ If build xsel, it will be configured with the same options as fish.]
),
[xsel=$withval],
[xsel=with_xsel]
@@ -977,6 +983,12 @@ if test ! x$local_found_posix_switch = xyes; then
echo "Some fish features may be disabled."
fi
+if [[ "$xsel" = "with_xsel" ]]; then
+ echo "Now configure xsel with $conf_arg"
+ rm -rf $XSEL
+ tar xf $XSEL.tar.gz
+ cd $XSEL && ./configure $conf_arg
+fi
echo "fish is now configured."
echo "Use 'make' and 'make install' to build and install fish."