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 \
662 $target_guile_config $host_guile_config $build_guile_config \
664 guile2-config guile-2-config guile-config-2 \
665 guile2.2-config guile-2.2-config guile-config-2.2 \
666 guile2.0-config guile-2.0-config guile-config-2.0 \
667 guile1-config guile-1-config guile-config-1 \
668 guile1.9-config guile-1.9-config guile-config-1.9 \
669 guile1.8-config guile-1.8-config guile-config-1.8; \
671 exe=`STEPMAKE_GET_EXECUTABLE($r)`
672 if ! $exe --version > /dev/null 2>&1 ; then
675 ver=`STEPMAKE_GET_VERSION($exe)`
676 num=`STEPMAKE_NUMERIC_VERSION($ver)`
677 req=`STEPMAKE_NUMERIC_VERSION($2)`
678 sup=`STEPMAKE_NUMERIC_VERSION($3)`
679 if test -n "$2" -a "$num" -lt "$req"; then
680 guile_config=["$r >= $2 (installed: $ver)"]
683 if test -n "$3" -a "$num" -ge "$sup"; then
684 guile_config=["$r < $3 (installed: $ver)"]
693 AC_MSG_RESULT([$found])
694 if test "$found" != "no"; then
695 AC_MSG_CHECKING([$guile_config version])
696 AC_MSG_RESULT([$ver])
699 STEPMAKE_ADD_ENTRY($1, "$guile_config (guile-devel, guile-dev or libguile-dev package)")
702 AC_SUBST(GUILE_CONFIG)
705 changequote(<<, >>)#dnl
706 GUILE_MAJOR_VERSION=`expr $guile_version : '\([0-9]*\)'`
707 GUILE_MINOR_VERSION=`expr $guile_version : '[0-9]*\.\([0-9]*\)'`
708 GUILE_PATCH_LEVEL=`expr $guile_version : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
709 changequote([, ])#dnl
711 save_CPPFLAGS="$CPPFLAGS"
713 CPPFLAGS="$GUILE_CFLAGS $CPPFLAGS"
714 LIBS="$GUILE_LDFLAGS $LIBS"
715 AC_CHECK_HEADERS([libguile.h])
716 AC_CHECK_LIB(guile, scm_boot_guile)
717 AC_CHECK_FUNCS(scm_boot_guile,,libguile_b=no)
718 if test "$libguile_b" = "no"; then
719 warn='libguile (libguile-dev, guile-devel or guile-dev
721 STEPMAKE_ADD_ENTRY(REQUIRED, $warn)
723 CPPFLAGS="$save_CPPFLAGS"
725 AC_DEFINE_UNQUOTED(GUILE_MAJOR_VERSION, $GUILE_MAJOR_VERSION)
726 AC_DEFINE_UNQUOTED(GUILE_MINOR_VERSION, $GUILE_MINOR_VERSION)
727 AC_DEFINE_UNQUOTED(GUILE_PATCH_LEVEL, $GUILE_PATCH_LEVEL)
731 AC_DEFUN(STEPMAKE_DLOPEN, [
732 AC_CHECK_LIB(dl, dlopen)
733 AC_CHECK_FUNCS(dlopen)
736 AC_DEFUN(STEPMAKE_HAS_CLANG, [
741 ], HAS_CLANG=yes, HAS_CLANG=no)
744 AC_DEFUN(STEPMAKE_GXX_OR_CLANG, [
746 if test "$HAS_CLANG" = "no"; then
747 if test "$GXX" = "yes"; then
748 STEPMAKE_CHECK_VERSION(CXX, $1, $2)
750 warn="$CXX (Please install *GNU* c++)"
751 STEPMAKE_ADD_ENTRY($1, $warn)
754 # no else, we're fine with any clang
758 AC_DEFUN(STEPMAKE_INIT, [
761 FULL_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL
762 MICRO_VERSION=$PATCH_LEVEL
763 TOPLEVEL_VERSION=$FULL_VERSION
764 if test x$MY_PATCH_LEVEL != x; then
765 FULL_VERSION=$FULL_VERSION.$MY_PATCH_LEVEL
767 VERSION=$FULL_VERSION
768 export MAJOR_VERSION MINOR_VERSION PATCH_LEVEL
769 # urg: don't "fix" this: irix doesn't know about [:lower:] and [:upper:]
770 changequote(<<, >>)#dnl
771 PACKAGE=`echo $PACKAGE_NAME | tr '[a-z]' '[A-Z]'`
772 package=`echo $PACKAGE_NAME | tr '[A-Z]' '[a-z]'`
773 changequote([, ])#dnl
775 # No versioning on directory names of sub-packages
777 stepmake=${datadir}/stepmake
779 if test "$prefix" = "NONE"; then
780 presome=${ac_default_prefix}
782 stepmake=`echo ${stepmake} | sed "s!\\\${prefix}!$presome!"`
784 # urg, how is this supposed to work?
785 if test "$program_prefix" = "NONE"; then
788 if test "$program_suffix" = "NONE"; then
792 AC_MSG_CHECKING(Package)
793 if test "$PACKAGE" = "STEPMAKE"; then
794 AC_MSG_RESULT(Stepmake package!)
796 AC_MSG_CHECKING(builddir)
798 ugh_ugh_autoconf250_builddir="`pwd`"
800 if test "$srcdir" = "."; then
804 package_builddir="`dirname $ugh_ugh_autoconf250_builddir`"
805 package_srcdir="`dirname $srcdir`"
807 AC_MSG_RESULT($ugh_ugh_autoconf250_builddir)
809 (cd stepmake 2>/dev/null || mkdir stepmake)
810 (cd stepmake; rm -f bin; ln -s ../$srcdir/bin .)
813 AC_MSG_RESULT($PACKAGE)
815 AC_MSG_CHECKING(builddir)
816 ugh_ugh_autoconf250_builddir="`pwd`"
818 here_dir=$(cd . && pwd)
819 full_src_dir=$(cd $srcdir && pwd)
821 if test "$full_src_dir" = "$here_dir"; then
826 AC_MSG_RESULT($ugh_ugh_autoconf250_builddir)
828 AC_MSG_CHECKING(for stepmake)
829 # Check for installed stepmake
830 if test -d $stepmake; then
831 AC_MSG_RESULT($stepmake)
833 stepmake="`cd $srcdir/stepmake; pwd`"
834 AC_MSG_RESULT([$srcdir/stepmake ($datadir/stepmake not found)])
838 AC_SUBST(ugh_ugh_autoconf250_builddir)
840 # Use absolute directory for non-srcdir builds, so that build
842 if test "$srcdir_build" = "no" ; then
843 srcdir="`cd $srcdir; pwd`"
850 AC_SUBST(PACKAGE_NAME)
852 AC_SUBST(MAJOR_VERSION)
853 AC_SUBST(MINOR_VERSION)
854 AC_SUBST(MICRO_VERSION)
856 # stepmake nonstandard names
857 AC_SUBST(PATCH_LEVEL)
858 AC_SUBST(TOPLEVEL_VERSION)
860 # We don't need the upper case variant,
861 # so stick to macros are uppercase convention.
862 # AC_DEFINE_UNQUOTED(package, ["${package}"])
863 # AC_DEFINE_UNQUOTED(PACKAGE, ["${PACKAGE}"])
864 AC_DEFINE_UNQUOTED(PACKAGE, ["${package}"])
865 AC_DEFINE_UNQUOTED(PACKAGE_NAME, ["${PACKAGE_NAME}"])
866 AC_DEFINE_UNQUOTED(TOPLEVEL_VERSION, ["${FULL_VERSION}"])
868 if test -z "$package_depth"; then
871 package_depth="../$package_depth"
874 AC_SUBST(package_depth)
876 AUTOGENERATE="This file was automatically generated by configure"
877 AC_SUBST(AUTOGENERATE)
880 AC_ARG_ENABLE(config,
881 [AS_HELP_STRING([--enable-config=CONF],
882 [put settings in config-CONF.make and config-CONF.h;
883 do `make conf=CONF' to get output in ./out-CONF])],
884 [CONFIGURATION=$enableval])
888 test -n "$CONFIGURATION" && CONFIGSUFFIX="-$CONFIGURATION"
889 CONFIGFILE=config$CONFIGSUFFIX
890 AC_SUBST(CONFIGSUFFIX)
893 STEPMAKE_PROGS(MAKE, gmake make, REQUIRED)
894 STEPMAKE_PROGS(FIND, find, REQUIRED)
896 STEPMAKE_PROGS(TAR, tar, REQUIRED)
898 if test "$(echo 2)" != "2" ||
899 test "x`uname`" = "xHP-UX"; then
900 AC_PATH_PROG(KSH, ksh, /bin/ksh)
901 AC_PATH_PROG(BASH, bash, $KSH)
902 STEPMAKE_WARN(avoiding buggy /bin/sh)
903 AC_PATH_PROG(SHELL, bash, $KSH)
906 AC_PATH_PROG(BASH, bash, $SHELL)
910 STEPMAKE_PYTHON(REQUIRED, 1.5, 3.0)
912 if expr "$MAKE" : '.*\(echo\)' >/dev/null; then
913 $MAKE -v 2> /dev/null | grep GNU > /dev/null
914 if test "$?" = 1; then
915 warn='make (Please install *GNU* make)'
916 # STEPMAKE_WARN($warn)
917 STEPMAKE_ADD_ENTRY(REQUIRED, $warn)
928 AC_SUBST(program_prefix)
929 AC_SUBST(program_suffix)
933 AC_DEFINE_UNQUOTED(DIRSEP, ['${DIRSEP}'])
934 AC_DEFINE_UNQUOTED(PATHSEP, ['${PATHSEP}'])
944 AC_DEFUN(STEPMAKE_LIB, [
945 STEPMAKE_PROGS(AR, ar, $1)
947 STEPMAKE_OPTIONAL_REQUIRED(RANLIB, ranlib, $1)
951 AC_DEFUN(STEPMAKE_LIBTOOL, [
953 # **Never** try to set library version numbers so that they correspond
954 # to the release number of your package. This is an abuse that only
955 # fosters misunderstanding of the purpose of library versions.
957 REVISION=$PATCH_LEVEL
958 # CURRENT=$MINOR_VERSION
959 CURRENT=`expr $MINOR_VERSION + 1`
960 # AGE=`expr $MAJOR_VERSION + 1`
968 AC_DEFUN(STEPMAKE_LOCALE, [
973 AC_ARG_WITH(localedir,
974 [AS_HELP_STRING([--with-localedir=DIR],
975 [location of locales. Default: PREFIX/share/locale])],
976 localedir=$with_localedir,
977 localedir='${prefix}/share/locale')
980 [AS_HELP_STRING([--with-lang=LANG],
981 [use LANG as language to emit messages])],
985 AC_MSG_CHECKING(language)
987 En* | en* | Am* | am* | US* | us*)
989 NL | nl | Du* | du* | Ned* | ned*)
998 if test "$lang" = "unknown" ; then
999 STEPMAKE_WARN($language not supported; available are: $ALL_LINGUAS)
1005 AC_DEFUN(STEPMAKE_MAKEINFO, [
1006 STEPMAKE_PROGS(MAKEINFO, makeinfo, $1)
1010 AC_DEFUN(STEPMAKE_MAN, [
1011 STEPMAKE_PROGS(GROFF, groff ditroff, $1)
1013 STEPMAKE_PROGS(TROFF, troff, $1)
1015 STEPMAKE_PROGS(TBL, tbl, $1)
1020 AC_DEFUN(STEPMAKE_MSGFMT, [
1021 STEPMAKE_PROGS(MSGFMT, msgfmt, $1)
1025 # Check for program ($2), set full path result to ($1).
1026 # If missing, add entry to missing-list ($3, one of 'OPTIONAL', 'REQUIRED')
1027 AC_DEFUN(STEPMAKE_PATH_PROG, [
1028 AC_CHECK_PROGS($1, $2, no)
1029 STEPMAKE_OPTIONAL_REQUIRED($1, $2, $3)
1030 if test $? -eq 0; then
1031 AC_PATH_PROGS($1, $2)
1032 if test -n "$4"; then
1033 STEPMAKE_CHECK_VERSION($1, $3, $4)
1039 # Check for program in set of names ($2), set result to ($1) .
1040 # If missing, add entry to missing-list ($3, one of 'OPTIONAL', 'REQUIRED')
1041 # If exists, and a minimal version ($4) is required
1042 AC_DEFUN(STEPMAKE_PROGS, [
1043 AC_CHECK_PROGS($1, $2, no)
1044 STEPMAKE_OPTIONAL_REQUIRED($1, $2, $3)
1045 if test $? -eq 0 -a -n "$4"; then
1046 STEPMAKE_CHECK_VERSION($1, $3, $4)
1051 AC_DEFUN(STEPMAKE_PERL, [
1052 STEPMAKE_PATH_PROG(PERL, perl, $1)
1056 # Check for python, between minimum ($2) and maximum version ($3).
1057 # If missing, add entry to missing-list ($1, one of 'OPTIONAL', 'REQUIRED')
1058 AC_DEFUN(STEPMAKE_PYTHON, [
1059 AC_MSG_CHECKING([for python])
1062 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
1063 exe=`STEPMAKE_GET_EXECUTABLE($r)`
1064 if ! $exe -V > /dev/null 2>&1 ; then
1067 ver=`STEPMAKE_GET_VERSION($exe)`
1068 num=`STEPMAKE_NUMERIC_VERSION($ver)`
1069 req=`STEPMAKE_NUMERIC_VERSION($2)`
1070 sup=`STEPMAKE_NUMERIC_VERSION($3)`
1071 if test -n "$2" && test "$num" -lt "$req"; then
1072 python=["$r >= $2 (installed: $ver)"]
1075 if test -n "$3" && test "$num" -ge "$sup"; then
1076 python=["$r < $3 (installed: $ver)"]
1085 AC_MSG_RESULT([$found])
1086 if test "$found" != "no"; then
1087 AC_MSG_CHECKING([$python version])
1088 AC_MSG_RESULT([$ver])
1091 STEPMAKE_ADD_ENTRY($1, $python)
1093 AC_PATH_PROG(PYTHON, $PYTHON)
1097 # Check for python-config, between minimum ($2) and maximum version ($3).
1098 # If missing, add entry to missing-list ($1, one of 'OPTIONAL', 'REQUIRED')
1099 AC_DEFUN(STEPMAKE_PYTHON_DEVEL, [
1100 AC_ARG_WITH(python-include,
1101 [AS_HELP_STRING([--with-python-include=DIR],
1102 [location of the python include dir])],[
1103 if test "$withval" = "yes" -o "$withval" = "no"; then
1104 AC_MSG_WARN(Usage: --with-python-include=includedir)
1106 PYTHON_CFLAGS="-I${withval}"
1110 AC_ARG_WITH(python-lib,
1111 [AS_HELP_STRING([--with-python-lib=NAME],
1112 [name of the python lib])],[
1113 if test "$withval" = "yes" -o "$withval" = "no"; then
1114 AC_MSG_WARN(Usage: --with-python-lib=name)
1116 LDFLAGS="$LDFLAGS -l${withval}"
1120 STEPMAKE_PYTHON($1, $2, $3)
1121 AC_CHECK_PROGS(PYTHON_CONFIG, `basename $PYTHON`-config, no)
1123 if test -z "$PYTHON_CFLAGS" -a "$PYTHON_CONFIG" != "no"; then
1124 # Clean out junk: http://bugs.python.org/issue3290
1125 # Python headers may need some -f* flags, leave them in.
1126 # We want the sed commands to look like 's/-[WDOm][[:alnum:][:punct:]][[:alnum:][:punct:]]*//g' and 's/-arch [^[:space:]]*//g', but automake eats brackets.
1127 #PYTHON_CFLAGS=`$PYTHON_CONFIG --cflags | sed -e 's/-[[WDOm]][[[:alnum:][:punct:]]][[[:alnum:][:punct:]]]*//g' | sed -e 's/-arch @<:@^@<:@:space:@:>@@:>@*//g'`
1128 # The above sed BRE matches parts of legal options, stipping down part of that option, resulting in invalid gcc arguments. Gentoo Bug #415793
1129 # For instance, '-floop-stip-mime' becomes '-floop-strip', and '-fvect-cost-model' becomes '-fvect-cost'.
1130 # 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.
1131 PYTHON_CFLAGS=`$PYTHON_CONFIG --cflags | sed -e 's/\(^\|[[^[:alnum:]]]\)-[[WDOm]][[[:alnum:][:punct:]]][[[:alnum:][:punct:]]]*//g' | sed -e 's/-arch @<:@^@<:@:space:@:>@@:>@*//g'`
1132 PYTHON_LDFLAGS=`$PYTHON_CONFIG --ldflags`
1135 if test -z "$PYTHON_CFLAGS" -a "$cross_compiling" = "no"; then
1136 changequote(<<, >>)#dnl
1137 # alternatively, for python >= 2.0
1138 # 'import sys, distutils.sysconfig; sys.stdout.write (distutils.sysconfig.get_python_inc ())'
1139 PYTHON_INCLUDE=`$PYTHON -c 'import sys; sys.stdout.write ("%s/include/python%s" % (sys.prefix, sys.version[:3]))'`
1140 PYTHON_CFLAGS="-I$PYTHON_INCLUDE"
1141 changequote([, ])#dnl
1144 if test -z "$PYTHON_HEADER"; then
1145 CPPFLAGS="$PYTHON_CFLAGS $CPPFLAGS"
1146 AC_CHECK_HEADERS([Python.h],[PYTHON_HEADER=yes])
1149 if test -z "$PYTHON_HEADER"; then
1150 warn="Python.h (python-devel, python-dev or libpython-dev package)"
1151 STEPMAKE_ADD_ENTRY($1, $warn)
1153 AC_SUBST(PYTHON_CFLAGS)
1154 AC_SUBST(PYTHON_LDFLAGS)
1159 AC_DEFUN(STEPMAKE_STL_DATA_METHOD, [
1160 AC_CACHE_CHECK([for stl.data () method],
1161 [stepmake_cv_stl_data_method],
1162 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1164 using namespace std;
1166 void *p = v.data ();
1168 [stepmake_cv_stl_data_method=yes],
1169 [stepmake_cv_stl_data_method=no]))
1170 if test $stepmake_cv_stl_data_method = yes; then
1171 AC_DEFINE(HAVE_STL_DATA_METHOD, 1, [define if stl classes have data () method])
1176 AC_DEFUN(STEPMAKE_TEXMF_DIRS, [
1177 STEPMAKE_PROGS(KPSEWHICH, kpsewhich, $1)
1179 AC_MSG_CHECKING(for metapost required files)
1180 if test "$MFPLAIN_MP" = ""; then
1181 MFPLAIN_MP=`kpsewhich -format=mp mfplain`
1183 if test "$MFPLAIN_MP" = ""; then
1185 STEPMAKE_ADD_ENTRY($1,['metapost CTAN package (texlive-metapost)'])
1191 AC_DEFUN(STEPMAKE_TEXMF, [
1192 STEPMAKE_PROGS(METAFONT, mf-nowin mf mfw mfont, $1)
1193 STEPMAKE_PROGS(METAPOST, mpost, $1)
1194 if test "$METAPOST" != ""; then
1195 ver=`STEPMAKE_GET_VERSION($METAPOST)`
1196 num=`STEPMAKE_NUMERIC_VERSION($ver)`
1197 # Avoid buggy metapost versions: 1.600 <= x < 1.803
1198 if test "$num" -ge "1600000" -a "$num" -lt "1803000"; then
1199 STEPMAKE_ADD_ENTRY($1, ["mpost (due to a bug in metapost, versions 1.600 <= x < 1.803 are not supported; installed: $ver)"])
1203 AC_MSG_CHECKING(for working metafont mode)
1204 modelist='ljfour lj4 lj3 lj2 ljet laserjet'
1205 for MFMODE in $modelist; do
1206 $METAFONT -progname=mf "\mode:=$MFMODE; mode_setup; end." > /dev/null 2>&1
1207 if test -f mfput.tfm; then
1211 AC_MSG_RESULT($MFMODE)
1219 AC_DEFUN(STEPMAKE_WARN, [
1225 dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
1226 dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
1227 dnl also defines GSTUFF_PKG_ERRORS on error
1228 AC_DEFUN(PKG_CHECK_MODULES, [
1231 if test -z "$PKG_CONFIG"; then
1232 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
1235 if test "$PKG_CONFIG" = "no" ; then
1236 echo "*** The pkg-config script could not be found. Make sure it is"
1237 echo "*** in your path, or set the PKG_CONFIG environment variable"
1238 echo "*** to the full path to pkg-config."
1239 echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
1241 PKG_CONFIG_MIN_VERSION=0.9.0
1242 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
1243 AC_MSG_CHECKING(for $2)
1245 if $PKG_CONFIG --exists "$2" ; then
1249 AC_MSG_CHECKING($1_CFLAGS)
1250 $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
1251 AC_MSG_RESULT($$1_CFLAGS)
1253 AC_MSG_CHECKING($1_LIBS)
1254 $1_LIBS=`$PKG_CONFIG --libs "$2"`
1255 AC_MSG_RESULT($$1_LIBS)
1259 ## If we have a custom action on failure, don't print errors, but
1260 ## do set a variable so people can do so.
1261 $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
1262 ifelse([$4], ,echo $$1_PKG_ERRORS,)
1270 if test $succeeded = yes; then
1271 ifelse([$3], , :, [$3])
1273 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])
1277 AC_DEFUN(STEPMAKE_FREETYPE2, [
1278 PKG_CHECK_MODULES(FREETYPE2, $1 >= $3, have_freetype2=yes, true)
1279 if test "$have_freetype2" = yes; then
1280 AC_DEFINE(HAVE_FREETYPE2)
1281 save_CPPFLAGS="$CPPFLAGS"
1283 CPPFLAGS="$FREETYPE2_CFLAGS $CPPFLAGS"
1284 LIBS="$FREETYPE2_LIBS $LIBS"
1285 AC_SUBST(FREETYPE2_CFLAGS)
1286 AC_SUBST(FREETYPE2_LIBS)
1287 CPPFLAGS="$save_CPPFLAGS"
1291 #r="lib$1-dev or $1-devel"
1292 r="libfreetype6-dev or freetype?-devel"
1293 ver="`pkg-config --modversion $1`"
1294 STEPMAKE_ADD_ENTRY($2, ["$r >= $3 (installed: $ver)"])
1298 AC_DEFUN(STEPMAKE_PANGO, [
1299 PKG_CHECK_MODULES(PANGO, $1 >= $3, have_pango16=yes, true)
1300 if test "$have_pango16" = yes ; then
1301 AC_DEFINE(HAVE_PANGO16)
1302 # Do not pollute user-CPPFLAGS with configure-CPPFLAGS
1303 save_CPPFLAGS="$CPPFLAGS"
1305 CPPFLAGS="$PANGO_CFLAGS $CPPFLAGS"
1306 LIBS="$PANGO_LIBS $LIBS"
1307 AC_CHECK_HEADERS([pango/pangofc-fontmap.h])
1308 AC_CHECK_FUNCS([pango_fc_font_map_add_decoder_find_func])
1309 AC_SUBST(PANGO_CFLAGS)
1310 AC_SUBST(PANGO_LIBS)
1311 CPPFLAGS="$save_CPPFLAGS"
1315 #r="lib$1-dev or $1-devel"
1316 r="libpango1.0-dev or pango1.0-devel"
1317 ver="`pkg-config --modversion $1`"
1318 STEPMAKE_ADD_ENTRY($2, ["$r >= $3 (installed: $ver)"])
1322 AC_DEFUN(STEPMAKE_PANGO_FT2, [
1323 PKG_CHECK_MODULES(PANGO_FT2, $1 >= $3, have_pangoft2=yes, true)
1324 if test "$have_pangoft2" = yes ; then
1325 AC_DEFINE(HAVE_PANGO16)
1326 AC_DEFINE(HAVE_PANGO_FT2)
1327 # Do not pollute user-CPPFLAGS with configure-CPPFLAGS
1328 save_CPPFLAGS="$CPPFLAGS"
1330 CPPFLAGS="$CPPFLAGS $PANGO_FT2_CFLAGS"
1331 LIBS="$PANGO_FT2_LIBS $LIBS"
1332 AC_CHECK_HEADERS([pango/pangoft2.h])
1333 AC_CHECK_FUNCS([pango_ft2_font_map_create_context])
1334 AC_SUBST(PANGO_FT2_CFLAGS)
1335 AC_SUBST(PANGO_FT2_LIBS)
1336 CPPFLAGS="$save_CPPFLAGS"
1340 #r="lib$1-dev or $1-devel"e
1341 r="libpango1.0-dev or pango?-devel"
1342 ver="`pkg-config --modversion $1`"
1343 STEPMAKE_ADD_ENTRY($2, ["$r >= $3 (installed: $ver)"])
1347 AC_DEFUN(STEPMAKE_PANGO_FT2_WITH_OTF_FEATURE, [
1348 PKG_CHECK_MODULES(PANGO_FT2, $1 >= $3,
1349 have_pangoft2_with_otf_feature=yes, true)
1350 if test "$have_pangoft2_with_otf_feature" = yes ; then
1351 AC_DEFINE(HAVE_PANGO16)
1352 AC_DEFINE(HAVE_PANGO_FT2)
1353 AC_DEFINE(HAVE_PANGO_FT2_WITH_OTF_FEATURE)
1354 # Do not pollute user-CPPFLAGS with configure-CPPFLAGS
1355 save_CPPFLAGS="$CPPFLAGS"
1357 CPPFLAGS="$CPPFLAGS $PANGO_FT2_CFLAGS"
1358 LIBS="$PANGO_FT2_LIBS $LIBS"
1359 AC_CHECK_HEADERS([pango/pangoft2.h])
1360 AC_CHECK_FUNCS([pango_ft2_font_map_create_context])
1361 AC_SUBST(PANGO_FT2_CFLAGS)
1362 AC_SUBST(PANGO_FT2_LIBS)
1363 CPPFLAGS="$save_CPPFLAGS"
1367 #r="lib$1-dev or $1-devel"e
1368 r="libpango1.0-dev or pango?-devel"
1369 ver="`pkg-config --modversion $1`"
1370 STEPMAKE_ADD_ENTRY($2, ["$r >= $3 (It is required if you'd like "])
1371 STEPMAKE_ADD_ENTRY($2, ["to use OpenType font feature. "])
1372 STEPMAKE_ADD_ENTRY($2, ["installed: $ver)"])
1376 AC_DEFUN(STEPMAKE_FONTCONFIG, [
1377 PKG_CHECK_MODULES(FONTCONFIG, $1 >= $3, have_fontconfig=yes, true)
1378 if test "$have_fontconfig" = yes ; then
1379 AC_DEFINE(HAVE_FONTCONFIG)
1380 # Do not pollute user-CPPFLAGS with configure-CPPFLAGS
1381 save_CPPFLAGS="$CPPFLAGS"
1383 CPPFLAGS="$FONTCONFIG_CFLAGS $CPPFLAGS"
1384 LIBS="$FONTCONFIG_LIBS $LIBS"
1385 AC_SUBST(FONTCONFIG_CFLAGS)
1386 AC_SUBST(FONTCONFIG_LIBS)
1387 CPPFLAGS="$save_CPPFLAGS"
1390 r="lib$1-dev or $1-devel"
1391 ver="`pkg-config --modversion $1`"
1392 STEPMAKE_ADD_ENTRY($2, ["$r >= $3 (installed: $ver)"])
1396 AC_DEFUN(STEPMAKE_WINDOWS, [
1400 if test "$CYGWIN" = "yes"; then
1401 LN_S='cp -r' # Cygwin symbolic links do not work for native apps.
1403 INSTALL="\$(SHELL) \$(stepdir)/../bin/install-dot-exe.sh -c"
1404 elif test "$MINGW32" = "yes"; then
1408 INSTALL="\$(SHELL) \$(stepdir)/../bin/install-dot-exe.sh -c"
1414 AC_DEFINE_UNQUOTED(DIRSEP, ['${DIRSEP}'])
1415 AC_DEFINE_UNQUOTED(PATHSEP, ['${PATHSEP}'])
1418 AC_SUBST(program_suffix)
1420 AC_MSG_CHECKING([for some flavor of Windows])
1421 if test "$CYGWIN$MINGW32" = "nono"; then
1424 PLATFORM_WINDOWS=yes
1426 AC_MSG_RESULT([$PLATFORM_WINDOWS])
1427 AC_SUBST(PLATFORM_WINDOWS)
1428 STEPMAKE_PROGS(WINDRES, $target-windres windres, x)