1 dnl WARNING WARNING WARNING WARNING
2 dnl do not edit! this is aclocal.m4, generated from stepmake/aclocal.m4
3 dnl aclocal.m4 -*-shell-script-*-
4 dnl StepMake subroutines for configure.in
6 AC_DEFUN(AC_STEPMAKE_BIBTEX2HTML, [
7 AC_CHECK_PROGS(BIBTEX2HTML, bibtex2html bib2html, error)
8 if test "$BIBTEX2HTML" = "bib2html"; then
9 BIBTEX2HTML_FLAGS='$< $(@)'
11 BIBTEX2HTML_FLAGS='-o $(@D)/$(*F) $<'
14 AC_SUBST(BIBTEX2HTML_FLAGS)
18 AC_DEFUN(AC_STEPMAKE_COMPILE, [
19 # -O is necessary to get inlining
21 CXXFLAGS=${CXXFLAGS:-$CFLAGS}
22 LDFLAGS=${LDFLAGS:-""}
28 AC_ARG_ENABLE(checking,
29 [ --enable-checking set runtime checks (assert calls). Default: on],
30 [checking_b=$enableval] )
32 AC_ARG_ENABLE(debugging,
33 [ --enable-debugging compile with debugging info. Default: on],
36 AC_ARG_ENABLE(optimising,
37 [ --enable-optimising compile with optimising. Default: on],
38 [optimise_b=$enableval])
40 AC_ARG_ENABLE(profiling,
41 [ --enable-profiling compile with gprof support. Default: off],
42 [profile_b=$enableval])
45 if test "$checking_b" = no; then
48 DEFINES="$DEFINES -DNDEBUG"
51 if test "$optimise_b" = yes; then
52 OPTIMIZE="-O2 -finline-functions"
56 if test $profile_b = yes; then
58 OPTIMIZE="$OPTIMIZE -pg"
61 if test $debug_b = yes; then
62 OPTIMIZE="$OPTIMIZE -g"
70 CFLAGS="$CFLAGS $OPTIMIZE"
71 CPPFLAGS=${CPPFLAGS:-""}
73 AC_MSG_CHECKING([for IEEE-conformance compiler flags])
77 dnl should do compile test?
79 CFLAGS="-mieee $CFLAGS"
85 AC_SUBST(cross_compiling)
95 AC_DEFUN(AC_STEPMAKE_CXX, [
99 AC_CHECK_HEADER(FlexLexer.h, true,
100 AC_STEPMAKE_WARN(can"\'"t find flex header. Please install Flex headers correctly))
102 CPPFLAGS="$CPPFLAGS $DEFINES"
103 CXXFLAGS="$CXXFLAGS $OPTIMIZE"
104 LDFLAGS="$LDFLAGS $EXTRA_LIBES"
112 AC_DEFUN(AC_STEPMAKE_CXXTEMPLATE, [
113 AC_CACHE_CHECK([whether explicit instantiation is needed],
114 lily_cv_need_explicit_instantiation,
116 template <class T> struct foo { static int baz; };
117 template <class T> int foo<T>::baz = 1;
118 ], [ return foo<int>::baz; ],
119 lily_cv_need_explicit_instantiation=no,
120 lily_cv_need_explicit_instantiation=yes))
121 if test x"$lily_cv_need_explicit_instantiation"x = x"yes"x; then
122 AC_DEFINE(NEED_EXPLICIT_INSTANTIATION)
126 AC_DEFUN(AC_STEPMAKE_DATADIR, [
127 if test "$datadir" = "\${prefix}/share"; then
128 datadir='${prefix}/share/'$package
130 DIR_DATADIR=${datadir}
132 if test "$prefix" = "NONE"; then
133 presome=${ac_default_prefix}
135 DIR_DATADIR=`echo ${DIR_DATADIR} | sed "s!\\\${prefix}!$presome!"`
138 AC_SUBST(DIR_DATADIR)
140 dnl yeah, so fuck me gently with a cactus: this doesnt belong here
141 dnl Please take the person responsible for inventing shell-scripts out
142 dnl and shoot him. On behalf of the sane world, thank you.
143 dnl DIR_SHAREDSTATEDIR="foobar"
144 dnl AC_SUBST(DIR_SHAREDSTATEDIR)
146 AC_DEFINE_UNQUOTED(DIR_DATADIR, "${DIR_DATADIR}")
149 AC_DEFUN(AC_STEPMAKE_END, [
150 AC_OUTPUT($CONFIGFILE.make:config.make.in)
152 # regular in-place build
153 # test for srcdir_build = yes ?
154 if test "$builddir" = "."; then
155 rm -f $srcdir/GNUmakefile
156 cp $srcdir/GNUmakefile.in $srcdir/GNUmakefile
157 chmod 444 $srcdir/GNUmakefile
158 else # --srcdir build
160 cp $srcdir/make/srcdir.make.in GNUmakefile
161 chmod 444 GNUmakefile
165 AC_DEFUN(AC_STEPMAKE_GXX, [
166 AC_MSG_CHECKING("g++ version")
167 cxx_version=`$CXX --version`
168 AC_MSG_RESULT("$cxx_version")
169 changequote(<<, >>)dnl
170 # urg, egcs: how to check for egcs >= 1.1?
171 if expr "$cxx_version" : '.*2\.[89]' > /dev/null ||
172 expr "$cxx_version" : '.*egcs' > /dev/null ||
173 expr "$cxx_version" : '3\.0' > /dev/null
178 AC_STEPMAKE_WARN(can\'t find g++ 2.8, 2.9, 3.0 or egcs 1.1)
182 AC_DEFUN(AC_STEPMAKE_GUILE, [
183 ## First, let's just see if we can find Guile at all.
184 AC_MSG_CHECKING("for guile-config")
185 for guile_config in guile-config $target-guile-config $build-guile-config; do
186 AC_MSG_RESULT("$guile_config")
187 if ! $guile_config --version > /dev/null 2>&1 ; then
188 AC_MSG_WARN("cannot execute $guile_config")
189 AC_MSG_CHECKING("if we are cross compiling")
195 if test "$guile_config" = "error"; then
196 AC_MSG_ERROR("cannot find guile-config; is Guile installed?")
199 AC_MSG_CHECKING("Guile version")
200 need_guile_version="1.3.4"
201 need_guile_version_numeric=100304
202 guile_version=`$guile_config --version 2>&1 | awk '{print $NF}'`
203 guile_version_numeric=`echo $guile_version | awk -F. '
204 {if ([$]3) {last = [$]3}
206 {printf "%s%s%s\n",[$]1*100, [$]2*10,last}'`
207 AC_MSG_RESULT("$guile_version")
208 if test $guile_version_numeric -lt $need_guile_version_numeric
210 AC_STEPMAKE_WARN("Guile version "$need_guile_version" or newer is needed")
212 changequote(<<, >>)dnl
213 GUILE_MAJOR_VERSION=`expr $guile_version : '\([0-9]*\)'`
214 GUILE_MINOR_VERSION=`expr $guile_version : '[0-9]*\.\([0-9]*\)'`
217 AC_PATH_PROG(GUILE, guile, error)
219 AC_DEFINE_UNQUOTED(GUILE_MAJOR_VERSION, $GUILE_MAJOR_VERSION)
220 AC_DEFINE_UNQUOTED(GUILE_MINOR_VERSION, $GUILE_MINOR_VERSION)
223 AC_DEFUN(AC_STEPMAKE_INIT, [
226 FULL_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL
227 if test x$MY_PATCH_LEVEL != x; then
228 FULL_VERSION=$FULL_VERSION.$MY_PATCH_LEVEL
231 # urg: don't "fix" this: irix doesn't know about [:lower:] and [:upper:]
232 changequote(<<, >>)dnl
233 PACKAGE=`echo $PACKAGE_NAME | tr '[a-z]' '[A-Z]'`
234 package=`echo $PACKAGE_NAME | tr '[A-Z]' '[a-z]'`
237 # No versioning on directory names of sub-packages
239 stepmake=${datadir}/stepmake
241 if test "$prefix" = "NONE"; then
242 presome=${ac_default_prefix}
244 stepmake=`echo ${stepmake} | sed "s!\\\${prefix}!$presome!"`
246 # urg, how is this supposed to work?
247 if test "$program_prefix" = "NONE"; then
250 if test "$program_suffix" = "NONE"; then
254 AC_MSG_CHECKING(Package)
255 if test "x$PACKAGE" = "xSTEPMAKE"; then
256 AC_MSG_RESULT(Stepmake package!)
258 AC_MSG_CHECKING(builddir)
259 if test "$srcdir" = "."; then
262 absolute_builddir="`pwd`"
263 package_absolute_builddir="`dirname $absolute_builddir`"
264 package_srcdir="`dirname $srcdir`"
265 builddir="`dirname $package_srcdir`/`basename $package_absolute_builddir`/`basename $absolute_builddir`"
267 AC_MSG_RESULT($builddir)
269 (cd stepmake 2>/dev/null || mkdir stepmake)
270 (cd stepmake; rm -f stepmake; ln -s ../$srcdir/stepmake .)
271 (cd stepmake; rm -f bin; ln -s ../$srcdir/bin .)
272 AC_CONFIG_AUX_DIR(bin)
275 AC_MSG_RESULT($PACKAGE)
277 AC_MSG_CHECKING(builddir)
278 if test "$srcdir" = "."; then
282 absolute_builddir="`pwd`"
283 # builddir="`dirname $srcdir`/`basename $absolute_builddir`"
284 builddir="`bash $srcdir/buildscripts/walk.sh \"$srcdir\"`"
287 AC_MSG_RESULT($builddir)
288 if expr "$srcdir" : '/' > /dev/null 2>&1; then
290 AC_STEPMAKE_WARN(Absolute --srcdir specified: $srcdir)
293 AC_MSG_CHECKING(for stepmake)
294 # Check for installed stepmake
295 if test -d $stepmake; then
296 AC_MSG_RESULT($stepmake)
298 if test "$absolute_srcdir" != "yes"; then
299 stepmake='$(depth)'/$srcdir/stepmake
301 stepmake=$srcdir/stepmake
303 AC_MSG_RESULT($srcdir/stepmake ($datadir/stepmake not found))
307 $HOME/usr/local/share/stepmake/bin\
308 $HOME/usr/local/lib/stepmake/bin\
309 $HOME/usr/share/stepmake/bin\
310 $HOME/usr/lib/stepmake/bin\
311 /usr/local/share/stepmake/bin\
312 /usr/local/lib/stepmake/bin\
313 /usr/share/stepmake/bin\
314 /usr/lib/stepmake/bin\
316 $srcdir/stepmake/bin\
324 AC_SUBST(PACKAGE_NAME)
325 AC_DEFINE_UNQUOTED(PACKAGE, "${PACKAGE_NAME}")
326 AC_DEFINE_UNQUOTED(TOPLEVEL_VERSION, "${FULL_VERSION}")
328 if test "$package_depth" = "" ; then
331 package_depth="../$package_depth"
334 AC_SUBST(package_depth)
336 AUTOGENERATE="This file was automatically generated by configure"
337 AC_SUBST(AUTOGENERATE)
340 AC_ARG_ENABLE(config,
341 [ --enable-config=CONF put settings in config-CONF.make and config-CONF.h;
342 do \`make conf=CONF' to get output in ./out-CONF],
343 [CONFIGURATION=$enableval])
345 test -n "$CONFIGURATION" && CONFIGSUFFIX="-$CONFIGURATION"
346 CONFIGFILE=config$CONFIGSUFFIX
347 AC_SUBST(CONFIGSUFFIX)
350 AC_CHECK_PROGS(MAKE, gmake make, error)
351 AC_CHECK_PROGS(FIND, find, error)
353 dnl system supplied INSTALL is unsafe; use our own install.
355 dnl if test "$INSTALL" = "bin/install-sh"; then
356 dnl export INSTALL="\$\(depth\)/bin/install-sh"
359 AC_CHECK_PROGS(TAR, tar, error)
361 if test "x`uname`" = "xHP-UX"; then
362 AC_PATH_PROG(BASH, bash, /bin/sh)
363 AC_STEPMAKE_WARN(avoiding buggy /bin/sh)
364 AC_PATH_PROG(SHELL, bash, /bin/ksh)
366 AC_PATH_PROG(BASH, bash, /bin/sh)
372 AC_PATH_PROG(PYTHON, ${PYTHON:-python}, -echo no python)
375 if test $MAKE != "error" ; then
376 $MAKE -v 2> /dev/null | grep GNU > /dev/null
379 AC_STEPMAKE_WARN(Please install *GNU* make)
383 AC_CHECK_SEARCH_RESULT($PYTHON, python, You should install Python)
385 if test "x$OSTYPE" = "xcygwin32" || test "x$OSTYPE" = "xWindows_NT"; then
386 LN=cp # hard link does not work under cygnus-nt
387 LN_S='cp -r' # symbolic link does not work for native nt
395 # cygwin fixes all these things.
396 # it seems these were used because of dos-style TEXINPUTS and
397 # MFINPUTS needed for miktex.
398 # but this breaks parsing of all other cygwin/unix style paths.
400 # if your (mik)tex breaks, make a:
401 # /usr/local/bin/tex:
403 # TEXINPUTS=`cygpath -pw $TEXINPUTS` /texmf/miktex/bin/tex $*
409 # MFINPUTS=`cygpath -pw $MFINPUTS` /texmf/miktex/bin/mf $*
411 # this way, you may have buildscripts/out/lilypond-profile
412 # 'automatically' sourced from /usr/etc/profile.d/ too.
417 INSTALL="\$(SHELL) \$(stepdir)/../bin/install-dot-exe.sh -c"
425 INSTALL="\$(SHELL) \$(stepdir)/../bin/install-sh -c"
427 AC_SUBST(program_prefix)
428 AC_SUBST(program_suffix)
433 AC_DEFINE_UNQUOTED(DIRSEP, '${DIRSEP}')
434 AC_DEFINE_UNQUOTED(PATHSEP, '${PATHSEP}')
441 AC_DEFUN(AC_STEPMAKE_KPATHSEA, [
444 #FIXME --with-xxx is meant for specifying a PATH too,
445 # so this should read: --enable-kpathsea,
446 # or --with-kpathsea-include=PATH --with-kpathsea-lib=PATH
447 AC_ARG_WITH(kpathsea,
448 [ --with-kpathsea use kpathsea lib. Default: on],
449 [kpathsea_b=$with_kpathsea])
451 if test "$kpathsea_b" != "no"; then
452 AC_HAVE_HEADERS(kpathsea/kpathsea.h)
453 AC_CHECK_LIB(kpathsea, kpse_find_file)
454 AC_CHECK_FUNCS(kpse_find_file,, AC_ERROR(Cannot find kpathsea functions. You should install kpathsea; see INSTALL.txt. Rerun ./configure --without-kpathsea only if kpathsea is not available for your platform.))
456 AC_MSG_CHECKING(whether to use kpathsea)
457 if test "$kpathsea_b" != no; then
466 AC_DEFINE_UNQUOTED(KPATHSEA, $KPATHSEA)
469 AC_DEFUN(AC_STEPMAKE_LEXYACC, [
470 # ugh, automake: we want (and check for) bison
472 # ugh, automake: we want (and check for) flex
474 # urg: automake 1.3: hope this doesn't break 1.2 ac_cv_pro_lex_root hack...
478 ac_cv_prog_lex_root=lex.yy
480 AC_CHECK_PROGS(BISON, bison, error)
481 AC_CHECK_PROGS(FLEX, flex, error)
482 AC_CHECK_SEARCH_RESULT($BISON, bison, Please install Bison, 1.25 or newer)
483 AC_CHECK_SEARCH_RESULT($FLEX, flex, Please install Flex, 2.5 or newer)
485 if test $BISON != "error"; then
486 bison_version=`$BISON --version | sed 's/^.*version 1.//g'`
487 if test `echo $bison_version | sed 's/\..*$//g'` -lt 25; then
488 AC_STEPMAKE_WARN(Your bison is a bit old (1.$bison_version). You might have to install 1.25)
496 AC_DEFUN(AC_STEPMAKE_LIB, [
497 AC_CHECK_PROGS(AR, ar, error)
504 AC_DEFUN(AC_STEPMAKE_LIBTOOL, [
506 # **Never** try to set library version numbers so that they correspond
507 # to the release number of your package. This is an abuse that only
508 # fosters misunderstanding of the purpose of library versions.
510 REVISION=$PATCH_LEVEL
511 # CURRENT=$MINOR_VERSION
512 CURRENT=`expr $MINOR_VERSION + 1`
513 # AGE=$(expr $MAJOR_VERSION + 1)
520 AC_DEFUN(AC_STEPMAKE_LOCALE, [
525 AC_ARG_WITH(localedir,
526 [ --with-localedir=LOCALE use LOCALE as locale dir. Default:
527 PREFIX/share/locale ],
528 localedir=$with_localedir,
529 localedir='${prefix}/share/locale')
532 [ --with-lang=LANG use LANG as language to emit messages],
536 AC_MSG_CHECKING(language)
538 En* | en* | Am* | am* | US* | us*)
540 NL | nl | Du* | du* | Ned* | ned*)
549 if test "$lang" = "unknown" ; then
550 AC_STEPMAKE_WARN($language not supported; available are: $ALL_LINGUAS)
555 AC_DEFUN(AC_STEPMAKE_GETTEXT, [
556 DIR_LOCALEDIR=${localedir}
558 if test "$prefix" = "NONE"; then
559 presome=${ac_default_prefix}
561 DIR_LOCALEDIR=`echo ${DIR_LOCALEDIR} | sed "s!\\\${prefix}!$presome!"`
563 AC_SUBST(DIR_LOCALEDIR)
564 AC_DEFINE_UNQUOTED(DIR_LOCALEDIR, "${DIR_LOCALEDIR}")
566 AC_CHECK_LIB(intl, gettext)
567 AC_CHECK_FUNCS(gettext)
570 AC_DEFUN(AC_STEPMAKE_MAKEINFO, [
571 AC_CHECK_PROGS(MAKEINFO, makeinfo, error)
572 if test "$MAKEINFO" != "error"; then
573 AC_MSG_CHECKING(whether makeinfo can split html by @node)
575 makeinfo --html --output=out/split <<EOF
577 \input texinfo @c -*-texinfo-*-
578 @setfilename split.info
582 if test -d out/split; then
583 SPLITTING_MAKEINFO=yes
588 AC_STEPMAKE_WARN(your html documentation will be one large file)
592 AC_SUBST(SPLITTING_MAKEINFO)
596 AC_DEFUN(AC_STEPMAKE_MAN, [
597 AC_CHECK_PROGS(GROFF, groff ditroff, -echo no groff)
598 AC_CHECK_PROGS(TROFF, troff, -echo no troff)
599 AC_CHECK_PROGS(TBL, tbl, cat)
602 AC_DEFUN(AC_STEPMAKE_MSGFMT, [
603 # AC_CHECK_PROGS(MSGFMT, msgfmt, -echo no msgfmt)
604 AC_CHECK_PROGS(MSGFMT, msgfmt, \$(SHELL) \$(step-bindir)/fake-msgfmt.sh )
605 AC_MSG_CHECKING(whether msgfmt accepts -o)
606 msgfmt_output="`msgfmt -o bla 2>&1 | grep usage`"
607 if test "$msgfmt_output" = ""; then
611 MSGFMT="\$(SHELL) \$(step-bindir)/fake-msgfmt.sh"
613 AC_STEPMAKE_WARN(please install msgfmt from GNU gettext)
615 if test ! -n "$MSGFMT"; then
616 AC_STEPMAKE_WARN(please install msgfmt from GNU gettext)
620 #why has this been dropped?
621 AC_DEFUN(XXAC_STEPMAKE_TEXMF_DIRS, [
622 AC_ARG_ENABLE(tex-prefix,
623 [ --enable-tex-prefix=DIR set the tex-directory to find TeX
624 subdirectories. Default: PREFIX],
625 [TEXPREFIX=$enableval],
628 AC_ARG_ENABLE(tex-dir,
629 [ --enable-tex-dir=DIR set the directory to put $PACKAGE_NAME TeX files in. ],
633 AC_ARG_ENABLE(mf-dir,
634 [ --enable-mf-dir=DIR set the directory to put $PACKAGE_NAME MetaFont files in. ],
638 if test "x$TEXPREFIX" = xauto ; then
639 AC_TEX_PREFIX(TEXPREFIX)
641 find_texprefix=$TEXPREFIX
644 if test "x$MFDIR" = xauto; then
648 if test "x$TEXDIR" = xauto ; then
649 AC_TEX_SUBDIR(TEXDIR)
656 AC_DEFUN(AC_STEPMAKE_TEXMF_DIRS, [
657 AC_ARG_ENABLE(tfm-path,
658 [ --enable-tfm-path=PATH set path of tex directories where tfm files live,
659 esp.: cmr10.tfm. Default: use kpsewhich],
660 [tfm_path=$enableval],
663 AC_CHECK_PROGS(KPSEWHICH, kpsewhich, no)
664 AC_MSG_CHECKING(for tfm path)
668 if test "x$tfm_path" = xauto ; then
669 if test "x$KPSEWHICH" != "xno" ; then
670 for i in $TFM_FONTS; do
671 dir=`$KPSEWHICH tfm ${i}10.tfm`
672 TFM_PATH="$TFM_PATH `dirname $dir`"
675 AC_STEPMAKE_WARN(Please specify where cmr10.tfm lives:
676 ./configure --enable-tfm-path=/usr/local/TeX/lib/tex/fonts)
682 TFM_PATH=`echo $TFM_PATH | tr ':' ' '`
683 AC_MSG_RESULT($TFM_PATH)
687 AC_DEFUN(AC_STEPMAKE_TEXMF, [
688 # urg, never know what names these teTeX guys will think up
690 AC_CHECK_PROGS(METAFONT, mf, no)
691 if test "x$METAFONT" = "xno"; then
692 AC_CHECK_PROGS(MFONT, mfont, -echo no mf or mfont)
696 AC_CHECK_PROGS(METAPOST, mp, no)
697 if test "x$METAPOST" = "xno"; then
698 AC_CHECK_PROGS(MPOST, mpost, -echo no mp or mpost)
703 AC_CHECK_PROGS(INIMETAFONT, inimf, no)
704 if test "x$INIMETAFONT" = "xno"; then
705 AC_CHECK_PROGS(INIMFONT, inimfont, -echo no inimf or inimfont)
706 INIMETAFONT=$INIMFONT
709 AC_CHECK_PROGS(INIMETAPOST, inimp, no)
710 if test "x$INIMETAPOST" = "xno"; then
711 AC_CHECK_PROGS(INIMPOST, inimpost, -echo no inimp or inimpost)
712 INIMETAPOST=$INIMPOST
715 AC_MSG_CHECKING(for working metafont mode)
716 modelist='ljfour lj4 lj3 lj2 ljet laserjet'
717 for MFMODE in $modelist; do
718 $METAFONT "\mode:=$MFMODE; mode_setup; end." > /dev/null 2>&1
719 if test -f mfput.tfm; then
723 AC_MSG_RESULT($MFMODE)
725 AC_MSG_CHECKING(for mfplain.mp)
727 # For now let people define these in their environments
729 : ${MFPLAIN_MP=`kpsewhich --format mp mfplain.mp`}
730 AC_MSG_RESULT($MFPLAIN_MP)
732 AC_MSG_CHECKING(for inimetapost flags)
733 if test ${INIMETAPOST} = "inimp" ; then
734 : ${INIMETAPOST_FLAGS=''}
736 : ${INIMETAPOST_FLAGS='-interaction=nonstopmode'}
738 AC_MSG_RESULT($INIMETAPOST_FLAGS)
745 AC_SUBST(INIMETAFONT)
746 AC_SUBST(INIMETAPOST)
748 AC_SUBST(INIMETAPOST_FLAGS)
751 AC_DEFUN(AC_STEPMAKE_WARN, [
756 AC_DEFUN(AC_STEPMAKE_YODL, [
757 if test "x$YODL" = "x"; then
758 AC_CHECK_PROGS(STRIPROFF, striproff, -echo no striproff)
759 AC_CHECK_PROGS(YODL, yodl, -echo no yodl)
760 AC_CHECK_PROGS(YODL2HTML, yodl2html, -echo no yodl)
761 AC_CHECK_PROGS(YODL2LATEX, yodl2latex, )
762 AC_CHECK_PROGS(YODL2MAN, yodl2man, -echo no yodl)
763 AC_CHECK_PROGS(YODL2MSLESS, yodl2msless, -echo no yodl)
764 AC_CHECK_PROGS(YODL2TEXINFO, yodl2texinfo, -echo no yodl)
765 AC_CHECK_PROGS(YODL2TXT, yodl2txt, -echo no yodl)
766 YODL2LESS_DIR='$(bindir)/'
772 AC_SUBST(YODL2LESS_DIR)
774 AC_SUBST(YODL2MSLESS)
775 AC_SUBST(YODL2TEXINFO)
777 export STRIPROFF YODL YODL2HTML YODL2LATEX YODL2MAN YODL2MSLESS YODL2TEXINFO YODL2TXT
779 if test "x$YODL" = "-echo no yodl"; then
780 AC_STEPMAKE_WARN(Did not find YODL (Yodl is Yet Oneother Document Language, see http://www.cs.uu.nl/~hanwen/yodl))
784 dnl should cache result.
785 dnl should look in $prefix first.
786 dnl should probably assume TDS
788 AC_DEFUN(AC_TEX_PREFIX, [
791 AC_MSG_CHECKING(TeX/MF root dir directory)
793 find_root_prefix="$prefix"
796 test "x$find_root_prefix" = xNONE && find_root_prefix="$ac_default_prefix"
798 for postfix in "/lib/tex/" "/lib/texmf" "/lib" "/tex" "/texmf"; do
799 find_texprefix="$find_root_prefix$postfix"
800 if test -d $find_texprefix; then
801 find_texpostfix=$postfix
806 if test "x$find_texpostfix" = x; then
807 find_texpostfix='/lib/texmf/tex'
808 AC_STEPMAKE_WARN(Cannot determine the TeX-directory. Please use --enable-tex-prefix)
811 find_texprefix="$find_root_prefix/$find_texpostfix"
813 # only assign if variablename not empty
814 if test x != "x[$]$1"; then
815 $1='${prefix}'/"$find_texpostfix"
817 AC_MSG_RESULT($find_texprefix)
822 # find a directory inside a prefix,
823 # $1 the prefix (expanded version)
824 # $2 variable to assign
825 # $3 the directory name
827 AC_DEFUN(AC_FIND_DIR_IN_PREFIX, [
829 AC_MSG_CHECKING($4 directory)
831 $FIND ./ -type d -a -name $3 -print |sort|head -1|sed 's#^\./##')`
834 if test "x$find_dirdir" = x; then
836 AC_STEPMAKE_WARN(Cannot determine $4 subdirectory. Please set from command-line)
840 AC_MSG_RESULT($1/$find_dirdir)
843 # ugh. this is hopeless
844 AC_DEFUN(AC_KPSE_TEX_DIR, [
845 kpse_paths=`(kpsepath -n latex tex; kpsepath -n tex tex) | sed 's/:/ /g' | tr ' ' '\012' |sort | uniq -d`
846 kpse_syspaths=`echo $kpse_paths | grep '!'| sed 's/!//g'`
848 if test -w "$kpse_syspaths";
850 dir=`echo $kpse_syspaths | head -1`
852 dir=`echo $kpse_paths | grep -v '!'| head -1`
854 if test "$prefix" = "NONE"; then
855 local_prefix=$ac_default_prefix
856 local_prefix_quote='${prefix}'
860 local_prefix_quote=$prefix
862 echo $local_prefix_quote = $local_prefix
864 echo $dir | sed 's!'$local_prefix'!\$local_prefix_quote!g'
867 AC_DEFUN(AC_TEX_SUBDIR, [
868 dnl AC_REQUIRE([AC_TEX_PREFIX])
869 AC_FIND_DIR_IN_PREFIX($find_texprefix, $1, tex,TeX input)
873 AC_DEFUN(AC_MF_SUBDIR, [
874 dnl AC_REQUIRE([AC_TEX_PREFIX])
875 AC_FIND_DIR_IN_PREFIX($find_texprefix, $1, source, MF input)
879 AC_DEFUN(AC_CHECK_SEARCH_RESULT, [
880 result="`echo \"$1\" | grep echo`"
881 if test "x$1" = "xerror" -o "x$result" != "x"; then
882 AC_STEPMAKE_WARN(can\'t find $2. $3)
886 dnl GUILE_FLAGS --- set flags for compiling and linking with Guile
888 dnl This macro runs the `guile-config' script, installed with Guile,
889 dnl to find out where Guile's header files and libraries are
890 dnl installed. It sets two variables, marked for substitution, as
893 dnl GUILE_CFLAGS --- flags to pass to a C or C++ compiler to build
894 dnl code that uses Guile header files. This is almost
895 dnl always just a -I flag.
897 dnl GUILE_LDFLAGS --- flags to pass to the linker to link a
898 dnl program against Guile. This includes `-lguile' for
899 dnl the Guile library itself, any libraries that Guile
900 dnl itself requires (like -lqthreads), and so on. It may
901 dnl also include a -L flag to tell the compiler where to
902 dnl find the libraries.
904 AC_DEFUN([GUILE_FLAGS],[
905 ## The GUILE_FLAGS macro.
906 AC_MSG_CHECKING(for Guile)
907 if ! $guile_config link > /dev/null ; then
908 AC_MSG_RESULT("cannot execute $guile_config")
909 AC_MSG_ERROR("cannot find guile-config; is Guile installed?")
912 GUILE_CFLAGS="`$guile_config compile`"
913 GUILE_LDFLAGS="`$guile_config link`"
914 AC_SUBST(GUILE_CFLAGS)
915 AC_SUBST(GUILE_LDFLAGS)
920 # Configure paths for GTK+
921 # Owen Taylor 97-11-3
923 dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
924 dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
926 AC_DEFUN(AM_PATH_GTK,
928 dnl Get the cflags and libraries from the gtk-config script
930 AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
931 min_gtk_version=ifelse([$1], ,1.1.1,$1)
932 AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
934 if test "$GTK_CONFIG" != "no" ; then
935 GTK_CFLAGS=`$GTK_CONFIG --cflags`
936 GTK_LIBS=`$GTK_CONFIG --libs`
937 ac_save_CFLAGS="$CFLAGS"
939 ac_save_CXXFLAGS="$CXXFLAGS"
940 CFLAGS="$CFLAGS $GTK_CFLAGS"
941 CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
942 LIBS="$LIBS $GTK_LIBS"
944 dnl Now check if the installed GTK is sufficiently new. (Also sanity
945 dnl checks the results of gtk-config to some extent)
954 int major, minor, micro;
956 if (sscanf("$min_gtk_version", "%d.%d.%d", &major, &minor, µ) != 3) {
957 printf("%s, bad version string\n", "$min_gtk_version");
961 return !((gtk_major_version > major) ||
962 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
963 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)));
965 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
966 CFLAGS="$ac_save_CFLAGS"
967 CXXFLAGS="$ac_save_CXXFLAGS"
972 if test "x$no_gtk" = x ; then
974 ifelse([$2], , :, [$2])
979 ifelse([$3], , :, [$3])
981 CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
988 # Configure paths for GTK--
989 # Erik Andersen 30 May 1998
990 # Modified by Tero Pulkkinen (added the compiler checks... I hope they work..)
992 dnl Test for GTK__, and define GTK___CFLAGS and GTK___LIBS
993 dnl to be used as follows:
994 dnl AM_PATH_GTKMM([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
997 dnl Get the cflags and libraries from the gtkmm-config script
999 AC_ARG_WITH(gtkmm-prefix,[ --with-gtkmm-prefix=PREFIX
1000 Prefix where GTK-- is installed (optional)],
1001 gtkmm_config_prefix="$withval", gtkmm_config_prefix="")
1002 AC_ARG_WITH(gtkmm-exec-prefix,[ --with-gtkmm-exec-prefix=PREFIX
1003 Exec prefix where GTK-- is installed (optional)],
1004 gtkmm_config_exec_prefix="$withval", gtkmm_config_exec_prefix="")
1005 AC_ARG_ENABLE(gtkmmtest, [ --disable-gtkmmtest Do not try to compile and run a test GTK-- program],
1006 , enable_gtkmmtest=yes)
1008 if test x$gtkmm_config_exec_prefix != x ; then
1009 gtkmm_config_args="$gtkmm_config_args --exec-prefix=$gtkmm_config_exec_prefix"
1010 if test x${GTKMM_CONFIG+set} != xset ; then
1011 GTKMM_CONFIG=$gtkmm_config_exec_prefix/bin/gtkmm-config
1014 if test x$gtkmm_config_prefix != x ; then
1015 gtkmm_config_args="$gtkmm_config_args --prefix=$gtkmm_config_prefix"
1016 if test x${GTKMM_CONFIG+set} != xset ; then
1017 GTKMM_CONFIG=$gtkmm_config_prefix/bin/gtkmm-config
1022 AC_DEFUN(AM_PATH_GTKMM,
1026 dnl Check if the installed GTK-- is sufficiently new.
1028 AC_PATH_PROG(GTKMM_CONFIG, gtkmm-config, no)
1029 min_gtkmm_version=ifelse([$1], ,0.9.14,$1)
1031 AC_MSG_CHECKING(for GTK-- - version >= $min_gtkmm_version)
1033 if test "$GTKMM_CONFIG" = "no" ; then
1039 GTK___CFLAGS=`$GTKMM_CONFIG $gtkmm_config_args --cflags`
1040 GTK___LIBS=`$GTKMM_CONFIG $gtkmm_config_args --libs`
1041 gtkmm_config_major_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \
1042 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
1043 gtkmm_config_minor_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \
1044 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
1045 gtkmm_config_micro_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \
1046 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
1047 if test "x$enable_gtkmmtest" = "xyes" ; then
1048 ac_save_CXXFLAGS="$CXXFLAGS"
1049 ac_save_LIBS="$LIBS"
1050 CXXFLAGS="$CXXFLAGS $GTK___CFLAGS"
1051 LIBS="$LIBS $GTK___LIBS"
1053 dnl Now check if the installed GTK-- is sufficiently new. (Also sanity
1054 dnl checks the results of gtkmm-config to some extent
1056 rm -f conf.gtkmmtest
1065 int major, minor, micro;
1068 system ("touch conf.gtkmmtest");
1070 /* HP/UX 0 (%@#!) writes to sscanf strings */
1071 tmp_version = g_strdup("$min_gtkmm_version");
1072 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
1073 printf("%s, bad version string\n", "$min_gtkmm_version");
1077 if ((gtkmm_major_version != $gtkmm_config_major_version) ||
1078 (gtkmm_minor_version != $gtkmm_config_minor_version) ||
1079 (gtkmm_micro_version != $gtkmm_config_micro_version))
1081 printf("\n*** 'gtkmm-config --version' returned %d.%d.%d, but GTK-- (%d.%d.%d)\n",
1082 $gtkmm_config_major_version, $gtkmm_config_minor_version, $gtkmm_config_micro_version,
1083 gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version);
1084 printf ("*** was found! If gtkmm-config was correct, then it is best\n");
1085 printf ("*** to remove the old version of GTK--. You may also be able to fix the error\n");
1086 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
1087 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
1088 printf("*** required on your system.\n");
1089 printf("*** If gtkmm-config was wrong, set the environment variable GTKMM_CONFIG\n");
1090 printf("*** to point to the correct copy of gtkmm-config, and remove the file config.cache\n");
1091 printf("*** before re-running configure\n");
1093 /* GTK-- does not have the GTKMM_*_VERSION constants */
1095 else if ((gtkmm_major_version != GTKMM_MAJOR_VERSION) ||
1096 (gtkmm_minor_version != GTKMM_MINOR_VERSION) ||
1097 (gtkmm_micro_version != GTKMM_MICRO_VERSION))
1099 printf("*** GTK-- header files (version %d.%d.%d) do not match\n",
1100 GTKMM_MAJOR_VERSION, GTKMM_MINOR_VERSION, GTKMM_MICRO_VERSION);
1101 printf("*** library (version %d.%d.%d)\n",
1102 gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version);
1107 if ((gtkmm_major_version > major) ||
1108 ((gtkmm_major_version == major) && (gtkmm_minor_version > minor)) ||
1109 ((gtkmm_major_version == major) && (gtkmm_minor_version == minor) && (gtkmm_micro_version >= micro)))
1115 printf("\n*** An old version of GTK-- (%d.%d.%d) was found.\n",
1116 gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version);
1117 printf("*** You need a version of GTK-- newer than %d.%d.%d. The latest version of\n",
1118 major, minor, micro);
1119 printf("*** GTK-- is always available from ftp://ftp.gtk.org.\n");
1121 printf("*** If you have already installed a sufficiently new version, this error\n");
1122 printf("*** probably means that the wrong copy of the gtkmm-config shell script is\n");
1123 printf("*** being found. The easiest way to fix this is to remove the old version\n");
1124 printf("*** of GTK--, but you can also set the GTKMM_CONFIG environment to point to the\n");
1125 printf("*** correct copy of gtkmm-config. (In this case, you will have to\n");
1126 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
1127 printf("*** so that the correct libraries are found at run-time))\n");
1132 ],, no_gtkmm=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
1133 CXXFLAGS="$ac_save_CXXFLAGS"
1134 LIBS="$ac_save_LIBS"
1137 if test "x$no_gtkmm" = x ; then
1139 ifelse([$2], , :, [$2])
1142 if test "$GTKMM_CONFIG" = "no" ; then
1143 echo "*** The gtkmm-config script installed by GTK-- could not be found"
1144 echo "*** If GTK-- was installed in PREFIX, make sure PREFIX/bin is in"
1145 echo "*** your path, or set the GTK_CONFIG environment variable to the"
1146 echo "*** full path to gtk-config."
1147 echo "*** The gtkmm-config script was not available in GTK-- versions"
1148 echo "*** prior to 0.9.12. Perhaps you need to update your installed"
1149 echo "*** version to 0.9.12 or newer"
1151 if test -f conf.gtkmmtest ; then
1154 echo "*** Could not run GTK-- test program, checking why..."
1155 CXXFLAGS="$CFLAGS $GTKMM_CXXFLAGS"
1156 LIBS="$LIBS $GTK___LIBS"
1160 ], [ return ((gtkmm_major_version) || (gtkmm_minor_version) || (gtkmm_micro_version)); ],
1161 [ echo "*** The test program compiled, but did not run. This usually means"
1162 echo "*** that the run-time linker is not finding GTK-- or finding the wrong"
1163 echo "*** version of GTK--. If it is not finding GTK--, you'll need to set your"
1164 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
1165 echo "*** to the installed location Also, make sure you have run ldconfig if that"
1166 echo "*** is required on your system"
1168 echo "*** If you have an old version installed, it is best to remove it, although"
1169 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
1170 [ echo "*** The test program failed to compile or link. See the file config.log for the"
1171 echo "*** exact error that occured. This usually means GTK-- was incorrectly installed"
1172 echo "*** or that you have moved GTK-- since it was installed. In the latter case, you"
1173 echo "*** may want to edit the gtkmm-config script: $GTKMM_CONFIG" ])
1174 CXXFLAGS="$ac_save_CXXFLAGS"
1175 LIBS="$ac_save_LIBS"
1180 ifelse([$3], , :, [$3])
1183 AC_SUBST(GTK___CFLAGS)
1184 AC_SUBST(GTK___LIBS)
1185 rm -f conf.gtkmmtest
1188 # Configure paths for GTK--DRAW
1189 # Derek Quinn Wyatt 98-08-21 (adapted from Jan Nieuwenhuizen's code)
1191 dnl AM_PATH_GTK__DRAW([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
1192 dnl Test for GTK--DRAW, and define GTK___CFLAGS and GTK___LIBS
1194 AC_DEFUN(AM_PATH_GTK__DRAW,
1196 dnl Get the cflags and libraries from the gtk__-config script
1198 AC_PATH_PROG(GTKMM_CONFIG, gtkmm-config, no)
1199 min_gtk___version=ifelse([$1], ,0.0.5,$1)
1200 AC_MSG_CHECKING(for GTK--DRAW - version >= $min_gtk___version)
1202 if test "$GTKMM_CONFIG" != "no" ; then
1203 GTK___CFLAGS=`$GTKMM_CONFIG --cflags`
1204 GTK___LIBS=`$GTKMM_CONFIG --libs`
1205 GTK___DLIBS="$GTK___LIBS -lgtkmmdraw"
1206 GTK___LIBS="$GTK___DLIBS"
1207 ac_save_CFLAGS="$CFLAGS"
1208 ac_save_LIBS="$LIBS"
1209 ac_save_CXXFLAGS="$CXXFLAGS"
1210 CFLAGS="$CFLAGS $GTK___CFLAGS"
1211 CXXFLAGS="$CXXFLAGS $GTK___CFLAGS"
1212 LIBS="$LIBS $GTK___LIBS"
1214 dnl Now check if the installed GTK__ is sufficiently new. (Also sanity
1215 dnl checks the results of gtk__-config to some extent)
1227 ],, no_gtk__=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
1228 CFLAGS="$ac_save_CFLAGS"
1229 CXXFLAGS="$ac_save_CXXFLAGS"
1230 LIBS="$ac_save_LIBS"
1234 if test "x$no_gtk__" = x ; then
1236 ifelse([$2], , :, [$2])
1241 ifelse([$3], , :, [$3])
1243 CXXFLAGS="$CXXFLAGS $GTK___CFLAGS"
1245 AC_SUBST(GTK___CFLAGS)
1246 AC_SUBST(GTK___LIBS)