ac_help="$ac_help
enable-profiling compile with gprof support"
ac_help="$ac_help
- texprefix=DIR set the tex-directory to put the lilypond subdir in."
+ tex-prefix=DIR set the tex-directory to find TeX subdirectories."
+ac_help="$ac_help
+ tex-dir=DIR set the directory to put LilyPond TeX files in."
# Initialize some variables set by options.
# The variables have the same names as the options, with
optimise_b=no
profile_b=no
#shared_b=no
+
# Check whether --enable-printing or --disable-printing was given.
if test "${enable_printing+set}" = set; then
enableval="$enable_printing"
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
+
+
if test $profile_b = yes; then
EXTRA_LIBES="-pg"
DEFINES="$DEFINES -pg"
if test $optimise_b = yes; then
DEFINES="$DEFINES -O2 -DSTRING_UTILS_INLINED"
fi
+
AUTOHEADER="This file was automatically generated by configure"
CXXFLAGS=${CXXFLAGS:-""} # we don't want -g -O junk
for ac_prog in $CCC c++ g++ gcc CC cxx cc++
# 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:623: checking for $ac_word" >&5
+echo "configure:636: 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
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:654: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:667: 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.
cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext <<EOF
-#line 664 "configure"
+#line 677 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:681: \"$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
{ 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:688: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:701: 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:693: checking whether we are using GNU C++" >&5
+echo "configure:706: 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
yes;
#endif
EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:702: \"$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:715: \"$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
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
-echo "configure:717: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:730: 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
# 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:747: checking for $ac_word" >&5
+echo "configure:760: 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
# 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:803: checking for a BSD compatible install" >&5
+echo "configure:816: 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
# 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:870: 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
if test FIND = error; then
- echo "configure: warning: Couldn't find \`find'. Please use --enable-texprefix" 1>&2
-else
+ echo "configure: warning: Couldn't find \`find'. Please use --enable-tex-dir" 1>&2
+fi
+
for ac_prog in bison
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:905: checking for $ac_word" >&5
+echo "configure:919: 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
# 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:939: checking for $ac_word" >&5
+echo "configure:953: 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
# 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:973: checking for $ac_word" >&5
+echo "configure:987: 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
# 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:1007: checking for $ac_word" >&5
+echo "configure:1021: 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
test -n "$PODMAN" || PODMAN="error"
-if test $TEXPREFIX = auto ; then
+
+if test "x$TEXPREFIX" = xauto ; then
+
- # do something sensible if root hasn't specced dir yet attempts install
-
- echo $ac_n "checking TeX installation directory""... $ac_c" 1>&6
-echo "configure:1043: checking TeX installation directory" >&5
+ echo $ac_n "checking TeX/MF root dir directory""... $ac_c" 1>&6
+echo "configure:1057: 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`
+
+ 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
fi
+
+ find_texprefix="$find_root_prefix/$find_texpostfix"
+ TEXPREFIX='${prefix}'/"$find_texpostfix"
+
+ echo "$ac_t""$find_texprefix" 1>&6
+
+
+fi
+
+if test "x$TEXDIR" = xauto ; then
+
+
+ # do something sensible if root hasn't specced dir yet attempts install
+ test "x$find_texprefix" != x || find_texprefix="$TEXPREFIX"
+
+ echo $ac_n "checking TeX tex input directory""... $ac_c" 1>&6
+echo "configure:1092: checking TeX tex input directory" >&5
+ find_texdir=`(cd $find_texprefix;
+ $FIND -type d -a -name tex -print |sort|head -1|sed 's#^\./##')`
+
+
+ if test "x$find_texdir" = x; then
+ find_texdir="/tex";
+ echo "configure: warning: Cannot determine the TeX-subdirectory. Please use --enable-tex-dir" 1>&2
+ true
fi
+
+ TEXDIR="$TEXPREFIX/$find_texdir"
+
+ echo "$ac_t""$find_texprefix/$find_texdir" 1>&6
- echo "$ac_t""$TEXPREFIX" 1>&6
fi
$MAKE -v| grep GNU > /dev/null
if test "$?" = 1
then
- echo "configure: warning: Please install *GNU* make" 1>&2
- fi
-fi
-
-
+ echo "configure: warning: Please install *GNU* make" 1>&2
+ fi
+fi
+
if test $BISON = "error"
then
echo "configure: warning: can't find bison. Please install Bison (1.24 or better)" 1>&2
fi
echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
-echo "configure:1106: checking how to run the C++ preprocessor" >&5
+echo "configure:1144: 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
cross_compiling=$ac_cv_prog_cxx_cross
CXXCPP="${CXX-g++} -E"
cat > conftest.$ac_ext <<EOF
-#line 1119 "configure"
+#line 1157 "configure"
#include "confdefs.h"
#include <stdlib.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:1162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
ac_safe=`echo "FlexLexer.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for FlexLexer.h""... $ac_c" 1>&6
-echo "configure:1144: checking for FlexLexer.h" >&5
+echo "configure:1182: 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 1149 "configure"
+#line 1187 "configure"
#include "confdefs.h"
#include <FlexLexer.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1154: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1192: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
s%@BISON@%$BISON%g
s%@FLEX@%$FLEX%g
s%@TEXPREFIX@%$TEXPREFIX%g
+s%@TEXDIR@%$TEXDIR%g
s%@EXTRA_LIBES@%$EXTRA_LIBES%g
s%@MAKE@%$MAKE%g
s%@PODMAN@%$PODMAN%g
eval "DIR_DATADIR=$datadir"
DIR_DATADIR="$DIR_DATADIR/lilypond"
echo $ac_n "checking ""... $ac_c" 1>&6
-echo "configure:1556: checking " >&5
+echo "configure:1595: checking " >&5
cat << EOF > lib/out/config.hh
dnl should cache result.
dnl should look in $prefix first.
-AC_DEFUN(AC_TEX_SUBDIR, [
-
- # do something sensible if root hasn't specced dir yet attempts install
+AC_DEFUN(AC_TEX_PREFIX, [
+
- AC_MSG_CHECKING(TeX installation directory)
+ AC_MSG_CHECKING(TeX/MF root dir directory)
- 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
- $1=$ac_tmp_prefix/lib/texmf/tex
- if test x = "x$TEXTOP"; then
- AC_MSG_WARN(Cannot determine a tex-directory. Please use --enable-texprefix)
- else
- $1=`$FIND $TEXTOP -type d -a -name tex -print |sort|head -1`
+
+ if test "x$find_texpostfix" = x; then
+ find_texpostfix='/lib/texmf/tex'
+ AC_MSG_WARN(Cannot determine the TeX-directory. Please use --enable-tex-prefix)
fi
+
+ find_texprefix="$find_root_prefix/$find_texpostfix"
+ $1='${prefix}'/"$find_texpostfix"
+
+ AC_MSG_RESULT($find_texprefix)
+
+])
+
+AC_DEFUN(AC_TEX_SUBDIR, [
+
+ # do something sensible if root hasn't specced dir yet attempts install
+ test "x$find_texprefix" != x || find_texprefix="$TEXPREFIX"
+
+ AC_MSG_CHECKING(TeX tex input directory)
+ find_texdir=`(cd $find_texprefix;
+ $FIND -type d -a -name tex -print |sort|head -1|sed 's#^\./##')`
+
+
+ if test "x$find_texdir" = x; then
+ find_texdir="/tex";
+ AC_MSG_WARN(Cannot determine the TeX-subdirectory. Please use --enable-tex-dir)
+ true
fi
+
+ $1="$TEXPREFIX/$find_texdir"
+
+ AC_MSG_RESULT($find_texprefix/$find_texdir)
- AC_MSG_RESULT($$1)
])
AC_INIT(flower/choleski.cc)
optimise_b=no
profile_b=no
#shared_b=no
+
AC_ARG_ENABLE(printing,
[ enable-printing set debug printing],
[printing_b=$enableval])
[ enable-profiling compile with gprof support],
[profile_b=$enableval])
-AC_ARG_ENABLE(texprefix,
- [ texprefix=DIR set the tex-directory to put the lilypond subdir in.],
+AC_ARG_ENABLE(tex-prefix,
+ [ tex-prefix=DIR set the tex-directory to find TeX subdirectories.],
[TEXPREFIX=$enableval],
[TEXPREFIX=auto] )
-
+
+AC_ARG_ENABLE(tex-dir,
+ [ tex-dir=DIR set the directory to put LilyPond TeX files in.],
+ [TEXDIR=$enableval],
+ [TEXDIR=auto] )
+
if test $profile_b = yes; then
EXTRA_LIBES="-pg"
DEFINES="$DEFINES -pg"
if test $optimise_b = yes; then
DEFINES="$DEFINES -O2 -DSTRING_UTILS_INLINED"
fi
+
dnl COMPILEINFO="$HOST $host $TARGET $target"
AUTOHEADER="This file was automatically generated by configure"
CXXFLAGS=${CXXFLAGS:-""} # we don't want -g -O junk
dnl should check out -print
if test FIND = error; then
- AC_MSG_WARN(Couldn't find \`find'. Please use --enable-texprefix)
-else
+ AC_MSG_WARN(Couldn't find \`find'. Please use --enable-tex-dir)
+fi
AC_SUBST(CXX)
AC_SUBST(DEFINES)
AC_SUBST(BISON)
AC_SUBST(FLEX)
AC_SUBST(TEXPREFIX)
+AC_SUBST(TEXDIR)
AC_SUBST(EXTRA_LIBES)
AC_CHECK_PROGS(BISON, bison, error)
AC_CHECK_PROGS(MAKE, make, error)
AC_CHECK_PROGS(PODMAN, pod2man, error)
-if test $TEXPREFIX = auto ; then
- AC_TEX_SUBDIR(TEXPREFIX)
+
+if test "x$TEXPREFIX" = xauto ; then
+ AC_TEX_PREFIX(TEXPREFIX)
+fi
+
+if test "x$TEXDIR" = xauto ; then
+ AC_TEX_SUBDIR(TEXDIR)
fi
if test $MAKE = "error"
$MAKE -v| grep GNU > /dev/null
if test "$?" = 1
then
- AC_MSG_WARN(Please install *GNU* make)
- fi
-fi
-
-
+ AC_MSG_WARN(Please install *GNU* make)
+ fi
+fi
+
if test $BISON = "error"
then
AC_MSG_WARN(can't find bison. Please install Bison (1.24 or better))