summaryrefslogtreecommitdiff
path: root/app/mkfontscale
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2007-05-10 21:38:26 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2007-05-10 21:38:26 +0000
commiteadcf769ff8c67af6ac67203672f6ee2e52d4f76 (patch)
treeff1293da60eee79372700722abcfd5e0f827cbbf /app/mkfontscale
parentbd73ebe2831aee16a37fb594df5642458396a711 (diff)
regen
Diffstat (limited to 'app/mkfontscale')
-rw-r--r--app/mkfontscale/aclocal.m483
-rw-r--r--app/mkfontscale/configure171
2 files changed, 211 insertions, 43 deletions
diff --git a/app/mkfontscale/aclocal.m4 b/app/mkfontscale/aclocal.m4
index 89a893bec..b511cb709 100644
--- a/app/mkfontscale/aclocal.m4
+++ b/app/mkfontscale/aclocal.m4
@@ -44,7 +44,7 @@ if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
fi
if test -n "$PKG_CONFIG"; then
- _pkg_min_version=m4_ifval([$1], [$1], [0.9.0])
+ _pkg_min_version=m4_default([$1], [0.9.0])
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
AC_MSG_RESULT([yes])
@@ -80,14 +80,30 @@ fi])
# ---------------------------------------------
m4_define([_PKG_CONFIG],
[if test -n "$PKG_CONFIG"; then
+ if test -n "$$1"; then
+ pkg_cv_[]$1="$$1"
+ else
PKG_CHECK_EXISTS([$3],
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
[pkg_failed=yes])
+ fi
else
pkg_failed=untried
fi[]dnl
])# _PKG_CONFIG
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
+
+
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
# [ACTION-IF-NOT-FOUND])
#
@@ -109,29 +125,39 @@ AC_MSG_CHECKING([for $1])
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
if test $pkg_failed = yes; then
- $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
+ _PKG_SHORT_ERRORS_SUPPORTED
+ if test $_pkg_short_errors_supported = yes; then
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
+ else
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
+ fi
# Put the nasty error message in config.log where it belongs
- echo "$$1[]_PKG_ERRORS" 1>&AS_MESSAGE_LOG_FD
+ echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
ifelse([$4], , [AC_MSG_ERROR(dnl
-[Package requirements ($2) were not met.
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
-Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables
-to avoid the need to call pkg-config. See the pkg-config man page for
-more details.])],
- [$4])
+_PKG_TEXT
+])],
+ [AC_MSG_RESULT([no])
+ $4])
elif test $pkg_failed = untried; then
ifelse([$4], , [AC_MSG_FAILURE(dnl
[The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
-Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables
-to avoid the need to call pkg-config. See the pkg-config man page for
-more details.
+_PKG_TEXT
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
[$4])
@@ -860,6 +886,41 @@ AC_DEFUN([_AM_IF_OPTION],
# ---------------
AC_DEFUN([AM_SANITY_CHECK],
[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
AC_MSG_RESULT(yes)])
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
diff --git a/app/mkfontscale/configure b/app/mkfontscale/configure
index 71aae2fe9..2d57828a3 100644
--- a/app/mkfontscale/configure
+++ b/app/mkfontscale/configure
@@ -1413,6 +1413,47 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo "$as_me:$LINENO: checking whether build environment is sane" >&5
echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+ { (exit 1); exit 1; }; }
+fi
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
test "$program_prefix" != NONE &&
@@ -2994,6 +3035,7 @@ echo "$as_me: error: zlib is required, but was not found." >&2;}
fi
+
# Checks for pkg-config packages
@@ -3106,6 +3148,9 @@ echo "$as_me:$LINENO: checking for MKFONTSCALE" >&5
echo $ECHO_N "checking for MKFONTSCALE... $ECHO_C" >&6
if test -n "$PKG_CONFIG"; then
+ if test -n "$MKFONTSCALE_CFLAGS"; then
+ pkg_cv_MKFONTSCALE_CFLAGS="$MKFONTSCALE_CFLAGS"
+ else
if test -n "$PKG_CONFIG" && \
{ (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"fontenc freetype2\"") >&5
($PKG_CONFIG --exists --print-errors "fontenc freetype2") 2>&5
@@ -3116,10 +3161,14 @@ if test -n "$PKG_CONFIG"; then
else
pkg_failed=yes
fi
+ fi
else
pkg_failed=untried
fi
if test -n "$PKG_CONFIG"; then
+ if test -n "$MKFONTSCALE_LIBS"; then
+ pkg_cv_MKFONTSCALE_LIBS="$MKFONTSCALE_LIBS"
+ else
if test -n "$PKG_CONFIG" && \
{ (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"fontenc freetype2\"") >&5
($PKG_CONFIG --exists --print-errors "fontenc freetype2") 2>&5
@@ -3130,38 +3179,59 @@ if test -n "$PKG_CONFIG"; then
else
pkg_failed=yes
fi
+ fi
else
pkg_failed=untried
fi
+
+
if test $pkg_failed = yes; then
- MKFONTSCALE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontenc freetype2"`
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ MKFONTSCALE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "fontenc freetype2"`
+ else
+ MKFONTSCALE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontenc freetype2"`
+ fi
# Put the nasty error message in config.log where it belongs
- echo "$MKFONTSCALE_PKG_ERRORS" 1>&5
+ echo "$MKFONTSCALE_PKG_ERRORS" >&5
+
+ { { echo "$as_me:$LINENO: error: Package requirements (fontenc freetype2) were not met:
+
+$MKFONTSCALE_PKG_ERRORS
- { { echo "$as_me:$LINENO: error: Package requirements (fontenc freetype2) were not met.
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
-Alternatively you may set the MKFONTSCALE_CFLAGS and MKFONTSCALE_LIBS environment variables
-to avoid the need to call pkg-config. See the pkg-config man page for
-more details." >&5
-echo "$as_me: error: Package requirements (fontenc freetype2) were not met.
+Alternatively, you may set the environment variables MKFONTSCALE_CFLAGS
+and MKFONTSCALE_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&5
+echo "$as_me: error: Package requirements (fontenc freetype2) were not met:
+
+$MKFONTSCALE_PKG_ERRORS
+
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
-Alternatively you may set the MKFONTSCALE_CFLAGS and MKFONTSCALE_LIBS environment variables
-to avoid the need to call pkg-config. See the pkg-config man page for
-more details." >&2;}
+Alternatively, you may set the environment variables MKFONTSCALE_CFLAGS
+and MKFONTSCALE_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&2;}
{ (exit 1); exit 1; }; }
elif test $pkg_failed = untried; then
{ { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
-Alternatively you may set the MKFONTSCALE_CFLAGS and MKFONTSCALE_LIBS environment variables
-to avoid the need to call pkg-config. See the pkg-config man page for
-more details.
+Alternatively, you may set the environment variables MKFONTSCALE_CFLAGS
+and MKFONTSCALE_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
See \`config.log' for more details." >&5
@@ -3169,9 +3239,9 @@ echo "$as_me: error: The pkg-config script could not be found or is too old. Ma
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
-Alternatively you may set the MKFONTSCALE_CFLAGS and MKFONTSCALE_LIBS environment variables
-to avoid the need to call pkg-config. See the pkg-config man page for
-more details.
+Alternatively, you may set the environment variables MKFONTSCALE_CFLAGS
+and MKFONTSCALE_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
See \`config.log' for more details." >&2;}
@@ -3187,11 +3257,15 @@ fi
+
pkg_failed=no
echo "$as_me:$LINENO: checking for X11" >&5
echo $ECHO_N "checking for X11... $ECHO_C" >&6
if test -n "$PKG_CONFIG"; then
+ if test -n "$X11_CFLAGS"; then
+ pkg_cv_X11_CFLAGS="$X11_CFLAGS"
+ else
if test -n "$PKG_CONFIG" && \
{ (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xproto\"") >&5
($PKG_CONFIG --exists --print-errors "xproto") 2>&5
@@ -3202,10 +3276,14 @@ if test -n "$PKG_CONFIG"; then
else
pkg_failed=yes
fi
+ fi
else
pkg_failed=untried
fi
if test -n "$PKG_CONFIG"; then
+ if test -n "$X11_LIBS"; then
+ pkg_cv_X11_LIBS="$X11_LIBS"
+ else
if test -n "$PKG_CONFIG" && \
{ (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xproto\"") >&5
($PKG_CONFIG --exists --print-errors "xproto") 2>&5
@@ -3216,38 +3294,59 @@ if test -n "$PKG_CONFIG"; then
else
pkg_failed=yes
fi
+ fi
else
pkg_failed=untried
fi
+
+
if test $pkg_failed = yes; then
- X11_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xproto"`
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ X11_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xproto"`
+ else
+ X11_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xproto"`
+ fi
# Put the nasty error message in config.log where it belongs
- echo "$X11_PKG_ERRORS" 1>&5
+ echo "$X11_PKG_ERRORS" >&5
+
+ { { echo "$as_me:$LINENO: error: Package requirements (xproto) were not met:
+
+$X11_PKG_ERRORS
- { { echo "$as_me:$LINENO: error: Package requirements (xproto) were not met.
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
-Alternatively you may set the X11_CFLAGS and X11_LIBS environment variables
-to avoid the need to call pkg-config. See the pkg-config man page for
-more details." >&5
-echo "$as_me: error: Package requirements (xproto) were not met.
+Alternatively, you may set the environment variables X11_CFLAGS
+and X11_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&5
+echo "$as_me: error: Package requirements (xproto) were not met:
+
+$X11_PKG_ERRORS
+
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
-Alternatively you may set the X11_CFLAGS and X11_LIBS environment variables
-to avoid the need to call pkg-config. See the pkg-config man page for
-more details." >&2;}
+Alternatively, you may set the environment variables X11_CFLAGS
+and X11_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&2;}
{ (exit 1); exit 1; }; }
elif test $pkg_failed = untried; then
{ { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
-Alternatively you may set the X11_CFLAGS and X11_LIBS environment variables
-to avoid the need to call pkg-config. See the pkg-config man page for
-more details.
+Alternatively, you may set the environment variables X11_CFLAGS
+and X11_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
See \`config.log' for more details." >&5
@@ -3255,9 +3354,9 @@ echo "$as_me: error: The pkg-config script could not be found or is too old. Ma
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
-Alternatively you may set the X11_CFLAGS and X11_LIBS environment variables
-to avoid the need to call pkg-config. See the pkg-config man page for
-more details.
+Alternatively, you may set the environment variables X11_CFLAGS
+and X11_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
See \`config.log' for more details." >&2;}
@@ -3436,6 +3535,14 @@ _ACEOF
+if test $host_cpu = sh; then
+ case $host_os in
+ openbsd*)
+ CFLAGS="-O0 -pipe"
+ ;;
+ esac
+fi
+
ac_config_files="$ac_config_files Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure