From 5e62a6a476c925e58e169e43468ed0cee422bb1a Mon Sep 17 00:00:00 2001 From: pboutill Date: Mon, 21 Nov 2011 16:58:35 +0000 Subject: coqide default pref files are by default in /etc/xdg/coq/ git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@14715 85f007b7-540e-0410-9357-904b9bb8a0f7 --- configure | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'configure') diff --git a/configure b/configure index 1d6b086f0..4d8912461 100755 --- a/configure +++ b/configure @@ -45,6 +45,7 @@ usage () { printf "\tSpecifies the source directory\n" echo "-bindir" echo "-libdir" + echo "-configdir" echo "-mandir" echo "-docdir" printf "\tSpecifies where to install bin/lib/man/doc files resp.\n" @@ -129,6 +130,7 @@ src_spec=no prefix_spec=no bindir_spec=no libdir_spec=no +configdir_spec=no mandir_spec=no docdir_spec=no emacslib_spec=no @@ -178,6 +180,9 @@ while : ; do -libdir|--libdir) libdir_spec=yes libdir="$2" shift;; + -configdir|--configdir) configdir_spec=yes + configdir="$2" + shift;; -mandir|--mandir) mandir_spec=yes mandir="$2" shift;; @@ -730,6 +735,7 @@ case $ARCH$CYGWIN in win32) bindir_def='C:\coq\bin' libdir_def='C:\coq\lib' + configdir_def='C:\coq\config' mandir_def='C:\coq\man' docdir_def='C:\coq\doc' emacslib_def='C:\coq\emacs' @@ -737,6 +743,7 @@ case $ARCH$CYGWIN in *) bindir_def=/usr/local/bin libdir_def=/usr/local/lib/coq + configdir_def=/etc/xdg/coq mandir_def=/usr/local/man docdir_def=/usr/local/share/doc/coq emacslib_def=/usr/local/share/emacs/site-lisp @@ -780,6 +787,23 @@ case $libdir_spec in *) LIBDIR_OPTION="None";; esac +case $configdir_spec/$local in + yes/*) CONFIGDIR=$configdir;; + */true) CONFIGDIR=$COQTOP/ide + configdir_spec=yes;; + *) printf "Where should I install the Coqide conguration files [$configdir_def]? " + read CONFIGDIR + case $CONFIGDIR in + "") CONFIGDIR=$configdir_def;; + *) configdir_spec=yes;; + esac;; +esac + +case $configdir_spec in + yes) CONFIGDIR_OPTION="Some \"$CONFIGDIR\"";; + *) CONFIGDIR_OPTION="None";; +esac + case $mandir_spec/$prefix_spec/$local in yes/*/*) MANDIR=$mandir;; */yes/*) MANDIR=$prefix/man ;; @@ -908,6 +932,7 @@ echo "" echo " Paths for true installation:" echo " binaries will be copied in $BINDIR" echo " library will be copied in $LIBDIR" +echo " config files will be copied in $CONFIGDIR" echo " man pages will be copied in $MANDIR" echo " documentation will be copied in $DOCDIR" echo " emacs mode will be copied in $EMACSLIB" @@ -977,6 +1002,7 @@ case $ARCH in BINDIR=`echo $BINDIR |sed -e 's|\\\|\\\\\\\|g'` COQSRC=`cygpath -m $COQSRC |sed -e 's|\\\|\\\\\\\|g'` LIBDIR=`echo $LIBDIR |sed -e 's|\\\|\\\\\\\|g'` + CONFIGDIR=`echo $CONFIGDIR |sed -e 's|\\\|\\\\\\\|g'` CAMLBIN=`echo $CAMLBIN |sed -e 's|\\\|\\\\\\\|g'` CAMLLIB=`echo $CAMLLIB |sed -e 's|\\\|\\\\\\\|g'` MANDIR=`echo $MANDIR |sed -e 's|\\\|\\\\\\\|g'` @@ -1012,6 +1038,7 @@ cat << END_OF_COQ_CONFIG > $mlconfig_file let local = $local let coqrunbyteflags = "$COQRUNBYTEFLAGS" let coqlib = $LIBDIR_OPTION +let configdir = $CONFIGDIR_OPTION let docdir = "$DOCDIR" let ocaml = "$ocamlexec" let ocamlc = "$bytecamlc" @@ -1085,6 +1112,7 @@ sed -e "s|LOCALINSTALLATION|$local|" \ -e "s|COQVERSION|$VERSION|" \ -e "s|BINDIRDIRECTORY|$BINDIR|" \ -e "s|COQLIBDIRECTORY|$LIBDIR|" \ + -e "s|CONFIGDIRDIRECTORY|$CONFIGDIR|" \ -e "s|BUILDLDPATH=|$BUILDLDPATH|" \ -e "s|MANDIRDIRECTORY|$MANDIR|" \ -e "s|DOCDIRDIRECTORY|$DOCDIR|" \ -- cgit v1.2.3