gvfs r1770 - in trunk: . programs



Author: gicmo
Date: Tue May 20 10:03:41 2008
New Revision: 1770
URL: http://svn.gnome.org/viewvc/gvfs?rev=1770&view=rev

Log:
Make the bash completion script conditionally (#530772)

        * configure.ac:
        * programs/Makefile.am:
        Allow to disable the installation of the bash completion
        scripts. Also make it possible to choose the directory
        where the file gets installed. Fixes #530772


Modified:
   trunk/ChangeLog
   trunk/configure.ac
   trunk/programs/Makefile.am

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac	(original)
+++ trunk/configure.ac	Tue May 20 10:03:41 2008
@@ -472,6 +472,25 @@
 AC_SUBST(ARCHIVE_CFLAGS)
 AC_SUBST(ARCHIVE_LIBS)
 
+dnl Install bash-completion file?
+AC_ARG_ENABLE([bash-completion],
+	      AC_HELP_STRING([--disable-bash-completion],
+			     [build without bash-completion support]),
+	      msg_bash_completion=$enableval,
+	      msg_bash_completion=yes)
+if test "x$enable_bash_completion" != "xno"; then
+  msg_bash_completion=yes
+fi
+AM_CONDITIONAL(ENABLE_BASHCOMP, test "$msg_bash_completion" = "yes")
+
+AC_ARG_WITH([bash-completion-dir],
+	    AC_HELP_STRING([--with-bash-completion-dir=PATH],
+	    		   [choose directory for bash-completion file (default=SYSCONFDIR/profile.d)]),
+	    with_bashcomp_dir=$withval,
+	    with_bashcomp_dir=$sysconfdir/profile.d)
+BASHCOMP_DIR=$with_bashcomp_dir
+AC_SUBST(BASHCOMP_DIR)
+
 dnl ==========================================================================
 	
 dnl Globally define_GNU_SOURCE and therefore enable the GNU extensions
@@ -555,4 +574,5 @@
         DNS-SD support:               $msg_avahi
 	Use HAL for volume monitor:   $msg_hal (with fast init path: $have_hal_fast_init)
 	GNOME Keyring support:        $msg_keyring
+	Bash-completion support:      $msg_bash_completion
 "

Modified: trunk/programs/Makefile.am
==============================================================================
--- trunk/programs/Makefile.am	(original)
+++ trunk/programs/Makefile.am	Tue May 20 10:03:41 2008
@@ -32,8 +32,10 @@
 	gvfs-less				\
 	$(NULL)
 
-profiledir = $(sysconfdir)/profile.d
+if ENABLE_BASHCOMP
+profiledir = $(BASHCOMP_DIR)
 profile_SCRIPTS = gvfs-bash-completion.sh
+endif
 
 gvfs_cat_SOURCES = gvfs-cat.c
 gvfs_cat_LDADD = $(libraries)
@@ -80,4 +82,4 @@
 gvfs_mkdir_SOURCES = gvfs-mkdir.c
 gvfs_mkdir_LDADD = $(libraries)
 
-EXTRA_DIST=gvfs-less gvfs-bash-completion.sh
+EXTRA_DIST = gvfs-less gvfs-bash-completion.sh



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]