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
22 CXXFLAGS=${CXXFLAGS:-$CFLAGS}
23 LDFLAGS=${LDFLAGS:-""}
29 AC_ARG_ENABLE(checking,
30 [ enable-checking set runtime checks (assert calls). Default: on],
31 [checking_b=$enableval] )
33 # actually, the default is: tja='-O' to get inlining...
36 #actually, that sucks.
37 # tja looks like a typo. Default is optimisation off. --hwn
39 AC_ARG_ENABLE(optimise,
40 [ enable-optimise use maximal speed optimisations. Default: off],
41 [optimise_b=$enableval])
43 AC_ARG_ENABLE(profiling,
44 [ enable-profiling compile with gprof support. Default: off],
45 [profile_b=$enableval])
47 AC_ARG_ENABLE(debugging,
48 [ enable-debugging set debug info. Default: on],
51 AC_ARG_ENABLE(mingw-prefix,
52 [ enable-mingw-prefix=DIR set the mingw32 directory (standalone windows32 exes)],
53 [MINGWPREFIX=$enableval],
56 if test "$checking_b" = no; then
59 DEFINES="$DEFINES -DNDEBUG"
62 if test "$optimise_b" = yes; then
63 OPTIMIZE="-O2 -finline-functions"
66 if test "$optimise_b" = no; then
70 if test $profile_b = yes; then
72 OPTIMIZE="$OPTIMIZE -pg"
75 if test $debug_b = yes; then
76 OPTIMIZE="$OPTIMIZE -g"
79 # however, C++ support in mingw32 v 0.1.4 is still flaky
80 if test x$MINGWPREFIX != xno; then
81 ICFLAGS="-I$MINGWPREFIX/include"
82 ILDFLAGS="-$MINGWPREFIX/lib"
89 CFLAGS="$CFLAGS $OPTIMIZE"
90 CPPFLAGS=${CPPFLAGS:-""}
91 AC_SUBST(cross_compiling)
101 AC_DEFUN(AC_STEPMAKE_CXX, [
105 AC_CHECK_HEADER(FlexLexer.h, true,
106 AC_STEPMAKE_WARN(can"\'"t find flex header. Please install Flex headers correctly))
108 CPPFLAGS="$CPPFLAGS $DEFINES"
109 CXXFLAGS="$CXXFLAGS $OPTIMIZE"
110 LDFLAGS="$LDFLAGS $EXTRA_LIBES"
118 AC_DEFUN(AC_STEPMAKE_CXXTEMPLATE, [
119 AC_CACHE_CHECK([whether explicit instantiation is needed],
120 lily_cv_need_explicit_instantiation,
122 template <class T> struct foo { static int baz; };
123 template <class T> int foo<T>::baz = 1;
124 ], [ return foo<int>::baz; ],
125 lily_cv_need_explicit_instantiation=no,
126 lily_cv_need_explicit_instantiation=yes))
127 if test x"$lily_cv_need_explicit_instantiation"x = x"yes"x; then
128 AC_DEFINE(NEED_EXPLICIT_INSTANTIATION)
132 AC_DEFUN(AC_STEPMAKE_DATADIR, [
133 if test "$datadir" = "\${prefix}/share"; then
134 datadir='${prefix}/share/'$package
136 DIR_DATADIR=${datadir}
138 if test "$prefix" = "NONE"; then
139 presome=${ac_default_prefix}
141 DIR_DATADIR=`echo ${DIR_DATADIR} | sed "s!\\\${prefix}!$presome!"`
143 AC_SUBST(DIR_DATADIR)
144 AC_DEFINE_UNQUOTED(DIR_DATADIR, "${DIR_DATADIR}")
147 AC_DEFUN(AC_STEPMAKE_END, [
148 AC_OUTPUT($CONFIGFILE.make:config.make.in)
150 # regular in-place build
151 # test for srcdir_build = yes ?
152 if test "$builddir" = "."; then
153 rm -f $srcdir/GNUmakefile
154 cp $srcdir/GNUmakefile.in $srcdir/GNUmakefile
155 chmod 444 $srcdir/GNUmakefile
156 else # --srcdir build
158 cp $srcdir/make/srcdir.make.in GNUmakefile
159 chmod 444 GNUmakefile
163 AC_DEFUN(AC_STEPMAKE_GXX, [
165 # urg, egcs: how to check for egcs >= 1.1?
166 changequote(<<, >>)dnl
167 if $CXX --version | egrep '2\.[89]' > /dev/null ||
168 $CXX --version | grep 'egcs' > /dev/null
173 AC_STEPMAKE_WARN(can\'t find g++ 2.8, 2.9 or egcs 1.1)
177 AC_DEFUN(AC_STEPMAKE_GUILE, [
178 ## First, let's just see if we can find Guile at all.
179 AC_MSG_CHECKING("for guile-config")
180 for guile_config in guile-config $target-guile-config $build-guile-config; do
181 AC_MSG_RESULT("$guile_config")
182 if ! $guile_config --version > /dev/null 2>&1 ; then
183 AC_MSG_WARN("cannot execute $guile_config")
184 AC_MSG_CHECKING("if we are cross compiling")
190 if test "$guile_config" = "error"; then
191 AC_MSG_ERROR("cannot find guile-config; is Guile installed?")
194 AC_MSG_CHECKING("Guile version")
195 need_guile_version="1.3.4"
196 need_guile_version_numeric=100304
197 guile_version=`$guile_config --version 2>&1 | awk '{print $NF}'`
198 guile_version_numeric=`echo $guile_version | awk -F. '
199 {if ([$]3) {last = [$]3}
201 {printf "%s%s%s\n",[$]1*100, [$]2*10,last}'`
202 AC_MSG_RESULT("$guile_version")
203 if test $guile_version_numeric -lt $need_guile_version_numeric
205 AC_STEPMAKE_WARN("Guile version "$need_guile_version" or newer is needed")
208 AC_PATH_PROG(GUILE, guile, error)
212 AC_DEFUN(AC_STEPMAKE_INIT, [
215 FULL_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL
216 if test x$MY_PATCH_LEVEL != x; then
217 FULL_VERSION=$FULL_VERSION.$MY_PATCH_LEVEL
220 # urg: don't "fix" this: irix doesn't know about [:lower:] and [:upper:]
221 changequote(<<, >>)dnl
222 PACKAGE=`echo $PACKAGE_NAME | tr '[a-z]' '[A-Z]'`
223 package=`echo $PACKAGE_NAME | tr '[A-Z]' '[a-z]'`
226 # No versioning on directory names of sub-packages
228 stepmake=${datadir}/stepmake
230 if test "$prefix" = "NONE"; then
231 presome=${ac_default_prefix}
233 stepmake=`echo ${stepmake} | sed "s!\\\${prefix}!$presome!"`
235 # urg, how is this supposed to work?
236 if test "$program_prefix" = "NONE"; then
239 if test "$program_suffix" = "NONE"; then
243 AC_MSG_CHECKING(Package)
244 if test "x$PACKAGE" = "xSTEPMAKE"; then
245 AC_MSG_RESULT(Stepmake package!)
247 AC_MSG_CHECKING(builddir)
248 if test "$srcdir" = "."; then
251 absolute_builddir="`pwd`"
252 package_absolute_builddir="`dirname $absolute_builddir`"
253 package_srcdir="`dirname $srcdir`"
254 builddir="`dirname $package_srcdir`/`basename $package_absolute_builddir`/`basename $absolute_builddir`"
256 AC_MSG_RESULT($builddir)
258 (cd stepmake 2>/dev/null || mkdir stepmake)
259 (cd stepmake; rm -f stepmake; ln -s ../$srcdir/stepmake .)
260 (cd stepmake; rm -f bin; ln -s ../$srcdir/bin .)
261 AC_CONFIG_AUX_DIR(bin)
264 AC_MSG_RESULT($PACKAGE)
266 AC_MSG_CHECKING(builddir)
267 if test "$srcdir" = "."; then
271 absolute_builddir="`pwd`"
272 # builddir="`dirname $srcdir`/`basename $absolute_builddir`"
273 builddir="`bash $srcdir/buildscripts/walk.sh \"$srcdir\"`"
276 AC_MSG_RESULT($builddir)
277 if expr "$srcdir" : '/' > /dev/null 2>&1; then
279 AC_STEPMAKE_WARN(Absolute --srcdir specified: $srcdir)
282 AC_MSG_CHECKING(for stepmake)
283 # Check for installed stepmake
284 if test -d $stepmake; then
285 AC_MSG_RESULT($stepmake)
287 if test "$absolute_srcdir" != "yes"; then
288 stepmake='$(depth)'/$srcdir/stepmake
290 stepmake=$srcdir/stepmake
292 AC_MSG_RESULT($srcdir/stepmake ($datadir/stepmake not found))
296 $HOME/usr/local/share/stepmake/bin\
297 $HOME/usr/local/lib/stepmake/bin\
298 $HOME/usr/share/stepmake/bin\
299 $HOME/usr/lib/stepmake/bin\
300 /usr/local/share/stepmake/bin\
301 /usr/local/lib/stepmake/bin\
302 /usr/share/stepmake/bin\
303 /usr/lib/stepmake/bin\
305 $srcdir/stepmake/bin\
313 AC_SUBST(PACKAGE_NAME)
314 AC_DEFINE_UNQUOTED(PACKAGE, "${PACKAGE_NAME}")
315 AC_DEFINE_UNQUOTED(TOPLEVEL_VERSION, "${FULL_VERSION}")
317 if test "$package_depth" = "" ; then
320 package_depth="../$package_depth"
323 AC_SUBST(package_depth)
325 AUTOGENERATE="This file was automatically generated by configure"
326 AC_SUBST(AUTOGENERATE)
329 AC_ARG_ENABLE(config,
330 [ enable-config=FILE put configure settings in config-FILE.make],
331 [CONFIGSUFFIX=-$enableval])
333 CONFIGFILE=config$CONFIGSUFFIX
334 AC_SUBST(CONFIGSUFFIX)
337 AC_CHECK_PROGS(MAKE, gmake make, error)
338 AC_CHECK_PROGS(FIND, find, error)
340 dnl system supplied INSTALL is unsafe; use our own install.
342 dnl if test "$INSTALL" = "bin/install-sh"; then
343 dnl export INSTALL="\$\(depth\)/bin/install-sh"
346 AC_CHECK_PROGS(TAR, tar, error)
348 if test "x`uname`" = "xHP-UX"; then
349 AC_PATH_PROG(BASH, bash, /bin/sh)
350 AC_STEPMAKE_WARN(avoiding buggy /bin/sh)
351 AC_PATH_PROG(SHELL, bash, /bin/ksh)
353 AC_PATH_PROG(BASH, bash, /bin/sh)
359 AC_PATH_PROG(PYTHON, ${PYTHON:-python}, -echo no python)
362 if test $MAKE != "error" ; then
363 $MAKE -v 2> /dev/null | grep GNU > /dev/null
366 AC_STEPMAKE_WARN(Please install *GNU* make)
370 AC_CHECK_SEARCH_RESULT($PYTHON, python, You should install Python)
372 if test "x$OSTYPE" = "xcygwin32" || test "x$OSTYPE" = "xWindows_NT"; then
373 LN=cp # hard link does not work under cygnus-nt
374 LN_S='cp -r' # symbolic link does not work for native nt
382 # cygwin fixes all these things.
383 # it seems these were used because of dos-style TEXINPUTS and
384 # MFINPUTS needed for miktex.
385 # but this breaks parsing of all other cygwin/unix style paths.
387 # if your (mik)tex breaks, make a:
388 # /usr/local/bin/tex:
390 # TEXINPUTS=`cygpath -pw $TEXINPUTS` /texmf/miktex/bin/tex $*
396 # MFINPUTS=`cygpath -pw $MFINPUTS` /texmf/miktex/bin/mf $*
398 # this way, you may have buildscripts/out/lilypond-profile
399 # 'automatically' sourced from /usr/etc/profile.d/ too.
404 INSTALL="\$(SHELL) \$(stepdir)/../bin/install-dot-exe.sh -c"
412 INSTALL="\$(SHELL) \$(stepdir)/../bin/install-sh -c"
414 AC_SUBST(program_prefix)
415 AC_SUBST(program_suffix)
420 AC_DEFINE_UNQUOTED(DIRSEP, '${DIRSEP}')
421 AC_DEFINE_UNQUOTED(PATHSEP, '${PATHSEP}')
428 AC_DEFUN(AC_STEPMAKE_KPATHSEA, [
431 AC_ARG_ENABLE(kpathsea,
432 [ enable-kpathsea use kpathsea lib. Default: on],
433 [kpathsea_b=$enableval])
435 if test $kpathsea_b = yes; then
436 AC_HAVE_HEADERS(kpathsea/kpathsea.h)
437 AC_CHECK_LIB(kpathsea, kpse_find_file)
438 # urg: kpse_find_tfm is a #define, how to check for this?
439 # AC_CHECK_LIB(kpathsea, kpse_find_tfm)
440 # AC_CHECK_FUNCS(kpse_find_file kpse_find_tfm,, AC_STEPMAKE_WARN(Cannot find kpathsea functions. You may have to create TFM files manually.))
441 AC_CHECK_FUNCS(kpse_find_file,, AC_STEPMAKE_WARN(Cannot find kpathsea functions. You may have to create TFM files manually.) kpathsea_b=no)
443 AC_MSG_CHECKING(whether to use kpathsea)
444 if test $kpathsea_b = yes; then
453 AC_DEFINE_UNQUOTED(KPATHSEA, $KPATHSEA)
456 AC_DEFUN(AC_STEPMAKE_LEXYACC, [
457 # ugh, automake: we want (and check for) bison
459 # ugh, automake: we want (and check for) flex
461 # urg: automake 1.3: hope this doesn't break 1.2 ac_cv_pro_lex_root hack...
465 ac_cv_prog_lex_root=lex.yy
467 AC_CHECK_PROGS(BISON, bison, error)
468 AC_CHECK_PROGS(FLEX, flex, error)
469 AC_CHECK_SEARCH_RESULT($BISON, bison, Please install Bison, 1.25 or newer)
470 AC_CHECK_SEARCH_RESULT($FLEX, flex, Please install Flex, 2.5 or newer)
472 if test $BISON != "error"; then
473 bison_version=`$BISON --version | sed 's/^.*version 1.//g'`
474 if test `echo $bison_version | sed 's/\..*$//g'` -lt 25; then
475 AC_STEPMAKE_WARN(Your bison is a bit old (1.$bison_version). You might have to install 1.25)
483 AC_DEFUN(AC_STEPMAKE_LIB, [
484 AC_CHECK_PROGS(AR, ar, error)
491 AC_DEFUN(AC_STEPMAKE_LIBTOOL, [
493 # **Never** try to set library version numbers so that they correspond
494 # to the release number of your package. This is an abuse that only
495 # fosters misunderstanding of the purpose of library versions.
497 REVISION=$PATCH_LEVEL
498 # CURRENT=$MINOR_VERSION
499 CURRENT=`expr $MINOR_VERSION + 1`
500 # AGE=$(expr $MAJOR_VERSION + 1)
507 AC_DEFUN(AC_STEPMAKE_LOCALE, [
512 AC_ARG_WITH(localedir,
513 [ with-localedir=LOCALE use LOCALE as locale dir. Default: PREFIX/share/locale ],
514 localedir=$with_localedir,
515 localedir='${prefix}/share/locale')
518 [ with-lang=LANG use LANG as language to emit messages],
522 AC_MSG_CHECKING(language)
524 En* | en* | Am* | am* | US* | us*)
526 NL | nl | Du* | du* | Ned* | ned*)
535 if test "$lang" = "unknown" ; then
536 AC_STEPMAKE_WARN($language not supported; available are: $ALL_LINGUAS)
541 AC_DEFUN(AC_STEPMAKE_GETTEXT, [
542 DIR_LOCALEDIR=${localedir}
544 if test "$prefix" = "NONE"; then
545 presome=${ac_default_prefix}
547 DIR_LOCALEDIR=`echo ${DIR_LOCALEDIR} | sed "s!\\\${prefix}!$presome!"`
549 AC_SUBST(DIR_LOCALEDIR)
550 AC_DEFINE_UNQUOTED(DIR_LOCALEDIR, "${DIR_LOCALEDIR}")
552 AC_CHECK_LIB(intl, gettext)
553 AC_CHECK_FUNCS(gettext)
556 AC_DEFUN(AC_STEPMAKE_MAN, [
557 AC_CHECK_PROGS(GROFF, groff ditroff, -echo no groff)
558 AC_CHECK_PROGS(TROFF, troff, -echo no troff)
559 AC_CHECK_PROGS(TBL, tbl, cat)
562 AC_DEFUN(AC_STEPMAKE_MSGFMT, [
563 # AC_CHECK_PROGS(MSGFMT, msgfmt, -echo no msgfmt)
564 AC_CHECK_PROGS(MSGFMT, msgfmt, \$(SHELL) \$(step-bindir)/fake-msgfmt.sh )
565 AC_MSG_CHECKING(whether msgfmt accepts -o)
566 msgfmt_output="`msgfmt -o bla 2>&1 | grep usage`"
567 if test "$msgfmt_output" = ""; then
571 MSGFMT="\$(SHELL) \$(step-bindir)/fake-msgfmt.sh"
573 AC_STEPMAKE_WARN(please install msgfmt from GNU gettext)
575 if test ! -n "$MSGFMT"; then
576 AC_STEPMAKE_WARN(please install msgfmt from GNU gettext)
580 #why has this been dropped?
581 AC_DEFUN(XXAC_STEPMAKE_TEXMF_DIRS, [
582 AC_ARG_ENABLE(tex-prefix,
583 [ enable-tex-prefix=DIR set the tex-directory to find TeX subdirectories. Default: PREFIX],
584 [TEXPREFIX=$enableval],
587 AC_ARG_ENABLE(tex-dir,
588 [ enable-tex-dir=DIR set the directory to put $PACKAGE_NAME TeX files in. ],
592 AC_ARG_ENABLE(mf-dir,
593 [ enable-mf-dir=DIR set the directory to put $PACKAGE_NAME MetaFont files in. ],
597 if test "x$TEXPREFIX" = xauto ; then
598 AC_TEX_PREFIX(TEXPREFIX)
600 find_texprefix=$TEXPREFIX
603 if test "x$MFDIR" = xauto; then
607 if test "x$TEXDIR" = xauto ; then
608 AC_TEX_SUBDIR(TEXDIR)
615 AC_DEFUN(AC_STEPMAKE_TEXMF_DIRS, [
616 AC_ARG_ENABLE(tfm-path,
617 [ enable-tfm-path=PATH set path of tex directories where tfm files live, esp.: cmr10.tfm. Default: use kpsewhich],
618 [tfm_path=$enableval],
621 AC_CHECK_PROGS(KPSEWHICH, kpsewhich, no)
622 AC_MSG_CHECKING(for tfm path)
626 if test "x$tfm_path" = xauto ; then
627 if test "x$KPSEWHICH" != "xno" ; then
628 for i in $TFM_FONTS; do
629 dir=`$KPSEWHICH tfm ${i}10.tfm`
630 TFM_PATH="$TFM_PATH `dirname $dir`"
633 AC_STEPMAKE_WARN(Please specify where cmr10.tfm lives:
634 ./configure --enable-tfm-path=/usr/local/TeX/lib/tex/fonts)
640 TFM_PATH=`echo $TFM_PATH | tr ':' ' '`
641 AC_MSG_RESULT($TFM_PATH)
645 AC_DEFUN(AC_STEPMAKE_TEXMF, [
646 # urg, never know what names these teTeX guys will think up
648 AC_CHECK_PROGS(METAFONT, mf, no)
649 if test "x$METAFONT" = "xno"; then
650 AC_CHECK_PROGS(MFONT, mfont, -echo no mf or mfont)
654 AC_CHECK_PROGS(METAPOST, mp, no)
655 if test "x$METAPOST" = "xno"; then
656 AC_CHECK_PROGS(MPOST, mpost, -echo no mp or mpost)
661 AC_CHECK_PROGS(INIMETAFONT, inimf, no)
662 if test "x$INIMETAFONT" = "xno"; then
663 AC_CHECK_PROGS(INIMFONT, inimfont, -echo no inimf or inimfont)
664 INIMETAFONT=$INIMFONT
667 AC_CHECK_PROGS(INIMETAPOST, inimp, no)
668 if test "x$INIMETAPOST" = "xno"; then
669 AC_CHECK_PROGS(INIMPOST, inimpost, -echo no inimp or inimpost)
670 INIMETAPOST=$INIMPOST
673 AC_MSG_CHECKING(for working metafont mode)
674 modelist='ljfour lj4 lj3 lj2 ljet laserjet'
675 for MFMODE in $modelist; do
676 $METAFONT "\mode:=$MFMODE; mode_setup; end." > /dev/null 2>&1
677 if test -f mfput.tfm; then
681 AC_MSG_RESULT($MFMODE)
683 AC_MSG_CHECKING(for mfplain.mp)
685 # For now let people define these in their environments
687 : ${MFPLAIN_MP=`kpsewhich mp mfplain.mp`}
688 AC_MSG_RESULT($MFPLAIN_MP)
690 AC_MSG_CHECKING(for inimetapost flags)
691 if test ${INIMETAPOST} = "inimp" ; then
692 : ${INIMETAPOST_FLAGS=''}
694 : ${INIMETAPOST_FLAGS='-interaction=nonstopmode'}
696 AC_MSG_RESULT($INIMETAPOST_FLAGS)
703 AC_SUBST(INIMETAFONT)
704 AC_SUBST(INIMETAPOST)
706 AC_SUBST(INIMETAPOST_FLAGS)
709 AC_DEFUN(AC_STEPMAKE_WARN, [
714 AC_DEFUN(AC_STEPMAKE_YODL, [
715 if test "x$YODL" = "x"; then
716 AC_CHECK_PROGS(STRIPROFF, striproff, -echo no striproff)
717 AC_CHECK_PROGS(YODL, yodl, -echo no yodl)
718 AC_CHECK_PROGS(YODL2HTML, yodl2html, -echo no yodl)
719 AC_CHECK_PROGS(YODL2LATEX, yodl2latex, )
720 AC_CHECK_PROGS(YODL2MAN, yodl2man, -echo no yodl)
721 AC_CHECK_PROGS(YODL2MSLESS, yodl2msless, -echo no yodl)
722 AC_CHECK_PROGS(YODL2TEXINFO, yodl2texinfo, -echo no yodl)
723 AC_CHECK_PROGS(YODL2TXT, yodl2txt, -echo no yodl)
724 YODL2LESS_DIR='$(bindir)/'
730 AC_SUBST(YODL2LESS_DIR)
732 AC_SUBST(YODL2MSLESS)
733 AC_SUBST(YODL2TEXINFO)
735 export STRIPROFF YODL YODL2HTML YODL2LATEX YODL2MAN YODL2MSLESS YODL2TEXINFO YODL2TXT
737 if test "x$YODL" = "-echo no yodl"; then
738 AC_STEPMAKE_WARN(Did not find YODL (Yodl is Yet Oneother Document Language, see http://www.cs.uu.nl/~hanwen/yodl))
742 dnl should cache result.
743 dnl should look in $prefix first.
744 dnl should probably assume TDS
746 AC_DEFUN(AC_TEX_PREFIX, [
749 AC_MSG_CHECKING(TeX/MF root dir directory)
751 find_root_prefix="$prefix"
754 test "x$find_root_prefix" = xNONE && find_root_prefix="$ac_default_prefix"
756 for postfix in "/lib/tex/" "/lib/texmf" "/lib" "/tex" "/texmf"; do
757 find_texprefix="$find_root_prefix$postfix"
758 if test -d $find_texprefix; then
759 find_texpostfix=$postfix
764 if test "x$find_texpostfix" = x; then
765 find_texpostfix='/lib/texmf/tex'
766 AC_STEPMAKE_WARN(Cannot determine the TeX-directory. Please use --enable-tex-prefix)
769 find_texprefix="$find_root_prefix/$find_texpostfix"
771 # only assign if variablename not empty
772 if test x != "x[$]$1"; then
773 $1='${prefix}'/"$find_texpostfix"
775 AC_MSG_RESULT($find_texprefix)
780 # find a directory inside a prefix,
781 # $1 the prefix (expanded version)
782 # $2 variable to assign
783 # $3 the directory name
785 AC_DEFUN(AC_FIND_DIR_IN_PREFIX, [
787 AC_MSG_CHECKING($4 directory)
789 $FIND ./ -type d -a -name $3 -print |sort|head -1|sed 's#^\./##')`
792 if test "x$find_dirdir" = x; then
794 AC_STEPMAKE_WARN(Cannot determine $4 subdirectory. Please set from command-line)
798 AC_MSG_RESULT($1/$find_dirdir)
801 # ugh. this is hopeless
802 AC_DEFUN(AC_KPSE_TEX_DIR, [
803 kpse_paths=`(kpsepath -n latex tex; kpsepath -n tex tex) | sed 's/:/ /g' | tr ' ' '\012' |sort | uniq -d`
804 kpse_syspaths=`echo $kpse_paths | grep '!'| sed 's/!//g'`
806 if test -w "$kpse_syspaths";
808 dir=`echo $kpse_syspaths | head -1`
810 dir=`echo $kpse_paths | grep -v '!'| head -1`
812 if test "$prefix" = "NONE"; then
813 local_prefix=$ac_default_prefix
814 local_prefix_quote='${prefix}'
818 local_prefix_quote=$prefix
820 echo $local_prefix_quote = $local_prefix
822 echo $dir | sed 's!'$local_prefix'!\$local_prefix_quote!g'
825 AC_DEFUN(AC_TEX_SUBDIR, [
826 dnl AC_REQUIRE([AC_TEX_PREFIX])
827 AC_FIND_DIR_IN_PREFIX($find_texprefix, $1, tex,TeX input)
831 AC_DEFUN(AC_MF_SUBDIR, [
832 dnl AC_REQUIRE([AC_TEX_PREFIX])
833 AC_FIND_DIR_IN_PREFIX($find_texprefix, $1, source, MF input)
837 AC_DEFUN(AC_CHECK_SEARCH_RESULT, [
838 result="`echo \"$1\" | grep echo`"
839 if test "x$1" = "xerror" -o "x$result" != "x"; then
840 AC_STEPMAKE_WARN(can\'t find $2. $3)
844 dnl GUILE_FLAGS --- set flags for compiling and linking with Guile
846 dnl This macro runs the `guile-config' script, installed with Guile,
847 dnl to find out where Guile's header files and libraries are
848 dnl installed. It sets two variables, marked for substitution, as
851 dnl GUILE_CFLAGS --- flags to pass to a C or C++ compiler to build
852 dnl code that uses Guile header files. This is almost
853 dnl always just a -I flag.
855 dnl GUILE_LDFLAGS --- flags to pass to the linker to link a
856 dnl program against Guile. This includes `-lguile' for
857 dnl the Guile library itself, any libraries that Guile
858 dnl itself requires (like -lqthreads), and so on. It may
859 dnl also include a -L flag to tell the compiler where to
860 dnl find the libraries.
862 AC_DEFUN([GUILE_FLAGS],[
863 ## The GUILE_FLAGS macro.
864 AC_MSG_CHECKING(for Guile)
865 if ! $guile_config link > /dev/null ; then
866 AC_MSG_RESULT("cannot execute $guile_config")
867 AC_MSG_ERROR("cannot find guile-config; is Guile installed?")
870 GUILE_CFLAGS="`$guile_config compile`"
871 GUILE_LDFLAGS="`$guile_config link`"
872 AC_SUBST(GUILE_CFLAGS)
873 AC_SUBST(GUILE_LDFLAGS)
878 # Configure paths for GTK+
879 # Owen Taylor 97-11-3
881 dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
882 dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
884 AC_DEFUN(AM_PATH_GTK,
886 dnl Get the cflags and libraries from the gtk-config script
888 AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
889 min_gtk_version=ifelse([$1], ,1.1.1,$1)
890 AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
892 if test "$GTK_CONFIG" != "no" ; then
893 GTK_CFLAGS=`$GTK_CONFIG --cflags`
894 GTK_LIBS=`$GTK_CONFIG --libs`
895 ac_save_CFLAGS="$CFLAGS"
897 ac_save_CXXFLAGS="$CXXFLAGS"
898 CFLAGS="$CFLAGS $GTK_CFLAGS"
899 CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
900 LIBS="$LIBS $GTK_LIBS"
902 dnl Now check if the installed GTK is sufficiently new. (Also sanity
903 dnl checks the results of gtk-config to some extent)
912 int major, minor, micro;
914 if (sscanf("$min_gtk_version", "%d.%d.%d", &major, &minor, µ) != 3) {
915 printf("%s, bad version string\n", "$min_gtk_version");
919 return !((gtk_major_version > major) ||
920 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
921 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)));
923 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
924 CFLAGS="$ac_save_CFLAGS"
925 CXXFLAGS="$ac_save_CXXFLAGS"
930 if test "x$no_gtk" = x ; then
932 ifelse([$2], , :, [$2])
937 ifelse([$3], , :, [$3])
939 CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
946 # Configure paths for GTK--
947 # Erik Andersen 30 May 1998
948 # Modified by Tero Pulkkinen (added the compiler checks... I hope they work..)
950 dnl Test for GTK__, and define GTK___CFLAGS and GTK___LIBS
951 dnl to be used as follows:
952 dnl AM_PATH_GTKMM([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
955 dnl Get the cflags and libraries from the gtkmm-config script
957 AC_ARG_WITH(gtkmm-prefix,[ --with-gtkmm-prefix=PREFIX
958 Prefix where GTK-- is installed (optional)],
959 gtkmm_config_prefix="$withval", gtkmm_config_prefix="")
960 AC_ARG_WITH(gtkmm-exec-prefix,[ --with-gtkmm-exec-prefix=PREFIX
961 Exec prefix where GTK-- is installed (optional)],
962 gtkmm_config_exec_prefix="$withval", gtkmm_config_exec_prefix="")
963 AC_ARG_ENABLE(gtkmmtest, [ --disable-gtkmmtest Do not try to compile and run a test GTK-- program],
964 , enable_gtkmmtest=yes)
966 if test x$gtkmm_config_exec_prefix != x ; then
967 gtkmm_config_args="$gtkmm_config_args --exec-prefix=$gtkmm_config_exec_prefix"
968 if test x${GTKMM_CONFIG+set} != xset ; then
969 GTKMM_CONFIG=$gtkmm_config_exec_prefix/bin/gtkmm-config
972 if test x$gtkmm_config_prefix != x ; then
973 gtkmm_config_args="$gtkmm_config_args --prefix=$gtkmm_config_prefix"
974 if test x${GTKMM_CONFIG+set} != xset ; then
975 GTKMM_CONFIG=$gtkmm_config_prefix/bin/gtkmm-config
980 AC_DEFUN(AM_PATH_GTKMM,
984 dnl Check if the installed GTK-- is sufficiently new.
986 AC_PATH_PROG(GTKMM_CONFIG, gtkmm-config, no)
987 min_gtkmm_version=ifelse([$1], ,0.9.14,$1)
989 AC_MSG_CHECKING(for GTK-- - version >= $min_gtkmm_version)
991 if test "$GTKMM_CONFIG" = "no" ; then
997 GTK___CFLAGS=`$GTKMM_CONFIG $gtkmm_config_args --cflags`
998 GTK___LIBS=`$GTKMM_CONFIG $gtkmm_config_args --libs`
999 gtkmm_config_major_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \
1000 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
1001 gtkmm_config_minor_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \
1002 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
1003 gtkmm_config_micro_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \
1004 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
1005 if test "x$enable_gtkmmtest" = "xyes" ; then
1006 ac_save_CXXFLAGS="$CXXFLAGS"
1007 ac_save_LIBS="$LIBS"
1008 CXXFLAGS="$CXXFLAGS $GTK___CFLAGS"
1009 LIBS="$LIBS $GTK___LIBS"
1011 dnl Now check if the installed GTK-- is sufficiently new. (Also sanity
1012 dnl checks the results of gtkmm-config to some extent
1014 rm -f conf.gtkmmtest
1023 int major, minor, micro;
1026 system ("touch conf.gtkmmtest");
1028 /* HP/UX 0 (%@#!) writes to sscanf strings */
1029 tmp_version = g_strdup("$min_gtkmm_version");
1030 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
1031 printf("%s, bad version string\n", "$min_gtkmm_version");
1035 if ((gtkmm_major_version != $gtkmm_config_major_version) ||
1036 (gtkmm_minor_version != $gtkmm_config_minor_version) ||
1037 (gtkmm_micro_version != $gtkmm_config_micro_version))
1039 printf("\n*** 'gtkmm-config --version' returned %d.%d.%d, but GTK-- (%d.%d.%d)\n",
1040 $gtkmm_config_major_version, $gtkmm_config_minor_version, $gtkmm_config_micro_version,
1041 gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version);
1042 printf ("*** was found! If gtkmm-config was correct, then it is best\n");
1043 printf ("*** to remove the old version of GTK--. You may also be able to fix the error\n");
1044 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
1045 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
1046 printf("*** required on your system.\n");
1047 printf("*** If gtkmm-config was wrong, set the environment variable GTKMM_CONFIG\n");
1048 printf("*** to point to the correct copy of gtkmm-config, and remove the file config.cache\n");
1049 printf("*** before re-running configure\n");
1051 /* GTK-- does not have the GTKMM_*_VERSION constants */
1053 else if ((gtkmm_major_version != GTKMM_MAJOR_VERSION) ||
1054 (gtkmm_minor_version != GTKMM_MINOR_VERSION) ||
1055 (gtkmm_micro_version != GTKMM_MICRO_VERSION))
1057 printf("*** GTK-- header files (version %d.%d.%d) do not match\n",
1058 GTKMM_MAJOR_VERSION, GTKMM_MINOR_VERSION, GTKMM_MICRO_VERSION);
1059 printf("*** library (version %d.%d.%d)\n",
1060 gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version);
1065 if ((gtkmm_major_version > major) ||
1066 ((gtkmm_major_version == major) && (gtkmm_minor_version > minor)) ||
1067 ((gtkmm_major_version == major) && (gtkmm_minor_version == minor) && (gtkmm_micro_version >= micro)))
1073 printf("\n*** An old version of GTK-- (%d.%d.%d) was found.\n",
1074 gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version);
1075 printf("*** You need a version of GTK-- newer than %d.%d.%d. The latest version of\n",
1076 major, minor, micro);
1077 printf("*** GTK-- is always available from ftp://ftp.gtk.org.\n");
1079 printf("*** If you have already installed a sufficiently new version, this error\n");
1080 printf("*** probably means that the wrong copy of the gtkmm-config shell script is\n");
1081 printf("*** being found. The easiest way to fix this is to remove the old version\n");
1082 printf("*** of GTK--, but you can also set the GTKMM_CONFIG environment to point to the\n");
1083 printf("*** correct copy of gtkmm-config. (In this case, you will have to\n");
1084 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
1085 printf("*** so that the correct libraries are found at run-time))\n");
1090 ],, no_gtkmm=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
1091 CXXFLAGS="$ac_save_CXXFLAGS"
1092 LIBS="$ac_save_LIBS"
1095 if test "x$no_gtkmm" = x ; then
1097 ifelse([$2], , :, [$2])
1100 if test "$GTKMM_CONFIG" = "no" ; then
1101 echo "*** The gtkmm-config script installed by GTK-- could not be found"
1102 echo "*** If GTK-- was installed in PREFIX, make sure PREFIX/bin is in"
1103 echo "*** your path, or set the GTK_CONFIG environment variable to the"
1104 echo "*** full path to gtk-config."
1105 echo "*** The gtkmm-config script was not available in GTK-- versions"
1106 echo "*** prior to 0.9.12. Perhaps you need to update your installed"
1107 echo "*** version to 0.9.12 or newer"
1109 if test -f conf.gtkmmtest ; then
1112 echo "*** Could not run GTK-- test program, checking why..."
1113 CXXFLAGS="$CFLAGS $GTKMM_CXXFLAGS"
1114 LIBS="$LIBS $GTK___LIBS"
1118 ], [ return ((gtkmm_major_version) || (gtkmm_minor_version) || (gtkmm_micro_version)); ],
1119 [ echo "*** The test program compiled, but did not run. This usually means"
1120 echo "*** that the run-time linker is not finding GTK-- or finding the wrong"
1121 echo "*** version of GTK--. If it is not finding GTK--, you'll need to set your"
1122 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
1123 echo "*** to the installed location Also, make sure you have run ldconfig if that"
1124 echo "*** is required on your system"
1126 echo "*** If you have an old version installed, it is best to remove it, although"
1127 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
1128 [ echo "*** The test program failed to compile or link. See the file config.log for the"
1129 echo "*** exact error that occured. This usually means GTK-- was incorrectly installed"
1130 echo "*** or that you have moved GTK-- since it was installed. In the latter case, you"
1131 echo "*** may want to edit the gtkmm-config script: $GTKMM_CONFIG" ])
1132 CXXFLAGS="$ac_save_CXXFLAGS"
1133 LIBS="$ac_save_LIBS"
1138 ifelse([$3], , :, [$3])
1141 AC_SUBST(GTK___CFLAGS)
1142 AC_SUBST(GTK___LIBS)
1143 rm -f conf.gtkmmtest
1146 # Configure paths for GTK--DRAW
1147 # Derek Quinn Wyatt 98-08-21 (adapted from Jan Nieuwenhuizen's code)
1149 dnl AM_PATH_GTK__DRAW([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
1150 dnl Test for GTK--DRAW, and define GTK___CFLAGS and GTK___LIBS
1152 AC_DEFUN(AM_PATH_GTK__DRAW,
1154 dnl Get the cflags and libraries from the gtk__-config script
1156 AC_PATH_PROG(GTKMM_CONFIG, gtkmm-config, no)
1157 min_gtk___version=ifelse([$1], ,0.0.5,$1)
1158 AC_MSG_CHECKING(for GTK--DRAW - version >= $min_gtk___version)
1160 if test "$GTKMM_CONFIG" != "no" ; then
1161 GTK___CFLAGS=`$GTKMM_CONFIG --cflags`
1162 GTK___LIBS=`$GTKMM_CONFIG --libs`
1163 GTK___DLIBS="$GTK___LIBS -lgtkmmdraw"
1164 GTK___LIBS="$GTK___DLIBS"
1165 ac_save_CFLAGS="$CFLAGS"
1166 ac_save_LIBS="$LIBS"
1167 ac_save_CXXFLAGS="$CXXFLAGS"
1168 CFLAGS="$CFLAGS $GTK___CFLAGS"
1169 CXXFLAGS="$CXXFLAGS $GTK___CFLAGS"
1170 LIBS="$LIBS $GTK___LIBS"
1172 dnl Now check if the installed GTK__ is sufficiently new. (Also sanity
1173 dnl checks the results of gtk__-config to some extent)
1185 ],, no_gtk__=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
1186 CFLAGS="$ac_save_CFLAGS"
1187 CXXFLAGS="$ac_save_CXXFLAGS"
1188 LIBS="$ac_save_LIBS"
1192 if test "x$no_gtk__" = x ; then
1194 ifelse([$2], , :, [$2])
1199 ifelse([$3], , :, [$3])
1201 CXXFLAGS="$CXXFLAGS $GTK___CFLAGS"
1203 AC_SUBST(GTK___CFLAGS)
1204 AC_SUBST(GTK___LIBS)