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 \
46 | grep '\(^\|[^0-9a-f]\)[0-9]\{6,8\}\([^0-9a-f]\|$\)' \
48 | sed -e 's/^[^.0-9]*//' -e 's/[^.0-9]*$//'\`\"
54 # Calculate simplistic numeric version from version string ($1)
55 # As yet, we have no need for something more elaborate.
56 AC_DEFUN(STEPMAKE_NUMERIC_VERSION, [
59 if ([$]3) {three = [$]3}
62 {printf "%.0f\n", [$]1*1000000 + [$]2*1000 + three}'
66 # Add item ($2) to list ($1, one of 'OPTIONAL', 'REQUIRED')
67 AC_DEFUN(STEPMAKE_ADD_ENTRY, [
68 eval "$1"=\"`eval echo \"'$'$1\" \"$2\"`\"
71 # Check if tested program ($2) was found ($1).
72 # If not, add entry to missing-list ($3, one of 'OPTIONAL', 'REQUIRED').
73 # We could abort here if a 'REQUIRED' program is not found
74 AC_DEFUN(STEPMAKE_OPTIONAL_REQUIRED, [
75 STEPMAKE_CHECK_SEARCH_RESULT($1)
76 if test $? -ne 0; then
77 STEPMAKE_ADD_ENTRY($3, $2)
78 if test "$3" = "REQUIRED"; then
79 command="echo ERROR: $2 not found"
80 # abort configure process here?
82 command="- echo $2 not found"
92 # Return if tested proram ($1) was found (true) or not (false).
93 AC_DEFUN(STEPMAKE_CHECK_SEARCH_RESULT, [
94 r="`eval echo '$'"$1"`"
95 if test -n "$r" -a "$r" != "error" -a "$r" != "no" && expr '`eval echo '$'"$1"`' : '.*\(echo\)' > /dev/null; then
98 ##STEPMAKE_WARN(cannot find $2. $3)
104 # Check version of program ($1)
105 # If version ($4: optional argument, supply if version cannot be
106 # parsed using --version or -V ) is smaller than requested ($3), add
107 # entry to missing-list ($2, one of 'OPTIONAL', 'REQUIRED').
108 AC_DEFUN(STEPMAKE_CHECK_VERSION, [
109 r="`eval echo '$'"$1"`"
110 AC_MSG_CHECKING([$r version])
111 exe=`STEPMAKE_GET_EXECUTABLE($r)`
112 if test -n "$4"; then
115 ver=`STEPMAKE_GET_VERSION($exe)`
117 num=`STEPMAKE_NUMERIC_VERSION($ver)`
118 req=`STEPMAKE_NUMERIC_VERSION($3)`
119 AC_MSG_RESULT([$ver])
120 if test "$num" -lt "$req"; then
121 STEPMAKE_ADD_ENTRY($2, ["$r >= $3 (installed: $ver)"])
123 vervar="`echo $1 | tr '[a-z]' '[A-Z]'`_VERSION"
124 eval `echo $vervar=$num`
125 ## AC_SUBST(`eval echo $vervar`)
128 # Check version of program ($1)
129 # If version is greater than or equals unsupported ($3),
130 # add entry to unsupported list ($2, 'UNSUPPORTED')
131 AC_DEFUN(STEPMAKE_CHECK_VERSION_UNSUPPORTED, [
132 r="`eval echo '$'"$1"`"
133 AC_MSG_CHECKING([$r version])
134 exe=`STEPMAKE_GET_EXECUTABLE($r)`
135 ver=`STEPMAKE_GET_VERSION($exe)`
136 num=`STEPMAKE_NUMERIC_VERSION($ver)`
137 sup=`STEPMAKE_NUMERIC_VERSION($3)`
138 AC_MSG_RESULT([$ver])
139 if test "$num" -ge "$sup"; then
140 STEPMAKE_ADD_ENTRY($2, ["$r < $3 (installed: $ver)"])
144 ### Macros to build configure.ac
147 AC_DEFUN(STEPMAKE_BIBTEX2HTML, [
148 STEPMAKE_PROGS(BIBTEX2HTML, bibtex2html bib2html, $1)
149 if test "$BIBTEX2HTML" = "bib2html"; then
150 BIBTEX2HTML_FLAGS='$< $(@)'
152 BIBTEX2HTML_FLAGS='-o $(@D)/$(*F) $<'
154 AC_SUBST(BIBTEX2HTML)
155 AC_SUBST(BIBTEX2HTML_FLAGS)
159 AC_DEFUN(STEPMAKE_BISON, [
160 # ugh, automake: we want (and check for) bison
163 STEPMAKE_PROGS(BISON, bison, $1)
165 # urg. should test functionality rather than version.
166 if test "$BISON" = "bison" -a -n "$2"; then
167 STEPMAKE_CHECK_VERSION(BISON, $1, $2)
171 AC_DEFUN(STEPMAKE_COMPILE_BEFORE, [
172 # -O is necessary to get inlining
174 CXXFLAGS=${CXXFLAGS-$CFLAGS}
175 LDFLAGS=${LDFLAGS-""}
182 AC_ARG_ENABLE(debugging,
183 [AS_HELP_STRING([--enable-debugging],
184 [compile with debugging info. Default: on])],
185 [debug_b=$enableval])
187 AC_ARG_ENABLE(checking,
188 [AS_HELP_STRING([--enable-checking],
189 [compile with expensive run-time checks. Default: off])],
190 [checks_b=$enableval])
192 AC_ARG_ENABLE(optimising,
193 [AS_HELP_STRING([--enable-optimising],
194 [compile with optimising. Default: on])],
195 [optimise_b=$enableval])
197 AC_ARG_ENABLE(profiling,
198 [AS_HELP_STRING([--enable-profiling],
199 [compile with gprof support. Default: off])],
200 [profile_b=$enableval])
203 [AS_HELP_STRING([--enable-pipe],
204 [compile with -pipe. Default: on])],
207 if test "$optimise_b" = yes; then
208 OPTIMIZE=" -O2 -finline-functions"
209 # following two lines are compatibility while Patchy has not
210 # yet learnt about --enable-checking. But once it has, we
211 # don't want -DDEBUG twice, so we omit it here if it is going
212 # to get added anyway later.
213 elif test "$checks_b" != yes; then
214 DEFINES="$DEFINES -DDEBUG"
217 if test "$checks_b" = yes; then
218 DEFINES="$DEFINES -DDEBUG"
221 if test $profile_b = yes; then
223 OPTIMIZE="$OPTIMIZE -pg"
226 if test $debug_b = yes; then
227 OPTIMIZE="$OPTIMIZE -g"
231 AC_DEFUN(STEPMAKE_COMPILE, [
233 AC_REQUIRE([STEPMAKE_COMPILE_BEFORE])
234 AC_REQUIRE([AC_PROG_CC])
236 STEPMAKE_OPTIONAL_REQUIRED(CC, cc, $1)
240 # If -pipe requested, test if it works and add to CFLAGS.
241 if test "$pipe_b" = yes; then
242 save_cflags="$CFLAGS"
243 CFLAGS=" -pipe $CFLAGS";
244 AC_CACHE_CHECK([whether compiler understands -pipe],
245 [stepmake_cv_cflags_pipe],
246 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[/* -pipe test */]])],
247 [stepmake_cv_cflags_pipe=yes],
248 [stepmake_cv_cflags_pipe=no]))
250 if test $stepmake_cv_cflags_pipe = yes; then
251 OPTIMIZE="$OPTIMIZE -pipe"
255 CFLAGS="$CFLAGS $OPTIMIZE"
256 CPPFLAGS=${CPPFLAGS-""}
258 AC_MSG_CHECKING([for IEEE-conformance compiler flags])
259 save_cflags="$CFLAGS"
262 dnl should do compile test?
263 AC_MSG_RESULT(-mieee)
264 CFLAGS=" -mieee $CFLAGS"
267 AC_MSG_RESULT([none])
271 AC_SUBST(cross_compiling)
279 AC_DEFUN(STEPMAKE_CXX, [
281 STEPMAKE_OPTIONAL_REQUIRED(CXX, c++, $1)
283 CXXFLAGS="$CXXFLAGS $OPTIMIZE"
292 AC_DEFUN(STEPMAKE_CXXTEMPLATE, [
293 AC_CACHE_CHECK([whether explicit instantiation is needed],
294 stepmake_cv_need_explicit_instantiation,
295 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
296 template <class T> struct foo { static int baz; };
297 template <class T> int foo<T>::baz = 1;
298 ]], [[ return foo<int>::baz; ]])],[stepmake_cv_need_explicit_instantiation=no],[stepmake_cv_need_explicit_instantiation=yes]))
299 if test x"$stepmake_cv_need_explicit_instantiation"x = x"yes"x; then
300 AC_DEFINE(NEED_EXPLICIT_INSTANTIATION)
304 AC_DEFUN(STEPMAKE_GXXCODEGENBUG, [
305 AC_MSG_CHECKING([options for known g++ bugs])
306 case "$GXX:$CXX_VERSION" in
308 AC_MSG_RESULT([-fno-optimize-sibling-calls (tail call bug)])
309 CXXFLAGS="$CXXFLAGS -fno-optimize-sibling-calls"
312 AC_MSG_RESULT([-fno-tree-vrp (comparison bug)])
313 CXXFLAGS="$CXXFLAGS -fno-tree-vrp"
315 *) AC_MSG_RESULT([none])
321 AC_DEFUN(STEPMAKE_DATADIR, [
323 if test "$prefix" = "NONE"; then
324 presome=${ac_default_prefix}
327 build_package_datadir=$ugh_ugh_autoconf250_builddir/out$CONFIGSUFFIX/share/$package
329 DATADIR=`echo ${datadir} | sed "s!\\\${datarootdir}!${presome}/share!"`
330 DATADIR=`echo ${DATADIR} | sed "s!\\\${prefix}!$presome!"`
331 BUILD_PACKAGE_DATADIR=`echo ${build_package_datadir} | sed "s!\\\${prefix}!$presome!"`
334 AC_SUBST(datarootdir)
335 AC_SUBST(build_package_datadir)
336 AC_DEFINE_UNQUOTED(DATADIR, ["${DATADIR}"])
337 AC_DEFINE_UNQUOTED(BUILD_PACKAGE_DATADIR, ["${BUILD_PACKAGE_DATADIR}"])
340 ## ugh: cut & paste programming from datadir.
341 AC_DEFUN(STEPMAKE_LIBDIR, [
342 presome=${exec_prefix}
343 if test "$presome" = "NONE"; then
346 if test "$presome" = "NONE"; then
347 presome=${ac_default_prefix}
350 build_package_libdir=$ugh_ugh_autoconf250_builddir/out$CONFIGSUFFIX/lib/$package
352 LIBDIR=`echo ${libdir} | sed "s!\\\${exec_prefix}!$presome!"`
353 BUILD_PACKAGE_LIBDIR=`echo ${build_package_libdir} | sed "s!\\\${exec_prefix}!$presome!"`
356 AC_SUBST(build_package_libdir)
357 AC_DEFINE_UNQUOTED(LIBDIR, ["${LIBDIR}"])
358 AC_DEFINE_UNQUOTED(BUILD_PACKAGE_LIBDIR, ["${BUILD_PACKAGE_LIBDIR}"])
362 AC_DEFUN(STEPMAKE_PREFIX_EXPAND_FIXUP, [
363 # undo expanding of explicit --infodir=/usr/share
364 # to ease install-time override with prefix=...
365 strip=`echo $includedir | eval sed s@^$prefix@@`
366 if test "$includedir" = "`eval echo $prefix$strip`"; then
367 includedir='${prefix}'$strip''
369 strip=`echo $libdir | eval sed s@^$exec_prefix@@`
370 if test "$libdir" = "`eval echo $exec_prefix$strip`"; then
371 libdir='${exec_prefix}'$strip''
373 strip=`echo $infodir | eval sed s@^$datarootdir@@`
374 if test "$infodir" = "`eval echo $datarootdir$strip`"; then
375 infodir='${datarootdir}'$strip''
377 strip=`echo $mandir | eval sed s@^$datarootdir@@`
378 if test "$mandir" = "`eval echo $datarootdir$strip`"; then
379 mandir='${datarootdir}'$strip''
384 AC_DEFUN(STEPMAKE_END, [
385 STEPMAKE_PREFIX_EXPAND_FIXUP
390 AC_CONFIG_FILES([$CONFIGFILE.make:config.make.in])
393 if test -n "$OPTIONAL"; then
395 echo "WARNING: Please consider installing optional programs or files: $OPTIONAL"
398 if test -n "$REQUIRED"; then
400 echo "ERROR: Please install required programs: $REQUIRED"
403 if test -n "$UNSUPPORTED"; then
405 echo "ERROR: Please use older version of programs: $UNSUPPORTED"
408 if test -n "$OPTIONAL$REQUIRED$UNSUPPORTED"; then
410 echo "See INSTALL.txt for more information on how to build $PACKAGE_NAME"
411 if test -f config.cache ; then
412 echo "Remove config.cache before rerunning ./configure"
416 if test -n "$REQUIRED$UNSUPPORTED"; then
417 rm -f $srcdir/GNUmakefile
421 # regular in-place build
422 # test for srcdir_build = yes ?
423 if test "$srcdir_build" = "yes"; then
424 rm -f $srcdir/GNUmakefile
425 cp $srcdir/GNUmakefile.in $srcdir/GNUmakefile
426 chmod 444 $srcdir/GNUmakefile
428 if test -f $srcdir/GNUmakefile; then
430 Source directory already configured. Please clean the source directory
432 make -C $srcdir distclean
439 abssrcdir="`cd $srcdir; pwd`"
441 for d in 2 3 4 5 ; do
442 for mf in `cd $srcdir ; find . -maxdepth $d -mindepth $d -name GNUmakefile`; do
445 # source is below build directory, always copy
448 case "$abssrcdir/${mf#./}" in
450 # find descended into build directory, don't copy
455 cat <<EOF | $PYTHON - > $mf
456 print 'depth=' + ('../' * ( $d-1 ) )
457 print 'include \$(depth)/config\$(if \$(conf),-\$(conf),).make'
458 print 'include \$(configure-srcdir)/$mf'
459 print 'MODULE_INCLUDES += \$(src-dir)/\$(outbase)'
462 for mf in `cd $srcdir ; find . -maxdepth $d -mindepth $d -name '*.make' | grep -v config.make `; do
465 # source is below build directory, always copy
468 case "$abssrcdir/${mf#./}" in
470 # find descended into build directory, don't copy
475 cat <<EOF | $PYTHON - > $mf
476 print 'include \$(depth)/config\$(if \$(conf),-\$(conf),).make'
477 print 'include \$(configure-srcdir)/$mf'
483 cat <<EOF > GNUmakefile
485 include config\$(if \$(conf),-\$(conf),).make
486 include \$(configure-srcdir)/GNUmakefile.in
488 chmod 444 GNUmakefile
494 AC_DEFUN(STEPMAKE_FLEX, [
495 # ugh, automake: we want (and check for) flex
497 # urg: automake 1.3: hope this doesn't break 1.2 ac_cv_pro_lex_root hack...
501 ac_cv_prog_lex_root=lex.yy
502 STEPMAKE_PROGS(FLEX, flex, $1)
506 AC_DEFUN(STEPMAKE_FLEXLEXER, [
507 AC_CHECK_HEADERS([FlexLexer.h],[true],[false])
508 if test $? -ne 0; then
509 warn='FlexLexer.h (flex package)'
510 STEPMAKE_ADD_ENTRY($1, $warn)
512 # check for yyFlexLexer.yy_current_buffer,
513 # in 2.5.4 <= flex < 2.5.29
514 AC_CACHE_CHECK([for yyFlexLexer.yy_current_buffer],
515 [stepmake_cv_flexlexer_yy_current_buffer],
516 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
518 #include <FlexLexer.h>
519 class yy_flex_lexer: public yyFlexLexer
524 yy_current_buffer = 0;
528 [stepmake_cv_flexlexer_yy_current_buffer=yes],
529 [stepmake_cv_flexlexer_yy_current_buffer=no]))
530 if test $stepmake_cv_flexlexer_yy_current_buffer = yes; then
531 AC_DEFINE(HAVE_FLEXLEXER_YY_CURRENT_BUFFER, 1, [Define to 1 if yyFlexLexer has yy_current_buffer.])
537 AC_DEFUN(STEPMAKE_FLEXLEXER_LOCATION, [
538 AC_MSG_CHECKING([FlexLexer.h location])
541 cat <<EOF > conftest.cc
543 #include <FlexLexer.h>
545 FLEXLEXER_FILE=`eval $ac_cpp conftest.cc | \
546 sed 's!# 1 "\(.*FlexLexer.h\)"!@FLEXLEXER@\1@@!g' | grep '@@' | \
547 sed 's!.*@FLEXLEXER@\(.*\)@@.*$!\1!g' ` 1> /dev/null 2> /dev/null
549 AC_SUBST(FLEXLEXER_FILE)
550 AC_MSG_RESULT($FLEXLEXER_FILE)
553 AC_DEFUN(STEPMAKE_GCC_OR_CLANG, [
555 if test "$HAS_CLANG" = "no"; then
556 if test "$GCC" = "yes"; then
557 STEPMAKE_CHECK_VERSION(CC, $1, $2)
559 warn="$CC (Please install *GNU* cc)"
560 STEPMAKE_ADD_ENTRY($1, $warn)
563 # no else, we're fine with any clang
566 AC_DEFUN(STEPMAKE_GETTEXT, [
568 if test "$prefix" = "NONE"; then
569 presome=${ac_default_prefix}
571 LOCALEDIR=`echo ${localedir} | sed "s!\\\${prefix}!$presome!"`
574 AC_DEFINE_UNQUOTED(LOCALEDIR, ["${LOCALEDIR}"])
575 AC_CHECK_LIB(intl, gettext)
576 AC_CHECK_FUNCS(gettext)
580 # Check for guile, between minimum ($2) and maximum version ($3).
581 # If missing, add entry to missing-list ($1, one of 'OPTIONAL', 'REQUIRED')
582 AC_DEFUN(STEPMAKE_GUILE, [
583 AC_MSG_CHECKING([for guile])
586 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
587 exe=`STEPMAKE_GET_EXECUTABLE($r)`
588 if ! $exe --version > /dev/null 2>&1 ; then
591 ver=`STEPMAKE_GET_VERSION($exe)`
592 num=`STEPMAKE_NUMERIC_VERSION($ver)`
593 req=`STEPMAKE_NUMERIC_VERSION($2)`
594 sup=`STEPMAKE_NUMERIC_VERSION($3)`
595 if test -n "$2" && test "$num" -lt "$req"; then
596 guile=["$r >= $2 (installed: $ver)"]
599 if test -n "$3" && test "$num" -ge "$sup"; then
600 guile=["$r < $3 (installed: $ver)"]
609 AC_MSG_RESULT([$found])
610 if test "$found" != "no"; then
611 AC_MSG_CHECKING([$guile version])
612 AC_MSG_RESULT([$ver])
615 STEPMAKE_ADD_ENTRY($1, $guile)
617 STEPMAKE_PATH_PROG(GUILE, $GUILE)
621 # STEPMAKE_GUILE_FLAGS --- set flags for compiling and linking with Guile
623 # This macro runs the guile-config script, installed with Guile,
624 # to find out where Guile's header files and libraries are
625 # installed. It sets two variables, marked for substitution, as
628 # GUILE_CFLAGS --- flags to pass to a C or C++ compiler to build
629 # code that uses Guile header files. This is almost
630 # always just a -I flag.
632 # GUILE_LDFLAGS --- flags to pass to the linker to link a
633 # program against Guile. This includes -lguile for
634 # the Guile library itself, any libraries that Guile
635 # itself requires (like -lqthreads), and so on. It may
636 # also include a -L flag to tell the compiler where to
637 # find the libraries.
639 AC_DEFUN([STEPMAKE_GUILE_FLAGS], [
640 exe=`STEPMAKE_GET_EXECUTABLE($guile_config)`
641 if test -x $exe; then
642 AC_MSG_CHECKING([guile compile flags])
643 GUILE_CFLAGS="`$guile_config compile`"
644 AC_MSG_RESULT($GUILE_CFLAGS)
645 AC_MSG_CHECKING([guile link flags])
646 GUILE_LDFLAGS="`$guile_config link`"
647 AC_MSG_RESULT($GUILE_LDFLAGS)
649 AC_SUBST(GUILE_CFLAGS)
650 AC_SUBST(GUILE_LDFLAGS)
654 # Check for guile-config, between minimum ($2) and maximum version ($3).
655 # If missing, add entry to missing-list ($1, one of 'OPTIONAL', 'REQUIRED')
656 AC_DEFUN(STEPMAKE_GUILE_DEVEL, [
657 ## First, let's just see if we can find Guile at all.
658 test -n "$target_alias" && target_guile_config=$target_alias-guile-config
659 test -n "$host_alias" && host_guile_config=$host_alias-guile-config
660 AC_MSG_CHECKING([for guile-config])
661 guile_config="guile-config"
663 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
664 exe=`STEPMAKE_GET_EXECUTABLE($r)`
665 if ! $exe --version > /dev/null 2>&1 ; then
668 ver=`STEPMAKE_GET_VERSION($exe)`
669 num=`STEPMAKE_NUMERIC_VERSION($ver)`
670 req=`STEPMAKE_NUMERIC_VERSION($2)`
671 sup=`STEPMAKE_NUMERIC_VERSION($3)`
672 if test -n "$2" -a "$num" -lt "$req"; then
673 guile_config=["$r >= $2 (installed: $ver)"]
676 if test -n "$3" -a "$num" -ge "$sup"; then
677 guile_config=["$r < $3 (installed: $ver)"]
686 AC_MSG_RESULT([$found])
687 if test "$found" != "no"; then
688 AC_MSG_CHECKING([$guile_config version])
689 AC_MSG_RESULT([$ver])
692 STEPMAKE_ADD_ENTRY($1, "$guile_config (guile-devel, guile-dev or libguile-dev package)")
695 AC_SUBST(GUILE_CONFIG)
698 changequote(<<, >>)#dnl
699 GUILE_MAJOR_VERSION=`expr $guile_version : '\([0-9]*\)'`
700 GUILE_MINOR_VERSION=`expr $guile_version : '[0-9]*\.\([0-9]*\)'`
701 GUILE_PATCH_LEVEL=`expr $guile_version : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
702 changequote([, ])#dnl
704 save_CPPFLAGS="$CPPFLAGS"
706 CPPFLAGS="$GUILE_CFLAGS $CPPFLAGS"
707 LIBS="$GUILE_LDFLAGS $LIBS"
708 AC_CHECK_HEADERS([libguile.h])
709 AC_CHECK_LIB(guile, scm_boot_guile)
710 AC_CHECK_FUNCS(scm_boot_guile,,libguile_b=no)
711 if test "$libguile_b" = "no"; then
712 warn='libguile (libguile-dev, guile-devel or guile-dev
714 STEPMAKE_ADD_ENTRY(REQUIRED, $warn)
716 CPPFLAGS="$save_CPPFLAGS"
718 AC_DEFINE_UNQUOTED(GUILE_MAJOR_VERSION, $GUILE_MAJOR_VERSION)
719 AC_DEFINE_UNQUOTED(GUILE_MINOR_VERSION, $GUILE_MINOR_VERSION)
720 AC_DEFINE_UNQUOTED(GUILE_PATCH_LEVEL, $GUILE_PATCH_LEVEL)
724 AC_DEFUN(STEPMAKE_DLOPEN, [
725 AC_CHECK_LIB(dl, dlopen)
726 AC_CHECK_FUNCS(dlopen)
729 AC_DEFUN(STEPMAKE_HAS_CLANG, [
734 ], HAS_CLANG=yes, HAS_CLANG=no)
737 AC_DEFUN(STEPMAKE_GXX_OR_CLANG, [
739 if test "$HAS_CLANG" = "no"; then
740 if test "$GXX" = "yes"; then
741 STEPMAKE_CHECK_VERSION(CXX, $1, $2)
743 warn="$CXX (Please install *GNU* c++)"
744 STEPMAKE_ADD_ENTRY($1, $warn)
747 # no else, we're fine with any clang
751 AC_DEFUN(STEPMAKE_INIT, [
754 FULL_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL
755 MICRO_VERSION=$PATCH_LEVEL
756 TOPLEVEL_VERSION=$FULL_VERSION
757 if test x$MY_PATCH_LEVEL != x; then
758 FULL_VERSION=$FULL_VERSION.$MY_PATCH_LEVEL
760 VERSION=$FULL_VERSION
761 export MAJOR_VERSION MINOR_VERSION PATCH_LEVEL
762 # urg: don't "fix" this: irix doesn't know about [:lower:] and [:upper:]
763 changequote(<<, >>)#dnl
764 PACKAGE=`echo $PACKAGE_NAME | tr '[a-z]' '[A-Z]'`
765 package=`echo $PACKAGE_NAME | tr '[A-Z]' '[a-z]'`
766 changequote([, ])#dnl
768 # No versioning on directory names of sub-packages
770 stepmake=${datadir}/stepmake
772 if test "$prefix" = "NONE"; then
773 presome=${ac_default_prefix}
775 stepmake=`echo ${stepmake} | sed "s!\\\${prefix}!$presome!"`
777 # urg, how is this supposed to work?
778 if test "$program_prefix" = "NONE"; then
781 if test "$program_suffix" = "NONE"; then
785 AC_MSG_CHECKING(Package)
786 if test "$PACKAGE" = "STEPMAKE"; then
787 AC_MSG_RESULT(Stepmake package!)
789 AC_MSG_CHECKING(builddir)
791 ugh_ugh_autoconf250_builddir="`pwd`"
793 if test "$srcdir" = "."; then
797 package_builddir="`dirname $ugh_ugh_autoconf250_builddir`"
798 package_srcdir="`dirname $srcdir`"
800 AC_MSG_RESULT($ugh_ugh_autoconf250_builddir)
802 (cd stepmake 2>/dev/null || mkdir stepmake)
803 (cd stepmake; rm -f bin; ln -s ../$srcdir/bin .)
806 AC_MSG_RESULT($PACKAGE)
808 AC_MSG_CHECKING(builddir)
809 ugh_ugh_autoconf250_builddir="`pwd`"
811 here_dir=$(cd . && pwd)
812 full_src_dir=$(cd $srcdir && pwd)
814 if test "$full_src_dir" = "$here_dir"; then
819 AC_MSG_RESULT($ugh_ugh_autoconf250_builddir)
821 AC_MSG_CHECKING(for stepmake)
822 # Check for installed stepmake
823 if test -d $stepmake; then
824 AC_MSG_RESULT($stepmake)
826 stepmake="`cd $srcdir/stepmake; pwd`"
827 AC_MSG_RESULT([$srcdir/stepmake ($datadir/stepmake not found)])
831 AC_SUBST(ugh_ugh_autoconf250_builddir)
833 # Use absolute directory for non-srcdir builds, so that build
835 if test "$srcdir_build" = "no" ; then
836 srcdir="`cd $srcdir; pwd`"
843 AC_SUBST(PACKAGE_NAME)
845 AC_SUBST(MAJOR_VERSION)
846 AC_SUBST(MINOR_VERSION)
847 AC_SUBST(MICRO_VERSION)
849 # stepmake nonstandard names
850 AC_SUBST(PATCH_LEVEL)
851 AC_SUBST(TOPLEVEL_VERSION)
853 # We don't need the upper case variant,
854 # so stick to macros are uppercase convention.
855 # AC_DEFINE_UNQUOTED(package, ["${package}"])
856 # AC_DEFINE_UNQUOTED(PACKAGE, ["${PACKAGE}"])
857 AC_DEFINE_UNQUOTED(PACKAGE, ["${package}"])
858 AC_DEFINE_UNQUOTED(PACKAGE_NAME, ["${PACKAGE_NAME}"])
859 AC_DEFINE_UNQUOTED(TOPLEVEL_VERSION, ["${FULL_VERSION}"])
861 if test -z "$package_depth"; then
864 package_depth="../$package_depth"
867 AC_SUBST(package_depth)
869 AUTOGENERATE="This file was automatically generated by configure"
870 AC_SUBST(AUTOGENERATE)
873 AC_ARG_ENABLE(config,
874 [AS_HELP_STRING([--enable-config=CONF],
875 [put settings in config-CONF.make and config-CONF.h;
876 do `make conf=CONF' to get output in ./out-CONF])],
877 [CONFIGURATION=$enableval])
881 test -n "$CONFIGURATION" && CONFIGSUFFIX="-$CONFIGURATION"
882 CONFIGFILE=config$CONFIGSUFFIX
883 AC_SUBST(CONFIGSUFFIX)
886 STEPMAKE_PROGS(MAKE, gmake make, REQUIRED)
887 STEPMAKE_PROGS(FIND, find, REQUIRED)
889 STEPMAKE_PROGS(TAR, tar, REQUIRED)
891 if test "$(echo 2)" != "2" ||
892 test "x`uname`" = "xHP-UX"; then
893 AC_PATH_PROG(KSH, ksh, /bin/ksh)
894 AC_PATH_PROG(BASH, bash, $KSH)
895 STEPMAKE_WARN(avoiding buggy /bin/sh)
896 AC_PATH_PROG(SHELL, bash, $KSH)
899 AC_PATH_PROG(BASH, bash, $SHELL)
903 STEPMAKE_PYTHON(REQUIRED, 1.5, 3.0)
905 if expr "$MAKE" : '.*\(echo\)' >/dev/null; then
906 $MAKE -v 2> /dev/null | grep GNU > /dev/null
907 if test "$?" = 1; then
908 warn='make (Please install *GNU* make)'
909 # STEPMAKE_WARN($warn)
910 STEPMAKE_ADD_ENTRY(REQUIRED, $warn)
921 AC_SUBST(program_prefix)
922 AC_SUBST(program_suffix)
926 AC_DEFINE_UNQUOTED(DIRSEP, ['${DIRSEP}'])
927 AC_DEFINE_UNQUOTED(PATHSEP, ['${PATHSEP}'])
937 AC_DEFUN(STEPMAKE_LIB, [
938 STEPMAKE_PROGS(AR, ar, $1)
940 STEPMAKE_OPTIONAL_REQUIRED(RANLIB, ranlib, $1)
944 AC_DEFUN(STEPMAKE_LIBTOOL, [
946 # **Never** try to set library version numbers so that they correspond
947 # to the release number of your package. This is an abuse that only
948 # fosters misunderstanding of the purpose of library versions.
950 REVISION=$PATCH_LEVEL
951 # CURRENT=$MINOR_VERSION
952 CURRENT=`expr $MINOR_VERSION + 1`
953 # AGE=`expr $MAJOR_VERSION + 1`
961 AC_DEFUN(STEPMAKE_LOCALE, [
966 AC_ARG_WITH(localedir,
967 [AS_HELP_STRING([--with-localedir=DIR],
968 [location of locales. Default: PREFIX/share/locale])],
969 localedir=$with_localedir,
970 localedir='${prefix}/share/locale')
973 [AS_HELP_STRING([--with-lang=LANG],
974 [use LANG as language to emit messages])],
978 AC_MSG_CHECKING(language)
980 En* | en* | Am* | am* | US* | us*)
982 NL | nl | Du* | du* | Ned* | ned*)
991 if test "$lang" = "unknown" ; then
992 STEPMAKE_WARN($language not supported; available are: $ALL_LINGUAS)
998 AC_DEFUN(STEPMAKE_MAKEINFO, [
999 STEPMAKE_PROGS(MAKEINFO, makeinfo, $1)
1003 AC_DEFUN(STEPMAKE_MAN, [
1004 STEPMAKE_PROGS(GROFF, groff ditroff, $1)
1006 STEPMAKE_PROGS(TROFF, troff, $1)
1008 STEPMAKE_PROGS(TBL, tbl, $1)
1013 AC_DEFUN(STEPMAKE_MSGFMT, [
1014 STEPMAKE_PROGS(MSGFMT, msgfmt, $1)
1018 # Check for program ($2), set full path result to ($1).
1019 # If missing, add entry to missing-list ($3, one of 'OPTIONAL', 'REQUIRED')
1020 AC_DEFUN(STEPMAKE_PATH_PROG, [
1021 AC_CHECK_PROGS($1, $2, no)
1022 STEPMAKE_OPTIONAL_REQUIRED($1, $2, $3)
1023 if test $? -eq 0; then
1024 AC_PATH_PROGS($1, $2)
1025 if test -n "$4"; then
1026 STEPMAKE_CHECK_VERSION($1, $3, $4)
1032 # Check for program in set of names ($2), set result to ($1) .
1033 # If missing, add entry to missing-list ($3, one of 'OPTIONAL', 'REQUIRED')
1034 # If exists, and a minimal version ($4) is required
1035 AC_DEFUN(STEPMAKE_PROGS, [
1036 AC_CHECK_PROGS($1, $2, no)
1037 STEPMAKE_OPTIONAL_REQUIRED($1, $2, $3)
1038 if test $? -eq 0 -a -n "$4"; then
1039 STEPMAKE_CHECK_VERSION($1, $3, $4)
1044 AC_DEFUN(STEPMAKE_PERL, [
1045 STEPMAKE_PATH_PROG(PERL, perl, $1)
1049 # Check for python, between minimum ($2) and maximum version ($3).
1050 # If missing, add entry to missing-list ($1, one of 'OPTIONAL', 'REQUIRED')
1051 AC_DEFUN(STEPMAKE_PYTHON, [
1052 AC_MSG_CHECKING([for python])
1055 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
1056 exe=`STEPMAKE_GET_EXECUTABLE($r)`
1057 if ! $exe -V > /dev/null 2>&1 ; then
1060 ver=`STEPMAKE_GET_VERSION($exe)`
1061 num=`STEPMAKE_NUMERIC_VERSION($ver)`
1062 req=`STEPMAKE_NUMERIC_VERSION($2)`
1063 sup=`STEPMAKE_NUMERIC_VERSION($3)`
1064 if test -n "$2" && test "$num" -lt "$req"; then
1065 python=["$r >= $2 (installed: $ver)"]
1068 if test -n "$3" && test "$num" -ge "$sup"; then
1069 python=["$r < $3 (installed: $ver)"]
1078 AC_MSG_RESULT([$found])
1079 if test "$found" != "no"; then
1080 AC_MSG_CHECKING([$python version])
1081 AC_MSG_RESULT([$ver])
1084 STEPMAKE_ADD_ENTRY($1, $python)
1086 AC_PATH_PROG(PYTHON, $PYTHON)
1090 # Check for python-config, between minimum ($2) and maximum version ($3).
1091 # If missing, add entry to missing-list ($1, one of 'OPTIONAL', 'REQUIRED')
1092 AC_DEFUN(STEPMAKE_PYTHON_DEVEL, [
1093 AC_ARG_WITH(python-include,
1094 [AS_HELP_STRING([--with-python-include=DIR],
1095 [location of the python include dir])],[
1096 if test "$withval" = "yes" -o "$withval" = "no"; then
1097 AC_MSG_WARN(Usage: --with-python-include=includedir)
1099 PYTHON_CFLAGS="-I${withval}"
1103 AC_ARG_WITH(python-lib,
1104 [AS_HELP_STRING([--with-python-lib=NAME],
1105 [name of the python lib])],[
1106 if test "$withval" = "yes" -o "$withval" = "no"; then
1107 AC_MSG_WARN(Usage: --with-python-lib=name)
1109 LDFLAGS="$LDFLAGS -l${withval}"
1113 STEPMAKE_PYTHON($1, $2, $3)
1114 AC_CHECK_PROGS(PYTHON_CONFIG, `basename $PYTHON`-config, no)
1116 if test -z "$PYTHON_CFLAGS" -a "$PYTHON_CONFIG" != "no"; then
1117 # Clean out junk: http://bugs.python.org/issue3290
1118 # Python headers may need some -f* flags, leave them in.
1119 # We want the sed commands to look like 's/-[WDOm][[:alnum:][:punct:]][[:alnum:][:punct:]]*//g' and 's/-arch [^[:space:]]*//g', but automake eats brackets.
1120 #PYTHON_CFLAGS=`$PYTHON_CONFIG --cflags | sed -e 's/-[[WDOm]][[[:alnum:][:punct:]]][[[:alnum:][:punct:]]]*//g' | sed -e 's/-arch @<:@^@<:@:space:@:>@@:>@*//g'`
1121 # The above sed BRE matches parts of legal options, stipping down part of that option, resulting in invalid gcc arguments. Gentoo Bug #415793
1122 # For instance, '-floop-stip-mime' becomes '-floop-strip', and '-fvect-cost-model' becomes '-fvect-cost'.
1123 # 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.
1124 PYTHON_CFLAGS=`$PYTHON_CONFIG --cflags | sed -e 's/\(^\|[[^[:alnum:]]]\)-[[WDOm]][[[:alnum:][:punct:]]][[[:alnum:][:punct:]]]*//g' | sed -e 's/-arch @<:@^@<:@:space:@:>@@:>@*//g'`
1125 PYTHON_LDFLAGS=`$PYTHON_CONFIG --ldflags`
1128 if test -z "$PYTHON_CFLAGS" -a "$cross_compiling" = "no"; then
1129 changequote(<<, >>)#dnl
1130 # alternatively, for python >= 2.0
1131 # 'import sys, distutils.sysconfig; sys.stdout.write (distutils.sysconfig.get_python_inc ())'
1132 PYTHON_INCLUDE=`$PYTHON -c 'import sys; sys.stdout.write ("%s/include/python%s" % (sys.prefix, sys.version[:3]))'`
1133 PYTHON_CFLAGS="-I$PYTHON_INCLUDE"
1134 changequote([, ])#dnl
1137 if test -z "$PYTHON_HEADER"; then
1138 CPPFLAGS="$PYTHON_CFLAGS $CPPFLAGS"
1139 AC_CHECK_HEADERS([Python.h],[PYTHON_HEADER=yes])
1142 if test -z "$PYTHON_HEADER"; then
1143 warn="Python.h (python-devel, python-dev or libpython-dev package)"
1144 STEPMAKE_ADD_ENTRY($1, $warn)
1146 AC_SUBST(PYTHON_CFLAGS)
1147 AC_SUBST(PYTHON_LDFLAGS)
1152 AC_DEFUN(STEPMAKE_STL_DATA_METHOD, [
1153 AC_CACHE_CHECK([for stl.data () method],
1154 [stepmake_cv_stl_data_method],
1155 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1157 using namespace std;
1159 void *p = v.data ();
1161 [stepmake_cv_stl_data_method=yes],
1162 [stepmake_cv_stl_data_method=no]))
1163 if test $stepmake_cv_stl_data_method = yes; then
1164 AC_DEFINE(HAVE_STL_DATA_METHOD, 1, [define if stl classes have data () method])
1169 AC_DEFUN(STEPMAKE_TEXMF_DIRS, [
1170 STEPMAKE_PROGS(KPSEWHICH, kpsewhich, $1)
1172 AC_MSG_CHECKING(for metapost required files)
1173 if test "$MFPLAIN_MP" = ""; then
1174 MFPLAIN_MP=`kpsewhich -format=mp mfplain`
1176 if test "$MFPLAIN_MP" = ""; then
1178 STEPMAKE_ADD_ENTRY($1,['metapost CTAN package (texlive-metapost)'])
1184 AC_DEFUN(STEPMAKE_TEXMF, [
1185 STEPMAKE_PROGS(METAFONT, mf-nowin mf mfw mfont, $1)
1186 STEPMAKE_PROGS(METAPOST, mpost, $1)
1187 if test "$METAPOST" != ""; then
1188 ver=`STEPMAKE_GET_VERSION($METAPOST)`
1189 num=`STEPMAKE_NUMERIC_VERSION($ver)`
1190 # Avoid buggy metapost versions: 1.600 <= x < 1.803
1191 if test "$num" -ge "1600000" -a "$num" -lt "1803000"; then
1192 STEPMAKE_ADD_ENTRY($1, ["mpost (due to a bug in metapost, versions 1.600 <= x < 1.803 are not supported; installed: $ver)"])
1196 AC_MSG_CHECKING(for working metafont mode)
1197 modelist='ljfour lj4 lj3 lj2 ljet laserjet'
1198 for MFMODE in $modelist; do
1199 $METAFONT -progname=mf "\mode:=$MFMODE; mode_setup; end." > /dev/null 2>&1
1200 if test -f mfput.tfm; then
1204 AC_MSG_RESULT($MFMODE)
1212 AC_DEFUN(STEPMAKE_WARN, [
1218 dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
1219 dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
1220 dnl also defines GSTUFF_PKG_ERRORS on error
1221 AC_DEFUN(PKG_CHECK_MODULES, [
1224 if test -z "$PKG_CONFIG"; then
1225 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
1228 if test "$PKG_CONFIG" = "no" ; then
1229 echo "*** The pkg-config script could not be found. Make sure it is"
1230 echo "*** in your path, or set the PKG_CONFIG environment variable"
1231 echo "*** to the full path to pkg-config."
1232 echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
1234 PKG_CONFIG_MIN_VERSION=0.9.0
1235 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
1236 AC_MSG_CHECKING(for $2)
1238 if $PKG_CONFIG --exists "$2" ; then
1242 AC_MSG_CHECKING($1_CFLAGS)
1243 $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
1244 AC_MSG_RESULT($$1_CFLAGS)
1246 AC_MSG_CHECKING($1_LIBS)
1247 $1_LIBS=`$PKG_CONFIG --libs "$2"`
1248 AC_MSG_RESULT($$1_LIBS)
1252 ## If we have a custom action on failure, don't print errors, but
1253 ## do set a variable so people can do so.
1254 $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
1255 ifelse([$4], ,echo $$1_PKG_ERRORS,)
1263 if test $succeeded = yes; then
1264 ifelse([$3], , :, [$3])
1266 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])
1270 AC_DEFUN(STEPMAKE_FREETYPE2, [
1271 PKG_CHECK_MODULES(FREETYPE2, $1 >= $3, have_freetype2=yes, true)
1272 if test "$have_freetype2" = yes; then
1273 AC_DEFINE(HAVE_FREETYPE2)
1274 save_CPPFLAGS="$CPPFLAGS"
1276 CPPFLAGS="$FREETYPE2_CFLAGS $CPPFLAGS"
1277 LIBS="$FREETYPE2_LIBS $LIBS"
1278 AC_SUBST(FREETYPE2_CFLAGS)
1279 AC_SUBST(FREETYPE2_LIBS)
1280 CPPFLAGS="$save_CPPFLAGS"
1284 #r="lib$1-dev or $1-devel"
1285 r="libfreetype6-dev or freetype?-devel"
1286 ver="`pkg-config --modversion $1`"
1287 STEPMAKE_ADD_ENTRY($2, ["$r >= $3 (installed: $ver)"])
1291 AC_DEFUN(STEPMAKE_PANGO, [
1292 PKG_CHECK_MODULES(PANGO, $1 >= $3, have_pango16=yes, true)
1293 if test "$have_pango16" = yes ; then
1294 AC_DEFINE(HAVE_PANGO16)
1295 # Do not pollute user-CPPFLAGS with configure-CPPFLAGS
1296 save_CPPFLAGS="$CPPFLAGS"
1298 CPPFLAGS="$PANGO_CFLAGS $CPPFLAGS"
1299 LIBS="$PANGO_LIBS $LIBS"
1300 AC_CHECK_HEADERS([pango/pangofc-fontmap.h])
1301 AC_CHECK_FUNCS([pango_fc_font_map_add_decoder_find_func])
1302 AC_SUBST(PANGO_CFLAGS)
1303 AC_SUBST(PANGO_LIBS)
1304 CPPFLAGS="$save_CPPFLAGS"
1308 #r="lib$1-dev or $1-devel"
1309 r="libpango1.0-dev or pango1.0-devel"
1310 ver="`pkg-config --modversion $1`"
1311 STEPMAKE_ADD_ENTRY($2, ["$r >= $3 (installed: $ver)"])
1315 AC_DEFUN(STEPMAKE_PANGO_FT2, [
1316 PKG_CHECK_MODULES(PANGO_FT2, $1 >= $3, have_pangoft2=yes, true)
1317 if test "$have_pangoft2" = yes ; then
1318 AC_DEFINE(HAVE_PANGO16)
1319 AC_DEFINE(HAVE_PANGO_FT2)
1320 # Do not pollute user-CPPFLAGS with configure-CPPFLAGS
1321 save_CPPFLAGS="$CPPFLAGS"
1323 CPPFLAGS="$CPPFLAGS $PANGO_FT2_CFLAGS"
1324 LIBS="$PANGO_FT2_LIBS $LIBS"
1325 AC_CHECK_HEADERS([pango/pangoft2.h])
1326 AC_CHECK_FUNCS([pango_ft2_font_map_create_context])
1327 AC_SUBST(PANGO_FT2_CFLAGS)
1328 AC_SUBST(PANGO_FT2_LIBS)
1329 CPPFLAGS="$save_CPPFLAGS"
1333 #r="lib$1-dev or $1-devel"e
1334 r="libpango1.0-dev or pango?-devel"
1335 ver="`pkg-config --modversion $1`"
1336 STEPMAKE_ADD_ENTRY($2, ["$r >= $3 (installed: $ver)"])
1340 AC_DEFUN(STEPMAKE_FONTCONFIG, [
1341 PKG_CHECK_MODULES(FONTCONFIG, $1 >= $3, have_fontconfig=yes, true)
1342 if test "$have_fontconfig" = yes ; then
1343 AC_DEFINE(HAVE_FONTCONFIG)
1344 # Do not pollute user-CPPFLAGS with configure-CPPFLAGS
1345 save_CPPFLAGS="$CPPFLAGS"
1347 CPPFLAGS="$FONTCONFIG_CFLAGS $CPPFLAGS"
1348 LIBS="$FONTCONFIG_LIBS $LIBS"
1349 AC_SUBST(FONTCONFIG_CFLAGS)
1350 AC_SUBST(FONTCONFIG_LIBS)
1351 CPPFLAGS="$save_CPPFLAGS"
1354 r="lib$1-dev or $1-devel"
1355 ver="`pkg-config --modversion $1`"
1356 STEPMAKE_ADD_ENTRY($2, ["$r >= $3 (installed: $ver)"])
1360 AC_DEFUN(STEPMAKE_WINDOWS, [
1364 if test "$CYGWIN" = "yes"; then
1365 LN_S='cp -r' # Cygwin symbolic links do not work for native apps.
1367 INSTALL="\$(SHELL) \$(stepdir)/../bin/install-dot-exe.sh -c"
1368 elif test "$MINGW32" = "yes"; then
1372 INSTALL="\$(SHELL) \$(stepdir)/../bin/install-dot-exe.sh -c"
1378 AC_DEFINE_UNQUOTED(DIRSEP, ['${DIRSEP}'])
1379 AC_DEFINE_UNQUOTED(PATHSEP, ['${PATHSEP}'])
1382 AC_SUBST(program_suffix)
1384 AC_MSG_CHECKING([for some flavor of Windows])
1385 if test "$CYGWIN$MINGW32" = "nono"; then
1388 PLATFORM_WINDOWS=yes
1390 AC_MSG_RESULT([$PLATFORM_WINDOWS])
1391 AC_SUBST(PLATFORM_WINDOWS)
1392 STEPMAKE_PROGS(WINDRES, $target-windres windres, x)