]> git.donarmstrong.com Git - lilypond.git/blobdiff - configure
release: 0.1.47
[lilypond.git] / configure
index 3c13edc01f633432aaf07ea057df91dfcbb7fb92..3cd69740dd1098b34b938d64c3f37e7d3c78459e 100755 (executable)
--- a/configure
+++ b/configure
@@ -12,17 +12,25 @@ ac_help=
 ac_default_prefix=/usr/local
 # Any additions from configure.in:
 ac_help="$ac_help
-  enable-printing        set debug printing"
+  enable-printing         turn on debug printing. Default: off"
 ac_help="$ac_help
-  disable-checking       set runtime checks"
+  enable-checking         set runtime checks (assert calls). Default: on"
 ac_help="$ac_help
-  disable-debug          set debug info"
+  enable-debugging        set debug info. Default: on"
 ac_help="$ac_help
-  enable-optimise       use maximal speed optimisations"
+  enable-optimise         use maximal speed optimisations. Default: off"
 ac_help="$ac_help
-  enable-profiling      compile with gprof support"
+  enable-profiling        compile with gprof support. Default: off"
 ac_help="$ac_help
-  texprefix=DIR  set the tex-directory to put the lilypond subdir in."
+  enable-mingw-prefix=DIR        set the mingw32 directory (standalone windows32 exes)"
+ac_help="$ac_help
+  enable-tex-prefix=DIR          set the tex-directory to find TeX subdirectories. (default: PREFIX)"
+ac_help="$ac_help
+  enable-tex-dir=DIR             set the directory to put LilyPond TeX files in. "
+ac_help="$ac_help
+  enable-mf-dir=DIR             set the directory to put LilyPond MetaFont files in. "
+ac_help="$ac_help
+  enable-out-dir                 set the directory for machine generated files. Default out or out-HOST"
 
 # Initialize some variables set by options.
 # The variables have the same names as the options, with
@@ -532,6 +540,29 @@ fi
 
 
 
+if test x$srcdir != x.; then
+  echo Please look in the INSTALL instructions for
+  echo directions for multi-architecture building
+    
+  
+    echo "configure: warning: This package does not support --srcdir!" 1>&2
+    warn_b=yes
+
+fi
+
+# if given here, these vars are initted at the checking point.
+if test x$host = xNONE; then
+    OUTDIR_NAME=${OUTDIR_NAME-"out"}
+else
+    OUTDIR_NAME=${OUTDIR_NAME-"out-$host"}
+fi
+
+printing_b=no
+checking_b=yes
+debug_b=yes
+optimise_b=no
+profile_b=no
+
 ac_ext=C
 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
 ac_cpp='$CXXCPP $CPPFLAGS'
@@ -543,54 +574,127 @@ cross_compiling=$ac_cv_prog_cxx_cross
 # Check whether --enable-printing or --disable-printing was given.
 if test "${enable_printing+set}" = set; then
   enableval="$enable_printing"
-  :
-else
-  DEFINES="$DEFINES -DNPRINT=1"
+  printing_b=$enableval
 fi
 
+
+       
 # Check whether --enable-checking or --disable-checking was given.
 if test "${enable_checking+set}" = set; then
   enableval="$enable_checking"
-  DEFINES="$DEFINES -DNDEBUG=1"
+  checking_b=$enableval 
 fi
 
-# Check whether --enable-debug or --disable-debug was given.
-if test "${enable_debug+set}" = set; then
-  enableval="$enable_debug"
-  :
-else
-  DEFINES="$DEFINES -g"
+
+# Check whether --enable-debugging or --disable-debugging was given.
+if test "${enable_debugging+set}" = set; then
+  enableval="$enable_debugging"
+  debug_b=$enableval
 fi
 
+
 # Check whether --enable-optimise or --disable-optimise was given.
 if test "${enable_optimise+set}" = set; then
   enableval="$enable_optimise"
-  DEFINES="$DEFINES -O2 -DSTRING_UTILS_INLINED"
+  optimise_b=$enableval
 fi
 
+    
 # Check whether --enable-profiling or --disable-profiling was given.
 if test "${enable_profiling+set}" = set; then
   enableval="$enable_profiling"
-  DEFINES="$DEFINES -pg"
+  profile_b=$enableval
+fi
+
+    
+# Check whether --enable-mingw-prefix or --disable-mingw-prefix was given.
+if test "${enable_mingw_prefix+set}" = set; then
+  enableval="$enable_mingw_prefix"
+  MINGWPREFIX=$enableval
+else
+  MINGWPREFIX=no
 fi
 
-# Check whether --enable-texprefix or --disable-texprefix was given.
-if test "${enable_texprefix+set}" = set; then
-  enableval="$enable_texprefix"
+    
+# Check whether --enable-tex-prefix or --disable-tex-prefix was given.
+if test "${enable_tex_prefix+set}" = set; then
+  enableval="$enable_tex_prefix"
   TEXPREFIX=$enableval
 else
   TEXPREFIX=auto 
 fi
 
+    
+# Check whether --enable-tex-dir or --disable-tex-dir was given.
+if test "${enable_tex_dir+set}" = set; then
+  enableval="$enable_tex_dir"
+  TEXDIR=$enableval
+else
+  TEXDIR=auto 
+fi
+
+
+# Check whether --enable-mf-dir or --disable-mf-dir was given.
+if test "${enable_mf_dir+set}" = set; then
+  enableval="$enable_mf_dir"
+  MFDIR=$enableval
+else
+  MFDIR=auto
+fi
+
+
+# Check whether --enable-out-dir or --disable-out-dir was given.
+if test "${enable_out_dir+set}" = set; then
+  enableval="$enable_out_dir"
+  OUTDIR_NAME=$enableval
+    
+fi
+
+
+if test $profile_b = yes; then
+    EXTRA_LIBES="-pg"
+    DEFINES="$DEFINES -pg"
+fi
+    
+if test $printing_b = no; then
+    DEFINES="$DEFINES -DNPRINT=1"
+fi
+    
+if test $debug_b = yes; then   
+    DEFINES="$DEFINES -g"
+fi
+if test $checking_b = no; then
+    DEFINES="$DEFINES -DNDEBUG=1"
+fi
+
+# however, C++ support in mingw32 v 0.1.4 is still flaky
+if test x$MINGWPREFIX != xno; then 
+    ICFLAGS="-I$MINGWPREFIX/include"
+    ILDFLAGS="-$MINGWPREFIX/lib"
+fi
+
+if test $optimise_b = yes; then
+    DEFINES="$DEFINES -finline-functions -O2 -DSTRING_UTILS_INLINED"
+fi
+
+if test "x$OSTYPE" = "xWindows_NT"; then
+    LN=cp # hard link does not work under cygnus-nt (yet?)
+    ZIP="zip -r -9" #
+else
+    LN=ln
+    ZIP="zip -r -9"
+fi
 
 AUTOHEADER="This file was automatically generated by configure"
+CPPFLAGS=${CPPFLAGS:-""}       # we don't want -g -O junk
 CXXFLAGS=${CXXFLAGS:-""}       # we don't want -g -O junk
+
 for ac_prog in $CCC c++ g++ gcc CC cxx cc++
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:594: checking for $ac_word" >&5
+echo "configure:698: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -621,7 +725,7 @@ test -n "$CXX" || CXX="gcc"
 
 
 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:625: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:729: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
 
 ac_ext=C
 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -631,11 +735,11 @@ ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $L
 cross_compiling=$ac_cv_prog_cxx_cross
 
 cat > conftest.$ac_ext <<EOF
-#line 635 "configure"
+#line 739 "configure"
 #include "confdefs.h"
 main(){return(0);}
 EOF
-if { (eval echo configure:639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   ac_cv_prog_cxx_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -655,12 +759,12 @@ if test $ac_cv_prog_cxx_works = no; then
   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:659: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:763: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
 cross_compiling=$ac_cv_prog_cxx_cross
 
 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
-echo "configure:664: checking whether we are using GNU C++" >&5
+echo "configure:768: checking whether we are using GNU C++" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -669,7 +773,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:673: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gxx=yes
 else
   ac_cv_prog_gxx=no
@@ -684,7 +788,7 @@ if test $ac_cv_prog_gxx = yes; then
   ac_save_CXXFLAGS="$CXXFLAGS"
   CXXFLAGS=
   echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
-echo "configure:688: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:792: checking whether ${CXX-g++} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -714,7 +818,7 @@ fi
 # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:718: checking for $ac_word" >&5
+echo "configure:822: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -770,7 +874,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:774: checking for a BSD compatible install" >&5
+echo "configure:878: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -819,12 +923,46 @@ test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
 
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
+for ac_prog in tar
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:932: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_TAR'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$TAR"; then
+  ac_cv_prog_TAR="$TAR" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_TAR="$ac_prog"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+TAR="$ac_cv_prog_TAR"
+if test -n "$TAR"; then
+  echo "$ac_t""$TAR" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+test -n "$TAR" && break
+done
+test -n "$TAR" || TAR="error"
+
 for ac_prog in find
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:828: checking for $ac_word" >&5
+echo "configure:966: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_FIND'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -854,14 +992,34 @@ done
 test -n "$FIND" || FIND="error"
 
 
-if test FIND = error; then
-   echo "configure: warning: Couldn't find \`find'.  Please use --enable-texprefix" 1>&2
-else 
+
+       if test $FIND = "error" 
+       then
+               
+    echo "configure: warning: can't find \`find\'. Please use --enable-tex-dir. " 1>&2
+    warn_b=yes
+
+       fi
+
+
     
 
 
 
 
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 
 
@@ -871,7 +1029,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:875: checking for $ac_word" >&5
+echo "configure:1033: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -905,7 +1063,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:909: checking for $ac_word" >&5
+echo "configure:1067: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -939,7 +1097,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:943: checking for $ac_word" >&5
+echo "configure:1101: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_MAKE'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -968,12 +1126,76 @@ test -n "$MAKE" && break
 done
 test -n "$MAKE" || MAKE="error"
 
+# Extract the first word of "perl", so it can be a program name with args.
+set dummy perl; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1133: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  case "$PERL" in
+  /*)
+  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
+  ;;
+  *)
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_path_PERL="$ac_dir/$ac_word"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="error"
+  ;;
+esac
+fi
+PERL="$ac_cv_path_PERL"
+if test -n "$PERL"; then
+  echo "$ac_t""$PERL" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+# Extract the first word of "python", so it can be a program name with args.
+set dummy python; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1165: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_PYTHON'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  case "$PYTHON" in
+  /*)
+  ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
+  ;;
+  *)
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_path_PYTHON="$ac_dir/$ac_word"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_PYTHON" && ac_cv_path_PYTHON="error"
+  ;;
+esac
+fi
+PYTHON="$ac_cv_path_PYTHON"
+if test -n "$PYTHON"; then
+  echo "$ac_t""$PYTHON" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
 for ac_prog in pod2man
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:977: checking for $ac_word" >&5
+echo "configure:1199: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_PODMAN'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1003,76 +1225,191 @@ done
 test -n "$PODMAN" || PODMAN="error"
 
 
-if test $TEXPREFIX = auto ; then
-    
 
-    # do something sensible if root hasn't specced dir yet attempts install
+if test "x$TEXPREFIX" = xauto ; then
+    
+    
 
-    echo $ac_n "checking TeX installation directory""... $ac_c" 1>&6
-echo "configure:1013: checking TeX installation directory" >&5
+    echo $ac_n "checking TeX/MF root dir directory""... $ac_c" 1>&6
+echo "configure:1235: checking TeX/MF root dir directory" >&5    
 
-    ac_tmp_prefix=$prefix
-    test "x$ac_tmp_prefix" = xNONE && ac_tmp_prefix=$ac_default_prefix
+    find_root_prefix="$prefix"
+    
 
-    for texdir in $ac_tmp_prefix $ac_tmp_prefix/lib; do
-       if test -d $texdir/texmf; then
-           TEXTOP=$texdir/texmf
-           break
-       else    
-       if test -d $texdir/tex; then 
-           TEXTOP=$texdir/tex
-           break
-       fi
+    test "x$find_root_prefix" = xNONE && find_root_prefix="$ac_default_prefix"
+    find_texpostfix="";
+    for postfix in "/lib/tex/" "/lib/texmf" "/lib" "/tex" "/texmf"; do
+       find_texprefix="$find_root_prefix$postfix"
+       if test -d $find_texprefix; then
+           find_texpostfix=$postfix
+           break;
        fi
     done
-    TEXPREFIX=$ac_tmp_prefix/lib/texmf/tex
-    if test x = "x$TEXTOP"; then
-       echo "configure: warning: Cannot determine a tex-directory. Please use --enable-texprefix" 1>&2
-    else
-       TEXPREFIX=`$FIND $TEXTOP -type d -a -name tex -print |sort|head -1`
-    fi
+    
+    if test "x$find_texpostfix" = x; then
+       find_texpostfix='/lib/texmf/tex'
+       
+    echo "configure: warning: Cannot determine the TeX-directory. Please use --enable-tex-prefix" 1>&2
+    warn_b=yes
+
     fi
 
-    echo "$ac_t""$TEXPREFIX" 1>&6
+    find_texprefix="$find_root_prefix/$find_texpostfix"
+
+    # only assign if variablename not empty
+    if test x != "xTEXPREFIX"; then
+       TEXPREFIX='${prefix}'/"$find_texpostfix"
+    fi
+    echo "$ac_t""$find_texprefix" 1>&6
 
-fi
 
-if test $MAKE = "error" 
-then
-       { echo "configure: error: Please install GNU make" 1>&2; exit 1; }
 else
-       $MAKE -v| grep -q GNU
-       if test "$?" = 1
-       then
-               echo "configure: warning: Please install *GNU* make" 1>&2
-       fi
+ find_texprefix=$TEXPREFIX
 fi
 
+if test "x$MFDIR" = xauto; then
+    
+    
+    
+    echo $ac_n "checking MF input directory""... $ac_c" 1>&6
+echo "configure:1276: checking MF input directory" >&5    
+    find_dirdir=`(cd $find_texprefix; 
+      $FIND ./ -type d -a -name source -print |sort|head -1|sed 's#^\./##')`
+    
+
+    if test "x$find_dirdir" = x; then
+       find_dirdir="/source";
+       
+    echo "configure: warning: Cannot determine MF input subdirectory. Please set from command-line" 1>&2
+    warn_b=yes
+
+       true
+    fi
+    MFDIR=$find_dirdir
+    echo "$ac_t""$find_texprefix/$find_dirdir" 1>&6
+
+    MFDIR="$TEXPREFIX/$MFDIR"
 
-if test $BISON = "error" 
-then
-       echo "configure: warning: can't find bison. Please install Bison (1.24 or better)" 1>&2
 fi
+    
+if test "x$TEXDIR" = xauto ; then
+    
+    
+    
+    echo $ac_n "checking TeX input directory""... $ac_c" 1>&6
+echo "configure:1301: checking TeX input directory" >&5    
+    find_dirdir=`(cd $find_texprefix; 
+      $FIND ./ -type d -a -name tex -print |sort|head -1|sed 's#^\./##')`
+    
+
+    if test "x$find_dirdir" = x; then
+       find_dirdir="/tex";
+       
+    echo "configure: warning: Cannot determine TeX input subdirectory. Please set from command-line" 1>&2
+    warn_b=yes
+
+       true
+    fi
+    TEXDIR=$find_dirdir
+    echo "$ac_t""$find_texprefix/$find_dirdir" 1>&6
+
+    TEXDIR="$TEXPREFIX/$TEXDIR"
 
-if test $PODMAN = "error" 
-then
-       echo "configure: warning: can't find pod. You should install Perl (version 5 or better)" 1>&2
 fi
 
-if test $FLEX = "error" 
-then
-       echo "configure: warning: can't find flex. Please install Flex (2.5 or better)" 1>&2
+
+
+
+
+
+       if test $MAKE = "error" 
+       then
+               
+    echo "configure: warning: can't find GNU make. You should install GNU make" 1>&2
+    warn_b=yes
+
+       fi
+
+
+       if test $BISON = "error" 
+       then
+               
+    echo "configure: warning: can't find bison. Please install Bison" 1>&2
+    warn_b=yes
+
+       fi
+
+
+       if test $PERL = "error" 
+       then
+               
+    echo "configure: warning: can't find perl. You should install Perl" 1>&2
+    warn_b=yes
+
+       fi
+
+
+       if test $PYTHON = "error" 
+       then
+               
+    echo "configure: warning: can't find python. You should install Python" 1>&2
+    warn_b=yes
+
+       fi
+
+
+       if test $PODMAN = "error" 
+       then
+               
+    echo "configure: warning: can't find pod. You should install Perl" 1>&2
+    warn_b=yes
+
+       fi
+
+
+       if test $FLEX = "error" 
+       then
+               
+    echo "configure: warning: can't find flex. Please install Flex" 1>&2
+    warn_b=yes
+
+       fi
+
+
+
+if test $MAKE != "error" ; then
+    $MAKE -v| grep GNU > /dev/null
+    if test "$?" = 1
+    then
+           
+    echo "configure: warning: Please install *GNU* make" 1>&2
+    warn_b=yes
+    fi 
+fi 
+    
+if test $BISON != "error"; then
+    bison_version=`$BISON --version| sed 's/^.*version 1.//g' `
+    if test $bison_version -lt 25; then
+       
+    echo "configure: warning: Your bison is too old (1.$bison_version). Please install 1.25" 1>&2
+    warn_b=yes
+
+    fi 
 fi
 
-if $CXX --version | grep -q '2\.7'
+if $CXX --version | grep '2\.7' > /dev/null
 then
        true
 else
-       echo "configure: warning: can't find g++ 2.7" 1>&2
+       
+    echo "configure: warning: can't find g++ 2.7" 1>&2
+    warn_b=yes
+
 fi
 
 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
-echo "configure:1076: checking how to run the C++ preprocessor" >&5
+echo "configure:1413: checking how to run the C++ preprocessor" >&5
 if test -z "$CXXCPP"; then
 if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1085,12 +1422,12 @@ ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $L
 cross_compiling=$ac_cv_prog_cxx_cross
   CXXCPP="${CXX-g++} -E"
   cat > conftest.$ac_ext <<EOF
-#line 1089 "configure"
+#line 1426 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1431: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   :
@@ -1110,17 +1447,17 @@ echo "$ac_t""$CXXCPP" 1>&6
 
 ac_safe=`echo "FlexLexer.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for FlexLexer.h""... $ac_c" 1>&6
-echo "configure:1114: checking for FlexLexer.h" >&5
+echo "configure:1451: checking for FlexLexer.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1119 "configure"
+#line 1456 "configure"
 #include "confdefs.h"
 #include <FlexLexer.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1461: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1139,11 +1476,23 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   true
 else
   echo "$ac_t""no" 1>&6
-{ echo "configure: error: can't find flex header. Please install Flex headers correctly" 1>&2; exit 1; }
+
+    echo "configure: warning: can't find flex header. Please install Flex headers correctly" 1>&2
+    warn_b=yes
+
 fi
 
+
+for a in `find . -type d -and -not -name 'out*' -print`; do
+    if test ! -d  $a/$OUTDIR_NAME; then
+       mkdir $a/$OUTDIR_NAME
+    fi
+done
+
 subdirs="flower"
 
+
+    
 trap '' 1 2 15
 cat > confcache <<\EOF
 # This file is a shell script that caches the results of configure
@@ -1257,7 +1606,8 @@ done
 ac_given_srcdir=$srcdir
 ac_given_INSTALL="$INSTALL"
 
-trap 'rm -fr `echo "make/out/Configure_variables.make:make/Configure_variables.make.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "make/$OUTDIR_NAME/Configure_variables.make:make/Configure_variables.make.in
+    Makefile:make/Toplevel.make.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
 EOF
 cat >> $CONFIG_STATUS <<EOF
 
@@ -1291,13 +1641,25 @@ s%@CXX@%$CXX%g
 s%@RANLIB@%$RANLIB%g
 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
 s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@TAR@%$TAR%g
 s%@FIND@%$FIND%g
+s%@OUTDIR_NAME@%$OUTDIR_NAME%g
+s%@ICFLAGS@%$ICFLAGS%g
+s%@ILDFLAGS@%$ILDFLAGS%g
 s%@DEFINES@%$DEFINES%g
 s%@COMPILEINFO@%$COMPILEINFO%g
 s%@AUTOHEADER@%$AUTOHEADER%g
 s%@BISON@%$BISON%g
 s%@FLEX@%$FLEX%g
+s%@LN@%$LN%g
+s%@PERL@%$PERL%g
+s%@PYTHON@%$PYTHON%g
+s%@ZIP@%$ZIP%g
 s%@TEXPREFIX@%$TEXPREFIX%g
+s%@TEXDIR@%$TEXDIR%g
+s%@MFDIR@%$MFDIR%g
+s%@DIR_DATADIR@%$DIR_DATADIR%g
+s%@EXTRA_LIBES@%$EXTRA_LIBES%g
 s%@MAKE@%$MAKE%g
 s%@PODMAN@%$PODMAN%g
 s%@CXXCPP@%$CXXCPP%g
@@ -1343,7 +1705,8 @@ EOF
 
 cat >> $CONFIG_STATUS <<EOF
 
-CONFIG_FILES=\${CONFIG_FILES-"make/out/Configure_variables.make:make/Configure_variables.make.in"}
+CONFIG_FILES=\${CONFIG_FILES-"make/$OUTDIR_NAME/Configure_variables.make:make/Configure_variables.make.in
+    Makefile:make/Toplevel.make.in"}
 EOF
 cat >> $CONFIG_STATUS <<\EOF
 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
@@ -1512,43 +1875,34 @@ if test "$no_recursion" != yes; then
 fi
 
 
+touch make/$OUTDIR_NAME/Site.make
 
-
-eval "DIR_DATADIR=$datadir"
-DIR_DATADIR="$DIR_DATADIR/lilypond"
-echo $ac_n "checking ""... $ac_c" 1>&6
-echo "configure:1521: checking " >&5
-
-cat << EOF > lib/out/config.hh
-
-/* automatically generated by configure */
-/* include this file only once! */
-
-#define  DIR_DATADIR "$DIR_DATADIR"
-
-EOF
-
-CXX="$ac_cv_prog_CXX" bin/make_version >> lib/out/config.hh
-
-touch make/out/Site.make
-
-# ugr
-(cd mi2mu; CXX="$ac_cv_prog_CXX" ../bin/make_version > out/version.hh
-)
-# rgu
-sed 's/TOPLEVEL_//g' <  .version >  lily/.version
-(cd lily; CXX="$ac_cv_prog_CXX" ../bin/make_version > out/version.hh
-)
- (cd flower;
-)
 cat << END
+For making everything, do:
 
-Finished configuring. For making everything, do:
-
-       make all
+    make               # GNU make
 
-If you only want help on the make targets, do a
+or if you used --outdir=blabla
 
-       make help
+    make OUTDIR_NAME=blabla
+    
+If you want to make site-wide extensions to the makefiles, please use
 
+    make/$OUTDIR_NAME/Site.make
+    
 END
+
+if test x$warn_b = "xyes" ; then
+cat <<EOF
+    
+    **************************************************
+    Warning: configure encountered warnings or errors.
+    Please try to resolve these, and rerun configure 
+    before sending a bugreport.
+    If you cannot resolve some warnings, the make 
+    process may still be succesful, but be warned.
+    **************************************************
+    
+EOF
+fi
+