1 dnl aclocal.m4 -*-shell-script-*-
2 dnl StepMake subroutines for configure.ac
5 ### mostly interal macros
7 # Get full path of executable ($1)
8 AC_DEFUN(STEPMAKE_GET_EXECUTABLE, [
9 ## which doesn't work in ash, if /usr/bin/which isn't installed
10 ## type -p doesn't work in ash
11 ## command -v doesn't work in zsh
12 ## command -v "$1" 2>&1
13 ## this test should work in ash, bash, pdksh (ksh), zsh
14 type -p $1 2>/dev/null | tail -n 1 | awk '{print $NF}'
18 # Get version string from executable ($1)
19 AC_DEFUN(STEPMAKE_GET_VERSION, [
20 ## "$1" --version 2>&1 | grep -v '^$' | head -n 1 | awk '{print $NF}'
23 ## Workaround for broken Debian gcc version string:
24 ## gcc (GCC) 3.1.1 20020606 (Debian prerelease)
26 ## -V: Workaround for python
28 changequote(<<, >>)#dnl
30 ## Assume and hunt for dotted version multiplet.
31 ## use eval trickery, because we cannot use multi-level $() instead of ``
32 ## for compatibility reasons.
34 ## grab the first version number in --version output.
35 eval _ver=\"\`("$1" --version || "$1" -V) 2>&1 |
36 grep -E '(^| )[0-9][0-9]*\.[0-9]' |
39 sed 's/\([0-9][0-9]*\.[0-9][0-9.]*\).*/\1/g' |
40 grep -E '(^| )[0-9][0-9]*\.[0-9]' |
43 if test -z "$_ver"; then
44 ## If empty, try date [fontforge]
45 eval _ver=\"\`("$1" --version || "$1" -V) 2>&1 | grep '[0-9]\{6,8\}' \
47 | sed -e 's/^[^.0-9]*//' -e 's/[^.0-9]*$//'\`\"
53 # Calculate simplistic numeric version from version string ($1)
54 # As yet, we have no need for something more elaborate.
55 AC_DEFUN(STEPMAKE_NUMERIC_VERSION, [
58 if ([$]3) {three = [$]3}
61 {printf "%.0f\n", [$]1*1000000 + [$]2*1000 + three}'
65 # Add item ($2) to list ($1, one of 'OPTIONAL', 'REQUIRED')
66 AC_DEFUN(STEPMAKE_ADD_ENTRY, [
67 eval "$1"=\"`eval echo \"'$'$1\" \"$2\"`\"
70 # Check if tested program ($2) was found ($1).
71 # If not, add entry to missing-list ($3, one of 'OPTIONAL', 'REQUIRED').
72 # We could abort here if a 'REQUIRED' program is not found
73 AC_DEFUN(STEPMAKE_OPTIONAL_REQUIRED, [
74 STEPMAKE_CHECK_SEARCH_RESULT($1)
75 if test $? -ne 0; then
76 STEPMAKE_ADD_ENTRY($3, $2)
77 if test "$3" = "REQUIRED"; then
78 command="echo ERROR: $2 not found"
79 # abort configure process here?
81 command="- echo $2 not found"
91 # Return if tested proram ($1) was found (true) or not (false).
92 AC_DEFUN(STEPMAKE_CHECK_SEARCH_RESULT, [
93 r="`eval echo '$'"$1"`"
94 if test -n "$r" -a "$r" != "error" -a "$r" != "no" && expr '`eval echo '$'"$1"`' : '.*\(echo\)' > /dev/null; then
97 ##STEPMAKE_WARN(cannot find $2. $3)
103 # Check version of program ($1)
104 # If version ($4: optional argument, supply if version cannot be
105 # parsed using --version or -V ) is smaller than requested ($3), add
106 # entry to missing-list ($2, one of 'OPTIONAL', 'REQUIRED').
107 AC_DEFUN(STEPMAKE_CHECK_VERSION, [
108 r="`eval echo '$'"$1"`"
109 AC_MSG_CHECKING([$r version])
110 exe=`STEPMAKE_GET_EXECUTABLE($r)`
111 if test -n "$4"; then
114 ver=`STEPMAKE_GET_VERSION($exe)`
116 num=`STEPMAKE_NUMERIC_VERSION($ver)`
117 req=`STEPMAKE_NUMERIC_VERSION($3)`
118 AC_MSG_RESULT([$ver])
119 if test "$num" -lt "$req"; then
120 STEPMAKE_ADD_ENTRY($2, ["$r >= $3 (installed: $ver)"])
122 vervar="`echo $1 | tr '[a-z]' '[A-Z]'`_VERSION"
123 eval `echo $vervar=$num`
124 ## AC_SUBST(`eval echo $vervar`)
127 # Check version of program ($1)
128 # If version is greater than or equals unsupported ($3),
129 # add entry to unsupported list ($2, 'UNSUPPORTED')
130 AC_DEFUN(STEPMAKE_CHECK_VERSION_UNSUPPORTED, [
131 r="`eval echo '$'"$1"`"
132 AC_MSG_CHECKING([$r version])
133 exe=`STEPMAKE_GET_EXECUTABLE($r)`
134 ver=`STEPMAKE_GET_VERSION($exe)`
135 num=`STEPMAKE_NUMERIC_VERSION($ver)`
136 sup=`STEPMAKE_NUMERIC_VERSION($3)`
137 AC_MSG_RESULT([$ver])
138 if test "$num" -ge "$sup"; then
139 STEPMAKE_ADD_ENTRY($2, ["$r < $3 (installed: $ver)"])
143 ### Macros to build configure.ac
146 AC_DEFUN(STEPMAKE_BIBTEX2HTML, [
147 STEPMAKE_PROGS(BIBTEX2HTML, bibtex2html bib2html, $1)
148 if test "$BIBTEX2HTML" = "bib2html"; then
149 BIBTEX2HTML_FLAGS='$< $(@)'
151 BIBTEX2HTML_FLAGS='-o $(@D)/$(*F) $<'
153 AC_SUBST(BIBTEX2HTML)
154 AC_SUBST(BIBTEX2HTML_FLAGS)
158 AC_DEFUN(STEPMAKE_BISON, [
159 # ugh, automake: we want (and check for) bison
162 STEPMAKE_PROGS(BISON, bison, $1)
164 # urg. should test functionality rather than version.
165 if test "$BISON" = "bison" -a -n "$2"; then
166 STEPMAKE_CHECK_VERSION(BISON, $1, $2)
170 AC_DEFUN(STEPMAKE_COMPILE_BEFORE, [
171 # -O is necessary to get inlining
173 CXXFLAGS=${CXXFLAGS-$CFLAGS}
174 LDFLAGS=${LDFLAGS-""}
181 AC_ARG_ENABLE(debugging,
182 [AS_HELP_STRING([--enable-debugging],
183 [compile with debugging info. Default: on])],
184 [debug_b=$enableval])
186 AC_ARG_ENABLE(checking,
187 [AS_HELP_STRING([--enable-checking],
188 [compile with expensive run-time checks. Default: off])],
189 [checks_b=$enableval])
191 AC_ARG_ENABLE(optimising,
192 [AS_HELP_STRING([--enable-optimising],
193 [compile with optimising. Default: on])],
194 [optimise_b=$enableval])
196 AC_ARG_ENABLE(profiling,
197 [AS_HELP_STRING([--enable-profiling],
198 [compile with gprof support. Default: off])],
199 [profile_b=$enableval])
202 [AS_HELP_STRING([--enable-pipe],
203 [compile with -pipe. Default: on])],
206 if test "$optimise_b" = yes; then
207 OPTIMIZE=" -O2 -finline-functions"
208 # following two lines are compatibility while Patchy has not
209 # yet learnt about --enable-checking. But once it has, we
210 # don't want -DDEBUG twice, so we omit it here if it is going
211 # to get added anyway later.
212 elif test "$checks_b" != yes; then
213 DEFINES="$DEFINES -DDEBUG"
216 if test "$checks_b" = yes; then
217 DEFINES="$DEFINES -DDEBUG"
220 if test $profile_b = yes; then
222 OPTIMIZE="$OPTIMIZE -pg"
225 if test $debug_b = yes; then
226 OPTIMIZE="$OPTIMIZE -g"
230 AC_DEFUN(STEPMAKE_COMPILE, [
232 AC_REQUIRE([STEPMAKE_COMPILE_BEFORE])
233 AC_REQUIRE([AC_PROG_CC])
235 STEPMAKE_OPTIONAL_REQUIRED(CC, cc, $1)
239 # If -pipe requested, test if it works and add to CFLAGS.
240 if test "$pipe_b" = yes; then
241 save_cflags="$CFLAGS"
242 CFLAGS=" -pipe $CFLAGS";
243 AC_CACHE_CHECK([whether compiler understands -pipe],
244 [stepmake_cv_cflags_pipe],
245 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[/* -pipe test */]])],
246 [stepmake_cv_cflags_pipe=yes],
247 [stepmake_cv_cflags_pipe=no]))
249 if test $stepmake_cv_cflags_pipe = yes; then
250 OPTIMIZE="$OPTIMIZE -pipe"
254 CFLAGS="$CFLAGS $OPTIMIZE"
255 CPPFLAGS=${CPPFLAGS-""}
257 AC_MSG_CHECKING([for IEEE-conformance compiler flags])
258 save_cflags="$CFLAGS"
261 dnl should do compile test?
262 AC_MSG_RESULT(-mieee)
263 CFLAGS=" -mieee $CFLAGS"
266 AC_MSG_RESULT([none])
270 AC_SUBST(cross_compiling)
278 AC_DEFUN(STEPMAKE_CXX, [
280 STEPMAKE_OPTIONAL_REQUIRED(CXX, c++, $1)
282 CXXFLAGS="$CXXFLAGS $OPTIMIZE"
291 AC_DEFUN(STEPMAKE_CXXTEMPLATE, [
292 AC_CACHE_CHECK([whether explicit instantiation is needed],
293 stepmake_cv_need_explicit_instantiation,
294 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
295 template <class T> struct foo { static int baz; };
296 template <class T> int foo<T>::baz = 1;
297 ]], [[ return foo<int>::baz; ]])],[stepmake_cv_need_explicit_instantiation=no],[stepmake_cv_need_explicit_instantiation=yes]))
298 if test x"$stepmake_cv_need_explicit_instantiation"x = x"yes"x; then
299 AC_DEFINE(NEED_EXPLICIT_INSTANTIATION)
303 AC_DEFUN(STEPMAKE_GXXCODEGENBUG, [
304 AC_MSG_CHECKING([options for known g++ bugs])
305 case "$GXX:$CXX_VERSION" in
307 AC_MSG_RESULT([-fno-optimize-sibling-calls (tail call bug)])
308 CXXFLAGS="$CXXFLAGS -fno-optimize-sibling-calls"
311 AC_MSG_RESULT([-fno-tree-vrp (comparison bug)])
312 CXXFLAGS="$CXXFLAGS -fno-tree-vrp"
314 *) AC_MSG_RESULT([none])
320 AC_DEFUN(STEPMAKE_DATADIR, [
322 if test "$prefix" = "NONE"; then
323 presome=${ac_default_prefix}
326 build_package_datadir=$ugh_ugh_autoconf250_builddir/out$CONFIGSUFFIX/share/$package
328 DATADIR=`echo ${datadir} | sed "s!\\\${datarootdir}!${presome}/share!"`
329 DATADIR=`echo ${DATADIR} | sed "s!\\\${prefix}!$presome!"`
330 BUILD_PACKAGE_DATADIR=`echo ${build_package_datadir} | sed "s!\\\${prefix}!$presome!"`
333 AC_SUBST(datarootdir)
334 AC_SUBST(build_package_datadir)
335 AC_DEFINE_UNQUOTED(DATADIR, ["${DATADIR}"])
336 AC_DEFINE_UNQUOTED(BUILD_PACKAGE_DATADIR, ["${BUILD_PACKAGE_DATADIR}"])
339 ## ugh: cut & paste programming from datadir.
340 AC_DEFUN(STEPMAKE_LIBDIR, [
341 presome=${exec_prefix}
342 if test "$presome" = "NONE"; then
345 if test "$presome" = "NONE"; then
346 presome=${ac_default_prefix}
349 build_package_libdir=$ugh_ugh_autoconf250_builddir/out$CONFIGSUFFIX/lib/$package
351 LIBDIR=`echo ${libdir} | sed "s!\\\${exec_prefix}!$presome!"`
352 BUILD_PACKAGE_LIBDIR=`echo ${build_package_libdir} | sed "s!\\\${exec_prefix}!$presome!"`
355 AC_SUBST(build_package_libdir)
356 AC_DEFINE_UNQUOTED(LIBDIR, ["${LIBDIR}"])
357 AC_DEFINE_UNQUOTED(BUILD_PACKAGE_LIBDIR, ["${BUILD_PACKAGE_LIBDIR}"])
361 AC_DEFUN(STEPMAKE_PREFIX_EXPAND_FIXUP, [
362 # undo expanding of explicit --infodir=/usr/share
363 # to ease install-time override with prefix=...
364 strip=`echo $includedir | eval sed s@^$prefix@@`
365 if test "$includedir" = "`eval echo $prefix$strip`"; then
366 includedir='${prefix}'$strip''
368 strip=`echo $libdir | eval sed s@^$exec_prefix@@`
369 if test "$libdir" = "`eval echo $exec_prefix$strip`"; then
370 libdir='${exec_prefix}'$strip''
372 strip=`echo $infodir | eval sed s@^$datarootdir@@`
373 if test "$infodir" = "`eval echo $datarootdir$strip`"; then
374 infodir='${datarootdir}'$strip''
376 strip=`echo $mandir | eval sed s@^$datarootdir@@`
377 if test "$mandir" = "`eval echo $datarootdir$strip`"; then
378 mandir='${datarootdir}'$strip''
383 AC_DEFUN(STEPMAKE_END, [
384 STEPMAKE_PREFIX_EXPAND_FIXUP
389 AC_CONFIG_FILES([$CONFIGFILE.make:config.make.in])
392 if test -n "$OPTIONAL"; then
394 echo "WARNING: Please consider installing optional programs or files: $OPTIONAL"
397 if test -n "$REQUIRED"; then
399 echo "ERROR: Please install required programs: $REQUIRED"
402 if test -n "$UNSUPPORTED"; then
404 echo "ERROR: Please use older version of programs: $UNSUPPORTED"
407 if test -n "$OPTIONAL$REQUIRED$UNSUPPORTED"; then
409 echo "See INSTALL.txt for more information on how to build $PACKAGE_NAME"
410 if test -f config.cache ; then
411 echo "Remove config.cache before rerunning ./configure"
415 if test -n "$REQUIRED$UNSUPPORTED"; then
416 rm -f $srcdir/GNUmakefile
420 # regular in-place build
421 # test for srcdir_build = yes ?
422 if test "$srcdir_build" = "yes"; then
423 rm -f $srcdir/GNUmakefile
424 cp $srcdir/GNUmakefile.in $srcdir/GNUmakefile
425 chmod 444 $srcdir/GNUmakefile
427 if test -f $srcdir/GNUmakefile; then
429 Source directory already configured. Please clean the source directory
431 make -C $srcdir distclean
438 abssrcdir="`cd $srcdir; pwd`"
440 for d in 2 3 4 5 ; do
441 for mf in `cd $srcdir ; find . -maxdepth $d -mindepth $d -name GNUmakefile`; do
444 # source is below build directory, always copy
447 case "$abssrcdir/${mf#./}" in
449 # find descended into build directory, don't copy
454 cat <<EOF | $PYTHON - > $mf
455 print 'depth=' + ('../' * ( $d-1 ) )
456 print 'include \$(depth)/config\$(if \$(conf),-\$(conf),).make'
457 print 'include \$(configure-srcdir)/$mf'
458 print 'MODULE_INCLUDES += \$(src-dir)/\$(outbase)'
461 for mf in `cd $srcdir ; find . -maxdepth $d -mindepth $d -name '*.make' | grep -v config.make `; do
464 # source is below build directory, always copy
467 case "$abssrcdir/${mf#./}" in
469 # find descended into build directory, don't copy
474 cat <<EOF | $PYTHON - > $mf
475 print 'include \$(depth)/config\$(if \$(conf),-\$(conf),).make'
476 print 'include \$(configure-srcdir)/$mf'
482 cat <<EOF > GNUmakefile
484 include config\$(if \$(conf),-\$(conf),).make
485 include \$(configure-srcdir)/GNUmakefile.in
487 chmod 444 GNUmakefile
493 AC_DEFUN(STEPMAKE_FLEX, [
494 # ugh, automake: we want (and check for) flex
496 # urg: automake 1.3: hope this doesn't break 1.2 ac_cv_pro_lex_root hack...
500 ac_cv_prog_lex_root=lex.yy
501 STEPMAKE_PROGS(FLEX, flex, $1)
505 AC_DEFUN(STEPMAKE_FLEXLEXER, [
506 AC_CHECK_HEADERS([FlexLexer.h],[true],[false])
507 if test $? -ne 0; then
508 warn='FlexLexer.h (flex package)'
509 STEPMAKE_ADD_ENTRY($1, $warn)
511 # check for yyFlexLexer.yy_current_buffer,
512 # in 2.5.4 <= flex < 2.5.29
513 AC_CACHE_CHECK([for yyFlexLexer.yy_current_buffer],
514 [stepmake_cv_flexlexer_yy_current_buffer],
515 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
517 #include <FlexLexer.h>
518 class yy_flex_lexer: public yyFlexLexer
523 yy_current_buffer = 0;
527 [stepmake_cv_flexlexer_yy_current_buffer=yes],
528 [stepmake_cv_flexlexer_yy_current_buffer=no]))
529 if test $stepmake_cv_flexlexer_yy_current_buffer = yes; then
530 AC_DEFINE(HAVE_FLEXLEXER_YY_CURRENT_BUFFER, 1, [Define to 1 if yyFlexLexer has yy_current_buffer.])
536 AC_DEFUN(STEPMAKE_FLEXLEXER_LOCATION, [
537 AC_MSG_CHECKING([FlexLexer.h location])
540 cat <<EOF > conftest.cc
542 #include <FlexLexer.h>
544 FLEXLEXER_FILE=`eval $ac_cpp conftest.cc | \
545 sed 's!# 1 "\(.*FlexLexer.h\)"!@FLEXLEXER@\1@@!g' | grep '@@' | \
546 sed 's!.*@FLEXLEXER@\(.*\)@@.*$!\1!g' ` 1> /dev/null 2> /dev/null
548 AC_SUBST(FLEXLEXER_FILE)
549 AC_MSG_RESULT($FLEXLEXER_FILE)
552 AC_DEFUN(STEPMAKE_GCC_OR_CLANG, [
554 if test "$HAS_CLANG" = "no"; then
555 if test "$GCC" = "yes"; then
556 STEPMAKE_CHECK_VERSION(CC, $1, $2)
558 warn="$CC (Please install *GNU* cc)"
559 STEPMAKE_ADD_ENTRY($1, $warn)
562 # no else, we're fine with any clang
565 AC_DEFUN(STEPMAKE_GETTEXT, [
567 if test "$prefix" = "NONE"; then
568 presome=${ac_default_prefix}
570 LOCALEDIR=`echo ${localedir} | sed "s!\\\${prefix}!$presome!"`
573 AC_DEFINE_UNQUOTED(LOCALEDIR, ["${LOCALEDIR}"])
574 AC_CHECK_LIB(intl, gettext)
575 AC_CHECK_FUNCS(gettext)
579 # Check for guile, between minimum ($2) and maximum version ($3).
580 # If missing, add entry to missing-list ($1, one of 'OPTIONAL', 'REQUIRED')
581 AC_DEFUN(STEPMAKE_GUILE, [
582 AC_MSG_CHECKING([for guile])
585 for r in $GUILE guile guile2 guile2.0 guile-2.0 guile1 guile1.9 guile1.8 guile-1 guile-1.9 guile-1.8; do
586 exe=`STEPMAKE_GET_EXECUTABLE($r)`
587 if ! $exe --version > /dev/null 2>&1 ; then
590 ver=`STEPMAKE_GET_VERSION($exe)`
591 num=`STEPMAKE_NUMERIC_VERSION($ver)`
592 req=`STEPMAKE_NUMERIC_VERSION($2)`
593 sup=`STEPMAKE_NUMERIC_VERSION($3)`
594 if test -n "$2" && test "$num" -lt "$req"; then
595 guile=["$r >= $2 (installed: $ver)"]
598 if test -n "$3" && test "$num" -ge "$sup"; then
599 guile=["$r < $3 (installed: $ver)"]
608 AC_MSG_RESULT([$found])
609 if test "$found" != "no"; then
610 AC_MSG_CHECKING([$guile version])
611 AC_MSG_RESULT([$ver])
614 STEPMAKE_ADD_ENTRY($1, $guile)
616 STEPMAKE_PATH_PROG(GUILE, $GUILE)
620 # STEPMAKE_GUILE_FLAGS --- set flags for compiling and linking with Guile
622 # This macro runs the guile-config script, installed with Guile,
623 # to find out where Guile's header files and libraries are
624 # installed. It sets two variables, marked for substitution, as
627 # GUILE_CFLAGS --- flags to pass to a C or C++ compiler to build
628 # code that uses Guile header files. This is almost
629 # always just a -I flag.
631 # GUILE_LDFLAGS --- flags to pass to the linker to link a
632 # program against Guile. This includes -lguile for
633 # the Guile library itself, any libraries that Guile
634 # itself requires (like -lqthreads), and so on. It may
635 # also include a -L flag to tell the compiler where to
636 # find the libraries.
638 AC_DEFUN([STEPMAKE_GUILE_FLAGS], [
639 exe=`STEPMAKE_GET_EXECUTABLE($guile_config)`
640 if test -x $exe; then
641 AC_MSG_CHECKING([guile compile flags])
642 GUILE_CFLAGS="`$guile_config compile`"
643 AC_MSG_RESULT($GUILE_CFLAGS)
644 AC_MSG_CHECKING([guile link flags])
645 GUILE_LDFLAGS="`$guile_config link`"
646 AC_MSG_RESULT($GUILE_LDFLAGS)
648 AC_SUBST(GUILE_CFLAGS)
649 AC_SUBST(GUILE_LDFLAGS)
653 # Check for guile-config, between minimum ($2) and maximum version ($3).
654 # If missing, add entry to missing-list ($1, one of 'OPTIONAL', 'REQUIRED')
655 AC_DEFUN(STEPMAKE_GUILE_DEVEL, [
656 ## First, let's just see if we can find Guile at all.
657 test -n "$target_alias" && target_guile_config=$target_alias-guile-config
658 test -n "$host_alias" && host_guile_config=$host_alias-guile-config
659 AC_MSG_CHECKING([for guile-config])
660 guile_config="guile-config"
662 for r in $GUILE_CONFIG $target_guile_config $host_guile_config $build_guile_config guile-config guile2-config guile2.0-config guile-2.0-config guile1-config guile1.9-config guile1.8-config guile-1-config guile-1.9-config guile-1.8-config; do
663 exe=`STEPMAKE_GET_EXECUTABLE($r)`
664 if ! $exe --version > /dev/null 2>&1 ; then
667 ver=`STEPMAKE_GET_VERSION($exe)`
668 num=`STEPMAKE_NUMERIC_VERSION($ver)`
669 req=`STEPMAKE_NUMERIC_VERSION($2)`
670 sup=`STEPMAKE_NUMERIC_VERSION($3)`
671 if test -n "$2" -a "$num" -lt "$req"; then
672 guile_config=["$r >= $2 (installed: $ver)"]
675 if test -n "$3" -a "$num" -ge "$sup"; then
676 guile_config=["$r < $3 (installed: $ver)"]
685 AC_MSG_RESULT([$found])
686 if test "$found" != "no"; then
687 AC_MSG_CHECKING([$guile_config version])
688 AC_MSG_RESULT([$ver])
691 STEPMAKE_ADD_ENTRY($1, "$guile_config (guile-devel, guile-dev or libguile-dev package)")
694 AC_SUBST(GUILE_CONFIG)
697 changequote(<<, >>)#dnl
698 GUILE_MAJOR_VERSION=`expr $guile_version : '\([0-9]*\)'`
699 GUILE_MINOR_VERSION=`expr $guile_version : '[0-9]*\.\([0-9]*\)'`
700 GUILE_PATCH_LEVEL=`expr $guile_version : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
701 changequote([, ])#dnl
703 save_CPPFLAGS="$CPPFLAGS"
705 CPPFLAGS="$GUILE_CFLAGS $CPPFLAGS"
706 LIBS="$GUILE_LDFLAGS $LIBS"
707 AC_CHECK_HEADERS([libguile.h])
708 AC_CHECK_LIB(guile, scm_boot_guile)
709 AC_CHECK_FUNCS(scm_boot_guile,,libguile_b=no)
710 if test "$libguile_b" = "no"; then
711 warn='libguile (libguile-dev, guile-devel or guile-dev
713 STEPMAKE_ADD_ENTRY(REQUIRED, $warn)
715 CPPFLAGS="$save_CPPFLAGS"
717 AC_DEFINE_UNQUOTED(GUILE_MAJOR_VERSION, $GUILE_MAJOR_VERSION)
718 AC_DEFINE_UNQUOTED(GUILE_MINOR_VERSION, $GUILE_MINOR_VERSION)
719 AC_DEFINE_UNQUOTED(GUILE_PATCH_LEVEL, $GUILE_PATCH_LEVEL)
723 AC_DEFUN(STEPMAKE_DLOPEN, [
724 AC_CHECK_LIB(dl, dlopen)
725 AC_CHECK_FUNCS(dlopen)
728 AC_DEFUN(STEPMAKE_HAS_CLANG, [
733 ], HAS_CLANG=yes, HAS_CLANG=no)
736 AC_DEFUN(STEPMAKE_GXX_OR_CLANG, [
738 if test "$HAS_CLANG" = "no"; then
739 if test "$GXX" = "yes"; then
740 STEPMAKE_CHECK_VERSION(CXX, $1, $2)
742 warn="$CXX (Please install *GNU* c++)"
743 STEPMAKE_ADD_ENTRY($1, $warn)
746 # no else, we're fine with any clang
750 AC_DEFUN(STEPMAKE_INIT, [
753 FULL_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL
754 MICRO_VERSION=$PATCH_LEVEL
755 TOPLEVEL_VERSION=$FULL_VERSION
756 if test x$MY_PATCH_LEVEL != x; then
757 FULL_VERSION=$FULL_VERSION.$MY_PATCH_LEVEL
759 VERSION=$FULL_VERSION
760 export MAJOR_VERSION MINOR_VERSION PATCH_LEVEL
761 # urg: don't "fix" this: irix doesn't know about [:lower:] and [:upper:]
762 changequote(<<, >>)#dnl
763 PACKAGE=`echo $PACKAGE_NAME | tr '[a-z]' '[A-Z]'`
764 package=`echo $PACKAGE_NAME | tr '[A-Z]' '[a-z]'`
765 changequote([, ])#dnl
767 # No versioning on directory names of sub-packages
769 stepmake=${datadir}/stepmake
771 if test "$prefix" = "NONE"; then
772 presome=${ac_default_prefix}
774 stepmake=`echo ${stepmake} | sed "s!\\\${prefix}!$presome!"`
776 # urg, how is this supposed to work?
777 if test "$program_prefix" = "NONE"; then
780 if test "$program_suffix" = "NONE"; then
784 AC_MSG_CHECKING(Package)
785 if test "$PACKAGE" = "STEPMAKE"; then
786 AC_MSG_RESULT(Stepmake package!)
788 AC_MSG_CHECKING(builddir)
790 ugh_ugh_autoconf250_builddir="`pwd`"
792 if test "$srcdir" = "."; then
796 package_builddir="`dirname $ugh_ugh_autoconf250_builddir`"
797 package_srcdir="`dirname $srcdir`"
799 AC_MSG_RESULT($ugh_ugh_autoconf250_builddir)
801 (cd stepmake 2>/dev/null || mkdir stepmake)
802 (cd stepmake; rm -f bin; ln -s ../$srcdir/bin .)
805 AC_MSG_RESULT($PACKAGE)
807 AC_MSG_CHECKING(builddir)
808 ugh_ugh_autoconf250_builddir="`pwd`"
810 here_dir=$(cd . && pwd)
811 full_src_dir=$(cd $srcdir && pwd)
813 if test "$full_src_dir" = "$here_dir"; then
818 AC_MSG_RESULT($ugh_ugh_autoconf250_builddir)
820 AC_MSG_CHECKING(for stepmake)
821 # Check for installed stepmake
822 if test -d $stepmake; then
823 AC_MSG_RESULT($stepmake)
825 stepmake="`cd $srcdir/stepmake; pwd`"
826 AC_MSG_RESULT([$srcdir/stepmake ($datadir/stepmake not found)])
830 AC_SUBST(ugh_ugh_autoconf250_builddir)
832 # Use absolute directory for non-srcdir builds, so that build
834 if test "$srcdir_build" = "no" ; then
835 srcdir="`cd $srcdir; pwd`"
842 AC_SUBST(PACKAGE_NAME)
844 AC_SUBST(MAJOR_VERSION)
845 AC_SUBST(MINOR_VERSION)
846 AC_SUBST(MICRO_VERSION)
848 # stepmake nonstandard names
849 AC_SUBST(PATCH_LEVEL)
850 AC_SUBST(TOPLEVEL_VERSION)
852 # We don't need the upper case variant,
853 # so stick to macros are uppercase convention.
854 # AC_DEFINE_UNQUOTED(package, ["${package}"])
855 # AC_DEFINE_UNQUOTED(PACKAGE, ["${PACKAGE}"])
856 AC_DEFINE_UNQUOTED(PACKAGE, ["${package}"])
857 AC_DEFINE_UNQUOTED(PACKAGE_NAME, ["${PACKAGE_NAME}"])
858 AC_DEFINE_UNQUOTED(TOPLEVEL_VERSION, ["${FULL_VERSION}"])
860 if test -z "$package_depth"; then
863 package_depth="../$package_depth"
866 AC_SUBST(package_depth)
868 AUTOGENERATE="This file was automatically generated by configure"
869 AC_SUBST(AUTOGENERATE)
872 AC_ARG_ENABLE(config,
873 [AS_HELP_STRING([--enable-config=CONF],
874 [put settings in config-CONF.make and config-CONF.h;
875 do `make conf=CONF' to get output in ./out-CONF])],
876 [CONFIGURATION=$enableval])
880 test -n "$CONFIGURATION" && CONFIGSUFFIX="-$CONFIGURATION"
881 CONFIGFILE=config$CONFIGSUFFIX
882 AC_SUBST(CONFIGSUFFIX)
885 STEPMAKE_PROGS(MAKE, gmake make, REQUIRED)
886 STEPMAKE_PROGS(FIND, find, REQUIRED)
888 STEPMAKE_PROGS(TAR, tar, REQUIRED)
890 if test "$(echo 2)" != "2" ||
891 test "x`uname`" = "xHP-UX"; then
892 AC_PATH_PROG(KSH, ksh, /bin/ksh)
893 AC_PATH_PROG(BASH, bash, $KSH)
894 STEPMAKE_WARN(avoiding buggy /bin/sh)
895 AC_PATH_PROG(SHELL, bash, $KSH)
898 AC_PATH_PROG(BASH, bash, $SHELL)
902 STEPMAKE_PYTHON(REQUIRED, 1.5, 3.0)
904 if expr "$MAKE" : '.*\(echo\)' >/dev/null; then
905 $MAKE -v 2> /dev/null | grep GNU > /dev/null
906 if test "$?" = 1; then
907 warn='make (Please install *GNU* make)'
908 # STEPMAKE_WARN($warn)
909 STEPMAKE_ADD_ENTRY(REQUIRED, $warn)
920 AC_SUBST(program_prefix)
921 AC_SUBST(program_suffix)
925 AC_DEFINE_UNQUOTED(DIRSEP, ['${DIRSEP}'])
926 AC_DEFINE_UNQUOTED(PATHSEP, ['${PATHSEP}'])
936 AC_DEFUN(STEPMAKE_LIB, [
937 STEPMAKE_PROGS(AR, ar, $1)
939 STEPMAKE_OPTIONAL_REQUIRED(RANLIB, ranlib, $1)
943 AC_DEFUN(STEPMAKE_LIBTOOL, [
945 # **Never** try to set library version numbers so that they correspond
946 # to the release number of your package. This is an abuse that only
947 # fosters misunderstanding of the purpose of library versions.
949 REVISION=$PATCH_LEVEL
950 # CURRENT=$MINOR_VERSION
951 CURRENT=`expr $MINOR_VERSION + 1`
952 # AGE=`expr $MAJOR_VERSION + 1`
960 AC_DEFUN(STEPMAKE_LOCALE, [
965 AC_ARG_WITH(localedir,
966 [AS_HELP_STRING([--with-localedir=DIR],
967 [location of locales. Default: PREFIX/share/locale])],
968 localedir=$with_localedir,
969 localedir='${prefix}/share/locale')
972 [AS_HELP_STRING([--with-lang=LANG],
973 [use LANG as language to emit messages])],
977 AC_MSG_CHECKING(language)
979 En* | en* | Am* | am* | US* | us*)
981 NL | nl | Du* | du* | Ned* | ned*)
990 if test "$lang" = "unknown" ; then
991 STEPMAKE_WARN($language not supported; available are: $ALL_LINGUAS)
997 AC_DEFUN(STEPMAKE_MAKEINFO, [
998 STEPMAKE_PROGS(MAKEINFO, makeinfo, $1)
1002 AC_DEFUN(STEPMAKE_MAN, [
1003 STEPMAKE_PROGS(GROFF, groff ditroff, $1)
1005 STEPMAKE_PROGS(TROFF, troff, $1)
1007 STEPMAKE_PROGS(TBL, tbl, $1)
1012 AC_DEFUN(STEPMAKE_MSGFMT, [
1013 STEPMAKE_PROGS(MSGFMT, msgfmt, $1)
1017 # Check for program ($2), set full path result to ($1).
1018 # If missing, add entry to missing-list ($3, one of 'OPTIONAL', 'REQUIRED')
1019 AC_DEFUN(STEPMAKE_PATH_PROG, [
1020 AC_CHECK_PROGS($1, $2, no)
1021 STEPMAKE_OPTIONAL_REQUIRED($1, $2, $3)
1022 if test $? -eq 0; then
1023 AC_PATH_PROGS($1, $2)
1024 if test -n "$4"; then
1025 STEPMAKE_CHECK_VERSION($1, $3, $4)
1031 # Check for program in set of names ($2), set result to ($1) .
1032 # If missing, add entry to missing-list ($3, one of 'OPTIONAL', 'REQUIRED')
1033 # If exists, and a minimal version ($4) is required
1034 AC_DEFUN(STEPMAKE_PROGS, [
1035 AC_CHECK_PROGS($1, $2, no)
1036 STEPMAKE_OPTIONAL_REQUIRED($1, $2, $3)
1037 if test $? -eq 0 -a -n "$4"; then
1038 STEPMAKE_CHECK_VERSION($1, $3, $4)
1043 AC_DEFUN(STEPMAKE_PERL, [
1044 STEPMAKE_PATH_PROG(PERL, perl, $1)
1048 # Check for python, between minimum ($2) and maximum version ($3).
1049 # If missing, add entry to missing-list ($1, one of 'OPTIONAL', 'REQUIRED')
1050 AC_DEFUN(STEPMAKE_PYTHON, [
1051 AC_MSG_CHECKING([for python])
1054 for r in $PYTHON python python3 python3.3 python3.2 python3.1 python3.0 python2 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0; do
1055 exe=`STEPMAKE_GET_EXECUTABLE($r)`
1056 if ! $exe -V > /dev/null 2>&1 ; then
1059 ver=`STEPMAKE_GET_VERSION($exe)`
1060 num=`STEPMAKE_NUMERIC_VERSION($ver)`
1061 req=`STEPMAKE_NUMERIC_VERSION($2)`
1062 sup=`STEPMAKE_NUMERIC_VERSION($3)`
1063 if test -n "$2" && test "$num" -lt "$req"; then
1064 python=["$r >= $2 (installed: $ver)"]
1067 if test -n "$3" && test "$num" -ge "$sup"; then
1068 python=["$r < $3 (installed: $ver)"]
1077 AC_MSG_RESULT([$found])
1078 if test "$found" != "no"; then
1079 AC_MSG_CHECKING([$python version])
1080 AC_MSG_RESULT([$ver])
1083 STEPMAKE_ADD_ENTRY($1, $python)
1085 AC_PATH_PROG(PYTHON, $PYTHON)
1089 # Check for python-config, between minimum ($2) and maximum version ($3).
1090 # If missing, add entry to missing-list ($1, one of 'OPTIONAL', 'REQUIRED')
1091 AC_DEFUN(STEPMAKE_PYTHON_DEVEL, [
1092 AC_ARG_WITH(python-include,
1093 [AS_HELP_STRING([--with-python-include=DIR],
1094 [location of the python include dir])],[
1095 if test "$withval" = "yes" -o "$withval" = "no"; then
1096 AC_MSG_WARN(Usage: --with-python-include=includedir)
1098 PYTHON_CFLAGS="-I${withval}"
1102 AC_ARG_WITH(python-lib,
1103 [AS_HELP_STRING([--with-python-lib=NAME],
1104 [name of the python lib])],[
1105 if test "$withval" = "yes" -o "$withval" = "no"; then
1106 AC_MSG_WARN(Usage: --with-python-lib=name)
1108 LDFLAGS="$LDFLAGS -l${withval}"
1112 STEPMAKE_PYTHON($1, $2, $3)
1113 AC_CHECK_PROGS(PYTHON_CONFIG, `basename $PYTHON`-config, no)
1115 if test -z "$PYTHON_CFLAGS" -a "$PYTHON_CONFIG" != "no"; then
1116 # Clean out junk: http://bugs.python.org/issue3290
1117 # Python headers may need some -f* flags, leave them in.
1118 # We want the sed commands to look like 's/-[WDOm][[:alnum:][:punct:]][[:alnum:][:punct:]]*//g' and 's/-arch [^[:space:]]*//g', but automake eats brackets.
1119 #PYTHON_CFLAGS=`$PYTHON_CONFIG --cflags | sed -e 's/-[[WDOm]][[[:alnum:][:punct:]]][[[:alnum:][:punct:]]]*//g' | sed -e 's/-arch @<:@^@<:@:space:@:>@@:>@*//g'`
1120 # The above sed BRE matches parts of legal options, stipping down part of that option, resulting in invalid gcc arguments. Gentoo Bug #415793
1121 # For instance, '-floop-stip-mime' becomes '-floop-strip', and '-fvect-cost-model' becomes '-fvect-cost'.
1122 # Tentative fix to require a non alphanumeric character before the initial hyphen of the BRE or the hyphen being the first character in the string.
1123 PYTHON_CFLAGS=`$PYTHON_CONFIG --cflags | sed -e 's/\(^\|[[^[:alnum:]]]\)-[[WDOm]][[[:alnum:][:punct:]]][[[:alnum:][:punct:]]]*//g' | sed -e 's/-arch @<:@^@<:@:space:@:>@@:>@*//g'`
1124 PYTHON_LDFLAGS=`$PYTHON_CONFIG --ldflags`
1127 if test -z "$PYTHON_CFLAGS" -a "$cross_compiling" = "no"; then
1128 changequote(<<, >>)#dnl
1129 # alternatively, for python >= 2.0
1130 # 'import sys, distutils.sysconfig; sys.stdout.write (distutils.sysconfig.get_python_inc ())'
1131 PYTHON_INCLUDE=`$PYTHON -c 'import sys; sys.stdout.write ("%s/include/python%s" % (sys.prefix, sys.version[:3]))'`
1132 PYTHON_CFLAGS="-I$PYTHON_INCLUDE"
1133 changequote([, ])#dnl
1136 if test -z "$PYTHON_HEADER"; then
1137 CPPFLAGS="$PYTHON_CFLAGS $CPPFLAGS"
1138 AC_CHECK_HEADERS([Python.h],[PYTHON_HEADER=yes])
1141 if test -z "$PYTHON_HEADER"; then
1142 warn="Python.h (python-devel, python-dev or libpython-dev package)"
1143 STEPMAKE_ADD_ENTRY($1, $warn)
1145 AC_SUBST(PYTHON_CFLAGS)
1146 AC_SUBST(PYTHON_LDFLAGS)
1151 AC_DEFUN(STEPMAKE_STL_DATA_METHOD, [
1152 AC_CACHE_CHECK([for stl.data () method],
1153 [stepmake_cv_stl_data_method],
1154 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1156 using namespace std;
1158 void *p = v.data ();
1160 [stepmake_cv_stl_data_method=yes],
1161 [stepmake_cv_stl_data_method=no]))
1162 if test $stepmake_cv_stl_data_method = yes; then
1163 AC_DEFINE(HAVE_STL_DATA_METHOD, 1, [define if stl classes have data () method])
1168 AC_DEFUN(STEPMAKE_TEXMF_DIRS, [
1169 STEPMAKE_PROGS(KPSEWHICH, kpsewhich, $1)
1171 AC_MSG_CHECKING(for metapost required files)
1172 if test "$MFPLAIN_MP" = ""; then
1173 MFPLAIN_MP=`kpsewhich -format=mp mfplain`
1175 if test "$MFPLAIN_MP" = ""; then
1177 STEPMAKE_ADD_ENTRY($1,['metapost CTAN package (texlive-metapost)'])
1183 AC_DEFUN(STEPMAKE_TEXMF, [
1184 STEPMAKE_PROGS(METAFONT, mf-nowin mf mfw mfont, $1)
1185 STEPMAKE_PROGS(METAPOST, mpost, $1)
1186 if test "$METAPOST" != ""; then
1187 ver=`STEPMAKE_GET_VERSION($METAPOST)`
1188 num=`STEPMAKE_NUMERIC_VERSION($ver)`
1189 # Avoid buggy metapost versions: 1.600 <= x < 1.803
1190 if test "$num" -ge "1600000" -a "$num" -lt "1803000"; then
1191 STEPMAKE_ADD_ENTRY($1, ["mpost (due to a bug in metapost, versions 1.600 <= x < 1.803 are not supported; installed: $ver)"])
1195 AC_MSG_CHECKING(for working metafont mode)
1196 modelist='ljfour lj4 lj3 lj2 ljet laserjet'
1197 for MFMODE in $modelist; do
1198 $METAFONT -progname=mf "\mode:=$MFMODE; mode_setup; end." > /dev/null 2>&1
1199 if test -f mfput.tfm; then
1203 AC_MSG_RESULT($MFMODE)
1211 AC_DEFUN(STEPMAKE_WARN, [
1217 dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
1218 dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
1219 dnl also defines GSTUFF_PKG_ERRORS on error
1220 AC_DEFUN(PKG_CHECK_MODULES, [
1223 if test -z "$PKG_CONFIG"; then
1224 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
1227 if test "$PKG_CONFIG" = "no" ; then
1228 echo "*** The pkg-config script could not be found. Make sure it is"
1229 echo "*** in your path, or set the PKG_CONFIG environment variable"
1230 echo "*** to the full path to pkg-config."
1231 echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
1233 PKG_CONFIG_MIN_VERSION=0.9.0
1234 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
1235 AC_MSG_CHECKING(for $2)
1237 if $PKG_CONFIG --exists "$2" ; then
1241 AC_MSG_CHECKING($1_CFLAGS)
1242 $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
1243 AC_MSG_RESULT($$1_CFLAGS)
1245 AC_MSG_CHECKING($1_LIBS)
1246 $1_LIBS=`$PKG_CONFIG --libs "$2"`
1247 AC_MSG_RESULT($$1_LIBS)
1251 ## If we have a custom action on failure, don't print errors, but
1252 ## do set a variable so people can do so.
1253 $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
1254 ifelse([$4], ,echo $$1_PKG_ERRORS,)
1262 if test $succeeded = yes; then
1263 ifelse([$3], , :, [$3])
1265 ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
1269 AC_DEFUN(STEPMAKE_FREETYPE2, [
1270 PKG_CHECK_MODULES(FREETYPE2, $1 >= $3, have_freetype2=yes, true)
1271 if test "$have_freetype2" = yes; then
1272 AC_DEFINE(HAVE_FREETYPE2)
1273 save_CPPFLAGS="$CPPFLAGS"
1275 CPPFLAGS="$FREETYPE2_CFLAGS $CPPFLAGS"
1276 LIBS="$FREETYPE2_LIBS $LIBS"
1277 AC_SUBST(FREETYPE2_CFLAGS)
1278 AC_SUBST(FREETYPE2_LIBS)
1279 CPPFLAGS="$save_CPPFLAGS"
1283 #r="lib$1-dev or $1-devel"
1284 r="libfreetype6-dev or freetype?-devel"
1285 ver="`pkg-config --modversion $1`"
1286 STEPMAKE_ADD_ENTRY($2, ["$r >= $3 (installed: $ver)"])
1290 AC_DEFUN(STEPMAKE_PANGO, [
1291 PKG_CHECK_MODULES(PANGO, $1 >= $3, have_pango16=yes, true)
1292 if test "$have_pango16" = yes ; then
1293 AC_DEFINE(HAVE_PANGO16)
1294 # Do not pollute user-CPPFLAGS with configure-CPPFLAGS
1295 save_CPPFLAGS="$CPPFLAGS"
1297 CPPFLAGS="$PANGO_CFLAGS $CPPFLAGS"
1298 LIBS="$PANGO_LIBS $LIBS"
1299 AC_CHECK_HEADERS([pango/pangofc-fontmap.h])
1300 AC_CHECK_FUNCS([pango_fc_font_map_add_decoder_find_func])
1301 AC_SUBST(PANGO_CFLAGS)
1302 AC_SUBST(PANGO_LIBS)
1303 CPPFLAGS="$save_CPPFLAGS"
1307 #r="lib$1-dev or $1-devel"
1308 r="libpango1.0-dev or pango1.0-devel"
1309 ver="`pkg-config --modversion $1`"
1310 STEPMAKE_ADD_ENTRY($2, ["$r >= $3 (installed: $ver)"])
1314 AC_DEFUN(STEPMAKE_PANGO_FT2, [
1315 PKG_CHECK_MODULES(PANGO_FT2, $1 >= $3, have_pangoft2=yes, true)
1316 if test "$have_pangoft2" = yes ; then
1317 AC_DEFINE(HAVE_PANGO16)
1318 AC_DEFINE(HAVE_PANGO_FT2)
1319 # Do not pollute user-CPPFLAGS with configure-CPPFLAGS
1320 save_CPPFLAGS="$CPPFLAGS"
1322 CPPFLAGS="$CPPFLAGS $PANGO_FT2_CFLAGS"
1323 LIBS="$PANGO_FT2_LIBS $LIBS"
1324 AC_CHECK_HEADERS([pango/pangoft2.h])
1325 AC_CHECK_FUNCS([pango_ft2_font_map_create_context])
1326 AC_SUBST(PANGO_FT2_CFLAGS)
1327 AC_SUBST(PANGO_FT2_LIBS)
1328 CPPFLAGS="$save_CPPFLAGS"
1332 #r="lib$1-dev or $1-devel"e
1333 r="libpango1.0-dev or pango?-devel"
1334 ver="`pkg-config --modversion $1`"
1335 STEPMAKE_ADD_ENTRY($2, ["$r >= $3 (installed: $ver)"])
1339 AC_DEFUN(STEPMAKE_FONTCONFIG, [
1340 PKG_CHECK_MODULES(FONTCONFIG, $1 >= $3, have_fontconfig=yes, true)
1341 if test "$have_fontconfig" = yes ; then
1342 AC_DEFINE(HAVE_FONTCONFIG)
1343 # Do not pollute user-CPPFLAGS with configure-CPPFLAGS
1344 save_CPPFLAGS="$CPPFLAGS"
1346 CPPFLAGS="$FONTCONFIG_CFLAGS $CPPFLAGS"
1347 LIBS="$FONTCONFIG_LIBS $LIBS"
1348 AC_SUBST(FONTCONFIG_CFLAGS)
1349 AC_SUBST(FONTCONFIG_LIBS)
1350 CPPFLAGS="$save_CPPFLAGS"
1353 r="lib$1-dev or $1-devel"
1354 ver="`pkg-config --modversion $1`"
1355 STEPMAKE_ADD_ENTRY($2, ["$r >= $3 (installed: $ver)"])
1359 AC_DEFUN(STEPMAKE_WINDOWS, [
1363 if test "$CYGWIN" = "yes"; then
1364 LN_S='cp -r' # Cygwin symbolic links do not work for native apps.
1366 INSTALL="\$(SHELL) \$(stepdir)/../bin/install-dot-exe.sh -c"
1367 elif test "$MINGW32" = "yes"; then
1371 INSTALL="\$(SHELL) \$(stepdir)/../bin/install-dot-exe.sh -c"
1377 AC_DEFINE_UNQUOTED(DIRSEP, ['${DIRSEP}'])
1378 AC_DEFINE_UNQUOTED(PATHSEP, ['${PATHSEP}'])
1381 AC_SUBST(program_suffix)
1383 AC_MSG_CHECKING([for some flavor of Windows])
1384 if test "$CYGWIN$MINGW32" = "nono"; then
1387 PLATFORM_WINDOWS=yes
1389 AC_MSG_RESULT([$PLATFORM_WINDOWS])
1390 AC_SUBST(PLATFORM_WINDOWS)
1391 STEPMAKE_PROGS(WINDRES, $target-windres windres, x)