summaryrefslogtreecommitdiff
path: root/app/xdriinfo
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2007-04-05 20:47:09 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2007-04-05 20:47:09 +0000
commit4bbcdc802140588a6c541a79abdcbf23b9035f49 (patch)
tree2a9b433a60e67d7ff4afda23bb38cb42c5f5b9d6 /app/xdriinfo
parent0f802343683af28230b59c6f06ba5fdfcbf92bad (diff)
regen
Diffstat (limited to 'app/xdriinfo')
-rw-r--r--app/xdriinfo/Makefile.in5
-rw-r--r--app/xdriinfo/aclocal.m448
-rw-r--r--app/xdriinfo/configure61
3 files changed, 83 insertions, 31 deletions
diff --git a/app/xdriinfo/Makefile.in b/app/xdriinfo/Makefile.in
index ce6ae5da5..e8f2f6c19 100644
--- a/app/xdriinfo/Makefile.in
+++ b/app/xdriinfo/Makefile.in
@@ -77,8 +77,7 @@ binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS)
am_xdriinfo_OBJECTS = xdriinfo-xdriinfo.$(OBJEXT)
xdriinfo_OBJECTS = $(am_xdriinfo_OBJECTS)
-am__DEPENDENCIES_1 =
-xdriinfo_DEPENDENCIES = $(am__DEPENDENCIES_1)
+xdriinfo_LDADD = $(LDADD)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
@@ -206,8 +205,6 @@ sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
xdriinfo_CFLAGS = $(XDRIINFO_CFLAGS)
-# mesa should really use pkg-config ...
-xdriinfo_LDADD = $(XDRIINFO_LIBS)
xdriinfo_SOURCES = \
xdriinfo.c
diff --git a/app/xdriinfo/aclocal.m4 b/app/xdriinfo/aclocal.m4
index b0c8b891b..b511cb709 100644
--- a/app/xdriinfo/aclocal.m4
+++ b/app/xdriinfo/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])
diff --git a/app/xdriinfo/configure b/app/xdriinfo/configure
index f8b60d28e..f3a309bb3 100644
--- a/app/xdriinfo/configure
+++ b/app/xdriinfo/configure
@@ -3128,6 +3128,9 @@ echo "$as_me:$LINENO: checking for XDRIINFO" >&5
echo $ECHO_N "checking for XDRIINFO... $ECHO_C" >&6
if test -n "$PKG_CONFIG"; then
+ if test -n "$XDRIINFO_CFLAGS"; then
+ pkg_cv_XDRIINFO_CFLAGS="$XDRIINFO_CFLAGS"
+ else
if test -n "$PKG_CONFIG" && \
{ (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xext x11 glproto\"") >&5
($PKG_CONFIG --exists --print-errors "xext x11 glproto") 2>&5
@@ -3138,10 +3141,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 "$XDRIINFO_LIBS"; then
+ pkg_cv_XDRIINFO_LIBS="$XDRIINFO_LIBS"
+ else
if test -n "$PKG_CONFIG" && \
{ (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xext x11 glproto\"") >&5
($PKG_CONFIG --exists --print-errors "xext x11 glproto") 2>&5
@@ -3152,38 +3159,59 @@ if test -n "$PKG_CONFIG"; then
else
pkg_failed=yes
fi
+ fi
else
pkg_failed=untried
fi
+
+
if test $pkg_failed = yes; then
- XDRIINFO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xext x11 glproto"`
+
+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
+ XDRIINFO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xext x11 glproto"`
+ else
+ XDRIINFO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xext x11 glproto"`
+ fi
# Put the nasty error message in config.log where it belongs
- echo "$XDRIINFO_PKG_ERRORS" 1>&5
+ echo "$XDRIINFO_PKG_ERRORS" >&5
+
+ { { echo "$as_me:$LINENO: error: Package requirements (xext x11 glproto) were not met:
+
+$XDRIINFO_PKG_ERRORS
- { { echo "$as_me:$LINENO: error: Package requirements (xext x11 glproto) 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 XDRIINFO_CFLAGS and XDRIINFO_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 (xext x11 glproto) were not met.
+Alternatively, you may set the environment variables XDRIINFO_CFLAGS
+and XDRIINFO_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 (xext x11 glproto) were not met:
+
+$XDRIINFO_PKG_ERRORS
+
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
-Alternatively you may set the XDRIINFO_CFLAGS and XDRIINFO_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 XDRIINFO_CFLAGS
+and XDRIINFO_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 XDRIINFO_CFLAGS and XDRIINFO_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 XDRIINFO_CFLAGS
+and XDRIINFO_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
@@ -3191,9 +3219,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 XDRIINFO_CFLAGS and XDRIINFO_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 XDRIINFO_CFLAGS
+and XDRIINFO_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;}
@@ -3346,6 +3374,7 @@ See \`config.log' for more details." >&2;}
fi
+LIBS="$LIBS $XDRIINFO_LIBS"
# Make sure we can run config.sub.
$ac_config_sub sun4 >/dev/null 2>&1 ||