diff options
author | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2007-10-04 14:59:02 +0000 |
---|---|---|
committer | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2007-10-04 14:59:02 +0000 |
commit | 302482baff728df7ed2ec2da5321278b9d3a7449 (patch) | |
tree | e4fb1f5d8b3b483991884720b6e454de5b5830de | |
parent | 9a84c85f83c2a66f3817fc4c62c2413d55bf2e1f (diff) |
Ajout option -lablgtkdir au configure (basé sur patch de Guillaume
Rousse -- rapport de bug #1713)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@10176 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r-- | Makefile.build | 2 | ||||
-rw-r--r-- | config/Makefile.template | 3 | ||||
-rwxr-xr-x | configure | 32 |
3 files changed, 33 insertions, 4 deletions
diff --git a/Makefile.build b/Makefile.build index fb36ff9b3..a1ab3d09f 100644 --- a/Makefile.build +++ b/Makefile.build @@ -324,7 +324,7 @@ contrib/contrib.cmxa: $(CONTRIB:.cmo=.cmx) # target to build CoqIde coqide:: coqide-files coqide-binaries states -COQIDEFLAGS=-thread -I +lablgtk2 +COQIDEFLAGS=-thread $(COQIDEINCLUDES) .SUFFIXES:.vo diff --git a/config/Makefile.template b/config/Makefile.template index f99c7cfbc..16dc75894 100644 --- a/config/Makefile.template +++ b/config/Makefile.template @@ -51,6 +51,9 @@ CAMLP4O=CAMLP4TOOL CAMLP4COMPAT=CAMLP4COMPATFLAGS MYCAMLP4LIB="CAMLP4LIBDIRECTORY" +# LablGTK +COQIDEINCLUDES=LABLGTKINCLUDES + # Objective-Caml compile command OCAMLC="BYTECAMLC" OCAMLOPT="NATIVECAMLC" @@ -43,6 +43,8 @@ usage () { echo -e "\tSpecifies where Coqdoc style files are to be installed\n" echo "-camldir" echo -e "\tTells configure where to look for OCaml files\n" + echo "-lablgtkdir" + echo -e "\tTells configure where to look for Lablgtk files\n" echo "-arch" echo -e "\tSpecifies the architecture\n" echo "-opt" @@ -100,6 +102,7 @@ mandir_spec=no emacslib_spec=no emacs_spec=no camldir_spec=no +lablgtkdir_spec=no coqdocdir_spec=no fsets_opt=no fsets=all @@ -148,6 +151,9 @@ while : ; do -camldir|--camldir) camldir_spec=yes camldir="$2" shift;; + -lablgtkdir|--lablgtkdir) lablgtkdir_spec=yes + lablgtkdir="$2" + shift;; -arch|--arch) arch_spec=yes arch=$2 shift;; @@ -418,6 +424,10 @@ esac # lablgtk2 and CoqIDE +case $lablgtkdir_spec in + no) lablgtkdir=${CAMLLIB}/lablgtk2 +esac + # -byte-only should imply -coqide byte, unless the user decides otherwise if [ "$best_compiler" = "byte" -a "$coqide_spec" = "no" ]; then @@ -429,10 +439,10 @@ fi if [ "$coqide_spec" = "yes" -a "$COQIDE" = "no" ]; then echo "CoqIde disabled as requested" -elif [ ! -x "${CAMLLIB}/lablgtk2" ]; then +elif [ ! -f "$lablgtkdir/glib.mli" ]; then echo "LablGtk2 not found: CoqIde will not be available" COQIDE=no -elif [ -z "`grep -w convert_with_fallback ${CAMLLIB}/lablgtk2/glib.mli`" ]; then +elif [ -z "`grep -w convert_with_fallback "$lablgtkdir/glib.mli"`" ]; then echo "LablGtk2 found but too old: CoqIde will not be available" COQIDE=no; elif [ "$coqide_spec" = "yes" -a "$COQIDE" = "byte" ]; then @@ -446,6 +456,16 @@ else COQIDE=opt fi +case $COQIDE in + byte|opt) + case $lablgtkdir_spec in + no) LABLGTKLIB=+lablgtk2 # Pour le message + LABLGTKINCLUDES="-I $LABLGTKLIB";; # Pour le makefile + yes) LABLGTKLIB="$lablgtkdir" # Pour le message + LABLGTKINCLUDES="-I \"$LABLGTKLIB\"";; # Pour le makefile + esac;; + no) LABLGTKINCLUDES="";; +esac # Tell on windows if ocaml understands cygwin or windows path formats @@ -609,6 +629,9 @@ echo " Objective-Caml/Camlp4 version : $CAMLVERSION" echo " Objective-Caml/Camlp4 binaries in : $CAMLBIN" echo " Objective-Caml library in : $CAMLLIB" echo " Camlp4 library in : $CAMLP4LIB" +if test "$COQIDE" != "no"; then +echo " Lablgtk2 library in : $LABLGTKLIB" +fi if test "$fsets" = "all"; then echo " FSets theory : All" else @@ -653,6 +676,7 @@ case $ARCH in ESCCOQDOCDIR=`echo $COQDOCDIR |sed -e 's|\\\|\\\\\\\|g'` ESCCAMLP4BIN=`echo $CAMLP4BIN |sed -e 's|\\\|\\\\\\\|g'` ESCCAMLP4LIB=`echo $CAMLP4LIB |sed -e 's|\\\|\\\\\\\|g'` + ESCLABLGTKINCLUDES=`echo $LABLGTKINCLUDES |sed -e 's|\\\|\\\\\\\|g'` ;; *) ESCCOQTOP="$COQTOP" @@ -665,6 +689,7 @@ case $ARCH in ESCCOQDOCDIR="$COQDOCDIR" ESCCAMLP4BIN="$CAMLP4BIN" ESCCAMLP4LIB="$CAMLP4LIB" + ESCLABLGTKINCLUDES="$LABLGTKINCLUDES" ;; esac @@ -737,6 +762,7 @@ sed -e "s|LOCALINSTALLATION|$local|" \ -e "s|CAMLP4LIBDIRECTORY|$CAMLP4LIB|" \ -e "s|CAMLP4TOOL|$camlp4oexec|" \ -e "s|CAMLP4COMPATFLAGS|$CAMLP4COMPAT|" \ + -e "s|LABLGTKINCLUDES|$ESCLABLGTKINCLUDES|" \ -e "s|COQDEBUGFLAG|$coq_debug_flag|" \ -e "s|COQPROFILEFLAG|$coq_profile_flag|" \ -e "s|CAMLANNOTATEFLAG|$coq_annotate_flag|" \ @@ -783,7 +809,7 @@ fi #################################################### if [ ! "$COQIDE" = "no" ]; then - if grep "class view " "$CAMLLIB/lablgtk2/gText.mli" | grep -q "\[>" ; then + if grep "class view " "$lablgtkdir/gText.mli" | grep -q "\[>" ; then cp -f ide/undo_lablgtk_ge26.mli ide/undo.mli else cp -f ide/undo_lablgtk_lt26.mli ide/undo.mli |