]> git.donarmstrong.com Git - lilypond.git/blobdiff - stepmake/configure
release: 1.3.93
[lilypond.git] / stepmake / configure
index f0e6d926839dee4bec57d4ca505bed862e2d5dd9..3414e05b34b3a0880476dee23cbd8de135201004 100755 (executable)
@@ -604,12 +604,36 @@ fi
     fi
     stepmake=`echo ${stepmake} | sed "s!\\\${prefix}!$presome!"`
 
+    # urg, how is this supposed to work?
+    if test "$program_prefix" = "NONE"; then
+         program_prefix=
+    fi
+    if test "$program_suffix" = "NONE"; then
+         program_suffix=
+    fi
+
     echo $ac_n "checking Package""... $ac_c" 1>&6
-echo "configure:609: checking Package" >&5
+echo "configure:617: checking Package" >&5
     if test "x$PACKAGE" = "xSTEPMAKE"; then
        echo "$ac_t""Stepmake package!" 1>&6
-       (cd stepmake; rm -f stepmake; ln -s ../stepmake .)
-       (cd stepmake; rm -f bin; ln -s ../bin .)
+
+       #if test "x$builddir" != "x"; then
+       #    builddir="../$builddir"
+       #else
+       #    builddir=..
+       #fi
+       if test "$srcdir" != "."; then
+           absolute_builddir="`pwd`"
+           package_absolute_builddir="`dirname $absolute_builddir`"
+           package_srcdir="`dirname  $srcdir`"
+           builddir="`dirname $package_srcdir`/`basename $package_absolute_builddir`/`basename $absolute_builddir`"
+       else
+           builddir=.
+       fi
+
+       (cd stepmake 2>/dev/null || mkdir stepmake)
+       (cd stepmake; rm -f stepmake; ln -s ../$srcdir/stepmake .)
+       (cd stepmake; rm -f bin; ln -s ../$srcdir/bin .)
        ac_aux_dir=
 for ac_dir in bin $srcdir/bin; do
   if test -f $ac_dir/install-sh; then
@@ -632,14 +656,22 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
        stepmake=stepmake
     else
         echo "$ac_t""$PACKAGE" 1>&6
+
+       if test "$srcdir" != "."; then
+           absolute_builddir="`pwd`"
+           builddir="`dirname  $srcdir`/`basename $absolute_builddir`"
+       else
+           builddir=.
+       fi
+
        echo $ac_n "checking for stepmake""... $ac_c" 1>&6
-echo "configure:637: checking for stepmake" >&5
+echo "configure:669: checking for stepmake" >&5
        # Check for installed stepmake
        if test -d $stepmake; then
            echo "$ac_t""$stepmake" 1>&6
        else
-           stepmake='$(depth)'/stepmake
-           echo "$ac_t""./stepmake  ($datadir/stepmake not found)" 1>&6
+           stepmake='$(depth)'/$srcdir/stepmake
+           echo "$ac_t""$srcdir/stepmake  ($datadir/stepmake not found)" 1>&6
        fi
        ac_aux_dir=
 for ac_dir in \
@@ -652,6 +684,7 @@ for ac_dir in \
          /usr/share/stepmake/bin\
          /usr/lib/stepmake/bin\
          stepmake/bin\
+         $srcdir/stepmake/bin\
         $srcdir/\
          $HOME/usr/local/share/stepmake/bin\
          $HOME/usr/local/lib/stepmake/bin\
@@ -662,6 +695,7 @@ for ac_dir in \
          /usr/share/stepmake/bin\
          /usr/lib/stepmake/bin\
          stepmake/bin\
+         $srcdir/stepmake/bin\
        ; do
   if test -f $ac_dir/install-sh; then
     ac_aux_dir=$ac_dir
@@ -684,6 +718,7 @@ if test -z "$ac_aux_dir"; then
          /usr/share/stepmake/bin\
          /usr/lib/stepmake/bin\
          stepmake/bin\
+         $srcdir/stepmake/bin\
         $srcdir/\
          $HOME/usr/local/share/stepmake/bin\
          $HOME/usr/local/lib/stepmake/bin\
@@ -694,6 +729,7 @@ if test -z "$ac_aux_dir"; then
          /usr/share/stepmake/bin\
          /usr/lib/stepmake/bin\
          stepmake/bin\
+         $srcdir/stepmake/bin\
        " 1>&2; exit 1; }
 fi
 ac_config_guess=$ac_aux_dir/config.guess
@@ -706,6 +742,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
     
     
     
+    
     cat >> confdefs.h <<EOF
 #define PACKAGE "${PACKAGE_NAME}"
 EOF
@@ -725,28 +762,16 @@ EOF
 
     AUTOGENERATE="This file was automatically generated by configure"
     
-    absolute_builddir="`pwd`"
-    
-
-    STATE_VECTOR=`ls make/STATE-VECTOR 2>/dev/null`
-    if test "x$STATE_VECTOR" != "x"; then
-       STATE_VECTOR="\$(depth)/$STATE_VECTOR"
-    fi
-    
 
     CONFIGSUFFIX=
     # Check whether --enable-config or --disable-config was given.
 if test "${enable_config+set}" = set; then
   enableval="$enable_config"
-  CONFIGSUFFIX=$enableval
+  CONFIGSUFFIX=-$enableval
 fi
 
 
-    if test "$CONFIGSUFFIX" != "" ; then
-       CONFIGFILE=config-$CONFIGSUFFIX
-    else
-       CONFIGFILE=config
-    fi
+    CONFIGFILE=config$CONFIGSUFFIX
     
      
     
@@ -756,7 +781,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:760: checking host system type" >&5
+echo "configure:785: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -781,7 +806,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:785: checking for $ac_word" >&5
+echo "configure:810: 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
@@ -816,7 +841,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:820: checking for $ac_word" >&5
+echo "configure:845: 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
@@ -853,7 +878,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:857: checking for $ac_word" >&5
+echo "configure:882: 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
@@ -888,7 +913,7 @@ test -n "$TAR" || TAR="error"
        # Extract the first word of "bash", so it can be a program name with args.
 set dummy bash; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:892: checking for $ac_word" >&5
+echo "configure:917: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_BASH'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -928,7 +953,7 @@ fi
        # Extract the first word of "bash", so it can be a program name with args.
 set dummy bash; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:932: checking for $ac_word" >&5
+echo "configure:957: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_SHELL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -965,7 +990,7 @@ fi
        # Extract the first word of "bash", so it can be a program name with args.
 set dummy bash; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:969: checking for $ac_word" >&5
+echo "configure:994: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_BASH'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1006,7 +1031,7 @@ fi
     # Extract the first word of "${PYTHON:-python}", so it can be a program name with args.
 set dummy ${PYTHON:-python}; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1010: checking for $ac_word" >&5
+echo "configure:1035: 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
@@ -1066,7 +1091,7 @@ fi
        LN=cp # hard link does not work under cygnus-nt
        LN_S='cp -r' # symbolic link does not work for native nt
        ZIP="zip -r -9" #
-       DOTEXE=.exe
+       program_suffix=.exe
        # urg
         # DIRSEP='\\'
        # PATHSEP=';'
@@ -1106,6 +1131,7 @@ fi
     
     
     
+    
     cat >> confdefs.h <<EOF
 #define DIRSEP '${DIRSEP}'
 EOF
@@ -1117,7 +1143,6 @@ EOF
     
     
   
-   
     
     if test "$datadir" = "\${prefix}/share"; then
            datadir='${prefix}/share/'$package
@@ -1173,7 +1198,7 @@ fi
 
 
     echo $ac_n "checking language""... $ac_c" 1>&6
-echo "configure:1177: checking language" >&5    
+echo "configure:1202: checking language" >&5    
     case "$language" in
       En* | en* | Am* | am* | US* | us*)
            lang=English;;
@@ -1208,7 +1233,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:1212: checking for $ac_word" >&5
+echo "configure:1237: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1340,7 +1365,7 @@ done
 
 ac_given_srcdir=$srcdir
 
-trap 'rm -fr `echo "$CONFIGFILE.make:config.make.in $CONFIGFILE.hh:config.hh.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "$CONFIGFILE.make:config.make.in $CONFIGFILE.h:config.hh.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
 EOF
 cat >> $CONFIG_STATUS <<EOF
 
@@ -1372,14 +1397,13 @@ s%@includedir@%$includedir%g
 s%@oldincludedir@%$oldincludedir%g
 s%@infodir@%$infodir%g
 s%@mandir@%$mandir%g
+s%@builddir@%$builddir%g
 s%@stepmake@%$stepmake%g
 s%@package@%$package%g
 s%@PACKAGE@%$PACKAGE%g
 s%@PACKAGE_NAME@%$PACKAGE_NAME%g
 s%@package_depth@%$package_depth%g
 s%@AUTOGENERATE@%$AUTOGENERATE%g
-s%@absolute_builddir@%$absolute_builddir%g
-s%@STATE_VECTOR@%$STATE_VECTOR%g
 s%@CONFIGSUFFIX@%$CONFIGSUFFIX%g
 s%@host@%$host%g
 s%@host_alias@%$host_alias%g
@@ -1391,7 +1415,8 @@ s%@FIND@%$FIND%g
 s%@TAR@%$TAR%g
 s%@BASH@%$BASH%g
 s%@PYTHON@%$PYTHON%g
-s%@DOTEXE@%$DOTEXE%g
+s%@program_prefix@%$program_prefix%g
+s%@program_suffix@%$program_suffix%g
 s%@ZIP@%$ZIP%g
 s%@LN@%$LN%g
 s%@LN_S@%$LN_S%g
@@ -1517,7 +1542,7 @@ ac_eD='%g'
 if test "${CONFIG_HEADERS+set}" != set; then
 EOF
 cat >> $CONFIG_STATUS <<EOF
-  CONFIG_HEADERS="$CONFIGFILE.hh:config.hh.in"
+  CONFIG_HEADERS="$CONFIGFILE.h:config.hh.in"
 EOF
 cat >> $CONFIG_STATUS <<\EOF
 fi
@@ -1615,7 +1640,12 @@ rm -fr confdefs* $ac_clean_files
 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
 
 
-    rm -f GNUmakefile
-    cp make/toplevel.make.in ./GNUmakefile
-    chmod 444 GNUmakefile
+    rm -f $srcdir/GNUmakefile
+    cp $srcdir/make/toplevel.make.in $srcdir/GNUmakefile
+    chmod 444 $srcdir/GNUmakefile
+    if test "$builddir" != "."; then
+        rm -f GNUmakefile
+       cp $srcdir/make/srcdir.make.in GNUmakefile
+       chmod 444 GNUmakefile
+    fi