--- configure.orig Thu Aug 12 18:02:00 2004 +++ configure Mon Sep 27 15:32:42 2004 @@ -20,6 +20,7 @@ bindir='' libdir='' mandir='' +destroot='' manext=1 host_type=unknown ccoption='' @@ -59,6 +60,8 @@ bindir=$2; shift;; -libdir|--libdir) libdir=$2; shift;; + -destroot|--destroot) + destroot=$2; shift;; -mandir|--mandir) case "$2" in */man[1-9ln]) @@ -124,6 +127,11 @@ "") ;; *) echo "The -libdir directory must be absolute." 1>&2; exit 2;; esac +case "$destroot" in + /*) ;; + "") ;; + *) echo "The -destroot directory must be absolute." 1>&2; exit 2;; +esac case "$mandir" in /*) ;; "") ;; @@ -143,6 +151,11 @@ # Where to install echo "PREFIX=$prefix" >> Makefile +case "$destroot" in + "") echo 'DESTROOT=' >> Makefile + destroot="";; + *) echo "DESTROOT=$destroot" >> Makefile;; +esac case "$bindir" in "") echo 'BINDIR=$(PREFIX)/bin' >> Makefile bindir="$prefix/bin";; @@ -1341,6 +1354,10 @@ tk_defs="-I/sw/include" tcl_version=`sh ./runtest $tk_defs $tk_x11_include tclversion.c` fi + if test -z "$tcl_version"; then + tk_defs="-I/opt/local/include -I/System/Library/Frameworks/Tcl.framework/Versions/8.4/Headers/" + tcl_version=`sh ./runtest $tk_defs $tk_x11_include tclversion.c` + fi if test -n "$tcl_version"; then echo "tcl.h version $tcl_version found with \"$tk_defs\"." case $tcl_version in @@ -1392,6 +1409,9 @@ elif sh ./hasgot -L/sw/lib $tk_libs -ltcl$tclmaj.$tclmin $tkauxlibs \ Tcl_DoOneEvent then tk_libs="-L/sw/lib -ltk$tkmaj.$tkmin -ltcl$tclmaj.$tclmin $dllib" + elif sh ./hasgot -L/opt/local/lib $tk_libs -ltcl$tclmaj.$tclmin $tkauxlibs \ + Tcl_DoOneEvent + then tk_libs="-L/opt/local/lib -ltk$tkmaj.$tkmin -ltcl$tclmaj.$tclmin $dllib" else echo "Tcl library not found." has_tk=false @@ -1403,6 +1423,9 @@ elif sh ./hasgot -L/sw/lib $tk_libs $tk_x11_libs $tkauxlibs Tk_SetGrid; then tk_libs="-L/sw/lib $tk_libs" echo "Tcl/Tk libraries found." + elif sh ./hasgot -L/opt/local/lib $tk_libs $tk_x11_libs $tkauxlibs Tk_SetGrid; then + tk_libs="-L/opt/local/lib $tk_libs" + echo "Tcl/Tk libraries found." else echo "Tcl library found." echo "Tk library not found." @@ -1426,7 +1449,7 @@ # Begin Camlp4 ( cd ../../camlp4/config -EXE=$exe ./configure_batch -prefix "$prefix" -bindir "$bindir" -libdir "$libdir" -mandir "$mandir" -ocaml-top ../.. > /dev/null +EXE=$exe ./configure_batch -prefix "$prefix" -bindir "$bindir" -libdir "$libdir" -mandir "$mandir" -destroot "$destroot" -ocaml-top ../.. > /dev/null ) case $? in @@ -1492,6 +1515,10 @@ echo " binaries.................. $bindir" echo " standard library.......... $libdir" echo " manual pages.............. $mandir (with extension .$manext)" + +if test -n "$destroot"; then +echo "Destroot ......................... $destroot" +fi echo "Configuration for the bytecode compiler:" echo " C compiler used........... $bytecc"