-dnl -*-shell-script-*-
-dnl Process this file with autoconf to produce a configure script.
-
-
-AC_INIT(flower/choleski.cc)
-
-. $srcdir/VERSION
-FULL_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL
-if test x$MY_PATCH_LEVEL != x; then
- FULL_VERSION=$FULL_VERSION.$MY_PATCH_LEVEL
-fi
-AM_INIT_AUTOMAKE(lilypond, $FULL_VERSION)
-
-AC_PROG_CC
-AC_PROG_CXX
-
-# turn off shared libraries by default (may be enabled using --enable-shared)
-AM_DISABLE_SHARED
-AM_PROG_LIBTOOL
-
-# ugh, automake: we want (and check for) bison
-AC_PROG_YACC
-
-# ugh, automake: we want (and check for) flex
-AC_PROG_LEX
-
-AC_DECL_YYTEXT
-# ugh, ugh
-ac_cv_prog_lex_root=lex.yy
-
-printing_b=no
-checking_b=yes
-optimise_b=no
-profile_b=no
-
-debug_b=yes
-
-AC_LANG_CPLUSPLUS
-
-AC_ARG_ENABLE(printing,
- [ enable-printing turn on debug printing. Default: off],
- [printing_b=$enableval])
-
-AC_ARG_ENABLE(checking,
- [ enable-checking set runtime checks (assert calls). Default: on],
- [checking_b=$enableval] )
-
-AC_ARG_ENABLE(optimise,
- [ enable-optimise use maximal speed optimisations. Default: off],
- [optimise_b=$enableval])
-
-AC_ARG_ENABLE(profiling,
- [ enable-profiling compile with gprof support. Default: off],
- [profile_b=$enableval])
-
-AC_ARG_ENABLE(debugging,
- [ enable-debugging set debug info. Default: on],
- [debug_b=$enableval])
-
-AC_ARG_ENABLE(mingw-prefix,
- [ enable-mingw-prefix=DIR set the mingw32 directory (standalone windows32 exes)],
- [MINGWPREFIX=$enableval],
- [MINGWPREFIX=no])
-
-AC_ARG_ENABLE(tex-prefix,
- [ enable-tex-prefix=DIR set the tex-directory to find TeX subdirectories. (default: PREFIX)],
- [TEXPREFIX=$enableval],
- [TEXPREFIX=auto] )
-
-AC_ARG_ENABLE(tex-dir,
- [ enable-tex-dir=DIR set the directory to put LilyPond TeX files in. ],
- [TEXDIR=$enableval],
- [TEXDIR=auto] )
-
-AC_ARG_ENABLE(mf-dir,
- [ enable-mf-dir=DIR set the directory to put LilyPond MetaFont files in. ],
- [MFDIR=$enableval],
- [MFDIR=auto])
-
-if test "$printing_b" = no; then
- AC_DEFINE(NPRINT)
-fi
-
-if test "$checking_b" = no; then
- AC_DEFINE(NDEBUG)
-fi
-
-if test "$optimise_b" = yes; then
-# DEFINES="$DEFINES -finline-functions -O2 -DSTRING_UTILS_INLINED"
- AC_DEFINE(STRINGS_UTILS_INLINED)
+dnl configure.in -*-shell-script-*-
+dnl Process this file with autoconf to produce a configure script.
+
+# Bootstrap the init proces.
+AC_INIT
+
+# Bootstrap StepMake configure
+# For user package:
+AC_CONFIG_AUX_DIR([stepmake/bin])
+
+# For stepmake package:
+# AC_CONFIG_AUX_DIR(bin)
+
+
+STEPMAKE_INIT
+
+# List a file that identifies your package.
+AC_CONFIG_SRCDIR([lily/main.cc])
+
+# Move to aclocal.m4?
+AC_CONFIG_HEADER([$CONFIGFILE.hh:config.hh.in])
+
+# Uncomment the configuration options your package needs.
+
+DOCUMENTATION=yes
+AC_ARG_ENABLE(documentation,
+ [ --enable-documentation build Documentation. Default: on],
+ [DOCUMENTATION=$enableval])
+AC_SUBST(DOCUMENTATION)
+
+gui_b=no
+AC_ARG_ENABLE(gui,
+ [ --enable-gui compile with experimental GNOME output. Default: off],
+ [gui_b=$enableval])
+
+
+AC_ARG_WITH(ncsb-dir,
+ [ --with-ncsb-dir=DIR location of Century Schoolbook fonts.],
+ [NCSB_DIR=$withval],
+ [NCSB_DIR=""])
+
+reloc_b=no
+AC_ARG_ENABLE(relocation,
+ [ --enable-relocation compile with dynamic relocation. Default: off],
+ [reloc_b=$enableval])
+
+rpath_b=no
+AC_ARG_ENABLE(rpath,
+ [ --enable-rpath hardcode runtime library path. Default: off],
+ [rpath_b=$enableval])
+
+LINK_GXX_STATICALLY=no
+AC_ARG_ENABLE(static-gxx,
+ [ --enable-static-gxx link libstdc++.a statically. Default: off],
+ [LINK_GXX_STATICALLY=$enableval])
+AC_SUBST(LINK_GXX_STATICALLY)
+
+# must come before any header checks
+STEPMAKE_COMPILE
+
+AC_CHECK_PROG(FCMATCH, fc-match, fc-match)
+AC_MSG_CHECKING([New Century Schoolbook PFB files])
+AC_SUBST(NCSB_SOURCE_FILES)
+if test "$NCSB_DIR" != "" ; then
+ NCSB_SOURCE_FILES=""
+ for f in c059013l c059016l c059033l c059036l; do
+ if test ! -f "$NCSB_DIR/$f.pfb"; then
+ STEPMAKE_WARN($NCSB_DIR does not contain $f.pfb.)
+ else
+ NCSB_SOURCE_FILES="$NCSB_DIR/$f.pfb $NCSB_SOURCE_FILES"
+ fi
+ done
+else
+ if test "$FCMATCH" != ""; then
+ for style in Roman Italic "Bold Italic" Bold; do
+ NCSB_FILE=`$FCMATCH --verbose "Century Schoolbook L:style=$style" | grep 'file:' | grep -v "\.ttf"`
+
+ NCSB_FILE=`echo $NCSB_FILE | sed 's/^.*"\(.*\)".*$/\1/g'`
+ NCSB_FILE=`$PYTHON "$srcdir/scripts/auxiliar/readlink.py" $NCSB_FILE`
+ NCSB_SOURCE_FILES="$NCSB_FILE $NCSB_SOURCE_FILES"
+ done
+ else
+ AC_MSG_RESULT(not found)
+ echo "Can't find Century Schoolbook files. Install FontConfig's fc-match,"
+ echo "or use --with-ncsb-dir"
+ fi