From 018ee3b0c2be79eb81b1f65c3f3fa142d24129c8 Mon Sep 17 00:00:00 2001 From: Samuel Mimram Date: Thu, 19 Jan 2006 22:34:29 +0000 Subject: Imported Upstream version 8.0pl3 --- configure | 469 +++++++++++++++++++++++++++++++++++--------------------------- 1 file changed, 262 insertions(+), 207 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 0891b262..193ebff4 100755 --- a/configure +++ b/configure @@ -6,8 +6,8 @@ # ################################## -VERSION=8.0pl2 -DATE="Jan 2005" +VERSION=8.0pl3 +DATE="Jan 2006" # a local which command for sh which () { @@ -30,66 +30,50 @@ coq_profile_flag= best_compiler=opt local=false +src_spec=no +prefix_spec=no bindir_spec=no libdir_spec=no mandir_spec=no emacslib_spec=no -emacs_spec=no +#emacs_spec=no coqdocdir_spec=no reals_opt=no reals=all arch_spec=no coqide_spec=no -COQTOP=`pwd` - - # Parse command-line arguments while : ; do case "$1" in "") break;; - -prefix|--prefix) bindir_spec=yes - bindir=$2/bin - libdir_spec=yes - libdir=$2/lib/coq - mandir_spec=yes - mandir=$2/man - coqdocdir_spec=yes - coqdocdir=$2/share/texmf/tex/latex/misc + -prefix|--prefix) prefix_spec=yes + prefix="$2" shift;; -local|--local) local=true - bindir_spec=yes - bindir=$COQTOP/bin - libdir_spec=yes - libdir=$COQTOP - mandir_spec=yes - mandir=$COQTOP/man - emacslib_spec=yes - emacslib=$COQTOP/tools/emacs - coqdocdir_spec=yes - coqdocdir=$COQTOP/tools/coqdoc reals_opt=yes reals=all;; - -src|--src) COQTOP=$2 + -src|--src) src_spec=yes + COQTOP="$2" shift;; -bindir|--bindir) bindir_spec=yes - bindir=$2 + bindir="$2" shift;; -libdir|--libdir) libdir_spec=yes - libdir=$2 + libdir="$2" shift;; -mandir|--mandir) mandir_spec=yes mandir=$2 shift;; -emacslib|--emacslib) emacslib_spec=yes - emacslib=$2 + emacslib="$2" shift;; - -emacs |--emacs) emacs_spec=yes - emacs=$2 - shift;; +# -emacs |--emacs) emacs_spec=yes +# emacs="$2" +# shift;; -coqdocdir|--coqdocdir) coqdocdir_spec=yes - coqdocdir=$2 + coqdocdir="$2" shift;; -arch|--arch) arch_spec=yes arch=$2 @@ -111,6 +95,11 @@ while : ; do shift done +if [ $prefix_spec = yes -a $local = true ] ; then + echo "Options -prefix and -local are incompatible" + echo "Configure script failed!" + exit 1 +fi # compile date DATEPGM=`which date` @@ -146,125 +135,28 @@ case $arch_spec in yes) ARCH=$arch esac -# bindir, libdir, mandir, etc. - -case $ARCH in - win32) - bindir_def=C:\\coq\\bin - libdir_def=C:\\coq\\lib - mandir_def=C:\\coq\\man - emacslib_def=C:\\coq\\emacs;; - *) - bindir_def=/usr/local/bin - libdir_def=/usr/local/lib/coq - mandir_def=/usr/local/man - emacslib_def=/usr/share/emacs/site-lisp - coqdocdir_def=/usr/share/texmf/tex/latex/misc;; -esac - -emacs_def=emacs - -case $bindir_spec in - no) echo "Where should I install the Coq binaries [$bindir_def] ?" - read BINDIR - - case $BINDIR in - "") BINDIR=$bindir_def;; - *) true;; - esac;; - yes) BINDIR=$bindir;; -esac - -case $libdir_spec in - no) echo "Where should I install the Coq library [$libdir_def] ?" - read LIBDIR - - case $LIBDIR in - "") LIBDIR=$libdir_def;; - *) true;; - esac;; - yes) LIBDIR=$libdir;; -esac - -case $mandir_spec in - no) echo "Where should I install the Coq man pages [$mandir_def] ?" - read MANDIR - - case $MANDIR in - "") MANDIR=$mandir_def;; - *) true;; - esac;; - yes) MANDIR=$mandir;; -esac - -case $emacslib_spec in - no) echo "Where should I install the Coq Emacs mode [$emacslib_def] ?" - read EMACSLIB - - case $EMACSLIB in - "") EMACSLIB=$emacslib_def;; - *) true;; - esac;; - yes) EMACSLIB=$emacslib;; -esac - -case $coqdocdir_spec in - no) echo "Where should I install Coqdoc TeX/LaTeX files [$coqdocdir_def] ?" - read COQDOCDIR - - case $COQDOCDIR in - "") COQDOCDIR=$coqdocdir_def;; - *) true;; - esac;; - yes) COQDOCDIR=$coqdocdir;; -esac - -case $reals_opt in - no) echo "Should I compile the complete theory of real analysis [Y/N, default is Y] ?" - read reals_ans - - case $reals_ans in - "N"|"n"|"No"|"NO"|"no") - reals=basic;; - *) reals=all;; - esac;; - yes) true;; -esac - -# case $emacs_spec in -# no) echo "Which Emacs command should I use to compile coq.el [$emacs_def] ?" -# read EMACS - -# case $EMACS in -# "") EMACS=$emacs_def;; -# *) true;; -# esac;; -# yes) EMACS=$emacs;; -# esac - -# OS dependent libraries +# executable extension case $ARCH in - sun4*) OS=`uname -r` - case $OS in - 5*) OS="Sun Solaris $OS" - OSDEPLIBS="-cclib -lunix -cclib -lnsl -cclib -lsocket";; - *) OS="Sun OS $OS" - OSDEPLIBS="-cclib -lunix" - esac;; - alpha) OSDEPLIBS="-cclib -lunix";; - win32) OS="Win32" - OSDEPLIBS="-cclib -lunix";; - *) OSDEPLIBS="-cclib -lunix" + win32) EXE=".exe";; + *) EXE="" esac -# executable extension +# strip command case $ARCH in - win32) EXE=".exe";; - *) EXE="" + win32) + # true -> strip : it exists under cygwin ! + STRIPCOMMAND="strip";; + *) + if [ "$coq_profile_flag" = "-p" ] ; then + STRIPCOMMAND="true" + else + STRIPCOMMAND="strip" + fi esac +######################################### # Objective Caml programs CAMLC=`which $bytecamlc` @@ -293,16 +185,25 @@ CAMLBIN=`dirname "$CAMLC"` CAMLVERSION=`"$CAMLC" -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' ` case $CAMLVERSION in - 1.*|2.*|3.00|3.01|3.02|3.03|3.03alpha|3.04|3.05beta|3.05) + 1.*|2.*|3.00|3.01|3.02|3.03|3.03alpha|3.04|3.05beta|3.05|3.08.0) echo "Your version of Objective-Caml is $CAMLVERSION." - echo "You need Objective-Caml 3.06 or later !" + if [ "$CAMLVERSION" = "3.08.0" ] ; then + echo "You need Objective-Caml 3.06 or later (to the exception of 3.08.0)!" + else + echo "You need Objective-Caml 3.06 or later!"; + fi + echo "Configuration script failed!" + exit 1;; + 3.06|3.07*|3.08*) + echo "You have Objective-Caml $CAMLVERSION. Good!";; + ?*) + CAMLP4COMPAT="-loc loc" + echo "You have Objective-Caml $CAMLVERSION. Good!";; + *) + echo "I found the Objective-Caml compiler but cannot find its version number!" + echo "Is it installed properly ?" echo "Configuration script failed!" exit 1;; - ?*) echo "You have Objective-Caml $CAMLVERSION. Good!";; - *) echo "I found the Objective-Caml compiler but cannot find its version number!" - echo "Is it installed properly ?" - echo "Configuration script failed!" - exit 1;; esac CAMLTAG=OCAML`echo $CAMLVERSION | sed -e "s/\([1-9]\)\.\([0-9]*\).*/\1\2/g"` @@ -323,20 +224,28 @@ fi # For coqmktop -#CAMLLIB=`"$CAMLC" -v | sed -n -e 's|.*directory:* *\(.*\)$|\1|p' ` CAMLLIB=`"$CAMLC" -where` # Camlp4 (greatly simplified since merged with ocaml) CAMLP4BIN=${CAMLBIN} +CAMLP4LIB=+camlp4 -#case $OS in -# Win32) - CAMLP4LIB=+camlp4 -# ;; -# *) -# CAMLP4LIB=${CAMLLIB}/camlp4 -#esac +# OS dependent libraries + +case $ARCH in + sun4*) OS=`uname -r` + case $OS in + 5*) OS="Sun Solaris $OS" + OSDEPLIBS="-cclib -lunix -cclib -lnsl -cclib -lsocket";; + *) OS="Sun OS $OS" + OSDEPLIBS="-cclib -lunix" + esac;; + alpha) OSDEPLIBS="-cclib -lunix";; + win32) OS="Win32" + OSDEPLIBS="-cclib -lunix";; + *) OSDEPLIBS="-cclib -lunix" +esac # lablgtk2 and CoqIDE @@ -349,7 +258,7 @@ if test -x "${CAMLLIB}/lablgtk2" ; then else echo "LablGtk2 found, no native threads: bytecode CoqIde will be available" COQIDE=byte - fi; + fi else echo "LablGtk2 found but too old: CoqIde will not be available" COQIDE=no; @@ -360,30 +269,154 @@ else fi fi +if [ $COQIDE != no ] ; then + if grep "class view " "${CAMLLIB}/lablgtk2/gText.mli" | grep -q "\[>" ; then + LABLGTKGE26=yes; + else + LABLGTKGE26=no + fi +fi + # Tell on windows if ocaml understands cygwin or windows path formats #"$CAMLC" -o config/giveostype config/giveostype.ml #CAMLOSTYPE=`config/giveostype` #rm config/giveostype -case $ARCH in - win32) - # true -> strip : it exists under cygwin ! - STRIPCOMMAND="strip";; - *) - if [ "$coq_profile_flag" = "-p" ] ; then - STRIPCOMMAND="true" - else - STRIPCOMMAND="strip" - fi -esac - +###################################### # mktexlsr + #MKTEXLSR=`which mktexlsr` #case $MKTEXLSR in # "") MKTEXLSR=true;; #esac +########################################### +# bindir, libdir, mandir, etc. + +canonical_pwd () { +ocaml 2>&1 1>/dev/null <&1 1>/dev/null < $mlconfig_file (* DO NOT EDIT THIS FILE: automatically generated by ../configure *) let local = $local -let bindir = "$BINDIR" -let coqlib = "$LIBDIR" -let coqtop = "$COQTOP" -let camllib = "$CAMLLIB" -let camlp4lib = "$CAMLP4LIB" +let bindir = "$ESCBINDIR" +let coqlib = "$ESCLIBDIR" +let coqtop = "$ESCCOQTOP" +let camllib = "$ESCCAMLLIB" +let camlp4lib = "$ESCCAMLP4LIB" let best = "$best_compiler" let arch = "$ARCH" let osdeplibs = "$OSDEPLIBS" let version = "$VERSION" -let versionsi = "$VERSIONSI" let date = "$DATE" let compile_date = "$COMPILEDATE" let exec_extension = "$EXE" @@ -474,34 +509,45 @@ chmod a-w $mlconfig_file rm -f $COQTOP/config/Makefile -# damned backslashes under M$Windows (bis) +# damned backslashes under M$Windows case $ARCH in win32) - BINDIR=`echo $BINDIR |sed -e 's|\\\|\\\\\\\|g'` - LIBDIR=`echo $LIBDIR |sed -e 's|\\\|\\\\\\\|g'` - MANDIR=`echo $MANDIR |sed -e 's|\\\|\\\\\\\|g'` - EMACSLIB=`echo $EMACSLIB |sed -e 's|\\\|\\\\\\\|g'` + ESCCOQTOP=`echo $COQTOP |sed -e 's|\\\|\\\\\\\|g'` + ESCBINDIR=`echo $BINDIR |sed -e 's|\\\|\\\\\\\|g'` + ESCLIBDIR=`echo $LIBDIR |sed -e 's|\\\|\\\\\\\|g'` + ESCMANDIR=`echo $MANDIR |sed -e 's|\\\|\\\\\\\|g'` + ESCEMACSLIB=`echo $EMACSLIB |sed -e 's|\\\|\\\\\\\|g'` + ESCCOQDOCDIR=`echo $COQDOCDIR |sed -e 's|\\\|\\\\\\\|g'` + ESCCAMLP4BIN=`echo $CAMLP4BIN |sed -e 's|\\\|\\\\\\\|g'` ;; + *) + ESCCOQTOP="$COQTOP" + ESCBINDIR="$BINDIR" + ESCLIBDIR="$LIBDIR" + ESCMANDIR="$MANDIR" + ESCEMACSLIB="$EMACSLIB" + ESCCOQDOCDIR="$COQDOCDIR" + ESCCAMLP4BIN="$CAMLP4BIN" ;; esac sed -e "s|LOCALINSTALLATION|$local|" \ - -e "s|COQTOPDIRECTORY|$COQTOP|" \ + -e "s|COQTOPDIRECTORY|$ESCCOQTOP|" \ -e "s|COQVERSION|$VERSION|" \ - -e "s|BINDIRDIRECTORY|$BINDIR|" \ - -e "s|COQLIBDIRECTORY|$LIBDIR|" \ - -e "s|MANDIRDIRECTORY|$MANDIR|" \ - -e "s|EMACSLIBDIRECTORY|$EMACSLIB|" \ + -e "s|BINDIRDIRECTORY|$ESCBINDIR|" \ + -e "s|COQLIBDIRECTORY|$ESCLIBDIR|" \ + -e "s|MANDIRDIRECTORY|$ESCMANDIR|" \ + -e "s|EMACSLIBDIRECTORY|$ESCEMACSLIB|" \ -e "s|EMACSCOMMAND|$EMACS|" \ - -e "s|COQDOCDIRECTORY|$COQDOCDIR|" \ + -e "s|COQDOCDIRECTORY|$ESCCOQDOCDIR|" \ -e "s|MKTEXLSRCOMMAND|$MKTEXLSR|" \ -e "s|ARCHITECTURE|$ARCH|" \ -e "s|OSDEPENDENTLIBS|$OSDEPLIBS|" \ -e "s|OSDEPENDENTP4OPTFLAGS|$OSDEPP4OPTFLAGS|" \ - -e "s|CAMLLIBDIRECTORY|$CAMLLIB|" \ -e "s|CAMLTAG|$CAMLTAG|" \ - -e "s|CAMLP4BINDIRECTORY|$CAMLP4BIN|" \ + -e "s|CAMLP4BINDIRECTORY|$ESCCAMLP4BIN|" \ -e "s|CAMLP4LIBDIRECTORY|$CAMLP4LIB|" \ -e "s|CAMLP4TOOL|$camlp4o|" \ + -e "s|CAMLP4COMPATFLAGS|$CAMLP4COMPAT|" \ -e "s|COQDEBUGFLAG|$coq_debug_flag|" \ -e "s|COQPROFILEFLAG|$coq_profile_flag|" \ -e "s|BESTCOMPILER|$best_compiler|" \ @@ -521,22 +567,31 @@ chmod a-w $COQTOP/config/Makefile if test "$coq_debug_flag" = "-g" ; then rm -f $COQTOP/dev/ocamldebug-v7 - if [ "$CAMLP4LIB" = "+camlp4" ] ; then - CAMLP4LIBFORCAMLDEBUG=$CAMLLIB/camlp4 - else - CAMLP4LIBFORCAMLDEBUG=$CAMLP4LIB - fi sed -e "s|COQTOPDIRECTORY|$COQTOP|" \ -e "s|COQLIBDIRECTORY|$LIBDIR|" \ -e "s|CAMLBINDIRECTORY|$CAMLBIN|" \ - -e "s|CAMLP4LIBDIRECTORY|$CAMLP4LIBFORCAMLDEBUG|" \ + -e "s|CAMLP4LIBDIRECTORY|$CAMLLIB/camlp4|" \ $COQTOP/dev/ocamldebug-v7.template > $COQTOP/dev/ocamldebug-v7 chmod a-w,a+x $COQTOP/dev/ocamldebug-v7 fi +################################################## +# Fixing lablgtk types +#################################################### + +if [ "$LABLGTKGE26" = "yes" ] ; then + cp -f ide/undo_lablgtk_ge26.mli ide/undo.mli; +else + cp -f ide/undo_lablgtk_lt26.mli ide/undo.mli +fi + +################################################## +# The end +#################################################### + echo "If anything in the above is wrong, please restart './configure'" echo echo "*Warning* To compile the system for a new architecture" echo " don't forget to do a 'make archclean' before './configure'." -# $Id: configure,v 1.74.2.7 2005/01/21 17:27:32 herbelin Exp $ +# $Id: configure,v 1.74.2.19 2006/01/13 11:50:07 barras Exp $ -- cgit v1.2.3