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"
290 AC_DEFUN(STEPMAKE_CXXTEMPLATE, [
291 AC_CACHE_CHECK([whether explicit instantiation is needed],
292 stepmake_cv_need_explicit_instantiation,
293 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
294 template <class T> struct foo { static int baz; };
295 template <class T> int foo<T>::baz = 1;
296 ]], [[ return foo<int>::baz; ]])],[stepmake_cv_need_explicit_instantiation=no],[stepmake_cv_need_explicit_instantiation=yes]))
297 if test x"$stepmake_cv_need_explicit_instantiation"x = x"yes"x; then
298 AC_DEFINE(NEED_EXPLICIT_INSTANTIATION)
302 AC_DEFUN(STEPMAKE_GXXCODEGENBUG, [
303 AC_MSG_CHECKING([options for known g++ bugs])
304 case "$GXX:$CXX_VERSION" in
306 AC_MSG_RESULT([-fno-optimize-sibling-calls (tail call bug)])
307 CXXFLAGS="$CXXFLAGS -fno-optimize-sibling-calls"
310 AC_MSG_RESULT([-fno-tree-vrp (comparison bug)])
311 CXXFLAGS="$CXXFLAGS -fno-tree-vrp"
313 *) AC_MSG_RESULT([none])
319 AC_DEFUN(STEPMAKE_DATADIR, [
321 if test "$prefix" = "NONE"; then
322 presome=${ac_default_prefix}
325 build_package_datadir=$ugh_ugh_autoconf250_builddir/out$CONFIGSUFFIX/share/$package
327 DATADIR=`echo ${datadir} | sed "s!\\\${datarootdir}!${presome}/share!"`
328 DATADIR=`echo ${DATADIR} | sed "s!\\\${prefix}!$presome!"`
329 BUILD_PACKAGE_DATADIR=`echo ${build_package_datadir} | sed "s!\\\${prefix}!$presome!"`
332 AC_SUBST(datarootdir)
333 AC_SUBST(build_package_datadir)
334 AC_DEFINE_UNQUOTED(DATADIR, ["${DATADIR}"])
335 AC_DEFINE_UNQUOTED(BUILD_PACKAGE_DATADIR, ["${BUILD_PACKAGE_DATADIR}"])
338 ## ugh: cut & paste programming from datadir.
339 AC_DEFUN(STEPMAKE_LIBDIR, [
340 presome=${exec_prefix}
341 if test "$presome" = "NONE"; then
344 if test "$presome" = "NONE"; then
345 presome=${ac_default_prefix}
348 build_package_libdir=$ugh_ugh_autoconf250_builddir/out$CONFIGSUFFIX/lib/$package
350 LIBDIR=`echo ${libdir} | sed "s!\\\${exec_prefix}!$presome!"`
351 BUILD_PACKAGE_LIBDIR=`echo ${build_package_libdir} | sed "s!\\\${exec_prefix}!$presome!"`
354 AC_SUBST(build_package_libdir)
355 AC_DEFINE_UNQUOTED(LIBDIR, ["${LIBDIR}"])
356 AC_DEFINE_UNQUOTED(BUILD_PACKAGE_LIBDIR, ["${BUILD_PACKAGE_LIBDIR}"])
360 AC_DEFUN(STEPMAKE_PREFIX_EXPAND_FIXUP, [
361 # undo expanding of explicit --infodir=/usr/share
362 # to ease install-time override with prefix=...
363 strip=`echo $includedir | eval sed s@^$prefix@@`
364 if test "$includedir" = "`eval echo $prefix$strip`"; then
365 includedir='${prefix}'$strip''
367 strip=`echo $libdir | eval sed s@^$exec_prefix@@`
368 if test "$libdir" = "`eval echo $exec_prefix$strip`"; then
369 libdir='${exec_prefix}'$strip''
371 strip=`echo $infodir | eval sed s@^$datarootdir@@`
372 if test "$infodir" = "`eval echo $datarootdir$strip`"; then
373 infodir='${datarootdir}'$strip''
375 strip=`echo $mandir | eval sed s@^$datarootdir@@`
376 if test "$mandir" = "`eval echo $datarootdir$strip`"; then
377 mandir='${datarootdir}'$strip''
382 AC_DEFUN(STEPMAKE_END, [
383 STEPMAKE_PREFIX_EXPAND_FIXUP
388 AC_CONFIG_FILES([$CONFIGFILE.make:config.make.in])
391 if test -n "$OPTIONAL"; then
393 echo "WARNING: Please consider installing optional programs or files: $OPTIONAL"
396 if test -n "$REQUIRED"; then
398 echo "ERROR: Please install required programs: $REQUIRED"
401 if test -n "$UNSUPPORTED"; then
403 echo "ERROR: Please use older version of programs: $UNSUPPORTED"
406 if test -n "$OPTIONAL$REQUIRED$UNSUPPORTED"; then
408 echo "See INSTALL.txt for more information on how to build $PACKAGE_NAME"
409 if test -f config.cache ; then
410 echo "Remove config.cache before rerunning ./configure"
414 if test -n "$REQUIRED$UNSUPPORTED"; then
415 rm -f $srcdir/GNUmakefile
419 # regular in-place build
420 # test for srcdir_build = yes ?
421 if test "$srcdir_build" = "yes"; then
422 rm -f $srcdir/GNUmakefile
423 cp $srcdir/GNUmakefile.in $srcdir/GNUmakefile
424 chmod 444 $srcdir/GNUmakefile
426 if test -f $srcdir/GNUmakefile; then
428 Source directory already configured. Please clean the source directory
430 make -C $srcdir distclean
437 abssrcdir="`cd $srcdir; pwd`"
439 for d in 2 3 4 5 ; do
440 for mf in `cd $srcdir ; find . -maxdepth $d -mindepth $d -name GNUmakefile`; do
443 # source is below build directory, always copy
446 case "$abssrcdir/${mf#./}" in
448 # find descended into build directory, don't copy
453 cat <<EOF | $PYTHON - > $mf
454 print 'depth=' + ('../' * ( $d-1 ) )
455 print 'include \$(depth)/config\$(if \$(conf),-\$(conf),).make'
456 print 'include \$(configure-srcdir)/$mf'
457 print 'MODULE_INCLUDES += \$(src-dir)/\$(outbase)'
460 for mf in `cd $srcdir ; find . -maxdepth $d -mindepth $d -name '*.make' | grep -v config.make `; do
463 # source is below build directory, always copy
466 case "$abssrcdir/${mf#./}" in
468 # find descended into build directory, don't copy
473 cat <<EOF | $PYTHON - > $mf
474 print 'include \$(depth)/config\$(if \$(conf),-\$(conf),).make'
475 print 'include \$(configure-srcdir)/$mf'
481 cat <<EOF > GNUmakefile
483 include config\$(if \$(conf),-\$(conf),).make
484 include \$(configure-srcdir)/GNUmakefile.in
486 chmod 444 GNUmakefile
492 AC_DEFUN(STEPMAKE_FLEX, [
493 # ugh, automake: we want (and check for) flex
495 # urg: automake 1.3: hope this doesn't break 1.2 ac_cv_pro_lex_root hack...
499 ac_cv_prog_lex_root=lex.yy
500 STEPMAKE_PROGS(FLEX, flex, $1)
504 AC_DEFUN(STEPMAKE_FLEXLEXER, [
505 AC_CHECK_HEADERS([FlexLexer.h],[true],[false])
506 if test $? -ne 0; then
507 warn='FlexLexer.h (flex package)'
508 STEPMAKE_ADD_ENTRY($1, $warn)
510 # check for yyFlexLexer.yy_current_buffer,
511 # in 2.5.4 <= flex < 2.5.29
512 AC_CACHE_CHECK([for yyFlexLexer.yy_current_buffer],
513 [stepmake_cv_flexlexer_yy_current_buffer],
514 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
516 #include <FlexLexer.h>
517 class yy_flex_lexer: public yyFlexLexer
522 yy_current_buffer = 0;
526 [stepmake_cv_flexlexer_yy_current_buffer=yes],
527 [stepmake_cv_flexlexer_yy_current_buffer=no]))
528 if test $stepmake_cv_flexlexer_yy_current_buffer = yes; then
529 AC_DEFINE(HAVE_FLEXLEXER_YY_CURRENT_BUFFER, 1, [Define to 1 if yyFlexLexer has yy_current_buffer.])
535 AC_DEFUN(STEPMAKE_FLEXLEXER_LOCATION, [
536 AC_MSG_CHECKING([FlexLexer.h location])
539 cat <<EOF > conftest.cc
541 #include <FlexLexer.h>
543 FLEXLEXER_FILE=`eval $ac_cpp conftest.cc | \
544 sed 's!# 1 "\(.*FlexLexer.h\)"!@FLEXLEXER@\1@@!g' | grep '@@' | \
545 sed 's!.*@FLEXLEXER@\(.*\)@@.*$!\1!g' ` 1> /dev/null 2> /dev/null
547 AC_SUBST(FLEXLEXER_FILE)
548 AC_MSG_RESULT($FLEXLEXER_FILE)
551 AC_DEFUN(STEPMAKE_GCC_OR_CLANG, [
553 if test "$HAS_CLANG" = "no"; then
554 if test "$GCC" = "yes"; then
555 STEPMAKE_CHECK_VERSION(CC, $1, $2)
557 warn="$CC (Please install *GNU* cc)"
558 STEPMAKE_ADD_ENTRY($1, $warn)
561 # no else, we're fine with any clang
564 AC_DEFUN(STEPMAKE_GETTEXT, [
566 if test "$prefix" = "NONE"; then
567 presome=${ac_default_prefix}
569 LOCALEDIR=`echo ${localedir} | sed "s!\\\${prefix}!$presome!"`
572 AC_DEFINE_UNQUOTED(LOCALEDIR, ["${LOCALEDIR}"])
573 AC_CHECK_LIB(intl, gettext)
574 AC_CHECK_FUNCS(gettext)
578 # Check for guile, between minimum ($2) and maximum version ($3).
579 # If missing, add entry to missing-list ($1, one of 'OPTIONAL', 'REQUIRED')
580 AC_DEFUN(STEPMAKE_GUILE, [
581 AC_MSG_CHECKING([for guile])
584 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
585 exe=`STEPMAKE_GET_EXECUTABLE($r)`
586 if ! $exe --version > /dev/null 2>&1 ; then
589 ver=`STEPMAKE_GET_VERSION($exe)`
590 num=`STEPMAKE_NUMERIC_VERSION($ver)`
591 req=`STEPMAKE_NUMERIC_VERSION($2)`
592 sup=`STEPMAKE_NUMERIC_VERSION($3)`
593 if test -n "$2" && test "$num" -lt "$req"; then
594 guile=["$r >= $2 (installed: $ver)"]
597 if test -n "$3" && test "$num" -ge "$sup"; then
598 guile=["$r < $3 (installed: $ver)"]
607 AC_MSG_RESULT([$found])
608 if test "$found" != "no"; then
609 AC_MSG_CHECKING([$guile version])
610 AC_MSG_RESULT([$ver])
613 STEPMAKE_ADD_ENTRY($1, $guile)
615 STEPMAKE_PATH_PROG(GUILE, $GUILE)
619 # STEPMAKE_GUILE_FLAGS --- set flags for compiling and linking with Guile
621 # This macro runs the guile-config script, installed with Guile,
622 # to find out where Guile's header files and libraries are
623 # installed. It sets two variables, marked for substitution, as
626 # GUILE_CFLAGS --- flags to pass to a C or C++ compiler to build
627 # code that uses Guile header files. This is almost
628 # always just a -I flag.
630 # GUILE_LDFLAGS --- flags to pass to the linker to link a
631 # program against Guile. This includes -lguile for
632 # the Guile library itself, any libraries that Guile
633 # itself requires (like -lqthreads), and so on. It may
634 # also include a -L flag to tell the compiler where to
635 # find the libraries.
637 AC_DEFUN([STEPMAKE_GUILE_FLAGS], [
638 exe=`STEPMAKE_GET_EXECUTABLE($guile_config)`
639 if test -x $exe; then
640 AC_MSG_CHECKING([guile compile flags])
641 GUILE_CFLAGS="`$guile_config compile`"
642 AC_MSG_RESULT($GUILE_CFLAGS)
643 AC_MSG_CHECKING([guile link flags])
644 GUILE_LDFLAGS="`$guile_config link`"
645 AC_MSG_RESULT($GUILE_LDFLAGS)
647 AC_SUBST(GUILE_CFLAGS)
648 AC_SUBST(GUILE_LDFLAGS)
652 # Check for guile-config, between minimum ($2) and maximum version ($3).
653 # If missing, add entry to missing-list ($1, one of 'OPTIONAL', 'REQUIRED')
654 AC_DEFUN(STEPMAKE_GUILE_DEVEL, [
655 ## First, let's just see if we can find Guile at all.
656 test -n "$target_alias" && target_guile_config=$target_alias-guile-config
657 test -n "$host_alias" && host_guile_config=$host_alias-guile-config
658 AC_MSG_CHECKING([for guile-config])
659 guile_config="guile-config"
661 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
662 exe=`STEPMAKE_GET_EXECUTABLE($r)`
663 if ! $exe --version > /dev/null 2>&1 ; then
666 ver=`STEPMAKE_GET_VERSION($exe)`
667 num=`STEPMAKE_NUMERIC_VERSION($ver)`
668 req=`STEPMAKE_NUMERIC_VERSION($2)`
669 sup=`STEPMAKE_NUMERIC_VERSION($3)`
670 if test -n "$2" -a "$num" -lt "$req"; then
671 guile_config=["$r >= $2 (installed: $ver)"]
674 if test -n "$3" -a "$num" -ge "$sup"; then
675 guile_config=["$r < $3 (installed: $ver)"]
684 AC_MSG_RESULT([$found])
685 if test "$found" != "no"; then
686 AC_MSG_CHECKING([$guile_config version])
687 AC_MSG_RESULT([$ver])
690 STEPMAKE_ADD_ENTRY($1, "$guile_config (guile-devel, guile-dev or libguile-dev package)")
693 AC_SUBST(GUILE_CONFIG)
696 changequote(<<, >>)#dnl
697 GUILE_MAJOR_VERSION=`expr $guile_version : '\([0-9]*\)'`
698 GUILE_MINOR_VERSION=`expr $guile_version : '[0-9]*\.\([0-9]*\)'`
699 GUILE_PATCH_LEVEL=`expr $guile_version : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
700 changequote([, ])#dnl
702 save_CPPFLAGS="$CPPFLAGS"
704 CPPFLAGS="$GUILE_CFLAGS $CPPFLAGS"
705 LIBS="$GUILE_LDFLAGS $LIBS"
706 AC_CHECK_HEADERS([libguile.h])
707 AC_CHECK_LIB(guile, scm_boot_guile)
708 AC_CHECK_FUNCS(scm_boot_guile,,libguile_b=no)
709 if test "$libguile_b" = "no"; then
710 warn='libguile (libguile-dev, guile-devel or guile-dev
712 STEPMAKE_ADD_ENTRY(REQUIRED, $warn)
714 CPPFLAGS="$save_CPPFLAGS"
716 AC_DEFINE_UNQUOTED(GUILE_MAJOR_VERSION, $GUILE_MAJOR_VERSION)
717 AC_DEFINE_UNQUOTED(GUILE_MINOR_VERSION, $GUILE_MINOR_VERSION)
718 AC_DEFINE_UNQUOTED(GUILE_PATCH_LEVEL, $GUILE_PATCH_LEVEL)
722 AC_DEFUN(STEPMAKE_DLOPEN, [
723 AC_CHECK_LIB(dl, dlopen)
724 AC_CHECK_FUNCS(dlopen)
727 AC_DEFUN(STEPMAKE_HAS_CLANG, [
732 ], HAS_CLANG=yes, HAS_CLANG=no)
735 AC_DEFUN(STEPMAKE_GXX_OR_CLANG, [
737 if test "$HAS_CLANG" = "no"; then
738 if test "$GXX" = "yes"; then
739 STEPMAKE_CHECK_VERSION(CXX, $1, $2)
741 warn="$CXX (Please install *GNU* c++)"
742 STEPMAKE_ADD_ENTRY($1, $warn)
745 # no else, we're fine with any clang
749 AC_DEFUN(STEPMAKE_INIT, [
752 FULL_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL
753 MICRO_VERSION=$PATCH_LEVEL
754 TOPLEVEL_VERSION=$FULL_VERSION
755 if test x$MY_PATCH_LEVEL != x; then
756 FULL_VERSION=$FULL_VERSION.$MY_PATCH_LEVEL
758 VERSION=$FULL_VERSION
759 export MAJOR_VERSION MINOR_VERSION PATCH_LEVEL
760 # urg: don't "fix" this: irix doesn't know about [:lower:] and [:upper:]
761 changequote(<<, >>)#dnl
762 PACKAGE=`echo $PACKAGE_NAME | tr '[a-z]' '[A-Z]'`
763 package=`echo $PACKAGE_NAME | tr '[A-Z]' '[a-z]'`
764 changequote([, ])#dnl
766 # No versioning on directory names of sub-packages
768 stepmake=${datadir}/stepmake
770 if test "$prefix" = "NONE"; then
771 presome=${ac_default_prefix}
773 stepmake=`echo ${stepmake} | sed "s!\\\${prefix}!$presome!"`
775 # urg, how is this supposed to work?
776 if test "$program_prefix" = "NONE"; then
779 if test "$program_suffix" = "NONE"; then
783 AC_MSG_CHECKING(Package)
784 if test "$PACKAGE" = "STEPMAKE"; then
785 AC_MSG_RESULT(Stepmake package!)
787 AC_MSG_CHECKING(builddir)
789 ugh_ugh_autoconf250_builddir="`pwd`"
791 if test "$srcdir" = "."; then
795 package_builddir="`dirname $ugh_ugh_autoconf250_builddir`"
796 package_srcdir="`dirname $srcdir`"
798 AC_MSG_RESULT($ugh_ugh_autoconf250_builddir)
800 (cd stepmake 2>/dev/null || mkdir stepmake)
801 (cd stepmake; rm -f bin; ln -s ../$srcdir/bin .)
804 AC_MSG_RESULT($PACKAGE)
806 AC_MSG_CHECKING(builddir)
807 ugh_ugh_autoconf250_builddir="`pwd`"
809 here_dir=$(cd . && pwd)
810 full_src_dir=$(cd $srcdir && pwd)
812 if test "$full_src_dir" = "$here_dir"; then
817 AC_MSG_RESULT($ugh_ugh_autoconf250_builddir)
819 AC_MSG_CHECKING(for stepmake)
820 # Check for installed stepmake
821 if test -d $stepmake; then
822 AC_MSG_RESULT($stepmake)
824 stepmake="`cd $srcdir/stepmake; pwd`"
825 AC_MSG_RESULT([$srcdir/stepmake ($datadir/stepmake not found)])
829 AC_SUBST(ugh_ugh_autoconf250_builddir)
831 # Use absolute directory for non-srcdir builds, so that build
833 if test "$srcdir_build" = "no" ; then
834 srcdir="`cd $srcdir; pwd`"
841 AC_SUBST(PACKAGE_NAME)
843 AC_SUBST(MAJOR_VERSION)
844 AC_SUBST(MINOR_VERSION)
845 AC_SUBST(MICRO_VERSION)
847 # stepmake nonstandard names
848 AC_SUBST(PATCH_LEVEL)
849 AC_SUBST(TOPLEVEL_VERSION)
851 # We don't need the upper case variant,
852 # so stick to macros are uppercase convention.
853 # AC_DEFINE_UNQUOTED(package, ["${package}"])
854 # AC_DEFINE_UNQUOTED(PACKAGE, ["${PACKAGE}"])
855 AC_DEFINE_UNQUOTED(PACKAGE, ["${package}"])
856 AC_DEFINE_UNQUOTED(PACKAGE_NAME, ["${PACKAGE_NAME}"])
857 AC_DEFINE_UNQUOTED(TOPLEVEL_VERSION, ["${FULL_VERSION}"])
859 if test -z "$package_depth"; then
862 package_depth="../$package_depth"
865 AC_SUBST(package_depth)
867 AUTOGENERATE="This file was automatically generated by configure"
868 AC_SUBST(AUTOGENERATE)
871 AC_ARG_ENABLE(config,
872 [AS_HELP_STRING([--enable-config=CONF],
873 [put settings in config-CONF.make and config-CONF.h;
874 do `make conf=CONF' to get output in ./out-CONF])],
875 [CONFIGURATION=$enableval])
879 test -n "$CONFIGURATION" && CONFIGSUFFIX="-$CONFIGURATION"
880 CONFIGFILE=config$CONFIGSUFFIX
881 AC_SUBST(CONFIGSUFFIX)
884 STEPMAKE_PROGS(MAKE, gmake make, REQUIRED)
885 STEPMAKE_PROGS(FIND, find, REQUIRED)
887 STEPMAKE_PROGS(TAR, tar, REQUIRED)
889 if test "$(echo 2)" != "2" ||
890 test "x`uname`" = "xHP-UX"; then
891 AC_PATH_PROG(KSH, ksh, /bin/ksh)
892 AC_PATH_PROG(BASH, bash, $KSH)
893 STEPMAKE_WARN(avoiding buggy /bin/sh)
894 AC_PATH_PROG(SHELL, bash, $KSH)
897 AC_PATH_PROG(BASH, bash, $SHELL)
901 STEPMAKE_PYTHON(REQUIRED, 1.5, 3.0)
903 if expr "$MAKE" : '.*\(echo\)' >/dev/null; then
904 $MAKE -v 2> /dev/null | grep GNU > /dev/null
905 if test "$?" = 1; then
906 warn='make (Please install *GNU* make)'
907 # STEPMAKE_WARN($warn)
908 STEPMAKE_ADD_ENTRY(REQUIRED, $warn)
919 AC_SUBST(program_prefix)
920 AC_SUBST(program_suffix)
924 AC_DEFINE_UNQUOTED(DIRSEP, ['${DIRSEP}'])
925 AC_DEFINE_UNQUOTED(PATHSEP, ['${PATHSEP}'])
935 AC_DEFUN(STEPMAKE_LIB, [
936 STEPMAKE_PROGS(AR, ar, $1)
938 STEPMAKE_OPTIONAL_REQUIRED(RANLIB, ranlib, $1)
942 AC_DEFUN(STEPMAKE_LIBTOOL, [
944 # **Never** try to set library version numbers so that they correspond
945 # to the release number of your package. This is an abuse that only
946 # fosters misunderstanding of the purpose of library versions.
948 REVISION=$PATCH_LEVEL
949 # CURRENT=$MINOR_VERSION
950 CURRENT=`expr $MINOR_VERSION + 1`
951 # AGE=`expr $MAJOR_VERSION + 1`
959 AC_DEFUN(STEPMAKE_LOCALE, [
964 AC_ARG_WITH(localedir,
965 [AS_HELP_STRING([--with-localedir=DIR],
966 [location of locales. Default: PREFIX/share/locale])],
967 localedir=$with_localedir,
968 localedir='${prefix}/share/locale')
971 [AS_HELP_STRING([--with-lang=LANG],
972 [use LANG as language to emit messages])],
976 AC_MSG_CHECKING(language)
978 En* | en* | Am* | am* | US* | us*)
980 NL | nl | Du* | du* | Ned* | ned*)
989 if test "$lang" = "unknown" ; then
990 STEPMAKE_WARN($language not supported; available are: $ALL_LINGUAS)
996 AC_DEFUN(STEPMAKE_MAKEINFO, [
997 STEPMAKE_PROGS(MAKEINFO, makeinfo, $1)
1001 AC_DEFUN(STEPMAKE_MAN, [
1002 STEPMAKE_PROGS(GROFF, groff ditroff, $1)
1004 STEPMAKE_PROGS(TROFF, troff, $1)
1006 STEPMAKE_PROGS(TBL, tbl, $1)
1011 AC_DEFUN(STEPMAKE_MSGFMT, [
1012 STEPMAKE_PROGS(MSGFMT, msgfmt, $1)
1016 # Check for program ($2), set full path result to ($1).
1017 # If missing, add entry to missing-list ($3, one of 'OPTIONAL', 'REQUIRED')
1018 AC_DEFUN(STEPMAKE_PATH_PROG, [
1019 AC_CHECK_PROGS($1, $2, no)
1020 STEPMAKE_OPTIONAL_REQUIRED($1, $2, $3)
1021 if test $? -eq 0; then
1022 AC_PATH_PROGS($1, $2)
1023 if test -n "$4"; then
1024 STEPMAKE_CHECK_VERSION($1, $3, $4)
1030 # Check for program in set of names ($2), set result to ($1) .
1031 # If missing, add entry to missing-list ($3, one of 'OPTIONAL', 'REQUIRED')
1032 # If exists, and a minimal version ($4) is required
1033 AC_DEFUN(STEPMAKE_PROGS, [
1034 AC_CHECK_PROGS($1, $2, no)
1035 STEPMAKE_OPTIONAL_REQUIRED($1, $2, $3)
1036 if test $? -eq 0 -a -n "$4"; then
1037 STEPMAKE_CHECK_VERSION($1, $3, $4)
1042 AC_DEFUN(STEPMAKE_PERL, [
1043 STEPMAKE_PATH_PROG(PERL, perl, $1)
1047 # Check for python, between minimum ($2) and maximum version ($3).
1048 # If missing, add entry to missing-list ($1, one of 'OPTIONAL', 'REQUIRED')
1049 AC_DEFUN(STEPMAKE_PYTHON, [
1050 AC_MSG_CHECKING([for python])
1053 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
1054 exe=`STEPMAKE_GET_EXECUTABLE($r)`
1055 if ! $exe -V > /dev/null 2>&1 ; then
1058 ver=`STEPMAKE_GET_VERSION($exe)`
1059 num=`STEPMAKE_NUMERIC_VERSION($ver)`
1060 req=`STEPMAKE_NUMERIC_VERSION($2)`
1061 sup=`STEPMAKE_NUMERIC_VERSION($3)`
1062 if test -n "$2" && test "$num" -lt "$req"; then
1063 python=["$r >= $2 (installed: $ver)"]
1066 if test -n "$3" && test "$num" -ge "$sup"; then
1067 python=["$r < $3 (installed: $ver)"]
1076 AC_MSG_RESULT([$found])
1077 if test "$found" != "no"; then
1078 AC_MSG_CHECKING([$python version])
1079 AC_MSG_RESULT([$ver])
1082 STEPMAKE_ADD_ENTRY($1, $python)
1084 AC_PATH_PROG(PYTHON, $PYTHON)
1088 # Check for python-config, between minimum ($2) and maximum version ($3).
1089 # If missing, add entry to missing-list ($1, one of 'OPTIONAL', 'REQUIRED')
1090 AC_DEFUN(STEPMAKE_PYTHON_DEVEL, [
1091 AC_ARG_WITH(python-include,
1092 [AS_HELP_STRING([--with-python-include=DIR],
1093 [location of the python include dir])],[
1094 if test "$withval" = "yes" -o "$withval" = "no"; then
1095 AC_MSG_WARN(Usage: --with-python-include=includedir)
1097 PYTHON_CFLAGS="-I${withval}"
1101 AC_ARG_WITH(python-lib,
1102 [AS_HELP_STRING([--with-python-lib=NAME],
1103 [name of the python lib])],[
1104 if test "$withval" = "yes" -o "$withval" = "no"; then
1105 AC_MSG_WARN(Usage: --with-python-lib=name)
1107 LDFLAGS="$LDFLAGS -l${withval}"
1111 STEPMAKE_PYTHON($1, $2, $3)
1112 AC_CHECK_PROGS(PYTHON_CONFIG, `basename $PYTHON`-config, no)
1114 if test -z "$PYTHON_CFLAGS" -a "$PYTHON_CONFIG" != "no"; then
1115 # Clean out junk: http://bugs.python.org/issue3290
1116 # Python headers may need some -f* flags, leave them in.
1117 # We want the sed commands to look like 's/-[WDOm][[:alnum:][:punct:]][[:alnum:][:punct:]]*//g' and 's/-arch [^[:space:]]*//g', but automake eats brackets.
1118 #PYTHON_CFLAGS=`$PYTHON_CONFIG --cflags | sed -e 's/-[[WDOm]][[[:alnum:][:punct:]]][[[:alnum:][:punct:]]]*//g' | sed -e 's/-arch @<:@^@<:@:space:@:>@@:>@*//g'`
1119 # The above sed BRE matches parts of legal options, stipping down part of that option, resulting in invalid gcc arguments. Gentoo Bug #415793
1120 # For instance, '-floop-stip-mime' becomes '-floop-strip', and '-fvect-cost-model' becomes '-fvect-cost'.
1121 # 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.
1122 PYTHON_CFLAGS=`$PYTHON_CONFIG --cflags | sed -e 's/\(^\|[[^[:alnum:]]]\)-[[WDOm]][[[:alnum:][:punct:]]][[[:alnum:][:punct:]]]*//g' | sed -e 's/-arch @<:@^@<:@:space:@:>@@:>@*//g'`
1123 PYTHON_LDFLAGS=`$PYTHON_CONFIG --ldflags`
1126 if test -z "$PYTHON_CFLAGS" -a "$cross_compiling" = "no"; then
1127 changequote(<<, >>)#dnl
1128 # alternatively, for python >= 2.0
1129 # 'import sys, distutils.sysconfig; sys.stdout.write (distutils.sysconfig.get_python_inc ())'
1130 PYTHON_INCLUDE=`$PYTHON -c 'import sys; sys.stdout.write ("%s/include/python%s" % (sys.prefix, sys.version[:3]))'`
1131 PYTHON_CFLAGS="-I$PYTHON_INCLUDE"
1132 changequote([, ])#dnl
1135 if test -z "$PYTHON_HEADER"; then
1136 CPPFLAGS="$PYTHON_CFLAGS $CPPFLAGS"
1137 AC_CHECK_HEADERS([Python.h],[PYTHON_HEADER=yes])
1140 if test -z "$PYTHON_HEADER"; then
1141 warn="Python.h (python-devel, python-dev or libpython-dev package)"
1142 STEPMAKE_ADD_ENTRY($1, $warn)
1144 AC_SUBST(PYTHON_CFLAGS)
1145 AC_SUBST(PYTHON_LDFLAGS)
1150 AC_DEFUN(STEPMAKE_STL_DATA_METHOD, [
1151 AC_CACHE_CHECK([for stl.data () method],
1152 [stepmake_cv_stl_data_method],
1153 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1155 using namespace std;
1157 void *p = v.data ();
1159 [stepmake_cv_stl_data_method=yes],
1160 [stepmake_cv_stl_data_method=no]))
1161 if test $stepmake_cv_stl_data_method = yes; then
1162 AC_DEFINE(HAVE_STL_DATA_METHOD, 1, [define if stl classes have data () method])
1167 AC_DEFUN(STEPMAKE_TEXMF_DIRS, [
1168 STEPMAKE_PROGS(KPSEWHICH, kpsewhich, $1)
1170 AC_MSG_CHECKING(for metapost required files)
1171 if test "$MFPLAIN_MP" = ""; then
1172 MFPLAIN_MP=`kpsewhich -format=mp mfplain`
1174 if test "$MFPLAIN_MP" = ""; then
1176 STEPMAKE_ADD_ENTRY($1,['metapost CTAN package (texlive-metapost)'])
1182 AC_DEFUN(STEPMAKE_TEXMF, [
1183 STEPMAKE_PROGS(METAFONT, mf-nowin mf mfw mfont, $1)
1184 STEPMAKE_PROGS(METAPOST, mpost, $1)
1185 if test "$METAPOST" != ""; then
1186 ver=`STEPMAKE_GET_VERSION($METAPOST)`
1187 num=`STEPMAKE_NUMERIC_VERSION($ver)`
1188 # Avoid buggy metapost versions: 1.600 <= x < 1.803
1189 if test "$num" -ge "1600000" -a "$num" -lt "1803000"; then
1190 STEPMAKE_ADD_ENTRY($1, ["mpost (due to a bug in metapost, versions 1.600 <= x < 1.803 are not supported; installed: $ver)"])
1194 AC_MSG_CHECKING(for working metafont mode)
1195 modelist='ljfour lj4 lj3 lj2 ljet laserjet'
1196 for MFMODE in $modelist; do
1197 $METAFONT -progname=mf "\mode:=$MFMODE; mode_setup; end." > /dev/null 2>&1
1198 if test -f mfput.tfm; then
1202 AC_MSG_RESULT($MFMODE)
1210 AC_DEFUN(STEPMAKE_WARN, [
1216 dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
1217 dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
1218 dnl also defines GSTUFF_PKG_ERRORS on error
1219 AC_DEFUN(PKG_CHECK_MODULES, [
1222 if test -z "$PKG_CONFIG"; then
1223 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
1226 if test "$PKG_CONFIG" = "no" ; then
1227 echo "*** The pkg-config script could not be found. Make sure it is"
1228 echo "*** in your path, or set the PKG_CONFIG environment variable"
1229 echo "*** to the full path to pkg-config."
1230 echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
1232 PKG_CONFIG_MIN_VERSION=0.9.0
1233 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
1234 AC_MSG_CHECKING(for $2)
1236 if $PKG_CONFIG --exists "$2" ; then
1240 AC_MSG_CHECKING($1_CFLAGS)
1241 $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
1242 AC_MSG_RESULT($$1_CFLAGS)
1244 AC_MSG_CHECKING($1_LIBS)
1245 $1_LIBS=`$PKG_CONFIG --libs "$2"`
1246 AC_MSG_RESULT($$1_LIBS)
1250 ## If we have a custom action on failure, don't print errors, but
1251 ## do set a variable so people can do so.
1252 $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
1253 ifelse([$4], ,echo $$1_PKG_ERRORS,)
1261 if test $succeeded = yes; then
1262 ifelse([$3], , :, [$3])
1264 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])
1268 AC_DEFUN(STEPMAKE_FREETYPE2, [
1269 PKG_CHECK_MODULES(FREETYPE2, $1 >= $3, have_freetype2=yes, true)
1270 if test "$have_freetype2" = yes; then
1271 AC_DEFINE(HAVE_FREETYPE2)
1272 save_CPPFLAGS="$CPPFLAGS"
1274 CPPFLAGS="$FREETYPE2_CFLAGS $CPPFLAGS"
1275 LIBS="$FREETYPE2_LIBS $LIBS"
1276 AC_SUBST(FREETYPE2_CFLAGS)
1277 AC_SUBST(FREETYPE2_LIBS)
1278 CPPFLAGS="$save_CPPFLAGS"
1282 #r="lib$1-dev or $1-devel"
1283 r="libfreetype6-dev or freetype?-devel"
1284 ver="`pkg-config --modversion $1`"
1285 STEPMAKE_ADD_ENTRY($2, ["$r >= $3 (installed: $ver)"])
1289 AC_DEFUN(STEPMAKE_PANGO, [
1290 PKG_CHECK_MODULES(PANGO, $1 >= $3, have_pango16=yes, true)
1291 if test "$have_pango16" = yes ; then
1292 AC_DEFINE(HAVE_PANGO16)
1293 # Do not pollute user-CPPFLAGS with configure-CPPFLAGS
1294 save_CPPFLAGS="$CPPFLAGS"
1296 CPPFLAGS="$PANGO_CFLAGS $CPPFLAGS"
1297 LIBS="$PANGO_LIBS $LIBS"
1298 AC_CHECK_HEADERS([pango/pangofc-fontmap.h])
1299 AC_CHECK_FUNCS([pango_fc_font_map_add_decoder_find_func])
1300 AC_SUBST(PANGO_CFLAGS)
1301 AC_SUBST(PANGO_LIBS)
1302 CPPFLAGS="$save_CPPFLAGS"
1306 #r="lib$1-dev or $1-devel"
1307 r="libpango1.0-dev or pango1.0-devel"
1308 ver="`pkg-config --modversion $1`"
1309 STEPMAKE_ADD_ENTRY($2, ["$r >= $3 (installed: $ver)"])
1313 AC_DEFUN(STEPMAKE_PANGO_FT2, [
1314 PKG_CHECK_MODULES(PANGO_FT2, $1 >= $3, have_pangoft2=yes, true)
1315 if test "$have_pangoft2" = yes ; then
1316 AC_DEFINE(HAVE_PANGO16)
1317 AC_DEFINE(HAVE_PANGO_FT2)
1318 # Do not pollute user-CPPFLAGS with configure-CPPFLAGS
1319 save_CPPFLAGS="$CPPFLAGS"
1321 CPPFLAGS="$CPPFLAGS $PANGO_FT2_CFLAGS"
1322 LIBS="$PANGO_FT2_LIBS $LIBS"
1323 AC_CHECK_HEADERS([pango/pangoft2.h])
1324 AC_CHECK_FUNCS([pango_ft2_font_map_create_context])
1325 AC_SUBST(PANGO_FT2_CFLAGS)
1326 AC_SUBST(PANGO_FT2_LIBS)
1327 CPPFLAGS="$save_CPPFLAGS"
1331 #r="lib$1-dev or $1-devel"e
1332 r="libpango1.0-dev or pango?-devel"
1333 ver="`pkg-config --modversion $1`"
1334 STEPMAKE_ADD_ENTRY($2, ["$r >= $3 (installed: $ver)"])
1338 AC_DEFUN(STEPMAKE_FONTCONFIG, [
1339 PKG_CHECK_MODULES(FONTCONFIG, $1 >= $3, have_fontconfig=yes, true)
1340 if test "$have_fontconfig" = yes ; then
1341 AC_DEFINE(HAVE_FONTCONFIG)
1342 # Do not pollute user-CPPFLAGS with configure-CPPFLAGS
1343 save_CPPFLAGS="$CPPFLAGS"
1345 CPPFLAGS="$FONTCONFIG_CFLAGS $CPPFLAGS"
1346 LIBS="$FONTCONFIG_LIBS $LIBS"
1347 AC_SUBST(FONTCONFIG_CFLAGS)
1348 AC_SUBST(FONTCONFIG_LIBS)
1349 CPPFLAGS="$save_CPPFLAGS"
1352 r="lib$1-dev or $1-devel"
1353 ver="`pkg-config --modversion $1`"
1354 STEPMAKE_ADD_ENTRY($2, ["$r >= $3 (installed: $ver)"])
1358 AC_DEFUN(STEPMAKE_WINDOWS, [
1362 if test "$CYGWIN" = "yes"; then
1363 LN_S='cp -r' # Cygwin symbolic links do not work for native apps.
1365 INSTALL="\$(SHELL) \$(stepdir)/../bin/install-dot-exe.sh -c"
1366 elif test "$MINGW32" = "yes"; then
1370 INSTALL="\$(SHELL) \$(stepdir)/../bin/install-dot-exe.sh -c"
1376 AC_DEFINE_UNQUOTED(DIRSEP, ['${DIRSEP}'])
1377 AC_DEFINE_UNQUOTED(PATHSEP, ['${PATHSEP}'])
1380 AC_SUBST(program_suffix)
1382 AC_MSG_CHECKING([for some flavor of Windows])
1383 if test "$CYGWIN$MINGW32" = "nono"; then
1386 PLATFORM_WINDOWS=yes
1388 AC_MSG_RESULT([$PLATFORM_WINDOWS])
1389 AC_SUBST(PLATFORM_WINDOWS)
1390 STEPMAKE_PROGS(WINDRES, $target-windres windres, x)