diff options
167 files changed, 15569 insertions, 2793 deletions
diff --git a/app/appres/aclocal.m4 b/app/appres/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/appres/aclocal.m4 +++ b/app/appres/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/appres/configure b/app/appres/configure index f889e38cf..e83dc320c 100644 --- a/app/appres/configure +++ b/app/appres/configure @@ -1402,6 +1402,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 && @@ -3015,6 +3056,9 @@ echo "$as_me:$LINENO: checking for APPRES" >&5 echo $ECHO_N "checking for APPRES... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$APPRES_CFLAGS"; then + pkg_cv_APPRES_CFLAGS="$APPRES_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xt\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xt") 2>&5 @@ -3025,10 +3069,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 "$APPRES_LIBS"; then + pkg_cv_APPRES_LIBS="$APPRES_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xt\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xt") 2>&5 @@ -3039,38 +3087,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - APPRES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xt"` + +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 + APPRES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 xt"` + else + APPRES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xt"` + fi # Put the nasty error message in config.log where it belongs - echo "$APPRES_PKG_ERRORS" 1>&5 + echo "$APPRES_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11 xt) were not met: + +$APPRES_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11 xt) 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 APPRES_CFLAGS and APPRES_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 (x11 xt) were not met. +Alternatively, you may set the environment variables APPRES_CFLAGS +and APPRES_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 (x11 xt) were not met: + +$APPRES_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the APPRES_CFLAGS and APPRES_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 APPRES_CFLAGS +and APPRES_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 APPRES_CFLAGS and APPRES_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 APPRES_CFLAGS +and APPRES_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 @@ -3078,9 +3147,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 APPRES_CFLAGS and APPRES_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 APPRES_CFLAGS +and APPRES_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;} diff --git a/app/bdftopcf/Makefile.in b/app/bdftopcf/Makefile.in index 1e5444aaf..e72bd315e 100644 --- a/app/bdftopcf/Makefile.in +++ b/app/bdftopcf/Makefile.in @@ -62,8 +62,7 @@ bin_PROGRAMS = bdftopcf$(EXEEXT) DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ - compile config.guess config.sub depcomp install-sh missing \ - mkinstalldirs + compile config.guess config.sub depcomp install-sh missing subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac @@ -71,7 +70,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno configure.status.lineno -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(SHELL) $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" diff --git a/app/beforelight/aclocal.m4 b/app/beforelight/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/beforelight/aclocal.m4 +++ b/app/beforelight/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/beforelight/configure b/app/beforelight/configure index ee5076b1e..d8c3e229e 100644 --- a/app/beforelight/configure +++ b/app/beforelight/configure @@ -1415,6 +1415,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 && @@ -3028,6 +3069,9 @@ echo "$as_me:$LINENO: checking for BEFORELIGHT" >&5 echo $ECHO_N "checking for BEFORELIGHT... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$BEFORELIGHT_CFLAGS"; then + pkg_cv_BEFORELIGHT_CFLAGS="$BEFORELIGHT_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xscrnsaver xt xaw7\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xscrnsaver xt xaw7") 2>&5 @@ -3038,10 +3082,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 "$BEFORELIGHT_LIBS"; then + pkg_cv_BEFORELIGHT_LIBS="$BEFORELIGHT_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xscrnsaver xt xaw7\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xscrnsaver xt xaw7") 2>&5 @@ -3052,38 +3100,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - BEFORELIGHT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xscrnsaver xt xaw7"` + +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 + BEFORELIGHT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 xscrnsaver xt xaw7"` + else + BEFORELIGHT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xscrnsaver xt xaw7"` + fi # Put the nasty error message in config.log where it belongs - echo "$BEFORELIGHT_PKG_ERRORS" 1>&5 + echo "$BEFORELIGHT_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11 xscrnsaver xt xaw7) were not met: + +$BEFORELIGHT_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11 xscrnsaver xt xaw7) 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 BEFORELIGHT_CFLAGS and BEFORELIGHT_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 (x11 xscrnsaver xt xaw7) were not met. +Alternatively, you may set the environment variables BEFORELIGHT_CFLAGS +and BEFORELIGHT_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 (x11 xscrnsaver xt xaw7) were not met: + +$BEFORELIGHT_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the BEFORELIGHT_CFLAGS and BEFORELIGHT_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 BEFORELIGHT_CFLAGS +and BEFORELIGHT_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 BEFORELIGHT_CFLAGS and BEFORELIGHT_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 BEFORELIGHT_CFLAGS +and BEFORELIGHT_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 @@ -3091,9 +3160,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 BEFORELIGHT_CFLAGS and BEFORELIGHT_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 BEFORELIGHT_CFLAGS +and BEFORELIGHT_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;} @@ -3114,6 +3183,9 @@ echo "$as_me:$LINENO: checking for APPDEFS" >&5 echo $ECHO_N "checking for APPDEFS... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$APPDEFS_CFLAGS"; then + pkg_cv_APPDEFS_CFLAGS="$APPDEFS_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3124,10 +3196,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 "$APPDEFS_LIBS"; then + pkg_cv_APPDEFS_LIBS="$APPDEFS_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3138,38 +3214,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + +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 + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xt"` + else + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + fi # Put the nasty error message in config.log where it belongs - echo "$APPDEFS_PKG_ERRORS" 1>&5 + echo "$APPDEFS_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xt) were not met: + +$APPDEFS_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xt) 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 APPDEFS_CFLAGS and APPDEFS_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 (xt) were not met. +Alternatively, you may set the environment variables APPDEFS_CFLAGS +and APPDEFS_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 (xt) were not met: + +$APPDEFS_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 @@ -3177,9 +3274,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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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;} diff --git a/app/bitmap/aclocal.m4 b/app/bitmap/aclocal.m4 index cf4de4f63..d8c0aaaab 100644 --- a/app/bitmap/aclocal.m4 +++ b/app/bitmap/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/bitmap/configure b/app/bitmap/configure index cf4beabe2..75fbd0bbf 100644 --- a/app/bitmap/configure +++ b/app/bitmap/configure @@ -1450,6 +1450,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 && @@ -3163,6 +3204,9 @@ echo "$as_me:$LINENO: checking for BMTOA" >&5 echo $ECHO_N "checking for BMTOA... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$BMTOA_CFLAGS"; then + pkg_cv_BMTOA_CFLAGS="$BMTOA_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xmu\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xmu") 2>&5 @@ -3173,10 +3217,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 "$BMTOA_LIBS"; then + pkg_cv_BMTOA_LIBS="$BMTOA_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xmu\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xmu") 2>&5 @@ -3187,38 +3235,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - BMTOA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xmu"` + +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 + BMTOA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 xmu"` + else + BMTOA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xmu"` + fi # Put the nasty error message in config.log where it belongs - echo "$BMTOA_PKG_ERRORS" 1>&5 + echo "$BMTOA_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11 xmu) were not met: + +$BMTOA_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11 xmu) 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 BMTOA_CFLAGS and BMTOA_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 (x11 xmu) were not met. +Alternatively, you may set the environment variables BMTOA_CFLAGS +and BMTOA_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 (x11 xmu) were not met: + +$BMTOA_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the BMTOA_CFLAGS and BMTOA_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 BMTOA_CFLAGS +and BMTOA_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 BMTOA_CFLAGS and BMTOA_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 BMTOA_CFLAGS +and BMTOA_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 @@ -3226,9 +3295,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 BMTOA_CFLAGS and BMTOA_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 BMTOA_CFLAGS +and BMTOA_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;} @@ -3250,6 +3319,9 @@ echo "$as_me:$LINENO: checking for ATOBM" >&5 echo $ECHO_N "checking for ATOBM... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$ATOBM_CFLAGS"; then + pkg_cv_ATOBM_CFLAGS="$ATOBM_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 @@ -3260,10 +3332,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 "$ATOBM_LIBS"; then + pkg_cv_ATOBM_LIBS="$ATOBM_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 @@ -3274,38 +3350,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - ATOBM_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + +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 + ATOBM_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11"` + else + ATOBM_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + fi # Put the nasty error message in config.log where it belongs - echo "$ATOBM_PKG_ERRORS" 1>&5 + echo "$ATOBM_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11) were not met: + +$ATOBM_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11) 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 ATOBM_CFLAGS and ATOBM_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 (x11) were not met. +Alternatively, you may set the environment variables ATOBM_CFLAGS +and ATOBM_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 (x11) were not met: + +$ATOBM_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the ATOBM_CFLAGS and ATOBM_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 ATOBM_CFLAGS +and ATOBM_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 ATOBM_CFLAGS and ATOBM_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 ATOBM_CFLAGS +and ATOBM_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 @@ -3313,9 +3410,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 ATOBM_CFLAGS and ATOBM_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 ATOBM_CFLAGS +and ATOBM_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;} @@ -3359,6 +3456,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3369,10 +3469,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3383,16 +3487,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK1"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3410,6 +3529,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3420,10 +3542,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3434,16 +3560,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK2"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3483,6 +3624,9 @@ echo "$as_me:$LINENO: checking for XBITMAPS" >&5 echo $ECHO_N "checking for XBITMAPS... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XBITMAPS_CFLAGS"; then + pkg_cv_XBITMAPS_CFLAGS="$XBITMAPS_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xbitmaps\"") >&5 ($PKG_CONFIG --exists --print-errors "xbitmaps") 2>&5 @@ -3493,10 +3637,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 "$XBITMAPS_LIBS"; then + pkg_cv_XBITMAPS_LIBS="$XBITMAPS_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xbitmaps\"") >&5 ($PKG_CONFIG --exists --print-errors "xbitmaps") 2>&5 @@ -3507,38 +3655,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XBITMAPS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xbitmaps"` + +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 + XBITMAPS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xbitmaps"` + else + XBITMAPS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xbitmaps"` + fi # Put the nasty error message in config.log where it belongs - echo "$XBITMAPS_PKG_ERRORS" 1>&5 + echo "$XBITMAPS_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xbitmaps) were not met: + +$XBITMAPS_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xbitmaps) 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 XBITMAPS_CFLAGS and XBITMAPS_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 (xbitmaps) were not met. +Alternatively, you may set the environment variables XBITMAPS_CFLAGS +and XBITMAPS_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 (xbitmaps) were not met: + +$XBITMAPS_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XBITMAPS_CFLAGS and XBITMAPS_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 XBITMAPS_CFLAGS +and XBITMAPS_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 XBITMAPS_CFLAGS and XBITMAPS_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 XBITMAPS_CFLAGS +and XBITMAPS_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 @@ -3546,9 +3715,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 XBITMAPS_CFLAGS and XBITMAPS_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 XBITMAPS_CFLAGS +and XBITMAPS_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;} @@ -3575,6 +3744,9 @@ echo "$as_me:$LINENO: checking for APPDEFS" >&5 echo $ECHO_N "checking for APPDEFS... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$APPDEFS_CFLAGS"; then + pkg_cv_APPDEFS_CFLAGS="$APPDEFS_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3585,10 +3757,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 "$APPDEFS_LIBS"; then + pkg_cv_APPDEFS_LIBS="$APPDEFS_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3599,38 +3775,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + +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 + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xt"` + else + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + fi # Put the nasty error message in config.log where it belongs - echo "$APPDEFS_PKG_ERRORS" 1>&5 + echo "$APPDEFS_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xt) were not met: + +$APPDEFS_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xt) 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 APPDEFS_CFLAGS and APPDEFS_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 (xt) were not met. +Alternatively, you may set the environment variables APPDEFS_CFLAGS +and APPDEFS_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 (xt) were not met: + +$APPDEFS_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 @@ -3638,9 +3835,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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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;} diff --git a/app/editres/aclocal.m4 b/app/editres/aclocal.m4 index cf4de4f63..d8c0aaaab 100644 --- a/app/editres/aclocal.m4 +++ b/app/editres/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/editres/configure b/app/editres/configure index 39507a3f5..4c6134315 100644 --- a/app/editres/configure +++ b/app/editres/configure @@ -1428,6 +1428,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 && @@ -3062,6 +3103,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3072,10 +3116,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3086,16 +3134,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK1"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3113,6 +3176,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3123,10 +3189,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3137,16 +3207,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK2"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3188,6 +3273,9 @@ echo "$as_me:$LINENO: checking for EDITRES" >&5 echo $ECHO_N "checking for EDITRES... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$EDITRES_CFLAGS"; then + pkg_cv_EDITRES_CFLAGS="$EDITRES_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xt xmu\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xt xmu") 2>&5 @@ -3198,10 +3286,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 "$EDITRES_LIBS"; then + pkg_cv_EDITRES_LIBS="$EDITRES_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xt xmu\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xt xmu") 2>&5 @@ -3212,38 +3304,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - EDITRES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xt xmu"` + +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 + EDITRES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 xt xmu"` + else + EDITRES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xt xmu"` + fi # Put the nasty error message in config.log where it belongs - echo "$EDITRES_PKG_ERRORS" 1>&5 + echo "$EDITRES_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11 xt xmu) were not met: + +$EDITRES_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11 xt xmu) 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 EDITRES_CFLAGS and EDITRES_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 (x11 xt xmu) were not met. +Alternatively, you may set the environment variables EDITRES_CFLAGS +and EDITRES_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 (x11 xt xmu) were not met: + +$EDITRES_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the EDITRES_CFLAGS and EDITRES_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 EDITRES_CFLAGS +and EDITRES_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 EDITRES_CFLAGS and EDITRES_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 EDITRES_CFLAGS +and EDITRES_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 @@ -3251,9 +3364,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 EDITRES_CFLAGS and EDITRES_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 EDITRES_CFLAGS +and EDITRES_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;} @@ -3276,6 +3389,9 @@ echo "$as_me:$LINENO: checking for APPDEFS" >&5 echo $ECHO_N "checking for APPDEFS... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$APPDEFS_CFLAGS"; then + pkg_cv_APPDEFS_CFLAGS="$APPDEFS_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3286,10 +3402,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 "$APPDEFS_LIBS"; then + pkg_cv_APPDEFS_LIBS="$APPDEFS_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3300,38 +3420,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + +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 + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xt"` + else + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + fi # Put the nasty error message in config.log where it belongs - echo "$APPDEFS_PKG_ERRORS" 1>&5 + echo "$APPDEFS_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xt) were not met: + +$APPDEFS_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xt) 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 APPDEFS_CFLAGS and APPDEFS_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 (xt) were not met. +Alternatively, you may set the environment variables APPDEFS_CFLAGS +and APPDEFS_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 (xt) were not met: + +$APPDEFS_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 @@ -3339,9 +3480,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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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;} diff --git a/app/fonttosfnt/aclocal.m4 b/app/fonttosfnt/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/fonttosfnt/aclocal.m4 +++ b/app/fonttosfnt/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/fonttosfnt/configure b/app/fonttosfnt/configure index 72c263a10..8386c8dbe 100644 --- a/app/fonttosfnt/configure +++ b/app/fonttosfnt/configure @@ -1403,6 +1403,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 && @@ -3125,6 +3166,9 @@ echo "$as_me:$LINENO: checking for FONTTOSFNT" >&5 echo $ECHO_N "checking for FONTTOSFNT... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$FONTTOSFNT_CFLAGS"; then + pkg_cv_FONTTOSFNT_CFLAGS="$FONTTOSFNT_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xproto freetype2 fontenc\"") >&5 ($PKG_CONFIG --exists --print-errors "xproto freetype2 fontenc") 2>&5 @@ -3135,10 +3179,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 "$FONTTOSFNT_LIBS"; then + pkg_cv_FONTTOSFNT_LIBS="$FONTTOSFNT_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xproto freetype2 fontenc\"") >&5 ($PKG_CONFIG --exists --print-errors "xproto freetype2 fontenc") 2>&5 @@ -3149,38 +3197,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - FONTTOSFNT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xproto freetype2 fontenc"` + +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 + FONTTOSFNT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xproto freetype2 fontenc"` + else + FONTTOSFNT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xproto freetype2 fontenc"` + fi # Put the nasty error message in config.log where it belongs - echo "$FONTTOSFNT_PKG_ERRORS" 1>&5 + echo "$FONTTOSFNT_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xproto freetype2 fontenc) were not met: + +$FONTTOSFNT_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xproto freetype2 fontenc) 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 FONTTOSFNT_CFLAGS and FONTTOSFNT_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 freetype2 fontenc) were not met. +Alternatively, you may set the environment variables FONTTOSFNT_CFLAGS +and FONTTOSFNT_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 freetype2 fontenc) were not met: + +$FONTTOSFNT_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the FONTTOSFNT_CFLAGS and FONTTOSFNT_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 FONTTOSFNT_CFLAGS +and FONTTOSFNT_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 FONTTOSFNT_CFLAGS and FONTTOSFNT_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 FONTTOSFNT_CFLAGS +and FONTTOSFNT_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 @@ -3188,9 +3257,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 FONTTOSFNT_CFLAGS and FONTTOSFNT_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 FONTTOSFNT_CFLAGS +and FONTTOSFNT_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;} diff --git a/app/fslsfonts/aclocal.m4 b/app/fslsfonts/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/fslsfonts/aclocal.m4 +++ b/app/fslsfonts/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/fslsfonts/configure b/app/fslsfonts/configure index 3a700d4a1..b7eb29193 100644 --- a/app/fslsfonts/configure +++ b/app/fslsfonts/configure @@ -1403,6 +1403,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 && @@ -3016,6 +3057,9 @@ echo "$as_me:$LINENO: checking for FSLSFONTS" >&5 echo $ECHO_N "checking for FSLSFONTS... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$FSLSFONTS_CFLAGS"; then + pkg_cv_FSLSFONTS_CFLAGS="$FSLSFONTS_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 libfs\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 libfs") 2>&5 @@ -3026,10 +3070,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 "$FSLSFONTS_LIBS"; then + pkg_cv_FSLSFONTS_LIBS="$FSLSFONTS_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 libfs\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 libfs") 2>&5 @@ -3040,38 +3088,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - FSLSFONTS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 libfs"` + +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 + FSLSFONTS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 libfs"` + else + FSLSFONTS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 libfs"` + fi # Put the nasty error message in config.log where it belongs - echo "$FSLSFONTS_PKG_ERRORS" 1>&5 + echo "$FSLSFONTS_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11 libfs) were not met: + +$FSLSFONTS_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11 libfs) 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 FSLSFONTS_CFLAGS and FSLSFONTS_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 (x11 libfs) were not met. +Alternatively, you may set the environment variables FSLSFONTS_CFLAGS +and FSLSFONTS_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 (x11 libfs) were not met: + +$FSLSFONTS_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the FSLSFONTS_CFLAGS and FSLSFONTS_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 FSLSFONTS_CFLAGS +and FSLSFONTS_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 FSLSFONTS_CFLAGS and FSLSFONTS_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 FSLSFONTS_CFLAGS +and FSLSFONTS_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 @@ -3079,9 +3148,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 FSLSFONTS_CFLAGS and FSLSFONTS_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 FSLSFONTS_CFLAGS +and FSLSFONTS_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;} diff --git a/app/fstobdf/aclocal.m4 b/app/fstobdf/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/fstobdf/aclocal.m4 +++ b/app/fstobdf/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/fstobdf/configure b/app/fstobdf/configure index 75bbe5e3d..17f263135 100644 --- a/app/fstobdf/configure +++ b/app/fstobdf/configure @@ -1403,6 +1403,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 && @@ -3016,6 +3057,9 @@ echo "$as_me:$LINENO: checking for FSTOBDF" >&5 echo $ECHO_N "checking for FSTOBDF... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$FSTOBDF_CFLAGS"; then + pkg_cv_FSTOBDF_CFLAGS="$FSTOBDF_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 libfs\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 libfs") 2>&5 @@ -3026,10 +3070,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 "$FSTOBDF_LIBS"; then + pkg_cv_FSTOBDF_LIBS="$FSTOBDF_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 libfs\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 libfs") 2>&5 @@ -3040,38 +3088,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - FSTOBDF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 libfs"` + +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 + FSTOBDF_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 libfs"` + else + FSTOBDF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 libfs"` + fi # Put the nasty error message in config.log where it belongs - echo "$FSTOBDF_PKG_ERRORS" 1>&5 + echo "$FSTOBDF_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11 libfs) were not met: + +$FSTOBDF_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11 libfs) 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 FSTOBDF_CFLAGS and FSTOBDF_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 (x11 libfs) were not met. +Alternatively, you may set the environment variables FSTOBDF_CFLAGS +and FSTOBDF_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 (x11 libfs) were not met: + +$FSTOBDF_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the FSTOBDF_CFLAGS and FSTOBDF_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 FSTOBDF_CFLAGS +and FSTOBDF_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 FSTOBDF_CFLAGS and FSTOBDF_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 FSTOBDF_CFLAGS +and FSTOBDF_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 @@ -3079,9 +3148,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 FSTOBDF_CFLAGS and FSTOBDF_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 FSTOBDF_CFLAGS +and FSTOBDF_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;} diff --git a/app/iceauth/aclocal.m4 b/app/iceauth/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/iceauth/aclocal.m4 +++ b/app/iceauth/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/iceauth/configure b/app/iceauth/configure index a40d8ebae..1f5e51c11 100644 --- a/app/iceauth/configure +++ b/app/iceauth/configure @@ -1403,6 +1403,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 && @@ -3087,6 +3128,9 @@ echo "$as_me:$LINENO: checking for ICEAUTH" >&5 echo $ECHO_N "checking for ICEAUTH... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$ICEAUTH_CFLAGS"; then + pkg_cv_ICEAUTH_CFLAGS="$ICEAUTH_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xproto ice\"") >&5 ($PKG_CONFIG --exists --print-errors "xproto ice") 2>&5 @@ -3097,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 "$ICEAUTH_LIBS"; then + pkg_cv_ICEAUTH_LIBS="$ICEAUTH_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xproto ice\"") >&5 ($PKG_CONFIG --exists --print-errors "xproto ice") 2>&5 @@ -3111,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 - ICEAUTH_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xproto ice"` + +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 + ICEAUTH_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xproto ice"` + else + ICEAUTH_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xproto ice"` + fi # Put the nasty error message in config.log where it belongs - echo "$ICEAUTH_PKG_ERRORS" 1>&5 + echo "$ICEAUTH_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xproto ice) were not met: + +$ICEAUTH_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xproto ice) 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 ICEAUTH_CFLAGS and ICEAUTH_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 ice) were not met. +Alternatively, you may set the environment variables ICEAUTH_CFLAGS +and ICEAUTH_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 ice) were not met: + +$ICEAUTH_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the ICEAUTH_CFLAGS and ICEAUTH_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 ICEAUTH_CFLAGS +and ICEAUTH_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 ICEAUTH_CFLAGS and ICEAUTH_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 ICEAUTH_CFLAGS +and ICEAUTH_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 @@ -3150,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 ICEAUTH_CFLAGS and ICEAUTH_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 ICEAUTH_CFLAGS +and ICEAUTH_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;} diff --git a/app/ico/aclocal.m4 b/app/ico/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/ico/aclocal.m4 +++ b/app/ico/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/ico/configure b/app/ico/configure index d0295ef6e..78f9f76a3 100644 --- a/app/ico/configure +++ b/app/ico/configure @@ -1401,6 +1401,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 && @@ -3014,6 +3055,9 @@ echo "$as_me:$LINENO: checking for ICO" >&5 echo $ECHO_N "checking for ICO... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$ICO_CFLAGS"; then + pkg_cv_ICO_CFLAGS="$ICO_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 >= 0.99.1\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 >= 0.99.1") 2>&5 @@ -3024,10 +3068,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 "$ICO_LIBS"; then + pkg_cv_ICO_LIBS="$ICO_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 >= 0.99.1\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 >= 0.99.1") 2>&5 @@ -3038,38 +3086,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - ICO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 >= 0.99.1"` + +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 + ICO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 >= 0.99.1"` + else + ICO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 >= 0.99.1"` + fi # Put the nasty error message in config.log where it belongs - echo "$ICO_PKG_ERRORS" 1>&5 + echo "$ICO_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11 >= 0.99.1) were not met: + +$ICO_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11 >= 0.99.1) 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 ICO_CFLAGS and ICO_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 (x11 >= 0.99.1) were not met. +Alternatively, you may set the environment variables ICO_CFLAGS +and ICO_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 (x11 >= 0.99.1) were not met: + +$ICO_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the ICO_CFLAGS and ICO_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 ICO_CFLAGS +and ICO_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 ICO_CFLAGS and ICO_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 ICO_CFLAGS +and ICO_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 @@ -3077,9 +3146,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 ICO_CFLAGS and ICO_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 ICO_CFLAGS +and ICO_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;} diff --git a/app/lbxproxy/aclocal.m4 b/app/lbxproxy/aclocal.m4 index 68f92a03c..65663b720 100644 --- a/app/lbxproxy/aclocal.m4 +++ b/app/lbxproxy/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/lbxproxy/configure b/app/lbxproxy/configure index 025ae3036..e914b13b0 100644 --- a/app/lbxproxy/configure +++ b/app/lbxproxy/configure @@ -1408,6 +1408,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 && @@ -3084,6 +3125,9 @@ echo "$as_me:$LINENO: checking for LBXPROXY" >&5 echo $ECHO_N "checking for LBXPROXY... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$LBXPROXY_CFLAGS"; then + pkg_cv_LBXPROXY_CFLAGS="$LBXPROXY_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xtrans xext lbxutil x11 ice xproxymngproto bigreqsproto\"") >&5 ($PKG_CONFIG --exists --print-errors "xtrans xext lbxutil x11 ice xproxymngproto bigreqsproto") 2>&5 @@ -3094,10 +3138,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 "$LBXPROXY_LIBS"; then + pkg_cv_LBXPROXY_LIBS="$LBXPROXY_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xtrans xext lbxutil x11 ice xproxymngproto bigreqsproto\"") >&5 ($PKG_CONFIG --exists --print-errors "xtrans xext lbxutil x11 ice xproxymngproto bigreqsproto") 2>&5 @@ -3108,38 +3156,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - LBXPROXY_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xtrans xext lbxutil x11 ice xproxymngproto bigreqsproto"` + +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 + LBXPROXY_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xtrans xext lbxutil x11 ice xproxymngproto bigreqsproto"` + else + LBXPROXY_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xtrans xext lbxutil x11 ice xproxymngproto bigreqsproto"` + fi # Put the nasty error message in config.log where it belongs - echo "$LBXPROXY_PKG_ERRORS" 1>&5 + echo "$LBXPROXY_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xtrans xext lbxutil x11 ice xproxymngproto bigreqsproto) were not met: + +$LBXPROXY_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xtrans xext lbxutil x11 ice xproxymngproto bigreqsproto) 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 LBXPROXY_CFLAGS and LBXPROXY_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 (xtrans xext lbxutil x11 ice xproxymngproto bigreqsproto) were not met. +Alternatively, you may set the environment variables LBXPROXY_CFLAGS +and LBXPROXY_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 (xtrans xext lbxutil x11 ice xproxymngproto bigreqsproto) were not met: + +$LBXPROXY_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the LBXPROXY_CFLAGS and LBXPROXY_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 LBXPROXY_CFLAGS +and LBXPROXY_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 LBXPROXY_CFLAGS and LBXPROXY_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 LBXPROXY_CFLAGS +and LBXPROXY_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 @@ -3147,9 +3216,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 LBXPROXY_CFLAGS and LBXPROXY_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 LBXPROXY_CFLAGS +and LBXPROXY_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;} diff --git a/app/listres/aclocal.m4 b/app/listres/aclocal.m4 index cf4de4f63..d8c0aaaab 100644 --- a/app/listres/aclocal.m4 +++ b/app/listres/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/listres/configure b/app/listres/configure index 2541ffbe9..90b66bb56 100644 --- a/app/listres/configure +++ b/app/listres/configure @@ -1416,6 +1416,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 && @@ -3050,6 +3091,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3060,10 +3104,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3074,16 +3122,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK1"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3101,6 +3164,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3111,10 +3177,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3125,16 +3195,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK2"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3176,6 +3261,9 @@ echo "$as_me:$LINENO: checking for LISTRES" >&5 echo $ECHO_N "checking for LISTRES... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$LISTRES_CFLAGS"; then + pkg_cv_LISTRES_CFLAGS="$LISTRES_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xt xmu\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xt xmu") 2>&5 @@ -3186,10 +3274,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 "$LISTRES_LIBS"; then + pkg_cv_LISTRES_LIBS="$LISTRES_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xt xmu\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xt xmu") 2>&5 @@ -3200,38 +3292,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - LISTRES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xt xmu"` + +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 + LISTRES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 xt xmu"` + else + LISTRES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xt xmu"` + fi # Put the nasty error message in config.log where it belongs - echo "$LISTRES_PKG_ERRORS" 1>&5 + echo "$LISTRES_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11 xt xmu) were not met: + +$LISTRES_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11 xt xmu) 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 LISTRES_CFLAGS and LISTRES_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 (x11 xt xmu) were not met. +Alternatively, you may set the environment variables LISTRES_CFLAGS +and LISTRES_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 (x11 xt xmu) were not met: + +$LISTRES_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the LISTRES_CFLAGS and LISTRES_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 LISTRES_CFLAGS +and LISTRES_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 LISTRES_CFLAGS and LISTRES_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 LISTRES_CFLAGS +and LISTRES_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 @@ -3239,9 +3352,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 LISTRES_CFLAGS and LISTRES_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 LISTRES_CFLAGS +and LISTRES_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;} diff --git a/app/luit/aclocal.m4 b/app/luit/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/luit/aclocal.m4 +++ b/app/luit/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/luit/configure b/app/luit/configure index 7fb2c3c41..26d9910d1 100644 --- a/app/luit/configure +++ b/app/luit/configure @@ -1404,6 +1404,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 && @@ -3161,6 +3202,9 @@ echo "$as_me:$LINENO: checking for LUIT" >&5 echo $ECHO_N "checking for LUIT... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$LUIT_CFLAGS"; then + pkg_cv_LUIT_CFLAGS="$LUIT_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 fontenc\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 fontenc") 2>&5 @@ -3171,10 +3215,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 "$LUIT_LIBS"; then + pkg_cv_LUIT_LIBS="$LUIT_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 fontenc\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 fontenc") 2>&5 @@ -3185,38 +3233,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - LUIT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 fontenc"` + +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 + LUIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 fontenc"` + else + LUIT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 fontenc"` + fi # Put the nasty error message in config.log where it belongs - echo "$LUIT_PKG_ERRORS" 1>&5 + echo "$LUIT_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11 fontenc) were not met: + +$LUIT_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11 fontenc) 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 LUIT_CFLAGS and LUIT_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 (x11 fontenc) were not met. +Alternatively, you may set the environment variables LUIT_CFLAGS +and LUIT_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 (x11 fontenc) were not met: + +$LUIT_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the LUIT_CFLAGS and LUIT_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 LUIT_CFLAGS +and LUIT_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 LUIT_CFLAGS and LUIT_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 LUIT_CFLAGS +and LUIT_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 @@ -3224,9 +3293,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 LUIT_CFLAGS and LUIT_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 LUIT_CFLAGS +and LUIT_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;} diff --git a/app/mkfontdir/aclocal.m4 b/app/mkfontdir/aclocal.m4 index 24c3375c6..7d533c29f 100644 --- a/app/mkfontdir/aclocal.m4 +++ b/app/mkfontdir/aclocal.m4 @@ -440,6 +440,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/mkfontdir/configure b/app/mkfontdir/configure index 4e2208cea..bc1fd4d86 100644 --- a/app/mkfontdir/configure +++ b/app/mkfontdir/configure @@ -1357,6 +1357,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 && diff --git a/app/oclock/aclocal.m4 b/app/oclock/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/oclock/aclocal.m4 +++ b/app/oclock/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/oclock/configure b/app/oclock/configure index dc190e1ec..ad847b21c 100644 --- a/app/oclock/configure +++ b/app/oclock/configure @@ -1414,6 +1414,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 && @@ -3027,6 +3068,9 @@ echo "$as_me:$LINENO: checking for OCLOCK" >&5 echo $ECHO_N "checking for OCLOCK... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$OCLOCK_CFLAGS"; then + pkg_cv_OCLOCK_CFLAGS="$OCLOCK_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xmu xext\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xmu xext") 2>&5 @@ -3037,10 +3081,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 "$OCLOCK_LIBS"; then + pkg_cv_OCLOCK_LIBS="$OCLOCK_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xmu xext\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xmu xext") 2>&5 @@ -3051,38 +3099,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - OCLOCK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xmu xext"` + +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 + OCLOCK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 xmu xext"` + else + OCLOCK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xmu xext"` + fi # Put the nasty error message in config.log where it belongs - echo "$OCLOCK_PKG_ERRORS" 1>&5 + echo "$OCLOCK_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11 xmu xext) were not met: + +$OCLOCK_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11 xmu xext) 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 OCLOCK_CFLAGS and OCLOCK_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 (x11 xmu xext) were not met. +Alternatively, you may set the environment variables OCLOCK_CFLAGS +and OCLOCK_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 (x11 xmu xext) were not met: + +$OCLOCK_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the OCLOCK_CFLAGS and OCLOCK_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 OCLOCK_CFLAGS +and OCLOCK_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 OCLOCK_CFLAGS and OCLOCK_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 OCLOCK_CFLAGS +and OCLOCK_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 @@ -3090,9 +3159,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 OCLOCK_CFLAGS and OCLOCK_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 OCLOCK_CFLAGS +and OCLOCK_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;} @@ -3113,6 +3182,9 @@ echo "$as_me:$LINENO: checking for APPDEFS" >&5 echo $ECHO_N "checking for APPDEFS... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$APPDEFS_CFLAGS"; then + pkg_cv_APPDEFS_CFLAGS="$APPDEFS_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3123,10 +3195,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 "$APPDEFS_LIBS"; then + pkg_cv_APPDEFS_LIBS="$APPDEFS_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3137,38 +3213,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + +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 + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xt"` + else + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + fi # Put the nasty error message in config.log where it belongs - echo "$APPDEFS_PKG_ERRORS" 1>&5 + echo "$APPDEFS_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xt) were not met: + +$APPDEFS_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xt) 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 APPDEFS_CFLAGS and APPDEFS_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 (xt) were not met. +Alternatively, you may set the environment variables APPDEFS_CFLAGS +and APPDEFS_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 (xt) were not met: + +$APPDEFS_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 @@ -3176,9 +3273,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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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;} diff --git a/app/proxymngr/aclocal.m4 b/app/proxymngr/aclocal.m4 index 68f92a03c..65663b720 100644 --- a/app/proxymngr/aclocal.m4 +++ b/app/proxymngr/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/proxymngr/configure b/app/proxymngr/configure index 6056bb61d..2ffc53355 100644 --- a/app/proxymngr/configure +++ b/app/proxymngr/configure @@ -1409,6 +1409,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 && @@ -4186,6 +4227,9 @@ echo "$as_me:$LINENO: checking for PROXYMNGR" >&5 echo $ECHO_N "checking for PROXYMNGR... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$PROXYMNGR_CFLAGS"; then + pkg_cv_PROXYMNGR_CFLAGS="$PROXYMNGR_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"ice xt x11 xproxymngproto\"") >&5 ($PKG_CONFIG --exists --print-errors "ice xt x11 xproxymngproto") 2>&5 @@ -4196,10 +4240,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 "$PROXYMNGR_LIBS"; then + pkg_cv_PROXYMNGR_LIBS="$PROXYMNGR_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"ice xt x11 xproxymngproto\"") >&5 ($PKG_CONFIG --exists --print-errors "ice xt x11 xproxymngproto") 2>&5 @@ -4210,38 +4258,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - PROXYMNGR_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "ice xt x11 xproxymngproto"` + +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 + PROXYMNGR_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "ice xt x11 xproxymngproto"` + else + PROXYMNGR_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "ice xt x11 xproxymngproto"` + fi # Put the nasty error message in config.log where it belongs - echo "$PROXYMNGR_PKG_ERRORS" 1>&5 + echo "$PROXYMNGR_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (ice xt x11 xproxymngproto) were not met: + +$PROXYMNGR_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (ice xt x11 xproxymngproto) 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 PROXYMNGR_CFLAGS and PROXYMNGR_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 (ice xt x11 xproxymngproto) were not met. +Alternatively, you may set the environment variables PROXYMNGR_CFLAGS +and PROXYMNGR_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 (ice xt x11 xproxymngproto) were not met: + +$PROXYMNGR_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the PROXYMNGR_CFLAGS and PROXYMNGR_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 PROXYMNGR_CFLAGS +and PROXYMNGR_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 PROXYMNGR_CFLAGS and PROXYMNGR_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 PROXYMNGR_CFLAGS +and PROXYMNGR_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 @@ -4249,9 +4318,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 PROXYMNGR_CFLAGS and PROXYMNGR_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 PROXYMNGR_CFLAGS +and PROXYMNGR_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;} diff --git a/app/rgb/aclocal.m4 b/app/rgb/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/rgb/aclocal.m4 +++ b/app/rgb/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/rgb/configure b/app/rgb/configure index 0e54628cd..dbeb4287b 100644 --- a/app/rgb/configure +++ b/app/rgb/configure @@ -1406,6 +1406,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 && @@ -3342,6 +3383,9 @@ echo "$as_me:$LINENO: checking for RGB" >&5 echo $ECHO_N "checking for RGB... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$RGB_CFLAGS"; then + pkg_cv_RGB_CFLAGS="$RGB_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 @@ -3352,10 +3396,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 "$RGB_LIBS"; then + pkg_cv_RGB_LIBS="$RGB_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 @@ -3366,38 +3414,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - RGB_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 + RGB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xproto"` + else + RGB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xproto"` + fi # Put the nasty error message in config.log where it belongs - echo "$RGB_PKG_ERRORS" 1>&5 + echo "$RGB_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xproto) were not met: + +$RGB_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 RGB_CFLAGS and RGB_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 RGB_CFLAGS +and RGB_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: + +$RGB_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the RGB_CFLAGS and RGB_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 RGB_CFLAGS +and RGB_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 RGB_CFLAGS and RGB_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 RGB_CFLAGS +and RGB_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 @@ -3405,9 +3474,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 RGB_CFLAGS and RGB_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 RGB_CFLAGS +and RGB_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;} diff --git a/app/rstart/aclocal.m4 b/app/rstart/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/rstart/aclocal.m4 +++ b/app/rstart/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/rstart/configure b/app/rstart/configure index 20357a181..be39f214d 100644 --- a/app/rstart/configure +++ b/app/rstart/configure @@ -1419,6 +1419,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 && @@ -3519,6 +3560,9 @@ echo "$as_me:$LINENO: checking for RSTART" >&5 echo $ECHO_N "checking for RSTART... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$RSTART_CFLAGS"; then + pkg_cv_RSTART_CFLAGS="$RSTART_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 @@ -3529,10 +3573,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 "$RSTART_LIBS"; then + pkg_cv_RSTART_LIBS="$RSTART_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 @@ -3543,38 +3591,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - RSTART_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + +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 + RSTART_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11"` + else + RSTART_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + fi # Put the nasty error message in config.log where it belongs - echo "$RSTART_PKG_ERRORS" 1>&5 + echo "$RSTART_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11) were not met: + +$RSTART_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11) 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 RSTART_CFLAGS and RSTART_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 (x11) were not met. +Alternatively, you may set the environment variables RSTART_CFLAGS +and RSTART_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 (x11) were not met: + +$RSTART_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the RSTART_CFLAGS and RSTART_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 RSTART_CFLAGS +and RSTART_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 RSTART_CFLAGS and RSTART_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 RSTART_CFLAGS +and RSTART_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 @@ -3582,9 +3651,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 RSTART_CFLAGS and RSTART_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 RSTART_CFLAGS +and RSTART_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;} diff --git a/app/scripts/aclocal.m4 b/app/scripts/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/scripts/aclocal.m4 +++ b/app/scripts/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/scripts/configure b/app/scripts/configure index 075c49718..f14c7f282 100644 --- a/app/scripts/configure +++ b/app/scripts/configure @@ -1403,6 +1403,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 && @@ -3016,6 +3057,9 @@ echo "$as_me:$LINENO: checking for SCRIPTS" >&5 echo $ECHO_N "checking for SCRIPTS... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$SCRIPTS_CFLAGS"; then + pkg_cv_SCRIPTS_CFLAGS="$SCRIPTS_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 @@ -3026,10 +3070,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 "$SCRIPTS_LIBS"; then + pkg_cv_SCRIPTS_LIBS="$SCRIPTS_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 @@ -3040,38 +3088,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - SCRIPTS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + +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 + SCRIPTS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11"` + else + SCRIPTS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + fi # Put the nasty error message in config.log where it belongs - echo "$SCRIPTS_PKG_ERRORS" 1>&5 + echo "$SCRIPTS_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11) were not met: + +$SCRIPTS_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11) 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 SCRIPTS_CFLAGS and SCRIPTS_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 (x11) were not met. +Alternatively, you may set the environment variables SCRIPTS_CFLAGS +and SCRIPTS_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 (x11) were not met: + +$SCRIPTS_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the SCRIPTS_CFLAGS and SCRIPTS_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 SCRIPTS_CFLAGS +and SCRIPTS_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 SCRIPTS_CFLAGS and SCRIPTS_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 SCRIPTS_CFLAGS +and SCRIPTS_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 @@ -3079,9 +3148,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 SCRIPTS_CFLAGS and SCRIPTS_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 SCRIPTS_CFLAGS +and SCRIPTS_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;} diff --git a/app/sessreg/aclocal.m4 b/app/sessreg/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/sessreg/aclocal.m4 +++ b/app/sessreg/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/sessreg/configure b/app/sessreg/configure index be637466a..bc72bff72 100644 --- a/app/sessreg/configure +++ b/app/sessreg/configure @@ -1448,6 +1448,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 && @@ -4207,6 +4248,9 @@ echo "$as_me:$LINENO: checking for SESSREG" >&5 echo $ECHO_N "checking for SESSREG... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$SESSREG_CFLAGS"; then + pkg_cv_SESSREG_CFLAGS="$SESSREG_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 @@ -4217,10 +4261,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 "$SESSREG_LIBS"; then + pkg_cv_SESSREG_LIBS="$SESSREG_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 @@ -4231,38 +4279,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - SESSREG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + +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 + SESSREG_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11"` + else + SESSREG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + fi # Put the nasty error message in config.log where it belongs - echo "$SESSREG_PKG_ERRORS" 1>&5 + echo "$SESSREG_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11) were not met: + +$SESSREG_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11) 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 SESSREG_CFLAGS and SESSREG_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 (x11) were not met. +Alternatively, you may set the environment variables SESSREG_CFLAGS +and SESSREG_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 (x11) were not met: + +$SESSREG_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the SESSREG_CFLAGS and SESSREG_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 SESSREG_CFLAGS +and SESSREG_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 SESSREG_CFLAGS and SESSREG_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 SESSREG_CFLAGS +and SESSREG_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 @@ -4270,9 +4339,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 SESSREG_CFLAGS and SESSREG_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 SESSREG_CFLAGS +and SESSREG_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;} diff --git a/app/setxkbmap/aclocal.m4 b/app/setxkbmap/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/setxkbmap/aclocal.m4 +++ b/app/setxkbmap/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/setxkbmap/configure b/app/setxkbmap/configure index a5021ff28..ca359d251 100644 --- a/app/setxkbmap/configure +++ b/app/setxkbmap/configure @@ -1406,6 +1406,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 && @@ -3029,6 +3070,9 @@ echo "$as_me:$LINENO: checking for SETXKBMAP" >&5 echo $ECHO_N "checking for SETXKBMAP... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$SETXKBMAP_CFLAGS"; then + pkg_cv_SETXKBMAP_CFLAGS="$SETXKBMAP_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xkbfile x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xkbfile x11") 2>&5 @@ -3039,10 +3083,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 "$SETXKBMAP_LIBS"; then + pkg_cv_SETXKBMAP_LIBS="$SETXKBMAP_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xkbfile x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xkbfile x11") 2>&5 @@ -3053,38 +3101,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - SETXKBMAP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xkbfile x11"` + +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 + SETXKBMAP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xkbfile x11"` + else + SETXKBMAP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xkbfile x11"` + fi # Put the nasty error message in config.log where it belongs - echo "$SETXKBMAP_PKG_ERRORS" 1>&5 + echo "$SETXKBMAP_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xkbfile x11) were not met: + +$SETXKBMAP_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xkbfile x11) 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 SETXKBMAP_CFLAGS and SETXKBMAP_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 (xkbfile x11) were not met. +Alternatively, you may set the environment variables SETXKBMAP_CFLAGS +and SETXKBMAP_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 (xkbfile x11) were not met: + +$SETXKBMAP_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the SETXKBMAP_CFLAGS and SETXKBMAP_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 SETXKBMAP_CFLAGS +and SETXKBMAP_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 SETXKBMAP_CFLAGS and SETXKBMAP_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 SETXKBMAP_CFLAGS +and SETXKBMAP_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 @@ -3092,9 +3161,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 SETXKBMAP_CFLAGS and SETXKBMAP_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 SETXKBMAP_CFLAGS +and SETXKBMAP_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;} diff --git a/app/showfont/aclocal.m4 b/app/showfont/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/showfont/aclocal.m4 +++ b/app/showfont/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/showfont/configure b/app/showfont/configure index 9080da709..00663f145 100644 --- a/app/showfont/configure +++ b/app/showfont/configure @@ -1403,6 +1403,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 && @@ -3016,6 +3057,9 @@ echo "$as_me:$LINENO: checking for SHOWFONT" >&5 echo $ECHO_N "checking for SHOWFONT... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$SHOWFONT_CFLAGS"; then + pkg_cv_SHOWFONT_CFLAGS="$SHOWFONT_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libfs\"") >&5 ($PKG_CONFIG --exists --print-errors "libfs") 2>&5 @@ -3026,10 +3070,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 "$SHOWFONT_LIBS"; then + pkg_cv_SHOWFONT_LIBS="$SHOWFONT_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libfs\"") >&5 ($PKG_CONFIG --exists --print-errors "libfs") 2>&5 @@ -3040,38 +3088,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - SHOWFONT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libfs"` + +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 + SHOWFONT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libfs"` + else + SHOWFONT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libfs"` + fi # Put the nasty error message in config.log where it belongs - echo "$SHOWFONT_PKG_ERRORS" 1>&5 + echo "$SHOWFONT_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (libfs) were not met: + +$SHOWFONT_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (libfs) 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 SHOWFONT_CFLAGS and SHOWFONT_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 (libfs) were not met. +Alternatively, you may set the environment variables SHOWFONT_CFLAGS +and SHOWFONT_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 (libfs) were not met: + +$SHOWFONT_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the SHOWFONT_CFLAGS and SHOWFONT_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 SHOWFONT_CFLAGS +and SHOWFONT_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 SHOWFONT_CFLAGS and SHOWFONT_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 SHOWFONT_CFLAGS +and SHOWFONT_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 @@ -3079,9 +3148,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 SHOWFONT_CFLAGS and SHOWFONT_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 SHOWFONT_CFLAGS +and SHOWFONT_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;} diff --git a/app/smproxy/aclocal.m4 b/app/smproxy/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/smproxy/aclocal.m4 +++ b/app/smproxy/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/smproxy/configure b/app/smproxy/configure index 71e816058..7c2b3848c 100644 --- a/app/smproxy/configure +++ b/app/smproxy/configure @@ -1403,6 +1403,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 && @@ -3116,6 +3157,9 @@ echo "$as_me:$LINENO: checking for SMPROXY" >&5 echo $ECHO_N "checking for SMPROXY... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$SMPROXY_CFLAGS"; then + pkg_cv_SMPROXY_CFLAGS="$SMPROXY_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt xmu\"") >&5 ($PKG_CONFIG --exists --print-errors "xt xmu") 2>&5 @@ -3126,10 +3170,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 "$SMPROXY_LIBS"; then + pkg_cv_SMPROXY_LIBS="$SMPROXY_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt xmu\"") >&5 ($PKG_CONFIG --exists --print-errors "xt xmu") 2>&5 @@ -3140,38 +3188,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - SMPROXY_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt xmu"` + +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 + SMPROXY_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xt xmu"` + else + SMPROXY_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt xmu"` + fi # Put the nasty error message in config.log where it belongs - echo "$SMPROXY_PKG_ERRORS" 1>&5 + echo "$SMPROXY_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xt xmu) were not met: + +$SMPROXY_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xt xmu) 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 SMPROXY_CFLAGS and SMPROXY_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 (xt xmu) were not met. +Alternatively, you may set the environment variables SMPROXY_CFLAGS +and SMPROXY_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 (xt xmu) were not met: + +$SMPROXY_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the SMPROXY_CFLAGS and SMPROXY_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 SMPROXY_CFLAGS +and SMPROXY_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 SMPROXY_CFLAGS and SMPROXY_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 SMPROXY_CFLAGS +and SMPROXY_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 @@ -3179,9 +3248,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 SMPROXY_CFLAGS and SMPROXY_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 SMPROXY_CFLAGS +and SMPROXY_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;} diff --git a/app/twm/aclocal.m4 b/app/twm/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/twm/aclocal.m4 +++ b/app/twm/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/twm/configure b/app/twm/configure index 7e2aaf79e..8a0f23b0c 100644 --- a/app/twm/configure +++ b/app/twm/configure @@ -1401,6 +1401,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 && @@ -3429,6 +3470,9 @@ echo "$as_me:$LINENO: checking for TWM" >&5 echo $ECHO_N "checking for TWM... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TWM_CFLAGS"; then + pkg_cv_TWM_CFLAGS="$TWM_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xext xt xmu\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xext xt xmu") 2>&5 @@ -3439,10 +3483,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 "$TWM_LIBS"; then + pkg_cv_TWM_LIBS="$TWM_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xext xt xmu\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xext xt xmu") 2>&5 @@ -3453,38 +3501,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TWM_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xext xt xmu"` + +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 + TWM_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 xext xt xmu"` + else + TWM_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xext xt xmu"` + fi # Put the nasty error message in config.log where it belongs - echo "$TWM_PKG_ERRORS" 1>&5 + echo "$TWM_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11 xext xt xmu) were not met: + +$TWM_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11 xext xt xmu) 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 TWM_CFLAGS and TWM_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 (x11 xext xt xmu) were not met. +Alternatively, you may set the environment variables TWM_CFLAGS +and TWM_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 (x11 xext xt xmu) were not met: + +$TWM_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the TWM_CFLAGS and TWM_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 TWM_CFLAGS +and TWM_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 TWM_CFLAGS and TWM_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 TWM_CFLAGS +and TWM_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 @@ -3492,9 +3561,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 TWM_CFLAGS and TWM_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 TWM_CFLAGS +and TWM_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;} diff --git a/app/viewres/aclocal.m4 b/app/viewres/aclocal.m4 index cf4de4f63..d8c0aaaab 100644 --- a/app/viewres/aclocal.m4 +++ b/app/viewres/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/viewres/configure b/app/viewres/configure index a4bf069c1..16681eaf0 100644 --- a/app/viewres/configure +++ b/app/viewres/configure @@ -1416,6 +1416,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 && @@ -3050,6 +3091,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3060,10 +3104,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3074,16 +3122,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK1"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3101,6 +3164,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3111,10 +3177,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3125,16 +3195,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK2"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3178,6 +3263,9 @@ echo "$as_me:$LINENO: checking for APPDEFS" >&5 echo $ECHO_N "checking for APPDEFS... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$APPDEFS_CFLAGS"; then + pkg_cv_APPDEFS_CFLAGS="$APPDEFS_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3188,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 "$APPDEFS_LIBS"; then + pkg_cv_APPDEFS_LIBS="$APPDEFS_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3202,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 - APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + +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 + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xt"` + else + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + fi # Put the nasty error message in config.log where it belongs - echo "$APPDEFS_PKG_ERRORS" 1>&5 + echo "$APPDEFS_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xt) were not met: + +$APPDEFS_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xt) 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 APPDEFS_CFLAGS and APPDEFS_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 (xt) were not met. +Alternatively, you may set the environment variables APPDEFS_CFLAGS +and APPDEFS_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 (xt) were not met: + +$APPDEFS_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 @@ -3241,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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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;} diff --git a/app/x11perf/aclocal.m4 b/app/x11perf/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/x11perf/aclocal.m4 +++ b/app/x11perf/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/x11perf/configure b/app/x11perf/configure index d94972203..2cd892022 100644 --- a/app/x11perf/configure +++ b/app/x11perf/configure @@ -1435,6 +1435,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 && @@ -3164,6 +3205,9 @@ echo "$as_me:$LINENO: checking for X11PERF" >&5 echo $ECHO_N "checking for X11PERF... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$X11PERF_CFLAGS"; then + pkg_cv_X11PERF_CFLAGS="$X11PERF_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xmuu\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xmuu") 2>&5 @@ -3174,10 +3218,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 "$X11PERF_LIBS"; then + pkg_cv_X11PERF_LIBS="$X11PERF_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xmuu\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xmuu") 2>&5 @@ -3188,38 +3236,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - X11PERF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xmuu"` + +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 + X11PERF_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 xmuu"` + else + X11PERF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xmuu"` + fi # Put the nasty error message in config.log where it belongs - echo "$X11PERF_PKG_ERRORS" 1>&5 + echo "$X11PERF_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11 xmuu) were not met: + +$X11PERF_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11 xmuu) 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 X11PERF_CFLAGS and X11PERF_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 (x11 xmuu) were not met. +Alternatively, you may set the environment variables X11PERF_CFLAGS +and X11PERF_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 (x11 xmuu) were not met: + +$X11PERF_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the X11PERF_CFLAGS and X11PERF_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 X11PERF_CFLAGS +and X11PERF_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 X11PERF_CFLAGS and X11PERF_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 X11PERF_CFLAGS +and X11PERF_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 @@ -3227,9 +3296,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 X11PERF_CFLAGS and X11PERF_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 X11PERF_CFLAGS +and X11PERF_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;} @@ -3251,6 +3320,9 @@ echo "$as_me:$LINENO: checking for XRENDER" >&5 echo $ECHO_N "checking for XRENDER... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XRENDER_CFLAGS"; then + pkg_cv_XRENDER_CFLAGS="$XRENDER_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xrender\"") >&5 ($PKG_CONFIG --exists --print-errors "xrender") 2>&5 @@ -3261,10 +3333,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 "$XRENDER_LIBS"; then + pkg_cv_XRENDER_LIBS="$XRENDER_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xrender\"") >&5 ($PKG_CONFIG --exists --print-errors "xrender") 2>&5 @@ -3275,16 +3351,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XRENDER_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xrender"` + +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 + XRENDER_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xrender"` + else + XRENDER_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xrender"` + fi # Put the nasty error message in config.log where it belongs - echo "$XRENDER_PKG_ERRORS" 1>&5 + echo "$XRENDER_PKG_ERRORS" >&5 - xrender_found=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + xrender_found=no elif test $pkg_failed = untried; then xrender_found=no else @@ -3313,6 +3404,9 @@ echo "$as_me:$LINENO: checking for XFT" >&5 echo $ECHO_N "checking for XFT... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XFT_CFLAGS"; then + pkg_cv_XFT_CFLAGS="$XFT_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xft\"") >&5 ($PKG_CONFIG --exists --print-errors "xft") 2>&5 @@ -3323,10 +3417,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 "$XFT_LIBS"; then + pkg_cv_XFT_LIBS="$XFT_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xft\"") >&5 ($PKG_CONFIG --exists --print-errors "xft") 2>&5 @@ -3337,16 +3435,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft"` + +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 + XFT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xft"` + else + XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft"` + fi # Put the nasty error message in config.log where it belongs - echo "$XFT_PKG_ERRORS" 1>&5 + echo "$XFT_PKG_ERRORS" >&5 - xft_found=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + xft_found=no elif test $pkg_failed = untried; then xft_found=no else @@ -3375,6 +3488,9 @@ echo "$as_me:$LINENO: checking for XEXT" >&5 echo $ECHO_N "checking for XEXT... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XEXT_CFLAGS"; then + pkg_cv_XEXT_CFLAGS="$XEXT_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xext\"") >&5 ($PKG_CONFIG --exists --print-errors "xext") 2>&5 @@ -3385,10 +3501,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 "$XEXT_LIBS"; then + pkg_cv_XEXT_LIBS="$XEXT_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xext\"") >&5 ($PKG_CONFIG --exists --print-errors "xext") 2>&5 @@ -3399,16 +3519,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XEXT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xext"` + +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 + XEXT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xext"` + else + XEXT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xext"` + fi # Put the nasty error message in config.log where it belongs - echo "$XEXT_PKG_ERRORS" 1>&5 + echo "$XEXT_PKG_ERRORS" >&5 - xext_found=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + xext_found=no elif test $pkg_failed = untried; then xext_found=no else diff --git a/app/xauth/aclocal.m4 b/app/xauth/aclocal.m4 index 68f92a03c..65663b720 100644 --- a/app/xauth/aclocal.m4 +++ b/app/xauth/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/xauth/configure b/app/xauth/configure index dc02b97a1..c4e08fdaf 100644 --- a/app/xauth/configure +++ b/app/xauth/configure @@ -1451,6 +1451,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 && @@ -3799,6 +3840,9 @@ echo "$as_me:$LINENO: checking for XAUTH" >&5 echo $ECHO_N "checking for XAUTH... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XAUTH_CFLAGS"; then + pkg_cv_XAUTH_CFLAGS="$XAUTH_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xau xext xmuu\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xau xext xmuu") 2>&5 @@ -3809,10 +3853,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 "$XAUTH_LIBS"; then + pkg_cv_XAUTH_LIBS="$XAUTH_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xau xext xmuu\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xau xext xmuu") 2>&5 @@ -3823,38 +3871,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XAUTH_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xau xext xmuu"` + +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 + XAUTH_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 xau xext xmuu"` + else + XAUTH_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xau xext xmuu"` + fi # Put the nasty error message in config.log where it belongs - echo "$XAUTH_PKG_ERRORS" 1>&5 + echo "$XAUTH_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11 xau xext xmuu) were not met: + +$XAUTH_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11 xau xext xmuu) 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 XAUTH_CFLAGS and XAUTH_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 (x11 xau xext xmuu) were not met. +Alternatively, you may set the environment variables XAUTH_CFLAGS +and XAUTH_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 (x11 xau xext xmuu) were not met: + +$XAUTH_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XAUTH_CFLAGS and XAUTH_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 XAUTH_CFLAGS +and XAUTH_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 XAUTH_CFLAGS and XAUTH_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 XAUTH_CFLAGS +and XAUTH_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 @@ -3862,9 +3931,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 XAUTH_CFLAGS and XAUTH_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 XAUTH_CFLAGS +and XAUTH_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;} diff --git a/app/xbiff/aclocal.m4 b/app/xbiff/aclocal.m4 index cf4de4f63..d8c0aaaab 100644 --- a/app/xbiff/aclocal.m4 +++ b/app/xbiff/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/xbiff/configure b/app/xbiff/configure index 923e4bf4a..2585e2f98 100644 --- a/app/xbiff/configure +++ b/app/xbiff/configure @@ -1415,6 +1415,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 && @@ -3049,6 +3090,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3059,10 +3103,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3073,16 +3121,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK1"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3100,6 +3163,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3110,10 +3176,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3124,16 +3194,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK2"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3173,6 +3258,9 @@ echo "$as_me:$LINENO: checking for XBIFF" >&5 echo $ECHO_N "checking for XBIFF... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XBIFF_CFLAGS"; then + pkg_cv_XBIFF_CFLAGS="$XBIFF_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xbitmaps xext\"") >&5 ($PKG_CONFIG --exists --print-errors "xbitmaps xext") 2>&5 @@ -3183,10 +3271,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 "$XBIFF_LIBS"; then + pkg_cv_XBIFF_LIBS="$XBIFF_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xbitmaps xext\"") >&5 ($PKG_CONFIG --exists --print-errors "xbitmaps xext") 2>&5 @@ -3197,38 +3289,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XBIFF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xbitmaps xext"` + +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 + XBIFF_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xbitmaps xext"` + else + XBIFF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xbitmaps xext"` + fi # Put the nasty error message in config.log where it belongs - echo "$XBIFF_PKG_ERRORS" 1>&5 + echo "$XBIFF_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xbitmaps xext) were not met: + +$XBIFF_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xbitmaps xext) 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 XBIFF_CFLAGS and XBIFF_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 (xbitmaps xext) were not met. +Alternatively, you may set the environment variables XBIFF_CFLAGS +and XBIFF_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 (xbitmaps xext) were not met: + +$XBIFF_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XBIFF_CFLAGS and XBIFF_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 XBIFF_CFLAGS +and XBIFF_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 XBIFF_CFLAGS and XBIFF_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 XBIFF_CFLAGS +and XBIFF_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 @@ -3236,9 +3349,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 XBIFF_CFLAGS and XBIFF_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 XBIFF_CFLAGS +and XBIFF_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;} diff --git a/app/xcalc/aclocal.m4 b/app/xcalc/aclocal.m4 index cf4de4f63..d8c0aaaab 100644 --- a/app/xcalc/aclocal.m4 +++ b/app/xcalc/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/xcalc/configure b/app/xcalc/configure index 92797acf0..1f6abfccb 100644 --- a/app/xcalc/configure +++ b/app/xcalc/configure @@ -1416,6 +1416,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 && @@ -3050,6 +3091,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3060,10 +3104,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3074,16 +3122,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK1"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3101,6 +3164,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3111,10 +3177,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3125,16 +3195,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK2"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3178,6 +3263,9 @@ echo "$as_me:$LINENO: checking for APPDEFS" >&5 echo $ECHO_N "checking for APPDEFS... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$APPDEFS_CFLAGS"; then + pkg_cv_APPDEFS_CFLAGS="$APPDEFS_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3188,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 "$APPDEFS_LIBS"; then + pkg_cv_APPDEFS_LIBS="$APPDEFS_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3202,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 - APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + +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 + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xt"` + else + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + fi # Put the nasty error message in config.log where it belongs - echo "$APPDEFS_PKG_ERRORS" 1>&5 + echo "$APPDEFS_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xt) were not met: + +$APPDEFS_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xt) 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 APPDEFS_CFLAGS and APPDEFS_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 (xt) were not met. +Alternatively, you may set the environment variables APPDEFS_CFLAGS +and APPDEFS_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 (xt) were not met: + +$APPDEFS_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 @@ -3241,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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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;} diff --git a/app/xclipboard/aclocal.m4 b/app/xclipboard/aclocal.m4 index cf4de4f63..d8c0aaaab 100644 --- a/app/xclipboard/aclocal.m4 +++ b/app/xclipboard/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/xclipboard/configure b/app/xclipboard/configure index 4463769ff..96b7ddba7 100644 --- a/app/xclipboard/configure +++ b/app/xclipboard/configure @@ -1416,6 +1416,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 && @@ -3051,6 +3092,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3061,10 +3105,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3075,16 +3123,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK1"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3102,6 +3165,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3112,10 +3178,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3126,16 +3196,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK2"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3178,6 +3263,9 @@ echo "$as_me:$LINENO: checking for APPDEFS" >&5 echo $ECHO_N "checking for APPDEFS... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$APPDEFS_CFLAGS"; then + pkg_cv_APPDEFS_CFLAGS="$APPDEFS_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3188,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 "$APPDEFS_LIBS"; then + pkg_cv_APPDEFS_LIBS="$APPDEFS_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3202,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 - APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + +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 + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xt"` + else + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + fi # Put the nasty error message in config.log where it belongs - echo "$APPDEFS_PKG_ERRORS" 1>&5 + echo "$APPDEFS_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xt) were not met: + +$APPDEFS_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xt) 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 APPDEFS_CFLAGS and APPDEFS_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 (xt) were not met. +Alternatively, you may set the environment variables APPDEFS_CFLAGS +and APPDEFS_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 (xt) were not met: + +$APPDEFS_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 @@ -3241,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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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;} diff --git a/app/xclock/aclocal.m4 b/app/xclock/aclocal.m4 index cf4de4f63..d8c0aaaab 100644 --- a/app/xclock/aclocal.m4 +++ b/app/xclock/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/xclock/configure b/app/xclock/configure index eb438cd28..c5c45b6b5 100644 --- a/app/xclock/configure +++ b/app/xclock/configure @@ -1450,6 +1450,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 && @@ -3166,6 +3207,9 @@ echo "$as_me:$LINENO: checking for XCLOCK_X11" >&5 echo $ECHO_N "checking for XCLOCK_X11... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XCLOCK_X11_CFLAGS"; then + pkg_cv_XCLOCK_X11_CFLAGS="$XCLOCK_X11_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 @@ -3176,10 +3220,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 "$XCLOCK_X11_LIBS"; then + pkg_cv_XCLOCK_X11_LIBS="$XCLOCK_X11_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 @@ -3190,38 +3238,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XCLOCK_X11_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + +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 + XCLOCK_X11_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11"` + else + XCLOCK_X11_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + fi # Put the nasty error message in config.log where it belongs - echo "$XCLOCK_X11_PKG_ERRORS" 1>&5 + echo "$XCLOCK_X11_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11) were not met: + +$XCLOCK_X11_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11) 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 XCLOCK_X11_CFLAGS and XCLOCK_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 (x11) were not met. +Alternatively, you may set the environment variables XCLOCK_X11_CFLAGS +and XCLOCK_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 (x11) were not met: + +$XCLOCK_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 XCLOCK_X11_CFLAGS and XCLOCK_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 XCLOCK_X11_CFLAGS +and XCLOCK_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 XCLOCK_X11_CFLAGS and XCLOCK_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 XCLOCK_X11_CFLAGS +and XCLOCK_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 @@ -3229,9 +3298,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 XCLOCK_X11_CFLAGS and XCLOCK_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 XCLOCK_X11_CFLAGS +and XCLOCK_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;} @@ -3271,6 +3340,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3281,10 +3353,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3295,16 +3371,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK1"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3322,6 +3413,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3332,10 +3426,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3346,16 +3444,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK2"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3407,6 +3520,9 @@ echo "$as_me:$LINENO: checking for XFT" >&5 echo $ECHO_N "checking for XFT... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XFT_CFLAGS"; then + pkg_cv_XFT_CFLAGS="$XFT_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xrender xft\"") >&5 ($PKG_CONFIG --exists --print-errors "xrender xft") 2>&5 @@ -3417,10 +3533,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 "$XFT_LIBS"; then + pkg_cv_XFT_LIBS="$XFT_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xrender xft\"") >&5 ($PKG_CONFIG --exists --print-errors "xrender xft") 2>&5 @@ -3431,38 +3551,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xrender xft"` + +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 + XFT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xrender xft"` + else + XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xrender xft"` + fi # Put the nasty error message in config.log where it belongs - echo "$XFT_PKG_ERRORS" 1>&5 + echo "$XFT_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xrender xft) were not met: + +$XFT_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xrender xft) 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 XFT_CFLAGS and XFT_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 (xrender xft) were not met. +Alternatively, you may set the environment variables XFT_CFLAGS +and XFT_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 (xrender xft) were not met: + +$XFT_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XFT_CFLAGS and XFT_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 XFT_CFLAGS +and XFT_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 XFT_CFLAGS and XFT_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 XFT_CFLAGS +and XFT_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 @@ -3470,9 +3611,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 XFT_CFLAGS and XFT_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 XFT_CFLAGS +and XFT_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;} @@ -3639,6 +3780,9 @@ echo "$as_me:$LINENO: checking for XKB" >&5 echo $ECHO_N "checking for XKB... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XKB_CFLAGS"; then + pkg_cv_XKB_CFLAGS="$XKB_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xkbfile\"") >&5 ($PKG_CONFIG --exists --print-errors "xkbfile") 2>&5 @@ -3649,10 +3793,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 "$XKB_LIBS"; then + pkg_cv_XKB_LIBS="$XKB_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xkbfile\"") >&5 ($PKG_CONFIG --exists --print-errors "xkbfile") 2>&5 @@ -3663,38 +3811,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XKB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xkbfile"` + +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 + XKB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xkbfile"` + else + XKB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xkbfile"` + fi # Put the nasty error message in config.log where it belongs - echo "$XKB_PKG_ERRORS" 1>&5 + echo "$XKB_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xkbfile) were not met: + +$XKB_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xkbfile) 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 XKB_CFLAGS and XKB_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 (xkbfile) were not met. +Alternatively, you may set the environment variables XKB_CFLAGS +and XKB_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 (xkbfile) were not met: + +$XKB_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XKB_CFLAGS and XKB_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 XKB_CFLAGS +and XKB_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 XKB_CFLAGS and XKB_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 XKB_CFLAGS +and XKB_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 @@ -3702,9 +3871,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 XKB_CFLAGS and XKB_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 XKB_CFLAGS +and XKB_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;} @@ -3734,6 +3903,9 @@ echo "$as_me:$LINENO: checking for APPDEFS" >&5 echo $ECHO_N "checking for APPDEFS... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$APPDEFS_CFLAGS"; then + pkg_cv_APPDEFS_CFLAGS="$APPDEFS_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3744,10 +3916,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 "$APPDEFS_LIBS"; then + pkg_cv_APPDEFS_LIBS="$APPDEFS_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3758,38 +3934,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + +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 + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xt"` + else + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + fi # Put the nasty error message in config.log where it belongs - echo "$APPDEFS_PKG_ERRORS" 1>&5 + echo "$APPDEFS_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xt) were not met: + +$APPDEFS_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xt) 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 APPDEFS_CFLAGS and APPDEFS_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 (xt) were not met. +Alternatively, you may set the environment variables APPDEFS_CFLAGS +and APPDEFS_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 (xt) were not met: + +$APPDEFS_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 @@ -3797,9 +3994,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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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;} diff --git a/app/xcmsdb/aclocal.m4 b/app/xcmsdb/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/xcmsdb/aclocal.m4 +++ b/app/xcmsdb/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/xcmsdb/configure b/app/xcmsdb/configure index 2809e91fd..d39fb761d 100644 --- a/app/xcmsdb/configure +++ b/app/xcmsdb/configure @@ -1402,6 +1402,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 && @@ -3015,6 +3056,9 @@ echo "$as_me:$LINENO: checking for XCMSDB" >&5 echo $ECHO_N "checking for XCMSDB... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XCMSDB_CFLAGS"; then + pkg_cv_XCMSDB_CFLAGS="$XCMSDB_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 @@ -3025,10 +3069,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 "$XCMSDB_LIBS"; then + pkg_cv_XCMSDB_LIBS="$XCMSDB_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 @@ -3039,38 +3087,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XCMSDB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + +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 + XCMSDB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11"` + else + XCMSDB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + fi # Put the nasty error message in config.log where it belongs - echo "$XCMSDB_PKG_ERRORS" 1>&5 + echo "$XCMSDB_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11) were not met: + +$XCMSDB_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11) 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 XCMSDB_CFLAGS and XCMSDB_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 (x11) were not met. +Alternatively, you may set the environment variables XCMSDB_CFLAGS +and XCMSDB_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 (x11) were not met: + +$XCMSDB_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XCMSDB_CFLAGS and XCMSDB_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 XCMSDB_CFLAGS +and XCMSDB_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 XCMSDB_CFLAGS and XCMSDB_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 XCMSDB_CFLAGS +and XCMSDB_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 @@ -3078,9 +3147,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 XCMSDB_CFLAGS and XCMSDB_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 XCMSDB_CFLAGS +and XCMSDB_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;} diff --git a/app/xconsole/aclocal.m4 b/app/xconsole/aclocal.m4 index cf4de4f63..d8c0aaaab 100644 --- a/app/xconsole/aclocal.m4 +++ b/app/xconsole/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/xconsole/configure b/app/xconsole/configure index 9fa3b78b3..5c9f51156 100644 --- a/app/xconsole/configure +++ b/app/xconsole/configure @@ -1461,6 +1461,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 && @@ -3096,6 +3137,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3106,10 +3150,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3120,16 +3168,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK1"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3147,6 +3210,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3157,10 +3223,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3171,16 +3241,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK2"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3223,6 +3308,9 @@ echo "$as_me:$LINENO: checking for APPDEFS" >&5 echo $ECHO_N "checking for APPDEFS... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$APPDEFS_CFLAGS"; then + pkg_cv_APPDEFS_CFLAGS="$APPDEFS_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3233,10 +3321,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 "$APPDEFS_LIBS"; then + pkg_cv_APPDEFS_LIBS="$APPDEFS_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3247,38 +3339,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + +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 + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xt"` + else + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + fi # Put the nasty error message in config.log where it belongs - echo "$APPDEFS_PKG_ERRORS" 1>&5 + echo "$APPDEFS_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xt) were not met: + +$APPDEFS_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xt) 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 APPDEFS_CFLAGS and APPDEFS_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 (xt) were not met. +Alternatively, you may set the environment variables APPDEFS_CFLAGS +and APPDEFS_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 (xt) were not met: + +$APPDEFS_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 @@ -3286,9 +3399,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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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;} diff --git a/app/xdm/aclocal.m4 b/app/xdm/aclocal.m4 index b6752e7b7..22d09b48f 100644 --- a/app/xdm/aclocal.m4 +++ b/app/xdm/aclocal.m4 @@ -7271,6 +7271,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/xdm/ltmain.sh b/app/xdm/ltmain.sh index ef5ee686b..85faf0734 100644 --- a/app/xdm/ltmain.sh +++ b/app/xdm/ltmain.sh @@ -1604,6 +1604,7 @@ EOF compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" + deplibs="$deplibs $arg" continue ;; @@ -2111,6 +2112,7 @@ EOF finalize_deplibs="$deplib $finalize_deplibs" else compiler_flags="$compiler_flags $deplib" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue ;; @@ -5822,6 +5824,10 @@ relink_command=\"$relink_command\"" esac install_prog="$install_prog $arg" done + case " $install_prog " in + *[\\\ /]cp\ *) extra_mode=;; + *) extra_mode='-m 644';; + esac if test -z "$install_prog"; then $echo "$modename: you must specify an install program" 1>&2 @@ -5976,8 +5982,8 @@ relink_command=\"$relink_command\"" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. - $show "$install_prog $dir/$srcname $destdir/$realname" - $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? + $show "$install_prog $extra_mode $dir/$srcname $destdir/$realname" + $run eval "$install_prog $extra_mode $dir/$srcname $destdir/$realname" || exit $? if test -n "$stripme" && test -n "$striplib"; then $show "$striplib $destdir/$realname" $run eval "$striplib $destdir/$realname" || exit $? @@ -6022,8 +6028,8 @@ relink_command=\"$relink_command\"" # Install the pseudo-library for information purposes. name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` instname="$dir/$name"i - $show "$install_prog $instname $destdir/$name" - $run eval "$install_prog $instname $destdir/$name" || exit $? + $show "$install_prog $extra_mode $instname $destdir/$name" + $run eval "$install_prog $extra_mode $instname $destdir/$name" || exit $? # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" @@ -6058,8 +6064,8 @@ relink_command=\"$relink_command\"" # Install the libtool object if requested. if test -n "$destfile"; then - $show "$install_prog $file $destfile" - $run eval "$install_prog $file $destfile" || exit $? + $show "$install_prog $extra_mode $file $destfile" + $run eval "$install_prog $extra_mode $file $destfile" || exit $? fi # Install the old object if enabled. @@ -6067,8 +6073,8 @@ relink_command=\"$relink_command\"" # Deduce the name of the old-style object file. staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` - $show "$install_prog $staticobj $staticdest" - $run eval "$install_prog \$staticobj \$staticdest" || exit $? + $show "$install_prog $extra_mode $staticobj $staticdest" + $run eval "$install_prog $extra_mode \$staticobj \$staticdest" || exit $? fi exit $EXIT_SUCCESS ;; diff --git a/app/xdpyinfo/aclocal.m4 b/app/xdpyinfo/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/xdpyinfo/aclocal.m4 +++ b/app/xdpyinfo/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/xdpyinfo/configure b/app/xdpyinfo/configure index 0e89c9b52..808ebe326 100644 --- a/app/xdpyinfo/configure +++ b/app/xdpyinfo/configure @@ -1547,6 +1547,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 && @@ -3160,6 +3201,9 @@ echo "$as_me:$LINENO: checking for XDPYINFO" >&5 echo $ECHO_N "checking for XDPYINFO... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XDPYINFO_CFLAGS"; then + pkg_cv_XDPYINFO_CFLAGS="$XDPYINFO_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xext x11 xtst\"") >&5 ($PKG_CONFIG --exists --print-errors "xext x11 xtst") 2>&5 @@ -3170,10 +3214,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 "$XDPYINFO_LIBS"; then + pkg_cv_XDPYINFO_LIBS="$XDPYINFO_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xext x11 xtst\"") >&5 ($PKG_CONFIG --exists --print-errors "xext x11 xtst") 2>&5 @@ -3184,38 +3232,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XDPYINFO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xext x11 xtst"` + +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 + XDPYINFO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xext x11 xtst"` + else + XDPYINFO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xext x11 xtst"` + fi # Put the nasty error message in config.log where it belongs - echo "$XDPYINFO_PKG_ERRORS" 1>&5 + echo "$XDPYINFO_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xext x11 xtst) were not met: + +$XDPYINFO_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xext x11 xtst) 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 XDPYINFO_CFLAGS and XDPYINFO_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 xtst) were not met. +Alternatively, you may set the environment variables XDPYINFO_CFLAGS +and XDPYINFO_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 xtst) were not met: + +$XDPYINFO_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XDPYINFO_CFLAGS and XDPYINFO_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 XDPYINFO_CFLAGS +and XDPYINFO_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 XDPYINFO_CFLAGS and XDPYINFO_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 XDPYINFO_CFLAGS +and XDPYINFO_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 @@ -3223,9 +3292,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 XDPYINFO_CFLAGS and XDPYINFO_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 XDPYINFO_CFLAGS +and XDPYINFO_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;} @@ -3247,6 +3316,9 @@ echo "$as_me:$LINENO: checking for DPY_X11" >&5 echo $ECHO_N "checking for DPY_X11... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$DPY_X11_CFLAGS"; then + pkg_cv_DPY_X11_CFLAGS="$DPY_X11_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 @@ -3257,10 +3329,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 "$DPY_X11_LIBS"; then + pkg_cv_DPY_X11_LIBS="$DPY_X11_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 @@ -3271,38 +3347,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - DPY_X11_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + +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 + DPY_X11_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11"` + else + DPY_X11_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + fi # Put the nasty error message in config.log where it belongs - echo "$DPY_X11_PKG_ERRORS" 1>&5 + echo "$DPY_X11_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11) were not met: + +$DPY_X11_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11) 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 DPY_X11_CFLAGS and DPY_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 (x11) were not met. +Alternatively, you may set the environment variables DPY_X11_CFLAGS +and DPY_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 (x11) were not met: + +$DPY_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 DPY_X11_CFLAGS and DPY_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 DPY_X11_CFLAGS +and DPY_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 DPY_X11_CFLAGS and DPY_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 DPY_X11_CFLAGS +and DPY_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 @@ -3310,9 +3407,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 DPY_X11_CFLAGS and DPY_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 DPY_X11_CFLAGS +and DPY_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;} @@ -3332,6 +3429,9 @@ echo "$as_me:$LINENO: checking for DPY_XEXT" >&5 echo $ECHO_N "checking for DPY_XEXT... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$DPY_XEXT_CFLAGS"; then + pkg_cv_DPY_XEXT_CFLAGS="$DPY_XEXT_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xext\"") >&5 ($PKG_CONFIG --exists --print-errors "xext") 2>&5 @@ -3342,10 +3442,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 "$DPY_XEXT_LIBS"; then + pkg_cv_DPY_XEXT_LIBS="$DPY_XEXT_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xext\"") >&5 ($PKG_CONFIG --exists --print-errors "xext") 2>&5 @@ -3356,16 +3460,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - DPY_XEXT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xext"` + +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 + DPY_XEXT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xext"` + else + DPY_XEXT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xext"` + fi # Put the nasty error message in config.log where it belongs - echo "$DPY_XEXT_PKG_ERRORS" 1>&5 + echo "$DPY_XEXT_PKG_ERRORS" >&5 - echo "not found" + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + echo "not found" elif test $pkg_failed = untried; then echo "not found" else @@ -3446,6 +3565,9 @@ echo "$as_me:$LINENO: checking for DPY_XKB" >&5 echo $ECHO_N "checking for DPY_XKB... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$DPY_XKB_CFLAGS"; then + pkg_cv_DPY_XKB_CFLAGS="$DPY_XKB_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 @@ -3456,10 +3578,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 "$DPY_XKB_LIBS"; then + pkg_cv_DPY_XKB_LIBS="$DPY_XKB_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 @@ -3470,16 +3596,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - DPY_XKB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + +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 + DPY_XKB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11"` + else + DPY_XKB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + fi # Put the nasty error message in config.log where it belongs - echo "$DPY_XKB_PKG_ERRORS" 1>&5 + echo "$DPY_XKB_PKG_ERRORS" >&5 - echo "not found" + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + echo "not found" elif test $pkg_failed = untried; then echo "not found" else @@ -3560,6 +3701,9 @@ echo "$as_me:$LINENO: checking for DPY_XF86VIDMODE" >&5 echo $ECHO_N "checking for DPY_XF86VIDMODE... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$DPY_XF86VIDMODE_CFLAGS"; then + pkg_cv_DPY_XF86VIDMODE_CFLAGS="$DPY_XF86VIDMODE_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xxf86vm\"") >&5 ($PKG_CONFIG --exists --print-errors "xxf86vm") 2>&5 @@ -3570,10 +3714,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 "$DPY_XF86VIDMODE_LIBS"; then + pkg_cv_DPY_XF86VIDMODE_LIBS="$DPY_XF86VIDMODE_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xxf86vm\"") >&5 ($PKG_CONFIG --exists --print-errors "xxf86vm") 2>&5 @@ -3584,16 +3732,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - DPY_XF86VIDMODE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xxf86vm"` + +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 + DPY_XF86VIDMODE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xxf86vm"` + else + DPY_XF86VIDMODE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xxf86vm"` + fi # Put the nasty error message in config.log where it belongs - echo "$DPY_XF86VIDMODE_PKG_ERRORS" 1>&5 + echo "$DPY_XF86VIDMODE_PKG_ERRORS" >&5 - echo "not found" + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + echo "not found" elif test $pkg_failed = untried; then echo "not found" else @@ -3674,6 +3837,9 @@ echo "$as_me:$LINENO: checking for DPY_XF86DGA" >&5 echo $ECHO_N "checking for DPY_XF86DGA... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$DPY_XF86DGA_CFLAGS"; then + pkg_cv_DPY_XF86DGA_CFLAGS="$DPY_XF86DGA_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xxf86dga\"") >&5 ($PKG_CONFIG --exists --print-errors "xxf86dga") 2>&5 @@ -3684,10 +3850,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 "$DPY_XF86DGA_LIBS"; then + pkg_cv_DPY_XF86DGA_LIBS="$DPY_XF86DGA_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xxf86dga\"") >&5 ($PKG_CONFIG --exists --print-errors "xxf86dga") 2>&5 @@ -3698,16 +3868,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - DPY_XF86DGA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xxf86dga"` + +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 + DPY_XF86DGA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xxf86dga"` + else + DPY_XF86DGA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xxf86dga"` + fi # Put the nasty error message in config.log where it belongs - echo "$DPY_XF86DGA_PKG_ERRORS" 1>&5 + echo "$DPY_XF86DGA_PKG_ERRORS" >&5 - echo "not found" + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + echo "not found" elif test $pkg_failed = untried; then echo "not found" else @@ -3789,6 +3974,9 @@ echo "$as_me:$LINENO: checking for DPY_XF86MISC" >&5 echo $ECHO_N "checking for DPY_XF86MISC... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$DPY_XF86MISC_CFLAGS"; then + pkg_cv_DPY_XF86MISC_CFLAGS="$DPY_XF86MISC_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xxf86misc\"") >&5 ($PKG_CONFIG --exists --print-errors "xxf86misc") 2>&5 @@ -3799,10 +3987,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 "$DPY_XF86MISC_LIBS"; then + pkg_cv_DPY_XF86MISC_LIBS="$DPY_XF86MISC_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xxf86misc\"") >&5 ($PKG_CONFIG --exists --print-errors "xxf86misc") 2>&5 @@ -3813,16 +4005,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - DPY_XF86MISC_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xxf86misc"` + +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 + DPY_XF86MISC_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xxf86misc"` + else + DPY_XF86MISC_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xxf86misc"` + fi # Put the nasty error message in config.log where it belongs - echo "$DPY_XF86MISC_PKG_ERRORS" 1>&5 + echo "$DPY_XF86MISC_PKG_ERRORS" >&5 - echo "not found" + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + echo "not found" elif test $pkg_failed = untried; then echo "not found" else @@ -3904,6 +4111,9 @@ echo "$as_me:$LINENO: checking for DPY_XINPUT" >&5 echo $ECHO_N "checking for DPY_XINPUT... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$DPY_XINPUT_CFLAGS"; then + pkg_cv_DPY_XINPUT_CFLAGS="$DPY_XINPUT_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xi\"") >&5 ($PKG_CONFIG --exists --print-errors "xi") 2>&5 @@ -3914,10 +4124,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 "$DPY_XINPUT_LIBS"; then + pkg_cv_DPY_XINPUT_LIBS="$DPY_XINPUT_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xi\"") >&5 ($PKG_CONFIG --exists --print-errors "xi") 2>&5 @@ -3928,16 +4142,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - DPY_XINPUT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xi"` + +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 + DPY_XINPUT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xi"` + else + DPY_XINPUT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xi"` + fi # Put the nasty error message in config.log where it belongs - echo "$DPY_XINPUT_PKG_ERRORS" 1>&5 + echo "$DPY_XINPUT_PKG_ERRORS" >&5 - echo "not found" + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + echo "not found" elif test $pkg_failed = untried; then echo "not found" else @@ -4017,6 +4246,9 @@ echo "$as_me:$LINENO: checking for DPY_XRENDER" >&5 echo $ECHO_N "checking for DPY_XRENDER... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$DPY_XRENDER_CFLAGS"; then + pkg_cv_DPY_XRENDER_CFLAGS="$DPY_XRENDER_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xrender\"") >&5 ($PKG_CONFIG --exists --print-errors "xrender") 2>&5 @@ -4027,10 +4259,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 "$DPY_XRENDER_LIBS"; then + pkg_cv_DPY_XRENDER_LIBS="$DPY_XRENDER_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xrender\"") >&5 ($PKG_CONFIG --exists --print-errors "xrender") 2>&5 @@ -4041,16 +4277,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - DPY_XRENDER_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xrender"` + +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 + DPY_XRENDER_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xrender"` + else + DPY_XRENDER_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xrender"` + fi # Put the nasty error message in config.log where it belongs - echo "$DPY_XRENDER_PKG_ERRORS" 1>&5 + echo "$DPY_XRENDER_PKG_ERRORS" >&5 - echo "not found" + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + echo "not found" elif test $pkg_failed = untried; then echo "not found" else @@ -4130,6 +4381,9 @@ echo "$as_me:$LINENO: checking for DPY_XINERAMA" >&5 echo $ECHO_N "checking for DPY_XINERAMA... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$DPY_XINERAMA_CFLAGS"; then + pkg_cv_DPY_XINERAMA_CFLAGS="$DPY_XINERAMA_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xinerama\"") >&5 ($PKG_CONFIG --exists --print-errors "xinerama") 2>&5 @@ -4140,10 +4394,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 "$DPY_XINERAMA_LIBS"; then + pkg_cv_DPY_XINERAMA_LIBS="$DPY_XINERAMA_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xinerama\"") >&5 ($PKG_CONFIG --exists --print-errors "xinerama") 2>&5 @@ -4154,16 +4412,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - DPY_XINERAMA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xinerama"` + +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 + DPY_XINERAMA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xinerama"` + else + DPY_XINERAMA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xinerama"` + fi # Put the nasty error message in config.log where it belongs - echo "$DPY_XINERAMA_PKG_ERRORS" 1>&5 + echo "$DPY_XINERAMA_PKG_ERRORS" >&5 - echo "not found" + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + echo "not found" elif test $pkg_failed = untried; then echo "not found" else @@ -4243,6 +4516,9 @@ echo "$as_me:$LINENO: checking for DPY_DMX" >&5 echo $ECHO_N "checking for DPY_DMX... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$DPY_DMX_CFLAGS"; then + pkg_cv_DPY_DMX_CFLAGS="$DPY_DMX_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dmx\"") >&5 ($PKG_CONFIG --exists --print-errors "dmx") 2>&5 @@ -4253,10 +4529,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 "$DPY_DMX_LIBS"; then + pkg_cv_DPY_DMX_LIBS="$DPY_DMX_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dmx\"") >&5 ($PKG_CONFIG --exists --print-errors "dmx") 2>&5 @@ -4267,16 +4547,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - DPY_DMX_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dmx"` + +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 + DPY_DMX_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "dmx"` + else + DPY_DMX_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dmx"` + fi # Put the nasty error message in config.log where it belongs - echo "$DPY_DMX_PKG_ERRORS" 1>&5 + echo "$DPY_DMX_PKG_ERRORS" >&5 - echo "not found" + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + echo "not found" elif test $pkg_failed = untried; then echo "not found" else @@ -4356,6 +4651,9 @@ echo "$as_me:$LINENO: checking for DPY_XPRINT" >&5 echo $ECHO_N "checking for DPY_XPRINT... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$DPY_XPRINT_CFLAGS"; then + pkg_cv_DPY_XPRINT_CFLAGS="$DPY_XPRINT_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xp\"") >&5 ($PKG_CONFIG --exists --print-errors "xp") 2>&5 @@ -4366,10 +4664,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 "$DPY_XPRINT_LIBS"; then + pkg_cv_DPY_XPRINT_LIBS="$DPY_XPRINT_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xp\"") >&5 ($PKG_CONFIG --exists --print-errors "xp") 2>&5 @@ -4380,16 +4682,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - DPY_XPRINT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xp"` + +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 + DPY_XPRINT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xp"` + else + DPY_XPRINT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xp"` + fi # Put the nasty error message in config.log where it belongs - echo "$DPY_XPRINT_PKG_ERRORS" 1>&5 + echo "$DPY_XPRINT_PKG_ERRORS" >&5 - echo "not found" + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + echo "not found" elif test $pkg_failed = untried; then echo "not found" else @@ -4469,6 +4786,9 @@ echo "$as_me:$LINENO: checking for DPY_XTST" >&5 echo $ECHO_N "checking for DPY_XTST... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$DPY_XTST_CFLAGS"; then + pkg_cv_DPY_XTST_CFLAGS="$DPY_XTST_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xtst\"") >&5 ($PKG_CONFIG --exists --print-errors "xtst") 2>&5 @@ -4479,10 +4799,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 "$DPY_XTST_LIBS"; then + pkg_cv_DPY_XTST_LIBS="$DPY_XTST_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xtst\"") >&5 ($PKG_CONFIG --exists --print-errors "xtst") 2>&5 @@ -4493,16 +4817,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - DPY_XTST_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xtst"` + +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 + DPY_XTST_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xtst"` + else + DPY_XTST_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xtst"` + fi # Put the nasty error message in config.log where it belongs - echo "$DPY_XTST_PKG_ERRORS" 1>&5 + echo "$DPY_XTST_PKG_ERRORS" >&5 - echo "not found" + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + echo "not found" elif test $pkg_failed = untried; then echo "not found" else diff --git a/app/xdriinfo/aclocal.m4 b/app/xdriinfo/aclocal.m4 index 89a893bec..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]) @@ -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/xdriinfo/configure b/app/xdriinfo/configure index f5aa959e0..f3a309bb3 100644 --- a/app/xdriinfo/configure +++ b/app/xdriinfo/configure @@ -1403,6 +1403,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 && @@ -3087,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 @@ -3097,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 @@ -3111,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 @@ -3150,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;} diff --git a/app/xedit/aclocal.m4 b/app/xedit/aclocal.m4 index cf4de4f63..d8c0aaaab 100644 --- a/app/xedit/aclocal.m4 +++ b/app/xedit/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/xedit/configure b/app/xedit/configure index 027c655d7..af204702a 100644 --- a/app/xedit/configure +++ b/app/xedit/configure @@ -1428,6 +1428,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 && @@ -3143,6 +3184,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3153,10 +3197,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3167,16 +3215,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK1"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3194,6 +3257,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3204,10 +3270,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3218,16 +3288,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK2"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3268,6 +3353,9 @@ echo "$as_me:$LINENO: checking for XPRINT_UTIL" >&5 echo $ECHO_N "checking for XPRINT_UTIL... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XPRINT_UTIL_CFLAGS"; then + pkg_cv_XPRINT_UTIL_CFLAGS="$XPRINT_UTIL_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xprintutil xp\"") >&5 ($PKG_CONFIG --exists --print-errors "xprintutil xp") 2>&5 @@ -3278,10 +3366,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 "$XPRINT_UTIL_LIBS"; then + pkg_cv_XPRINT_UTIL_LIBS="$XPRINT_UTIL_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xprintutil xp\"") >&5 ($PKG_CONFIG --exists --print-errors "xprintutil xp") 2>&5 @@ -3292,38 +3384,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XPRINT_UTIL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xprintutil xp"` + +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 + XPRINT_UTIL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xprintutil xp"` + else + XPRINT_UTIL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xprintutil xp"` + fi # Put the nasty error message in config.log where it belongs - echo "$XPRINT_UTIL_PKG_ERRORS" 1>&5 + echo "$XPRINT_UTIL_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xprintutil xp) were not met: + +$XPRINT_UTIL_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xprintutil xp) 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 XPRINT_UTIL_CFLAGS and XPRINT_UTIL_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 (xprintutil xp) were not met. +Alternatively, you may set the environment variables XPRINT_UTIL_CFLAGS +and XPRINT_UTIL_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 (xprintutil xp) were not met: + +$XPRINT_UTIL_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XPRINT_UTIL_CFLAGS and XPRINT_UTIL_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 XPRINT_UTIL_CFLAGS +and XPRINT_UTIL_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 XPRINT_UTIL_CFLAGS and XPRINT_UTIL_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 XPRINT_UTIL_CFLAGS +and XPRINT_UTIL_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 @@ -3331,9 +3444,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 XPRINT_UTIL_CFLAGS and XPRINT_UTIL_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 XPRINT_UTIL_CFLAGS +and XPRINT_UTIL_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;} @@ -3359,6 +3472,9 @@ echo "$as_me:$LINENO: checking for APPDEFS" >&5 echo $ECHO_N "checking for APPDEFS... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$APPDEFS_CFLAGS"; then + pkg_cv_APPDEFS_CFLAGS="$APPDEFS_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3369,10 +3485,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 "$APPDEFS_LIBS"; then + pkg_cv_APPDEFS_LIBS="$APPDEFS_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3383,38 +3503,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + +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 + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xt"` + else + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + fi # Put the nasty error message in config.log where it belongs - echo "$APPDEFS_PKG_ERRORS" 1>&5 + echo "$APPDEFS_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xt) were not met: + +$APPDEFS_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xt) 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 APPDEFS_CFLAGS and APPDEFS_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 (xt) were not met. +Alternatively, you may set the environment variables APPDEFS_CFLAGS +and APPDEFS_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 (xt) were not met: + +$APPDEFS_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 @@ -3422,9 +3563,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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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;} diff --git a/app/xev/aclocal.m4 b/app/xev/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/xev/aclocal.m4 +++ b/app/xev/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/xev/configure b/app/xev/configure index 1cbe9b045..238135c5a 100644 --- a/app/xev/configure +++ b/app/xev/configure @@ -1401,6 +1401,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 && @@ -3014,6 +3055,9 @@ echo "$as_me:$LINENO: checking for XEV" >&5 echo $ECHO_N "checking for XEV... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XEV_CFLAGS"; then + pkg_cv_XEV_CFLAGS="$XEV_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 @@ -3024,10 +3068,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 "$XEV_LIBS"; then + pkg_cv_XEV_LIBS="$XEV_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 @@ -3038,38 +3086,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XEV_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + +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 + XEV_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11"` + else + XEV_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + fi # Put the nasty error message in config.log where it belongs - echo "$XEV_PKG_ERRORS" 1>&5 + echo "$XEV_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11) were not met: + +$XEV_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11) 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 XEV_CFLAGS and XEV_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 (x11) were not met. +Alternatively, you may set the environment variables XEV_CFLAGS +and XEV_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 (x11) were not met: + +$XEV_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XEV_CFLAGS and XEV_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 XEV_CFLAGS +and XEV_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 XEV_CFLAGS and XEV_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 XEV_CFLAGS +and XEV_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 @@ -3077,9 +3146,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 XEV_CFLAGS and XEV_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 XEV_CFLAGS +and XEV_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;} diff --git a/app/xeyes/aclocal.m4 b/app/xeyes/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/xeyes/aclocal.m4 +++ b/app/xeyes/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/xeyes/configure b/app/xeyes/configure index 69e4d021f..31909009b 100644 --- a/app/xeyes/configure +++ b/app/xeyes/configure @@ -1402,6 +1402,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 && @@ -3015,6 +3056,9 @@ echo "$as_me:$LINENO: checking for XEYES" >&5 echo $ECHO_N "checking for XEYES... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XEYES_CFLAGS"; then + pkg_cv_XEYES_CFLAGS="$XEYES_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xt xext xmu\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xt xext xmu") 2>&5 @@ -3025,10 +3069,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 "$XEYES_LIBS"; then + pkg_cv_XEYES_LIBS="$XEYES_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xt xext xmu\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xt xext xmu") 2>&5 @@ -3039,38 +3087,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XEYES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xt xext xmu"` + +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 + XEYES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 xt xext xmu"` + else + XEYES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xt xext xmu"` + fi # Put the nasty error message in config.log where it belongs - echo "$XEYES_PKG_ERRORS" 1>&5 + echo "$XEYES_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11 xt xext xmu) were not met: + +$XEYES_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11 xt xext xmu) 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 XEYES_CFLAGS and XEYES_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 (x11 xt xext xmu) were not met. +Alternatively, you may set the environment variables XEYES_CFLAGS +and XEYES_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 (x11 xt xext xmu) were not met: + +$XEYES_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XEYES_CFLAGS and XEYES_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 XEYES_CFLAGS +and XEYES_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 XEYES_CFLAGS and XEYES_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 XEYES_CFLAGS +and XEYES_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 @@ -3078,9 +3147,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 XEYES_CFLAGS and XEYES_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 XEYES_CFLAGS +and XEYES_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;} diff --git a/app/xf86dga/aclocal.m4 b/app/xf86dga/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/xf86dga/aclocal.m4 +++ b/app/xf86dga/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/xf86dga/configure b/app/xf86dga/configure index e2343cdf5..e6866f629 100644 --- a/app/xf86dga/configure +++ b/app/xf86dga/configure @@ -1403,6 +1403,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 && @@ -3016,6 +3057,9 @@ echo "$as_me:$LINENO: checking for XF86DGA" >&5 echo $ECHO_N "checking for XF86DGA... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XF86DGA_CFLAGS"; then + pkg_cv_XF86DGA_CFLAGS="$XF86DGA_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xxf86dga xt xaw7 xmu\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xxf86dga xt xaw7 xmu") 2>&5 @@ -3026,10 +3070,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 "$XF86DGA_LIBS"; then + pkg_cv_XF86DGA_LIBS="$XF86DGA_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xxf86dga xt xaw7 xmu\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xxf86dga xt xaw7 xmu") 2>&5 @@ -3040,38 +3088,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XF86DGA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xxf86dga xt xaw7 xmu"` + +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 + XF86DGA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 xxf86dga xt xaw7 xmu"` + else + XF86DGA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xxf86dga xt xaw7 xmu"` + fi # Put the nasty error message in config.log where it belongs - echo "$XF86DGA_PKG_ERRORS" 1>&5 + echo "$XF86DGA_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11 xxf86dga xt xaw7 xmu) were not met: + +$XF86DGA_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11 xxf86dga xt xaw7 xmu) 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 XF86DGA_CFLAGS and XF86DGA_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 (x11 xxf86dga xt xaw7 xmu) were not met. +Alternatively, you may set the environment variables XF86DGA_CFLAGS +and XF86DGA_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 (x11 xxf86dga xt xaw7 xmu) were not met: + +$XF86DGA_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XF86DGA_CFLAGS and XF86DGA_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 XF86DGA_CFLAGS +and XF86DGA_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 XF86DGA_CFLAGS and XF86DGA_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 XF86DGA_CFLAGS +and XF86DGA_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 @@ -3079,9 +3148,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 XF86DGA_CFLAGS and XF86DGA_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 XF86DGA_CFLAGS +and XF86DGA_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;} diff --git a/app/xfd/aclocal.m4 b/app/xfd/aclocal.m4 index cf4de4f63..d8c0aaaab 100644 --- a/app/xfd/aclocal.m4 +++ b/app/xfd/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/xfd/configure b/app/xfd/configure index 554975a11..a7069ebb4 100644 --- a/app/xfd/configure +++ b/app/xfd/configure @@ -1428,6 +1428,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 && @@ -3063,6 +3104,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3073,10 +3117,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3087,16 +3135,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK1"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3114,6 +3177,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3124,10 +3190,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3138,16 +3208,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK2"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3188,6 +3273,9 @@ echo "$as_me:$LINENO: checking for ADDITIONAL" >&5 echo $ECHO_N "checking for ADDITIONAL... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$ADDITIONAL_CFLAGS"; then + pkg_cv_ADDITIONAL_CFLAGS="$ADDITIONAL_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"freetype2 fontconfig xft\"") >&5 ($PKG_CONFIG --exists --print-errors "freetype2 fontconfig xft") 2>&5 @@ -3198,10 +3286,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 "$ADDITIONAL_LIBS"; then + pkg_cv_ADDITIONAL_LIBS="$ADDITIONAL_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"freetype2 fontconfig xft\"") >&5 ($PKG_CONFIG --exists --print-errors "freetype2 fontconfig xft") 2>&5 @@ -3212,38 +3304,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - ADDITIONAL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2 fontconfig xft"` + +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 + ADDITIONAL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "freetype2 fontconfig xft"` + else + ADDITIONAL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2 fontconfig xft"` + fi # Put the nasty error message in config.log where it belongs - echo "$ADDITIONAL_PKG_ERRORS" 1>&5 + echo "$ADDITIONAL_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (freetype2 fontconfig xft) were not met: + +$ADDITIONAL_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (freetype2 fontconfig xft) 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 ADDITIONAL_CFLAGS and ADDITIONAL_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 (freetype2 fontconfig xft) were not met. +Alternatively, you may set the environment variables ADDITIONAL_CFLAGS +and ADDITIONAL_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 (freetype2 fontconfig xft) were not met: + +$ADDITIONAL_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the ADDITIONAL_CFLAGS and ADDITIONAL_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 ADDITIONAL_CFLAGS +and ADDITIONAL_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 ADDITIONAL_CFLAGS and ADDITIONAL_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 ADDITIONAL_CFLAGS +and ADDITIONAL_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 @@ -3251,9 +3364,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 ADDITIONAL_CFLAGS and ADDITIONAL_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 ADDITIONAL_CFLAGS +and ADDITIONAL_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;} @@ -3279,6 +3392,9 @@ echo "$as_me:$LINENO: checking for APPDEFS" >&5 echo $ECHO_N "checking for APPDEFS... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$APPDEFS_CFLAGS"; then + pkg_cv_APPDEFS_CFLAGS="$APPDEFS_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3289,10 +3405,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 "$APPDEFS_LIBS"; then + pkg_cv_APPDEFS_LIBS="$APPDEFS_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3303,38 +3423,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + +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 + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xt"` + else + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + fi # Put the nasty error message in config.log where it belongs - echo "$APPDEFS_PKG_ERRORS" 1>&5 + echo "$APPDEFS_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xt) were not met: + +$APPDEFS_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xt) 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 APPDEFS_CFLAGS and APPDEFS_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 (xt) were not met. +Alternatively, you may set the environment variables APPDEFS_CFLAGS +and APPDEFS_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 (xt) were not met: + +$APPDEFS_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 @@ -3342,9 +3483,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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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;} diff --git a/app/xfindproxy/aclocal.m4 b/app/xfindproxy/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/xfindproxy/aclocal.m4 +++ b/app/xfindproxy/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/xfindproxy/configure b/app/xfindproxy/configure index b7fd2edf1..994c088f6 100644 --- a/app/xfindproxy/configure +++ b/app/xfindproxy/configure @@ -1401,6 +1401,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 && @@ -3014,6 +3055,9 @@ echo "$as_me:$LINENO: checking for DEP" >&5 echo $ECHO_N "checking for DEP... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$DEP_CFLAGS"; then + pkg_cv_DEP_CFLAGS="$DEP_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 ice xt xproxymngproto\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 ice xt xproxymngproto") 2>&5 @@ -3024,10 +3068,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 "$DEP_LIBS"; then + pkg_cv_DEP_LIBS="$DEP_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 ice xt xproxymngproto\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 ice xt xproxymngproto") 2>&5 @@ -3038,38 +3086,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - DEP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 ice xt xproxymngproto"` + +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 + DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 ice xt xproxymngproto"` + else + DEP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 ice xt xproxymngproto"` + fi # Put the nasty error message in config.log where it belongs - echo "$DEP_PKG_ERRORS" 1>&5 + echo "$DEP_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11 ice xt xproxymngproto) were not met: + +$DEP_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11 ice xt xproxymngproto) 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 DEP_CFLAGS and DEP_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 (x11 ice xt xproxymngproto) were not met. +Alternatively, you may set the environment variables DEP_CFLAGS +and DEP_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 (x11 ice xt xproxymngproto) were not met: + +$DEP_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the DEP_CFLAGS and DEP_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 DEP_CFLAGS +and DEP_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 DEP_CFLAGS and DEP_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 DEP_CFLAGS +and DEP_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 @@ -3077,9 +3146,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 DEP_CFLAGS and DEP_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 DEP_CFLAGS +and DEP_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;} diff --git a/app/xfontsel/aclocal.m4 b/app/xfontsel/aclocal.m4 index cf4de4f63..d8c0aaaab 100644 --- a/app/xfontsel/aclocal.m4 +++ b/app/xfontsel/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/xfontsel/configure b/app/xfontsel/configure index db187e0c3..9869147bb 100644 --- a/app/xfontsel/configure +++ b/app/xfontsel/configure @@ -1416,6 +1416,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 && @@ -3050,6 +3091,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3060,10 +3104,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3074,16 +3122,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK1"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3101,6 +3164,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3111,10 +3177,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3125,16 +3195,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK2"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3178,6 +3263,9 @@ echo "$as_me:$LINENO: checking for APPDEFS" >&5 echo $ECHO_N "checking for APPDEFS... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$APPDEFS_CFLAGS"; then + pkg_cv_APPDEFS_CFLAGS="$APPDEFS_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3188,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 "$APPDEFS_LIBS"; then + pkg_cv_APPDEFS_LIBS="$APPDEFS_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3202,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 - APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + +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 + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xt"` + else + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + fi # Put the nasty error message in config.log where it belongs - echo "$APPDEFS_PKG_ERRORS" 1>&5 + echo "$APPDEFS_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xt) were not met: + +$APPDEFS_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xt) 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 APPDEFS_CFLAGS and APPDEFS_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 (xt) were not met. +Alternatively, you may set the environment variables APPDEFS_CFLAGS +and APPDEFS_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 (xt) were not met: + +$APPDEFS_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 @@ -3241,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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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;} diff --git a/app/xfsinfo/aclocal.m4 b/app/xfsinfo/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/xfsinfo/aclocal.m4 +++ b/app/xfsinfo/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/xfsinfo/configure b/app/xfsinfo/configure index 77bc54221..efae8e5ab 100644 --- a/app/xfsinfo/configure +++ b/app/xfsinfo/configure @@ -1403,6 +1403,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 && @@ -3016,6 +3057,9 @@ echo "$as_me:$LINENO: checking for XFSINFO" >&5 echo $ECHO_N "checking for XFSINFO... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XFSINFO_CFLAGS"; then + pkg_cv_XFSINFO_CFLAGS="$XFSINFO_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 libfs\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 libfs") 2>&5 @@ -3026,10 +3070,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 "$XFSINFO_LIBS"; then + pkg_cv_XFSINFO_LIBS="$XFSINFO_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 libfs\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 libfs") 2>&5 @@ -3040,38 +3088,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XFSINFO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 libfs"` + +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 + XFSINFO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 libfs"` + else + XFSINFO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 libfs"` + fi # Put the nasty error message in config.log where it belongs - echo "$XFSINFO_PKG_ERRORS" 1>&5 + echo "$XFSINFO_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11 libfs) were not met: + +$XFSINFO_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11 libfs) 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 XFSINFO_CFLAGS and XFSINFO_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 (x11 libfs) were not met. +Alternatively, you may set the environment variables XFSINFO_CFLAGS +and XFSINFO_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 (x11 libfs) were not met: + +$XFSINFO_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XFSINFO_CFLAGS and XFSINFO_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 XFSINFO_CFLAGS +and XFSINFO_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 XFSINFO_CFLAGS and XFSINFO_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 XFSINFO_CFLAGS +and XFSINFO_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 @@ -3079,9 +3148,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 XFSINFO_CFLAGS and XFSINFO_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 XFSINFO_CFLAGS +and XFSINFO_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;} diff --git a/app/xfwp/aclocal.m4 b/app/xfwp/aclocal.m4 index 68f92a03c..65663b720 100644 --- a/app/xfwp/aclocal.m4 +++ b/app/xfwp/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/xfwp/configure b/app/xfwp/configure index 1019807de..eaa0c68db 100644 --- a/app/xfwp/configure +++ b/app/xfwp/configure @@ -1402,6 +1402,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 && @@ -3015,6 +3056,9 @@ echo "$as_me:$LINENO: checking for XFWP" >&5 echo $ECHO_N "checking for XFWP... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XFWP_CFLAGS"; then + pkg_cv_XFWP_CFLAGS="$XFWP_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 ice xproxymngproto\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 ice xproxymngproto") 2>&5 @@ -3025,10 +3069,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 "$XFWP_LIBS"; then + pkg_cv_XFWP_LIBS="$XFWP_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 ice xproxymngproto\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 ice xproxymngproto") 2>&5 @@ -3039,38 +3087,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XFWP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 ice xproxymngproto"` + +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 + XFWP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 ice xproxymngproto"` + else + XFWP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 ice xproxymngproto"` + fi # Put the nasty error message in config.log where it belongs - echo "$XFWP_PKG_ERRORS" 1>&5 + echo "$XFWP_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11 ice xproxymngproto) were not met: + +$XFWP_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11 ice xproxymngproto) 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 XFWP_CFLAGS and XFWP_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 (x11 ice xproxymngproto) were not met. +Alternatively, you may set the environment variables XFWP_CFLAGS +and XFWP_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 (x11 ice xproxymngproto) were not met: + +$XFWP_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XFWP_CFLAGS and XFWP_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 XFWP_CFLAGS +and XFWP_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 XFWP_CFLAGS and XFWP_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 XFWP_CFLAGS +and XFWP_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 @@ -3078,9 +3147,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 XFWP_CFLAGS and XFWP_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 XFWP_CFLAGS +and XFWP_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;} diff --git a/app/xgamma/aclocal.m4 b/app/xgamma/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/xgamma/aclocal.m4 +++ b/app/xgamma/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/xgamma/configure b/app/xgamma/configure index adbd95ad8..478962f2d 100644 --- a/app/xgamma/configure +++ b/app/xgamma/configure @@ -1402,6 +1402,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 && @@ -3015,6 +3056,9 @@ echo "$as_me:$LINENO: checking for XGAMMA" >&5 echo $ECHO_N "checking for XGAMMA... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XGAMMA_CFLAGS"; then + pkg_cv_XGAMMA_CFLAGS="$XGAMMA_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xxf86vm\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xxf86vm") 2>&5 @@ -3025,10 +3069,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 "$XGAMMA_LIBS"; then + pkg_cv_XGAMMA_LIBS="$XGAMMA_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xxf86vm\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xxf86vm") 2>&5 @@ -3039,38 +3087,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XGAMMA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xxf86vm"` + +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 + XGAMMA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 xxf86vm"` + else + XGAMMA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xxf86vm"` + fi # Put the nasty error message in config.log where it belongs - echo "$XGAMMA_PKG_ERRORS" 1>&5 + echo "$XGAMMA_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11 xxf86vm) were not met: + +$XGAMMA_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11 xxf86vm) 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 XGAMMA_CFLAGS and XGAMMA_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 (x11 xxf86vm) were not met. +Alternatively, you may set the environment variables XGAMMA_CFLAGS +and XGAMMA_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 (x11 xxf86vm) were not met: + +$XGAMMA_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XGAMMA_CFLAGS and XGAMMA_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 XGAMMA_CFLAGS +and XGAMMA_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 XGAMMA_CFLAGS and XGAMMA_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 XGAMMA_CFLAGS +and XGAMMA_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 @@ -3078,9 +3147,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 XGAMMA_CFLAGS and XGAMMA_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 XGAMMA_CFLAGS +and XGAMMA_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;} diff --git a/app/xgc/aclocal.m4 b/app/xgc/aclocal.m4 index cf4de4f63..d8c0aaaab 100644 --- a/app/xgc/aclocal.m4 +++ b/app/xgc/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/xgc/configure b/app/xgc/configure index f4ed69ea6..13524b3cc 100644 --- a/app/xgc/configure +++ b/app/xgc/configure @@ -1416,6 +1416,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 && @@ -4204,6 +4245,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -4214,10 +4258,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -4228,16 +4276,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK1"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -4255,6 +4318,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -4265,10 +4331,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -4279,16 +4349,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK2"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -4332,6 +4417,9 @@ echo "$as_me:$LINENO: checking for APPDEFS" >&5 echo $ECHO_N "checking for APPDEFS... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$APPDEFS_CFLAGS"; then + pkg_cv_APPDEFS_CFLAGS="$APPDEFS_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -4342,10 +4430,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 "$APPDEFS_LIBS"; then + pkg_cv_APPDEFS_LIBS="$APPDEFS_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -4356,38 +4448,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + +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 + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xt"` + else + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + fi # Put the nasty error message in config.log where it belongs - echo "$APPDEFS_PKG_ERRORS" 1>&5 + echo "$APPDEFS_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xt) were not met: + +$APPDEFS_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xt) 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 APPDEFS_CFLAGS and APPDEFS_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 (xt) were not met. +Alternatively, you may set the environment variables APPDEFS_CFLAGS +and APPDEFS_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 (xt) were not met: + +$APPDEFS_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 @@ -4395,9 +4508,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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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;} diff --git a/app/xhost/aclocal.m4 b/app/xhost/aclocal.m4 index 68f92a03c..65663b720 100644 --- a/app/xhost/aclocal.m4 +++ b/app/xhost/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/xhost/configure b/app/xhost/configure index e0b66300c..5dd231788 100644 --- a/app/xhost/configure +++ b/app/xhost/configure @@ -1408,6 +1408,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 && @@ -3092,6 +3133,9 @@ echo "$as_me:$LINENO: checking for XHOST" >&5 echo $ECHO_N "checking for XHOST... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XHOST_CFLAGS"; then + pkg_cv_XHOST_CFLAGS="$XHOST_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xmuu xau\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xmuu xau") 2>&5 @@ -3102,10 +3146,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 "$XHOST_LIBS"; then + pkg_cv_XHOST_LIBS="$XHOST_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xmuu xau\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xmuu xau") 2>&5 @@ -3116,38 +3164,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XHOST_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xmuu xau"` + +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 + XHOST_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 xmuu xau"` + else + XHOST_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xmuu xau"` + fi # Put the nasty error message in config.log where it belongs - echo "$XHOST_PKG_ERRORS" 1>&5 + echo "$XHOST_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11 xmuu xau) were not met: + +$XHOST_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11 xmuu xau) 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 XHOST_CFLAGS and XHOST_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 (x11 xmuu xau) were not met. +Alternatively, you may set the environment variables XHOST_CFLAGS +and XHOST_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 (x11 xmuu xau) were not met: + +$XHOST_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XHOST_CFLAGS and XHOST_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 XHOST_CFLAGS +and XHOST_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 XHOST_CFLAGS and XHOST_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 XHOST_CFLAGS +and XHOST_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 @@ -3155,9 +3224,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 XHOST_CFLAGS and XHOST_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 XHOST_CFLAGS +and XHOST_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;} diff --git a/app/xinit/aclocal.m4 b/app/xinit/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/xinit/aclocal.m4 +++ b/app/xinit/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/xinit/configure b/app/xinit/configure index ceb1d6561..24efba4b8 100644 --- a/app/xinit/configure +++ b/app/xinit/configure @@ -1455,6 +1455,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 && @@ -4471,6 +4512,9 @@ echo "$as_me:$LINENO: checking for XINIT" >&5 echo $ECHO_N "checking for XINIT... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XINIT_CFLAGS"; then + pkg_cv_XINIT_CFLAGS="$XINIT_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 @@ -4481,10 +4525,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 "$XINIT_LIBS"; then + pkg_cv_XINIT_LIBS="$XINIT_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 @@ -4495,38 +4543,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XINIT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + +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 + XINIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11"` + else + XINIT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + fi # Put the nasty error message in config.log where it belongs - echo "$XINIT_PKG_ERRORS" 1>&5 + echo "$XINIT_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11) were not met: + +$XINIT_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11) 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 XINIT_CFLAGS and XINIT_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 (x11) were not met. +Alternatively, you may set the environment variables XINIT_CFLAGS +and XINIT_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 (x11) were not met: + +$XINIT_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XINIT_CFLAGS and XINIT_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 XINIT_CFLAGS +and XINIT_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 XINIT_CFLAGS and XINIT_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 XINIT_CFLAGS +and XINIT_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 @@ -4534,9 +4603,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 XINIT_CFLAGS and XINIT_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 XINIT_CFLAGS +and XINIT_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;} diff --git a/app/xkbcomp/aclocal.m4 b/app/xkbcomp/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/xkbcomp/aclocal.m4 +++ b/app/xkbcomp/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/xkbcomp/configure b/app/xkbcomp/configure index f067ab417..2d4aa37a3 100644 --- a/app/xkbcomp/configure +++ b/app/xkbcomp/configure @@ -1403,6 +1403,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 && @@ -3057,6 +3098,9 @@ echo "$as_me:$LINENO: checking for XKBCOMP" >&5 echo $ECHO_N "checking for XKBCOMP... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XKBCOMP_CFLAGS"; then + pkg_cv_XKBCOMP_CFLAGS="$XKBCOMP_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xkbfile\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xkbfile") 2>&5 @@ -3067,10 +3111,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 "$XKBCOMP_LIBS"; then + pkg_cv_XKBCOMP_LIBS="$XKBCOMP_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xkbfile\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xkbfile") 2>&5 @@ -3081,38 +3129,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XKBCOMP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xkbfile"` + +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 + XKBCOMP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 xkbfile"` + else + XKBCOMP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xkbfile"` + fi # Put the nasty error message in config.log where it belongs - echo "$XKBCOMP_PKG_ERRORS" 1>&5 + echo "$XKBCOMP_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11 xkbfile) were not met: + +$XKBCOMP_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11 xkbfile) 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 XKBCOMP_CFLAGS and XKBCOMP_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 (x11 xkbfile) were not met. +Alternatively, you may set the environment variables XKBCOMP_CFLAGS +and XKBCOMP_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 (x11 xkbfile) were not met: + +$XKBCOMP_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XKBCOMP_CFLAGS and XKBCOMP_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 XKBCOMP_CFLAGS +and XKBCOMP_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 XKBCOMP_CFLAGS and XKBCOMP_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 XKBCOMP_CFLAGS +and XKBCOMP_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 @@ -3120,9 +3189,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 XKBCOMP_CFLAGS and XKBCOMP_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 XKBCOMP_CFLAGS +and XKBCOMP_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;} diff --git a/app/xkbevd/aclocal.m4 b/app/xkbevd/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/xkbevd/aclocal.m4 +++ b/app/xkbevd/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/xkbevd/configure b/app/xkbevd/configure index abfdde054..1be29d801 100644 --- a/app/xkbevd/configure +++ b/app/xkbevd/configure @@ -1402,6 +1402,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 && @@ -3056,6 +3097,9 @@ echo "$as_me:$LINENO: checking for XKBEVD" >&5 echo $ECHO_N "checking for XKBEVD... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XKBEVD_CFLAGS"; then + pkg_cv_XKBEVD_CFLAGS="$XKBEVD_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xkbfile x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xkbfile x11") 2>&5 @@ -3066,10 +3110,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 "$XKBEVD_LIBS"; then + pkg_cv_XKBEVD_LIBS="$XKBEVD_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xkbfile x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xkbfile x11") 2>&5 @@ -3080,38 +3128,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XKBEVD_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xkbfile x11"` + +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 + XKBEVD_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xkbfile x11"` + else + XKBEVD_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xkbfile x11"` + fi # Put the nasty error message in config.log where it belongs - echo "$XKBEVD_PKG_ERRORS" 1>&5 + echo "$XKBEVD_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xkbfile x11) were not met: + +$XKBEVD_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xkbfile x11) 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 XKBEVD_CFLAGS and XKBEVD_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 (xkbfile x11) were not met. +Alternatively, you may set the environment variables XKBEVD_CFLAGS +and XKBEVD_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 (xkbfile x11) were not met: + +$XKBEVD_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XKBEVD_CFLAGS and XKBEVD_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 XKBEVD_CFLAGS +and XKBEVD_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 XKBEVD_CFLAGS and XKBEVD_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 XKBEVD_CFLAGS +and XKBEVD_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 @@ -3119,9 +3188,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 XKBEVD_CFLAGS and XKBEVD_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 XKBEVD_CFLAGS +and XKBEVD_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;} diff --git a/app/xkbprint/aclocal.m4 b/app/xkbprint/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/xkbprint/aclocal.m4 +++ b/app/xkbprint/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/xkbprint/configure b/app/xkbprint/configure index 41bd5e86d..3a98fbe07 100644 --- a/app/xkbprint/configure +++ b/app/xkbprint/configure @@ -1403,6 +1403,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 && @@ -3016,6 +3057,9 @@ echo "$as_me:$LINENO: checking for XKBPRINT" >&5 echo $ECHO_N "checking for XKBPRINT... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XKBPRINT_CFLAGS"; then + pkg_cv_XKBPRINT_CFLAGS="$XKBPRINT_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xkbfile x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xkbfile x11") 2>&5 @@ -3026,10 +3070,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 "$XKBPRINT_LIBS"; then + pkg_cv_XKBPRINT_LIBS="$XKBPRINT_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xkbfile x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xkbfile x11") 2>&5 @@ -3040,38 +3088,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XKBPRINT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xkbfile x11"` + +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 + XKBPRINT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xkbfile x11"` + else + XKBPRINT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xkbfile x11"` + fi # Put the nasty error message in config.log where it belongs - echo "$XKBPRINT_PKG_ERRORS" 1>&5 + echo "$XKBPRINT_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xkbfile x11) were not met: + +$XKBPRINT_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xkbfile x11) 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 XKBPRINT_CFLAGS and XKBPRINT_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 (xkbfile x11) were not met. +Alternatively, you may set the environment variables XKBPRINT_CFLAGS +and XKBPRINT_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 (xkbfile x11) were not met: + +$XKBPRINT_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XKBPRINT_CFLAGS and XKBPRINT_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 XKBPRINT_CFLAGS +and XKBPRINT_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 XKBPRINT_CFLAGS and XKBPRINT_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 XKBPRINT_CFLAGS +and XKBPRINT_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 @@ -3079,9 +3148,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 XKBPRINT_CFLAGS and XKBPRINT_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 XKBPRINT_CFLAGS +and XKBPRINT_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;} diff --git a/app/xkbutils/aclocal.m4 b/app/xkbutils/aclocal.m4 index 98fa2b050..fca63c458 100644 --- a/app/xkbutils/aclocal.m4 +++ b/app/xkbutils/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/xkbutils/configure b/app/xkbutils/configure index 78926b72a..6103e58de 100644 --- a/app/xkbutils/configure +++ b/app/xkbutils/configure @@ -1412,6 +1412,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 && @@ -3047,6 +3088,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3057,10 +3101,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3071,16 +3119,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK1"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3098,6 +3161,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3108,10 +3174,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3122,16 +3192,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK2"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3175,6 +3260,9 @@ echo "$as_me:$LINENO: checking for XKBBELL" >&5 echo $ECHO_N "checking for XKBBELL... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XKBBELL_CFLAGS"; then + pkg_cv_XKBBELL_CFLAGS="$XKBBELL_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xkbfile x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xkbfile x11") 2>&5 @@ -3185,10 +3273,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 "$XKBBELL_LIBS"; then + pkg_cv_XKBBELL_LIBS="$XKBBELL_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xkbfile x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xkbfile x11") 2>&5 @@ -3199,38 +3291,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XKBBELL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xkbfile x11"` + +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 + XKBBELL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xkbfile x11"` + else + XKBBELL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xkbfile x11"` + fi # Put the nasty error message in config.log where it belongs - echo "$XKBBELL_PKG_ERRORS" 1>&5 + echo "$XKBBELL_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xkbfile x11) were not met: + +$XKBBELL_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xkbfile x11) 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 XKBBELL_CFLAGS and XKBBELL_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 (xkbfile x11) were not met. +Alternatively, you may set the environment variables XKBBELL_CFLAGS +and XKBBELL_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 (xkbfile x11) were not met: + +$XKBBELL_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XKBBELL_CFLAGS and XKBBELL_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 XKBBELL_CFLAGS +and XKBBELL_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 XKBBELL_CFLAGS and XKBBELL_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 XKBBELL_CFLAGS +and XKBBELL_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 @@ -3238,9 +3351,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 XKBBELL_CFLAGS and XKBBELL_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 XKBBELL_CFLAGS +and XKBBELL_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;} @@ -3284,6 +3397,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3294,10 +3410,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3308,16 +3428,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK1"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3335,6 +3470,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3345,10 +3483,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3359,16 +3501,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK2"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else diff --git a/app/xkill/aclocal.m4 b/app/xkill/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/xkill/aclocal.m4 +++ b/app/xkill/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/xkill/configure b/app/xkill/configure index 4dbcdde09..c4a84eed1 100644 --- a/app/xkill/configure +++ b/app/xkill/configure @@ -1402,6 +1402,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 && @@ -3015,6 +3056,9 @@ echo "$as_me:$LINENO: checking for XKILL" >&5 echo $ECHO_N "checking for XKILL... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XKILL_CFLAGS"; then + pkg_cv_XKILL_CFLAGS="$XKILL_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xmuu\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xmuu") 2>&5 @@ -3025,10 +3069,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 "$XKILL_LIBS"; then + pkg_cv_XKILL_LIBS="$XKILL_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xmuu\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xmuu") 2>&5 @@ -3039,38 +3087,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XKILL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xmuu"` + +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 + XKILL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 xmuu"` + else + XKILL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xmuu"` + fi # Put the nasty error message in config.log where it belongs - echo "$XKILL_PKG_ERRORS" 1>&5 + echo "$XKILL_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11 xmuu) were not met: + +$XKILL_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11 xmuu) 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 XKILL_CFLAGS and XKILL_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 (x11 xmuu) were not met. +Alternatively, you may set the environment variables XKILL_CFLAGS +and XKILL_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 (x11 xmuu) were not met: + +$XKILL_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XKILL_CFLAGS and XKILL_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 XKILL_CFLAGS +and XKILL_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 XKILL_CFLAGS and XKILL_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 XKILL_CFLAGS +and XKILL_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 @@ -3078,9 +3147,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 XKILL_CFLAGS and XKILL_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 XKILL_CFLAGS +and XKILL_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;} diff --git a/app/xload/aclocal.m4 b/app/xload/aclocal.m4 index cf4de4f63..d8c0aaaab 100644 --- a/app/xload/aclocal.m4 +++ b/app/xload/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/xload/configure b/app/xload/configure index a10e2059a..3c3b3e015 100644 --- a/app/xload/configure +++ b/app/xload/configure @@ -1416,6 +1416,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 && @@ -3130,6 +3171,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3140,10 +3184,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3154,16 +3202,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK1"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3181,6 +3244,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3191,10 +3257,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3205,16 +3275,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK2"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3258,6 +3343,9 @@ echo "$as_me:$LINENO: checking for APPDEFS" >&5 echo $ECHO_N "checking for APPDEFS... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$APPDEFS_CFLAGS"; then + pkg_cv_APPDEFS_CFLAGS="$APPDEFS_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3268,10 +3356,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 "$APPDEFS_LIBS"; then + pkg_cv_APPDEFS_LIBS="$APPDEFS_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3282,38 +3374,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + +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 + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xt"` + else + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + fi # Put the nasty error message in config.log where it belongs - echo "$APPDEFS_PKG_ERRORS" 1>&5 + echo "$APPDEFS_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xt) were not met: + +$APPDEFS_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xt) 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 APPDEFS_CFLAGS and APPDEFS_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 (xt) were not met. +Alternatively, you may set the environment variables APPDEFS_CFLAGS +and APPDEFS_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 (xt) were not met: + +$APPDEFS_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 @@ -3321,9 +3434,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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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;} diff --git a/app/xlogo/aclocal.m4 b/app/xlogo/aclocal.m4 index cf4de4f63..d8c0aaaab 100644 --- a/app/xlogo/aclocal.m4 +++ b/app/xlogo/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/xlogo/configure b/app/xlogo/configure index e3d19aee3..c599df5de 100644 --- a/app/xlogo/configure +++ b/app/xlogo/configure @@ -1461,6 +1461,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 && @@ -3096,6 +3137,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3106,10 +3150,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3120,16 +3168,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK1"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3147,6 +3210,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3157,10 +3223,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3171,16 +3241,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK2"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3222,6 +3307,9 @@ echo "$as_me:$LINENO: checking for XPRINT_UTIL" >&5 echo $ECHO_N "checking for XPRINT_UTIL... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XPRINT_UTIL_CFLAGS"; then + pkg_cv_XPRINT_UTIL_CFLAGS="$XPRINT_UTIL_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xprintutil xp\"") >&5 ($PKG_CONFIG --exists --print-errors "xprintutil xp") 2>&5 @@ -3232,10 +3320,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 "$XPRINT_UTIL_LIBS"; then + pkg_cv_XPRINT_UTIL_LIBS="$XPRINT_UTIL_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xprintutil xp\"") >&5 ($PKG_CONFIG --exists --print-errors "xprintutil xp") 2>&5 @@ -3246,38 +3338,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XPRINT_UTIL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xprintutil xp"` + +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 + XPRINT_UTIL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xprintutil xp"` + else + XPRINT_UTIL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xprintutil xp"` + fi # Put the nasty error message in config.log where it belongs - echo "$XPRINT_UTIL_PKG_ERRORS" 1>&5 + echo "$XPRINT_UTIL_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xprintutil xp) were not met: + +$XPRINT_UTIL_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xprintutil xp) 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 XPRINT_UTIL_CFLAGS and XPRINT_UTIL_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 (xprintutil xp) were not met. +Alternatively, you may set the environment variables XPRINT_UTIL_CFLAGS +and XPRINT_UTIL_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 (xprintutil xp) were not met: + +$XPRINT_UTIL_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XPRINT_UTIL_CFLAGS and XPRINT_UTIL_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 XPRINT_UTIL_CFLAGS +and XPRINT_UTIL_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 XPRINT_UTIL_CFLAGS and XPRINT_UTIL_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 XPRINT_UTIL_CFLAGS +and XPRINT_UTIL_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 @@ -3285,9 +3398,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 XPRINT_UTIL_CFLAGS and XPRINT_UTIL_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 XPRINT_UTIL_CFLAGS +and XPRINT_UTIL_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;} @@ -3335,6 +3448,9 @@ echo "$as_me:$LINENO: checking for XRENDER" >&5 echo $ECHO_N "checking for XRENDER... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XRENDER_CFLAGS"; then + pkg_cv_XRENDER_CFLAGS="$XRENDER_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xrender\"") >&5 ($PKG_CONFIG --exists --print-errors "xrender") 2>&5 @@ -3345,10 +3461,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 "$XRENDER_LIBS"; then + pkg_cv_XRENDER_LIBS="$XRENDER_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xrender\"") >&5 ($PKG_CONFIG --exists --print-errors "xrender") 2>&5 @@ -3359,38 +3479,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XRENDER_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xrender"` + +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 + XRENDER_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xrender"` + else + XRENDER_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xrender"` + fi # Put the nasty error message in config.log where it belongs - echo "$XRENDER_PKG_ERRORS" 1>&5 + echo "$XRENDER_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xrender) were not met: + +$XRENDER_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xrender) 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 XRENDER_CFLAGS and XRENDER_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 (xrender) were not met. +Alternatively, you may set the environment variables XRENDER_CFLAGS +and XRENDER_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 (xrender) were not met: + +$XRENDER_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XRENDER_CFLAGS and XRENDER_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 XRENDER_CFLAGS +and XRENDER_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 XRENDER_CFLAGS and XRENDER_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 XRENDER_CFLAGS +and XRENDER_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 @@ -3398,9 +3539,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 XRENDER_CFLAGS and XRENDER_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 XRENDER_CFLAGS +and XRENDER_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;} @@ -3418,6 +3559,9 @@ echo "$as_me:$LINENO: checking for XFT" >&5 echo $ECHO_N "checking for XFT... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XFT_CFLAGS"; then + pkg_cv_XFT_CFLAGS="$XFT_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xft\"") >&5 ($PKG_CONFIG --exists --print-errors "xft") 2>&5 @@ -3428,10 +3572,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 "$XFT_LIBS"; then + pkg_cv_XFT_LIBS="$XFT_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xft\"") >&5 ($PKG_CONFIG --exists --print-errors "xft") 2>&5 @@ -3442,38 +3590,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft"` + +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 + XFT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xft"` + else + XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft"` + fi # Put the nasty error message in config.log where it belongs - echo "$XFT_PKG_ERRORS" 1>&5 + echo "$XFT_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xft) were not met: + +$XFT_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xft) 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 XFT_CFLAGS and XFT_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 (xft) were not met. +Alternatively, you may set the environment variables XFT_CFLAGS +and XFT_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 (xft) were not met: + +$XFT_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XFT_CFLAGS and XFT_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 XFT_CFLAGS +and XFT_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 XFT_CFLAGS and XFT_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 XFT_CFLAGS +and XFT_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 @@ -3481,9 +3650,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 XFT_CFLAGS and XFT_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 XFT_CFLAGS +and XFT_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;} @@ -3512,6 +3681,9 @@ echo "$as_me:$LINENO: checking for XEXT" >&5 echo $ECHO_N "checking for XEXT... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XEXT_CFLAGS"; then + pkg_cv_XEXT_CFLAGS="$XEXT_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xext\"") >&5 ($PKG_CONFIG --exists --print-errors "xext") 2>&5 @@ -3522,10 +3694,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 "$XEXT_LIBS"; then + pkg_cv_XEXT_LIBS="$XEXT_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xext\"") >&5 ($PKG_CONFIG --exists --print-errors "xext") 2>&5 @@ -3536,38 +3712,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XEXT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xext"` + +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 + XEXT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xext"` + else + XEXT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xext"` + fi # Put the nasty error message in config.log where it belongs - echo "$XEXT_PKG_ERRORS" 1>&5 + echo "$XEXT_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xext) were not met: + +$XEXT_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xext) 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 XEXT_CFLAGS and XEXT_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) were not met. +Alternatively, you may set the environment variables XEXT_CFLAGS +and XEXT_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) were not met: + +$XEXT_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XEXT_CFLAGS and XEXT_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 XEXT_CFLAGS +and XEXT_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 XEXT_CFLAGS and XEXT_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 XEXT_CFLAGS +and XEXT_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 @@ -3575,9 +3772,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 XEXT_CFLAGS and XEXT_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 XEXT_CFLAGS +and XEXT_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;} @@ -3601,6 +3798,9 @@ echo "$as_me:$LINENO: checking for APPDEFS" >&5 echo $ECHO_N "checking for APPDEFS... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$APPDEFS_CFLAGS"; then + pkg_cv_APPDEFS_CFLAGS="$APPDEFS_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3611,10 +3811,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 "$APPDEFS_LIBS"; then + pkg_cv_APPDEFS_LIBS="$APPDEFS_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3625,38 +3829,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + +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 + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xt"` + else + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + fi # Put the nasty error message in config.log where it belongs - echo "$APPDEFS_PKG_ERRORS" 1>&5 + echo "$APPDEFS_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xt) were not met: + +$APPDEFS_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xt) 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 APPDEFS_CFLAGS and APPDEFS_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 (xt) were not met. +Alternatively, you may set the environment variables APPDEFS_CFLAGS +and APPDEFS_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 (xt) were not met: + +$APPDEFS_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 @@ -3664,9 +3889,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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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;} diff --git a/app/xlsatoms/aclocal.m4 b/app/xlsatoms/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/xlsatoms/aclocal.m4 +++ b/app/xlsatoms/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/xlsatoms/configure b/app/xlsatoms/configure index ad54a4e08..9ea6bb2ea 100644 --- a/app/xlsatoms/configure +++ b/app/xlsatoms/configure @@ -1403,6 +1403,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 && @@ -3016,6 +3057,9 @@ echo "$as_me:$LINENO: checking for XLSATOMS" >&5 echo $ECHO_N "checking for XLSATOMS... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XLSATOMS_CFLAGS"; then + pkg_cv_XLSATOMS_CFLAGS="$XLSATOMS_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xmuu\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xmuu") 2>&5 @@ -3026,10 +3070,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 "$XLSATOMS_LIBS"; then + pkg_cv_XLSATOMS_LIBS="$XLSATOMS_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xmuu\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xmuu") 2>&5 @@ -3040,38 +3088,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XLSATOMS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xmuu"` + +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 + XLSATOMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 xmuu"` + else + XLSATOMS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xmuu"` + fi # Put the nasty error message in config.log where it belongs - echo "$XLSATOMS_PKG_ERRORS" 1>&5 + echo "$XLSATOMS_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11 xmuu) were not met: + +$XLSATOMS_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11 xmuu) 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 XLSATOMS_CFLAGS and XLSATOMS_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 (x11 xmuu) were not met. +Alternatively, you may set the environment variables XLSATOMS_CFLAGS +and XLSATOMS_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 (x11 xmuu) were not met: + +$XLSATOMS_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XLSATOMS_CFLAGS and XLSATOMS_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 XLSATOMS_CFLAGS +and XLSATOMS_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 XLSATOMS_CFLAGS and XLSATOMS_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 XLSATOMS_CFLAGS +and XLSATOMS_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 @@ -3079,9 +3148,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 XLSATOMS_CFLAGS and XLSATOMS_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 XLSATOMS_CFLAGS +and XLSATOMS_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;} diff --git a/app/xlsclients/aclocal.m4 b/app/xlsclients/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/xlsclients/aclocal.m4 +++ b/app/xlsclients/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/xlsclients/configure b/app/xlsclients/configure index db4b8e2a5..9773eca4e 100644 --- a/app/xlsclients/configure +++ b/app/xlsclients/configure @@ -1403,6 +1403,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 && @@ -3016,6 +3057,9 @@ echo "$as_me:$LINENO: checking for XLSCLIENTS" >&5 echo $ECHO_N "checking for XLSCLIENTS... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XLSCLIENTS_CFLAGS"; then + pkg_cv_XLSCLIENTS_CFLAGS="$XLSCLIENTS_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xmuu\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xmuu") 2>&5 @@ -3026,10 +3070,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 "$XLSCLIENTS_LIBS"; then + pkg_cv_XLSCLIENTS_LIBS="$XLSCLIENTS_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xmuu\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xmuu") 2>&5 @@ -3040,38 +3088,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XLSCLIENTS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xmuu"` + +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 + XLSCLIENTS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 xmuu"` + else + XLSCLIENTS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xmuu"` + fi # Put the nasty error message in config.log where it belongs - echo "$XLSCLIENTS_PKG_ERRORS" 1>&5 + echo "$XLSCLIENTS_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11 xmuu) were not met: + +$XLSCLIENTS_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11 xmuu) 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 XLSCLIENTS_CFLAGS and XLSCLIENTS_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 (x11 xmuu) were not met. +Alternatively, you may set the environment variables XLSCLIENTS_CFLAGS +and XLSCLIENTS_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 (x11 xmuu) were not met: + +$XLSCLIENTS_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XLSCLIENTS_CFLAGS and XLSCLIENTS_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 XLSCLIENTS_CFLAGS +and XLSCLIENTS_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 XLSCLIENTS_CFLAGS and XLSCLIENTS_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 XLSCLIENTS_CFLAGS +and XLSCLIENTS_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 @@ -3079,9 +3148,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 XLSCLIENTS_CFLAGS and XLSCLIENTS_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 XLSCLIENTS_CFLAGS +and XLSCLIENTS_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;} diff --git a/app/xlsfonts/aclocal.m4 b/app/xlsfonts/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/xlsfonts/aclocal.m4 +++ b/app/xlsfonts/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/xlsfonts/configure b/app/xlsfonts/configure index f7005ae6b..f89ed66a3 100644 --- a/app/xlsfonts/configure +++ b/app/xlsfonts/configure @@ -1403,6 +1403,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 && @@ -3016,6 +3057,9 @@ echo "$as_me:$LINENO: checking for XLSFONTS" >&5 echo $ECHO_N "checking for XLSFONTS... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XLSFONTS_CFLAGS"; then + pkg_cv_XLSFONTS_CFLAGS="$XLSFONTS_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 @@ -3026,10 +3070,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 "$XLSFONTS_LIBS"; then + pkg_cv_XLSFONTS_LIBS="$XLSFONTS_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 @@ -3040,38 +3088,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XLSFONTS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + +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 + XLSFONTS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11"` + else + XLSFONTS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + fi # Put the nasty error message in config.log where it belongs - echo "$XLSFONTS_PKG_ERRORS" 1>&5 + echo "$XLSFONTS_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11) were not met: + +$XLSFONTS_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11) 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 XLSFONTS_CFLAGS and XLSFONTS_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 (x11) were not met. +Alternatively, you may set the environment variables XLSFONTS_CFLAGS +and XLSFONTS_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 (x11) were not met: + +$XLSFONTS_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XLSFONTS_CFLAGS and XLSFONTS_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 XLSFONTS_CFLAGS +and XLSFONTS_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 XLSFONTS_CFLAGS and XLSFONTS_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 XLSFONTS_CFLAGS +and XLSFONTS_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 @@ -3079,9 +3148,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 XLSFONTS_CFLAGS and XLSFONTS_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 XLSFONTS_CFLAGS +and XLSFONTS_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;} diff --git a/app/xmag/aclocal.m4 b/app/xmag/aclocal.m4 index cf4de4f63..d8c0aaaab 100644 --- a/app/xmag/aclocal.m4 +++ b/app/xmag/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/xmag/configure b/app/xmag/configure index 30e568771..b2a0edf2b 100644 --- a/app/xmag/configure +++ b/app/xmag/configure @@ -1416,6 +1416,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 && @@ -3051,6 +3092,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3061,10 +3105,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3075,16 +3123,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK1"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3102,6 +3165,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3112,10 +3178,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3126,16 +3196,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK2"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3178,6 +3263,9 @@ echo "$as_me:$LINENO: checking for APPDEFS" >&5 echo $ECHO_N "checking for APPDEFS... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$APPDEFS_CFLAGS"; then + pkg_cv_APPDEFS_CFLAGS="$APPDEFS_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3188,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 "$APPDEFS_LIBS"; then + pkg_cv_APPDEFS_LIBS="$APPDEFS_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3202,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 - APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + +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 + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xt"` + else + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + fi # Put the nasty error message in config.log where it belongs - echo "$APPDEFS_PKG_ERRORS" 1>&5 + echo "$APPDEFS_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xt) were not met: + +$APPDEFS_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xt) 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 APPDEFS_CFLAGS and APPDEFS_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 (xt) were not met. +Alternatively, you may set the environment variables APPDEFS_CFLAGS +and APPDEFS_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 (xt) were not met: + +$APPDEFS_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 @@ -3241,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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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;} diff --git a/app/xman/aclocal.m4 b/app/xman/aclocal.m4 index cf4de4f63..d8c0aaaab 100644 --- a/app/xman/aclocal.m4 +++ b/app/xman/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/xman/configure b/app/xman/configure index d832501ca..924149a15 100644 --- a/app/xman/configure +++ b/app/xman/configure @@ -1434,6 +1434,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 && @@ -3261,6 +3302,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3271,10 +3315,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3285,16 +3333,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK1"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3312,6 +3375,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3322,10 +3388,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3336,16 +3406,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK2"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3522,6 +3607,9 @@ echo "$as_me:$LINENO: checking for XPRINT_UTIL" >&5 echo $ECHO_N "checking for XPRINT_UTIL... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XPRINT_UTIL_CFLAGS"; then + pkg_cv_XPRINT_UTIL_CFLAGS="$XPRINT_UTIL_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xprintutil xp\"") >&5 ($PKG_CONFIG --exists --print-errors "xprintutil xp") 2>&5 @@ -3532,10 +3620,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 "$XPRINT_UTIL_LIBS"; then + pkg_cv_XPRINT_UTIL_LIBS="$XPRINT_UTIL_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xprintutil xp\"") >&5 ($PKG_CONFIG --exists --print-errors "xprintutil xp") 2>&5 @@ -3546,38 +3638,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XPRINT_UTIL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xprintutil xp"` + +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 + XPRINT_UTIL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xprintutil xp"` + else + XPRINT_UTIL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xprintutil xp"` + fi # Put the nasty error message in config.log where it belongs - echo "$XPRINT_UTIL_PKG_ERRORS" 1>&5 + echo "$XPRINT_UTIL_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xprintutil xp) were not met: + +$XPRINT_UTIL_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xprintutil xp) 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 XPRINT_UTIL_CFLAGS and XPRINT_UTIL_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 (xprintutil xp) were not met. +Alternatively, you may set the environment variables XPRINT_UTIL_CFLAGS +and XPRINT_UTIL_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 (xprintutil xp) were not met: + +$XPRINT_UTIL_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XPRINT_UTIL_CFLAGS and XPRINT_UTIL_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 XPRINT_UTIL_CFLAGS +and XPRINT_UTIL_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 XPRINT_UTIL_CFLAGS and XPRINT_UTIL_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 XPRINT_UTIL_CFLAGS +and XPRINT_UTIL_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 @@ -3585,9 +3698,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 XPRINT_UTIL_CFLAGS and XPRINT_UTIL_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 XPRINT_UTIL_CFLAGS +and XPRINT_UTIL_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;} @@ -3613,6 +3726,9 @@ echo "$as_me:$LINENO: checking for APPDEFS" >&5 echo $ECHO_N "checking for APPDEFS... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$APPDEFS_CFLAGS"; then + pkg_cv_APPDEFS_CFLAGS="$APPDEFS_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3623,10 +3739,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 "$APPDEFS_LIBS"; then + pkg_cv_APPDEFS_LIBS="$APPDEFS_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3637,38 +3757,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + +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 + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xt"` + else + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + fi # Put the nasty error message in config.log where it belongs - echo "$APPDEFS_PKG_ERRORS" 1>&5 + echo "$APPDEFS_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xt) were not met: + +$APPDEFS_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xt) 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 APPDEFS_CFLAGS and APPDEFS_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 (xt) were not met. +Alternatively, you may set the environment variables APPDEFS_CFLAGS +and APPDEFS_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 (xt) were not met: + +$APPDEFS_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 @@ -3676,9 +3817,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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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;} diff --git a/app/xmessage/aclocal.m4 b/app/xmessage/aclocal.m4 index cf4de4f63..d8c0aaaab 100644 --- a/app/xmessage/aclocal.m4 +++ b/app/xmessage/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/xmessage/configure b/app/xmessage/configure index e15d1ebda..054aa32b8 100644 --- a/app/xmessage/configure +++ b/app/xmessage/configure @@ -1416,6 +1416,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 && @@ -3051,6 +3092,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3061,10 +3105,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3075,16 +3123,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK1"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3102,6 +3165,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3112,10 +3178,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3126,16 +3196,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK2"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3178,6 +3263,9 @@ echo "$as_me:$LINENO: checking for APPDEFS" >&5 echo $ECHO_N "checking for APPDEFS... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$APPDEFS_CFLAGS"; then + pkg_cv_APPDEFS_CFLAGS="$APPDEFS_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3188,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 "$APPDEFS_LIBS"; then + pkg_cv_APPDEFS_LIBS="$APPDEFS_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3202,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 - APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + +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 + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xt"` + else + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + fi # Put the nasty error message in config.log where it belongs - echo "$APPDEFS_PKG_ERRORS" 1>&5 + echo "$APPDEFS_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xt) were not met: + +$APPDEFS_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xt) 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 APPDEFS_CFLAGS and APPDEFS_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 (xt) were not met. +Alternatively, you may set the environment variables APPDEFS_CFLAGS +and APPDEFS_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 (xt) were not met: + +$APPDEFS_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 @@ -3241,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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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;} diff --git a/app/xmodmap/aclocal.m4 b/app/xmodmap/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/xmodmap/aclocal.m4 +++ b/app/xmodmap/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/xmodmap/configure b/app/xmodmap/configure index f3f8f3029..207c17169 100644 --- a/app/xmodmap/configure +++ b/app/xmodmap/configure @@ -1401,6 +1401,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 && @@ -3014,6 +3055,9 @@ echo "$as_me:$LINENO: checking for DEP" >&5 echo $ECHO_N "checking for DEP... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$DEP_CFLAGS"; then + pkg_cv_DEP_CFLAGS="$DEP_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 @@ -3024,10 +3068,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 "$DEP_LIBS"; then + pkg_cv_DEP_LIBS="$DEP_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 @@ -3038,38 +3086,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - DEP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + +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 + DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11"` + else + DEP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + fi # Put the nasty error message in config.log where it belongs - echo "$DEP_PKG_ERRORS" 1>&5 + echo "$DEP_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11) were not met: + +$DEP_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11) 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 DEP_CFLAGS and DEP_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 (x11) were not met. +Alternatively, you may set the environment variables DEP_CFLAGS +and DEP_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 (x11) were not met: + +$DEP_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the DEP_CFLAGS and DEP_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 DEP_CFLAGS +and DEP_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 DEP_CFLAGS and DEP_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 DEP_CFLAGS +and DEP_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 @@ -3077,9 +3146,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 DEP_CFLAGS and DEP_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 DEP_CFLAGS +and DEP_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;} diff --git a/app/xmore/aclocal.m4 b/app/xmore/aclocal.m4 index cf4de4f63..d8c0aaaab 100644 --- a/app/xmore/aclocal.m4 +++ b/app/xmore/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/xmore/configure b/app/xmore/configure index a41520139..f38ee24bc 100644 --- a/app/xmore/configure +++ b/app/xmore/configure @@ -1428,6 +1428,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 && @@ -3063,6 +3104,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3073,10 +3117,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3087,16 +3135,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK1"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3114,6 +3177,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3124,10 +3190,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3138,16 +3208,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK2"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3188,6 +3273,9 @@ echo "$as_me:$LINENO: checking for XPRINT_UTIL" >&5 echo $ECHO_N "checking for XPRINT_UTIL... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XPRINT_UTIL_CFLAGS"; then + pkg_cv_XPRINT_UTIL_CFLAGS="$XPRINT_UTIL_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xprintutil xp\"") >&5 ($PKG_CONFIG --exists --print-errors "xprintutil xp") 2>&5 @@ -3198,10 +3286,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 "$XPRINT_UTIL_LIBS"; then + pkg_cv_XPRINT_UTIL_LIBS="$XPRINT_UTIL_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xprintutil xp\"") >&5 ($PKG_CONFIG --exists --print-errors "xprintutil xp") 2>&5 @@ -3212,38 +3304,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XPRINT_UTIL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xprintutil xp"` + +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 + XPRINT_UTIL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xprintutil xp"` + else + XPRINT_UTIL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xprintutil xp"` + fi # Put the nasty error message in config.log where it belongs - echo "$XPRINT_UTIL_PKG_ERRORS" 1>&5 + echo "$XPRINT_UTIL_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xprintutil xp) were not met: + +$XPRINT_UTIL_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xprintutil xp) 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 XPRINT_UTIL_CFLAGS and XPRINT_UTIL_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 (xprintutil xp) were not met. +Alternatively, you may set the environment variables XPRINT_UTIL_CFLAGS +and XPRINT_UTIL_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 (xprintutil xp) were not met: + +$XPRINT_UTIL_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XPRINT_UTIL_CFLAGS and XPRINT_UTIL_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 XPRINT_UTIL_CFLAGS +and XPRINT_UTIL_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 XPRINT_UTIL_CFLAGS and XPRINT_UTIL_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 XPRINT_UTIL_CFLAGS +and XPRINT_UTIL_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 @@ -3251,9 +3364,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 XPRINT_UTIL_CFLAGS and XPRINT_UTIL_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 XPRINT_UTIL_CFLAGS +and XPRINT_UTIL_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;} @@ -3279,6 +3392,9 @@ echo "$as_me:$LINENO: checking for APPDEFS" >&5 echo $ECHO_N "checking for APPDEFS... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$APPDEFS_CFLAGS"; then + pkg_cv_APPDEFS_CFLAGS="$APPDEFS_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3289,10 +3405,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 "$APPDEFS_LIBS"; then + pkg_cv_APPDEFS_LIBS="$APPDEFS_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3303,38 +3423,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + +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 + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xt"` + else + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + fi # Put the nasty error message in config.log where it belongs - echo "$APPDEFS_PKG_ERRORS" 1>&5 + echo "$APPDEFS_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xt) were not met: + +$APPDEFS_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xt) 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 APPDEFS_CFLAGS and APPDEFS_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 (xt) were not met. +Alternatively, you may set the environment variables APPDEFS_CFLAGS +and APPDEFS_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 (xt) were not met: + +$APPDEFS_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 @@ -3342,9 +3483,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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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;} diff --git a/app/xphelloworld/aclocal.m4 b/app/xphelloworld/aclocal.m4 index e78561e7e..9b83f9482 100644 --- a/app/xphelloworld/aclocal.m4 +++ b/app/xphelloworld/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/xphelloworld/configure b/app/xphelloworld/configure index c7765bb98..fefa30771 100644 --- a/app/xphelloworld/configure +++ b/app/xphelloworld/configure @@ -1459,6 +1459,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 && @@ -3094,6 +3135,9 @@ 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 \"x11\"") >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 @@ -3104,10 +3148,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 \"x11\"") >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 @@ -3118,38 +3166,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 "x11"` + +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 "x11"` + else + X11_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + 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 (x11) were not met: + +$X11_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11) 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 (x11) 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 (x11) 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 @@ -3157,9 +3226,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;} @@ -3280,6 +3349,9 @@ echo "$as_me:$LINENO: checking for XPAWHELLOWORLD" >&5 echo $ECHO_N "checking for XPAWHELLOWORLD... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XPAWHELLOWORLD_CFLAGS"; then + pkg_cv_XPAWHELLOWORLD_CFLAGS="$XPAWHELLOWORLD_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xaw8 xprintutil xp\"") >&5 ($PKG_CONFIG --exists --print-errors "xaw8 xprintutil xp") 2>&5 @@ -3290,10 +3362,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 "$XPAWHELLOWORLD_LIBS"; then + pkg_cv_XPAWHELLOWORLD_LIBS="$XPAWHELLOWORLD_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xaw8 xprintutil xp\"") >&5 ($PKG_CONFIG --exists --print-errors "xaw8 xprintutil xp") 2>&5 @@ -3304,38 +3380,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XPAWHELLOWORLD_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xaw8 xprintutil xp"` + +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 + XPAWHELLOWORLD_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xaw8 xprintutil xp"` + else + XPAWHELLOWORLD_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xaw8 xprintutil xp"` + fi # Put the nasty error message in config.log where it belongs - echo "$XPAWHELLOWORLD_PKG_ERRORS" 1>&5 + echo "$XPAWHELLOWORLD_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xaw8 xprintutil xp) were not met: + +$XPAWHELLOWORLD_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xaw8 xprintutil xp) 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 XPAWHELLOWORLD_CFLAGS and XPAWHELLOWORLD_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 (xaw8 xprintutil xp) were not met. +Alternatively, you may set the environment variables XPAWHELLOWORLD_CFLAGS +and XPAWHELLOWORLD_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 (xaw8 xprintutil xp) were not met: + +$XPAWHELLOWORLD_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XPAWHELLOWORLD_CFLAGS and XPAWHELLOWORLD_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 XPAWHELLOWORLD_CFLAGS +and XPAWHELLOWORLD_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 XPAWHELLOWORLD_CFLAGS and XPAWHELLOWORLD_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 XPAWHELLOWORLD_CFLAGS +and XPAWHELLOWORLD_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 @@ -3343,9 +3440,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 XPAWHELLOWORLD_CFLAGS and XPAWHELLOWORLD_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 XPAWHELLOWORLD_CFLAGS +and XPAWHELLOWORLD_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;} @@ -3374,6 +3471,9 @@ echo "$as_me:$LINENO: checking for XPHELLOWORLD" >&5 echo $ECHO_N "checking for XPHELLOWORLD... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XPHELLOWORLD_CFLAGS"; then + pkg_cv_XPHELLOWORLD_CFLAGS="$XPHELLOWORLD_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xprintapputil xprintutil xp\"") >&5 ($PKG_CONFIG --exists --print-errors "xprintapputil xprintutil xp") 2>&5 @@ -3384,10 +3484,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 "$XPHELLOWORLD_LIBS"; then + pkg_cv_XPHELLOWORLD_LIBS="$XPHELLOWORLD_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xprintapputil xprintutil xp\"") >&5 ($PKG_CONFIG --exists --print-errors "xprintapputil xprintutil xp") 2>&5 @@ -3398,38 +3502,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XPHELLOWORLD_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xprintapputil xprintutil xp"` + +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 + XPHELLOWORLD_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xprintapputil xprintutil xp"` + else + XPHELLOWORLD_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xprintapputil xprintutil xp"` + fi # Put the nasty error message in config.log where it belongs - echo "$XPHELLOWORLD_PKG_ERRORS" 1>&5 + echo "$XPHELLOWORLD_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xprintapputil xprintutil xp) were not met: + +$XPHELLOWORLD_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xprintapputil xprintutil xp) 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 XPHELLOWORLD_CFLAGS and XPHELLOWORLD_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 (xprintapputil xprintutil xp) were not met. +Alternatively, you may set the environment variables XPHELLOWORLD_CFLAGS +and XPHELLOWORLD_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 (xprintapputil xprintutil xp) were not met: + +$XPHELLOWORLD_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XPHELLOWORLD_CFLAGS and XPHELLOWORLD_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 XPHELLOWORLD_CFLAGS +and XPHELLOWORLD_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 XPHELLOWORLD_CFLAGS and XPHELLOWORLD_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 XPHELLOWORLD_CFLAGS +and XPHELLOWORLD_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 @@ -3437,9 +3562,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 XPHELLOWORLD_CFLAGS and XPHELLOWORLD_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 XPHELLOWORLD_CFLAGS +and XPHELLOWORLD_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;} @@ -3462,6 +3587,9 @@ echo "$as_me:$LINENO: checking for XPSIMPLEHELLOWORLD" >&5 echo $ECHO_N "checking for XPSIMPLEHELLOWORLD... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XPSIMPLEHELLOWORLD_CFLAGS"; then + pkg_cv_XPSIMPLEHELLOWORLD_CFLAGS="$XPSIMPLEHELLOWORLD_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xprintutil xp\"") >&5 ($PKG_CONFIG --exists --print-errors "xprintutil xp") 2>&5 @@ -3472,10 +3600,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 "$XPSIMPLEHELLOWORLD_LIBS"; then + pkg_cv_XPSIMPLEHELLOWORLD_LIBS="$XPSIMPLEHELLOWORLD_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xprintutil xp\"") >&5 ($PKG_CONFIG --exists --print-errors "xprintutil xp") 2>&5 @@ -3486,38 +3618,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XPSIMPLEHELLOWORLD_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xprintutil xp"` + +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 + XPSIMPLEHELLOWORLD_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xprintutil xp"` + else + XPSIMPLEHELLOWORLD_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xprintutil xp"` + fi # Put the nasty error message in config.log where it belongs - echo "$XPSIMPLEHELLOWORLD_PKG_ERRORS" 1>&5 + echo "$XPSIMPLEHELLOWORLD_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xprintutil xp) were not met: + +$XPSIMPLEHELLOWORLD_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xprintutil xp) 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 XPSIMPLEHELLOWORLD_CFLAGS and XPSIMPLEHELLOWORLD_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 (xprintutil xp) were not met. +Alternatively, you may set the environment variables XPSIMPLEHELLOWORLD_CFLAGS +and XPSIMPLEHELLOWORLD_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 (xprintutil xp) were not met: + +$XPSIMPLEHELLOWORLD_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XPSIMPLEHELLOWORLD_CFLAGS and XPSIMPLEHELLOWORLD_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 XPSIMPLEHELLOWORLD_CFLAGS +and XPSIMPLEHELLOWORLD_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 XPSIMPLEHELLOWORLD_CFLAGS and XPSIMPLEHELLOWORLD_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 XPSIMPLEHELLOWORLD_CFLAGS +and XPSIMPLEHELLOWORLD_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 @@ -3525,9 +3678,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 XPSIMPLEHELLOWORLD_CFLAGS and XPSIMPLEHELLOWORLD_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 XPSIMPLEHELLOWORLD_CFLAGS +and XPSIMPLEHELLOWORLD_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;} @@ -3551,6 +3704,9 @@ echo "$as_me:$LINENO: checking for XPXMHELLOWORLD" >&5 echo $ECHO_N "checking for XPXMHELLOWORLD... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XPXMHELLOWORLD_CFLAGS"; then + pkg_cv_XPXMHELLOWORLD_CFLAGS="$XPXMHELLOWORLD_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xprintutil xt xp\"") >&5 ($PKG_CONFIG --exists --print-errors "xprintutil xt xp") 2>&5 @@ -3561,10 +3717,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 "$XPXMHELLOWORLD_LIBS"; then + pkg_cv_XPXMHELLOWORLD_LIBS="$XPXMHELLOWORLD_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xprintutil xt xp\"") >&5 ($PKG_CONFIG --exists --print-errors "xprintutil xt xp") 2>&5 @@ -3575,38 +3735,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XPXMHELLOWORLD_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xprintutil xt xp"` + +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 + XPXMHELLOWORLD_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xprintutil xt xp"` + else + XPXMHELLOWORLD_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xprintutil xt xp"` + fi # Put the nasty error message in config.log where it belongs - echo "$XPXMHELLOWORLD_PKG_ERRORS" 1>&5 + echo "$XPXMHELLOWORLD_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xprintutil xt xp) were not met: + +$XPXMHELLOWORLD_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xprintutil xt xp) 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 XPXMHELLOWORLD_CFLAGS and XPXMHELLOWORLD_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 (xprintutil xt xp) were not met. +Alternatively, you may set the environment variables XPXMHELLOWORLD_CFLAGS +and XPXMHELLOWORLD_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 (xprintutil xt xp) were not met: + +$XPXMHELLOWORLD_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XPXMHELLOWORLD_CFLAGS and XPXMHELLOWORLD_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 XPXMHELLOWORLD_CFLAGS +and XPXMHELLOWORLD_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 XPXMHELLOWORLD_CFLAGS and XPXMHELLOWORLD_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 XPXMHELLOWORLD_CFLAGS +and XPXMHELLOWORLD_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 @@ -3614,9 +3795,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 XPXMHELLOWORLD_CFLAGS and XPXMHELLOWORLD_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 XPXMHELLOWORLD_CFLAGS +and XPXMHELLOWORLD_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;} @@ -3642,6 +3823,9 @@ echo "$as_me:$LINENO: checking for XPXTHELLOWORLD" >&5 echo $ECHO_N "checking for XPXTHELLOWORLD... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XPXTHELLOWORLD_CFLAGS"; then + pkg_cv_XPXTHELLOWORLD_CFLAGS="$XPXTHELLOWORLD_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xaw8 xprintutil xt xp\"") >&5 ($PKG_CONFIG --exists --print-errors "xaw8 xprintutil xt xp") 2>&5 @@ -3652,10 +3836,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 "$XPXTHELLOWORLD_LIBS"; then + pkg_cv_XPXTHELLOWORLD_LIBS="$XPXTHELLOWORLD_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xaw8 xprintutil xt xp\"") >&5 ($PKG_CONFIG --exists --print-errors "xaw8 xprintutil xt xp") 2>&5 @@ -3666,38 +3854,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XPXTHELLOWORLD_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xaw8 xprintutil xt xp"` + +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 + XPXTHELLOWORLD_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xaw8 xprintutil xt xp"` + else + XPXTHELLOWORLD_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xaw8 xprintutil xt xp"` + fi # Put the nasty error message in config.log where it belongs - echo "$XPXTHELLOWORLD_PKG_ERRORS" 1>&5 + echo "$XPXTHELLOWORLD_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xaw8 xprintutil xt xp) were not met: + +$XPXTHELLOWORLD_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xaw8 xprintutil xt xp) 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 XPXTHELLOWORLD_CFLAGS and XPXTHELLOWORLD_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 (xaw8 xprintutil xt xp) were not met. +Alternatively, you may set the environment variables XPXTHELLOWORLD_CFLAGS +and XPXTHELLOWORLD_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 (xaw8 xprintutil xt xp) were not met: + +$XPXTHELLOWORLD_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XPXTHELLOWORLD_CFLAGS and XPXTHELLOWORLD_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 XPXTHELLOWORLD_CFLAGS +and XPXTHELLOWORLD_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 XPXTHELLOWORLD_CFLAGS and XPXTHELLOWORLD_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 XPXTHELLOWORLD_CFLAGS +and XPXTHELLOWORLD_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 @@ -3705,9 +3914,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 XPXTHELLOWORLD_CFLAGS and XPXTHELLOWORLD_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 XPXTHELLOWORLD_CFLAGS +and XPXTHELLOWORLD_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;} diff --git a/app/xplsprinters/aclocal.m4 b/app/xplsprinters/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/xplsprinters/aclocal.m4 +++ b/app/xplsprinters/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/xplsprinters/configure b/app/xplsprinters/configure index c19475a6d..70cc5c12d 100644 --- a/app/xplsprinters/configure +++ b/app/xplsprinters/configure @@ -1403,6 +1403,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 && @@ -3016,6 +3057,9 @@ echo "$as_me:$LINENO: checking for XPLSPRINTERS" >&5 echo $ECHO_N "checking for XPLSPRINTERS... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XPLSPRINTERS_CFLAGS"; then + pkg_cv_XPLSPRINTERS_CFLAGS="$XPLSPRINTERS_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xp xprintutil x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xp xprintutil x11") 2>&5 @@ -3026,10 +3070,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 "$XPLSPRINTERS_LIBS"; then + pkg_cv_XPLSPRINTERS_LIBS="$XPLSPRINTERS_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xp xprintutil x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xp xprintutil x11") 2>&5 @@ -3040,38 +3088,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XPLSPRINTERS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xp xprintutil x11"` + +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 + XPLSPRINTERS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xp xprintutil x11"` + else + XPLSPRINTERS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xp xprintutil x11"` + fi # Put the nasty error message in config.log where it belongs - echo "$XPLSPRINTERS_PKG_ERRORS" 1>&5 + echo "$XPLSPRINTERS_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xp xprintutil x11) were not met: + +$XPLSPRINTERS_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xp xprintutil x11) 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 XPLSPRINTERS_CFLAGS and XPLSPRINTERS_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 (xp xprintutil x11) were not met. +Alternatively, you may set the environment variables XPLSPRINTERS_CFLAGS +and XPLSPRINTERS_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 (xp xprintutil x11) were not met: + +$XPLSPRINTERS_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XPLSPRINTERS_CFLAGS and XPLSPRINTERS_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 XPLSPRINTERS_CFLAGS +and XPLSPRINTERS_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 XPLSPRINTERS_CFLAGS and XPLSPRINTERS_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 XPLSPRINTERS_CFLAGS +and XPLSPRINTERS_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 @@ -3079,9 +3148,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 XPLSPRINTERS_CFLAGS and XPLSPRINTERS_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 XPLSPRINTERS_CFLAGS +and XPLSPRINTERS_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;} diff --git a/app/xpr/aclocal.m4 b/app/xpr/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/xpr/aclocal.m4 +++ b/app/xpr/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/xpr/configure b/app/xpr/configure index 3d0ee39b3..c25dc57d2 100644 --- a/app/xpr/configure +++ b/app/xpr/configure @@ -1401,6 +1401,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 && @@ -3014,6 +3055,9 @@ echo "$as_me:$LINENO: checking for XPR" >&5 echo $ECHO_N "checking for XPR... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XPR_CFLAGS"; then + pkg_cv_XPR_CFLAGS="$XPR_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xmuu x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xmuu x11") 2>&5 @@ -3024,10 +3068,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 "$XPR_LIBS"; then + pkg_cv_XPR_LIBS="$XPR_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xmuu x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xmuu x11") 2>&5 @@ -3038,38 +3086,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XPR_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xmuu x11"` + +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 + XPR_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xmuu x11"` + else + XPR_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xmuu x11"` + fi # Put the nasty error message in config.log where it belongs - echo "$XPR_PKG_ERRORS" 1>&5 + echo "$XPR_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xmuu x11) were not met: + +$XPR_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xmuu x11) 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 XPR_CFLAGS and XPR_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 (xmuu x11) were not met. +Alternatively, you may set the environment variables XPR_CFLAGS +and XPR_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 (xmuu x11) were not met: + +$XPR_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XPR_CFLAGS and XPR_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 XPR_CFLAGS +and XPR_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 XPR_CFLAGS and XPR_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 XPR_CFLAGS +and XPR_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 @@ -3077,9 +3146,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 XPR_CFLAGS and XPR_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 XPR_CFLAGS +and XPR_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;} diff --git a/app/xprehashprinterlist/aclocal.m4 b/app/xprehashprinterlist/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/xprehashprinterlist/aclocal.m4 +++ b/app/xprehashprinterlist/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/xprehashprinterlist/configure b/app/xprehashprinterlist/configure index 823142ae5..129865354 100644 --- a/app/xprehashprinterlist/configure +++ b/app/xprehashprinterlist/configure @@ -1403,6 +1403,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 && @@ -3016,6 +3057,9 @@ echo "$as_me:$LINENO: checking for XPREHASHPRINTERLIST" >&5 echo $ECHO_N "checking for XPREHASHPRINTERLIST... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XPREHASHPRINTERLIST_CFLAGS"; then + pkg_cv_XPREHASHPRINTERLIST_CFLAGS="$XPREHASHPRINTERLIST_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xp x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xp x11") 2>&5 @@ -3026,10 +3070,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 "$XPREHASHPRINTERLIST_LIBS"; then + pkg_cv_XPREHASHPRINTERLIST_LIBS="$XPREHASHPRINTERLIST_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xp x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xp x11") 2>&5 @@ -3040,38 +3088,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XPREHASHPRINTERLIST_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xp x11"` + +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 + XPREHASHPRINTERLIST_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xp x11"` + else + XPREHASHPRINTERLIST_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xp x11"` + fi # Put the nasty error message in config.log where it belongs - echo "$XPREHASHPRINTERLIST_PKG_ERRORS" 1>&5 + echo "$XPREHASHPRINTERLIST_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xp x11) were not met: + +$XPREHASHPRINTERLIST_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xp x11) 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 XPREHASHPRINTERLIST_CFLAGS and XPREHASHPRINTERLIST_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 (xp x11) were not met. +Alternatively, you may set the environment variables XPREHASHPRINTERLIST_CFLAGS +and XPREHASHPRINTERLIST_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 (xp x11) were not met: + +$XPREHASHPRINTERLIST_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XPREHASHPRINTERLIST_CFLAGS and XPREHASHPRINTERLIST_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 XPREHASHPRINTERLIST_CFLAGS +and XPREHASHPRINTERLIST_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 XPREHASHPRINTERLIST_CFLAGS and XPREHASHPRINTERLIST_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 XPREHASHPRINTERLIST_CFLAGS +and XPREHASHPRINTERLIST_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 @@ -3079,9 +3148,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 XPREHASHPRINTERLIST_CFLAGS and XPREHASHPRINTERLIST_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 XPREHASHPRINTERLIST_CFLAGS +and XPREHASHPRINTERLIST_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;} diff --git a/app/xprop/aclocal.m4 b/app/xprop/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/xprop/aclocal.m4 +++ b/app/xprop/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/xprop/configure b/app/xprop/configure index 997adb828..6e9c6395e 100644 --- a/app/xprop/configure +++ b/app/xprop/configure @@ -1402,6 +1402,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 && @@ -3015,6 +3056,9 @@ echo "$as_me:$LINENO: checking for XPROP" >&5 echo $ECHO_N "checking for XPROP... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XPROP_CFLAGS"; then + pkg_cv_XPROP_CFLAGS="$XPROP_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xmuu x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xmuu x11") 2>&5 @@ -3025,10 +3069,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 "$XPROP_LIBS"; then + pkg_cv_XPROP_LIBS="$XPROP_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xmuu x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xmuu x11") 2>&5 @@ -3039,38 +3087,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XPROP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xmuu x11"` + +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 + XPROP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xmuu x11"` + else + XPROP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xmuu x11"` + fi # Put the nasty error message in config.log where it belongs - echo "$XPROP_PKG_ERRORS" 1>&5 + echo "$XPROP_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xmuu x11) were not met: + +$XPROP_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xmuu x11) 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 XPROP_CFLAGS and XPROP_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 (xmuu x11) were not met. +Alternatively, you may set the environment variables XPROP_CFLAGS +and XPROP_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 (xmuu x11) were not met: + +$XPROP_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XPROP_CFLAGS and XPROP_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 XPROP_CFLAGS +and XPROP_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 XPROP_CFLAGS and XPROP_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 XPROP_CFLAGS +and XPROP_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 @@ -3078,9 +3147,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 XPROP_CFLAGS and XPROP_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 XPROP_CFLAGS +and XPROP_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;} diff --git a/app/xrandr/aclocal.m4 b/app/xrandr/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/xrandr/aclocal.m4 +++ b/app/xrandr/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/xrandr/configure b/app/xrandr/configure index d5b714cc8..0beb25fa1 100644 --- a/app/xrandr/configure +++ b/app/xrandr/configure @@ -1402,6 +1402,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 && @@ -3015,6 +3056,9 @@ echo "$as_me:$LINENO: checking for XRANDR" >&5 echo $ECHO_N "checking for XRANDR... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XRANDR_CFLAGS"; then + pkg_cv_XRANDR_CFLAGS="$XRANDR_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xrandr xrender x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xrandr xrender x11") 2>&5 @@ -3025,10 +3069,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 "$XRANDR_LIBS"; then + pkg_cv_XRANDR_LIBS="$XRANDR_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xrandr xrender x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xrandr xrender x11") 2>&5 @@ -3039,38 +3087,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XRANDR_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xrandr xrender x11"` + +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 + XRANDR_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xrandr xrender x11"` + else + XRANDR_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xrandr xrender x11"` + fi # Put the nasty error message in config.log where it belongs - echo "$XRANDR_PKG_ERRORS" 1>&5 + echo "$XRANDR_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xrandr xrender x11) were not met: + +$XRANDR_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xrandr xrender x11) 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 XRANDR_CFLAGS and XRANDR_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 (xrandr xrender x11) were not met. +Alternatively, you may set the environment variables XRANDR_CFLAGS +and XRANDR_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 (xrandr xrender x11) were not met: + +$XRANDR_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XRANDR_CFLAGS and XRANDR_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 XRANDR_CFLAGS +and XRANDR_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 XRANDR_CFLAGS and XRANDR_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 XRANDR_CFLAGS +and XRANDR_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 @@ -3078,9 +3147,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 XRANDR_CFLAGS and XRANDR_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 XRANDR_CFLAGS +and XRANDR_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;} diff --git a/app/xrdb/aclocal.m4 b/app/xrdb/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/xrdb/aclocal.m4 +++ b/app/xrdb/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/xrdb/configure b/app/xrdb/configure index 2de1a7052..65a354df9 100644 --- a/app/xrdb/configure +++ b/app/xrdb/configure @@ -1444,6 +1444,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 && @@ -3881,6 +3922,9 @@ echo "$as_me:$LINENO: checking for XRDB" >&5 echo $ECHO_N "checking for XRDB... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XRDB_CFLAGS"; then + pkg_cv_XRDB_CFLAGS="$XRDB_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xmuu x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xmuu x11") 2>&5 @@ -3891,10 +3935,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 "$XRDB_LIBS"; then + pkg_cv_XRDB_LIBS="$XRDB_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xmuu x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xmuu x11") 2>&5 @@ -3905,38 +3953,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XRDB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xmuu x11"` + +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 + XRDB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xmuu x11"` + else + XRDB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xmuu x11"` + fi # Put the nasty error message in config.log where it belongs - echo "$XRDB_PKG_ERRORS" 1>&5 + echo "$XRDB_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xmuu x11) were not met: + +$XRDB_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xmuu x11) 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 XRDB_CFLAGS and XRDB_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 (xmuu x11) were not met. +Alternatively, you may set the environment variables XRDB_CFLAGS +and XRDB_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 (xmuu x11) were not met: + +$XRDB_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XRDB_CFLAGS and XRDB_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 XRDB_CFLAGS +and XRDB_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 XRDB_CFLAGS and XRDB_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 XRDB_CFLAGS +and XRDB_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 @@ -3944,9 +4013,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 XRDB_CFLAGS and XRDB_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 XRDB_CFLAGS +and XRDB_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;} diff --git a/app/xrefresh/aclocal.m4 b/app/xrefresh/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/xrefresh/aclocal.m4 +++ b/app/xrefresh/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/xrefresh/configure b/app/xrefresh/configure index 113cf6414..598849693 100644 --- a/app/xrefresh/configure +++ b/app/xrefresh/configure @@ -1403,6 +1403,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 && @@ -3016,6 +3057,9 @@ echo "$as_me:$LINENO: checking for XREFRESH" >&5 echo $ECHO_N "checking for XREFRESH... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XREFRESH_CFLAGS"; then + pkg_cv_XREFRESH_CFLAGS="$XREFRESH_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 @@ -3026,10 +3070,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 "$XREFRESH_LIBS"; then + pkg_cv_XREFRESH_LIBS="$XREFRESH_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 @@ -3040,38 +3088,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XREFRESH_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + +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 + XREFRESH_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11"` + else + XREFRESH_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + fi # Put the nasty error message in config.log where it belongs - echo "$XREFRESH_PKG_ERRORS" 1>&5 + echo "$XREFRESH_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11) were not met: + +$XREFRESH_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11) 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 XREFRESH_CFLAGS and XREFRESH_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 (x11) were not met. +Alternatively, you may set the environment variables XREFRESH_CFLAGS +and XREFRESH_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 (x11) were not met: + +$XREFRESH_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XREFRESH_CFLAGS and XREFRESH_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 XREFRESH_CFLAGS +and XREFRESH_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 XREFRESH_CFLAGS and XREFRESH_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 XREFRESH_CFLAGS +and XREFRESH_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 @@ -3079,9 +3148,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 XREFRESH_CFLAGS and XREFRESH_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 XREFRESH_CFLAGS +and XREFRESH_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;} diff --git a/app/xset/aclocal.m4 b/app/xset/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/xset/aclocal.m4 +++ b/app/xset/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/xset/configure b/app/xset/configure index 19de979b1..600bc1611 100644 --- a/app/xset/configure +++ b/app/xset/configure @@ -1473,6 +1473,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 && @@ -3086,6 +3127,9 @@ echo "$as_me:$LINENO: checking for XSET" >&5 echo $ECHO_N "checking for XSET... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XSET_CFLAGS"; then + pkg_cv_XSET_CFLAGS="$XSET_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xmuu\"") >&5 ($PKG_CONFIG --exists --print-errors "xmuu") 2>&5 @@ -3096,10 +3140,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 "$XSET_LIBS"; then + pkg_cv_XSET_LIBS="$XSET_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xmuu\"") >&5 ($PKG_CONFIG --exists --print-errors "xmuu") 2>&5 @@ -3110,38 +3158,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XSET_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xmuu"` + +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 + XSET_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xmuu"` + else + XSET_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xmuu"` + fi # Put the nasty error message in config.log where it belongs - echo "$XSET_PKG_ERRORS" 1>&5 + echo "$XSET_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xmuu) were not met: + +$XSET_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xmuu) 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 XSET_CFLAGS and XSET_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 (xmuu) were not met. +Alternatively, you may set the environment variables XSET_CFLAGS +and XSET_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 (xmuu) were not met: + +$XSET_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XSET_CFLAGS and XSET_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 XSET_CFLAGS +and XSET_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 XSET_CFLAGS and XSET_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 XSET_CFLAGS +and XSET_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 @@ -3149,9 +3218,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 XSET_CFLAGS and XSET_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 XSET_CFLAGS +and XSET_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;} @@ -3171,6 +3240,9 @@ echo "$as_me:$LINENO: checking for SET_X11" >&5 echo $ECHO_N "checking for SET_X11... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$SET_X11_CFLAGS"; then + pkg_cv_SET_X11_CFLAGS="$SET_X11_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 @@ -3181,10 +3253,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 "$SET_X11_LIBS"; then + pkg_cv_SET_X11_LIBS="$SET_X11_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 @@ -3195,38 +3271,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - SET_X11_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + +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 + SET_X11_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11"` + else + SET_X11_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + fi # Put the nasty error message in config.log where it belongs - echo "$SET_X11_PKG_ERRORS" 1>&5 + echo "$SET_X11_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11) were not met: + +$SET_X11_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11) 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 SET_X11_CFLAGS and SET_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 (x11) were not met. +Alternatively, you may set the environment variables SET_X11_CFLAGS +and SET_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 (x11) were not met: + +$SET_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 SET_X11_CFLAGS and SET_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 SET_X11_CFLAGS +and SET_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 SET_X11_CFLAGS and SET_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 SET_X11_CFLAGS +and SET_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 @@ -3234,9 +3331,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 SET_X11_CFLAGS and SET_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 SET_X11_CFLAGS +and SET_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;} @@ -3256,6 +3353,9 @@ echo "$as_me:$LINENO: checking for SET_XEXT" >&5 echo $ECHO_N "checking for SET_XEXT... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$SET_XEXT_CFLAGS"; then + pkg_cv_SET_XEXT_CFLAGS="$SET_XEXT_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xext\"") >&5 ($PKG_CONFIG --exists --print-errors "xext") 2>&5 @@ -3266,10 +3366,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 "$SET_XEXT_LIBS"; then + pkg_cv_SET_XEXT_LIBS="$SET_XEXT_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xext\"") >&5 ($PKG_CONFIG --exists --print-errors "xext") 2>&5 @@ -3280,16 +3384,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - SET_XEXT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xext"` + +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 + SET_XEXT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xext"` + else + SET_XEXT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xext"` + fi # Put the nasty error message in config.log where it belongs - echo "$SET_XEXT_PKG_ERRORS" 1>&5 + echo "$SET_XEXT_PKG_ERRORS" >&5 - echo "not found" + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + echo "not found" elif test $pkg_failed = untried; then echo "not found" else @@ -3370,6 +3489,9 @@ echo "$as_me:$LINENO: checking for SET_XKB" >&5 echo $ECHO_N "checking for SET_XKB... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$SET_XKB_CFLAGS"; then + pkg_cv_SET_XKB_CFLAGS="$SET_XKB_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 @@ -3380,10 +3502,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 "$SET_XKB_LIBS"; then + pkg_cv_SET_XKB_LIBS="$SET_XKB_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 @@ -3394,16 +3520,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - SET_XKB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + +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 + SET_XKB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11"` + else + SET_XKB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + fi # Put the nasty error message in config.log where it belongs - echo "$SET_XKB_PKG_ERRORS" 1>&5 + echo "$SET_XKB_PKG_ERRORS" >&5 - echo "not found" + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + echo "not found" elif test $pkg_failed = untried; then echo "not found" else @@ -3483,6 +3624,9 @@ echo "$as_me:$LINENO: checking for SET_XF86MISC" >&5 echo $ECHO_N "checking for SET_XF86MISC... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$SET_XF86MISC_CFLAGS"; then + pkg_cv_SET_XF86MISC_CFLAGS="$SET_XF86MISC_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xxf86misc\"") >&5 ($PKG_CONFIG --exists --print-errors "xxf86misc") 2>&5 @@ -3493,10 +3637,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 "$SET_XF86MISC_LIBS"; then + pkg_cv_SET_XF86MISC_LIBS="$SET_XF86MISC_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xxf86misc\"") >&5 ($PKG_CONFIG --exists --print-errors "xxf86misc") 2>&5 @@ -3507,16 +3655,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - SET_XF86MISC_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xxf86misc"` + +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 + SET_XF86MISC_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xxf86misc"` + else + SET_XF86MISC_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xxf86misc"` + fi # Put the nasty error message in config.log where it belongs - echo "$SET_XF86MISC_PKG_ERRORS" 1>&5 + echo "$SET_XF86MISC_PKG_ERRORS" >&5 - echo "not found" + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + echo "not found" elif test $pkg_failed = untried; then echo "not found" else @@ -3598,6 +3761,9 @@ echo "$as_me:$LINENO: checking for SET_FONTCACHE" >&5 echo $ECHO_N "checking for SET_FONTCACHE... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$SET_FONTCACHE_CFLAGS"; then + pkg_cv_SET_FONTCACHE_CFLAGS="$SET_FONTCACHE_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xfontcache\"") >&5 ($PKG_CONFIG --exists --print-errors "xfontcache") 2>&5 @@ -3608,10 +3774,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 "$SET_FONTCACHE_LIBS"; then + pkg_cv_SET_FONTCACHE_LIBS="$SET_FONTCACHE_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xfontcache\"") >&5 ($PKG_CONFIG --exists --print-errors "xfontcache") 2>&5 @@ -3622,16 +3792,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - SET_FONTCACHE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xfontcache"` + +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 + SET_FONTCACHE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xfontcache"` + else + SET_FONTCACHE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xfontcache"` + fi # Put the nasty error message in config.log where it belongs - echo "$SET_FONTCACHE_PKG_ERRORS" 1>&5 + echo "$SET_FONTCACHE_PKG_ERRORS" >&5 - echo "not found" + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + echo "not found" elif test $pkg_failed = untried; then echo "not found" else @@ -3712,6 +3897,9 @@ echo "$as_me:$LINENO: checking for SET_XPRINT" >&5 echo $ECHO_N "checking for SET_XPRINT... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$SET_XPRINT_CFLAGS"; then + pkg_cv_SET_XPRINT_CFLAGS="$SET_XPRINT_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xp\"") >&5 ($PKG_CONFIG --exists --print-errors "xp") 2>&5 @@ -3722,10 +3910,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 "$SET_XPRINT_LIBS"; then + pkg_cv_SET_XPRINT_LIBS="$SET_XPRINT_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xp\"") >&5 ($PKG_CONFIG --exists --print-errors "xp") 2>&5 @@ -3736,16 +3928,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - SET_XPRINT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xp"` + +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 + SET_XPRINT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xp"` + else + SET_XPRINT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xp"` + fi # Put the nasty error message in config.log where it belongs - echo "$SET_XPRINT_PKG_ERRORS" 1>&5 + echo "$SET_XPRINT_PKG_ERRORS" >&5 - echo "not found" + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + echo "not found" elif test $pkg_failed = untried; then echo "not found" else diff --git a/app/xsetmode/aclocal.m4 b/app/xsetmode/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/xsetmode/aclocal.m4 +++ b/app/xsetmode/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/xsetmode/configure b/app/xsetmode/configure index 631241164..8087b4cd1 100644 --- a/app/xsetmode/configure +++ b/app/xsetmode/configure @@ -1403,6 +1403,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 && @@ -3016,6 +3057,9 @@ echo "$as_me:$LINENO: checking for XSETMODE" >&5 echo $ECHO_N "checking for XSETMODE... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XSETMODE_CFLAGS"; then + pkg_cv_XSETMODE_CFLAGS="$XSETMODE_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xi x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xi x11") 2>&5 @@ -3026,10 +3070,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 "$XSETMODE_LIBS"; then + pkg_cv_XSETMODE_LIBS="$XSETMODE_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xi x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xi x11") 2>&5 @@ -3040,38 +3088,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XSETMODE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xi x11"` + +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 + XSETMODE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xi x11"` + else + XSETMODE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xi x11"` + fi # Put the nasty error message in config.log where it belongs - echo "$XSETMODE_PKG_ERRORS" 1>&5 + echo "$XSETMODE_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xi x11) were not met: + +$XSETMODE_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xi x11) 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 XSETMODE_CFLAGS and XSETMODE_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 (xi x11) were not met. +Alternatively, you may set the environment variables XSETMODE_CFLAGS +and XSETMODE_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 (xi x11) were not met: + +$XSETMODE_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XSETMODE_CFLAGS and XSETMODE_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 XSETMODE_CFLAGS +and XSETMODE_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 XSETMODE_CFLAGS and XSETMODE_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 XSETMODE_CFLAGS +and XSETMODE_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 @@ -3079,9 +3148,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 XSETMODE_CFLAGS and XSETMODE_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 XSETMODE_CFLAGS +and XSETMODE_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;} diff --git a/app/xsetpointer/aclocal.m4 b/app/xsetpointer/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/xsetpointer/aclocal.m4 +++ b/app/xsetpointer/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/xsetpointer/configure b/app/xsetpointer/configure index f9b7169e9..022f49c57 100644 --- a/app/xsetpointer/configure +++ b/app/xsetpointer/configure @@ -1403,6 +1403,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 && @@ -3016,6 +3057,9 @@ echo "$as_me:$LINENO: checking for XSETPOINTER" >&5 echo $ECHO_N "checking for XSETPOINTER... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XSETPOINTER_CFLAGS"; then + pkg_cv_XSETPOINTER_CFLAGS="$XSETPOINTER_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xi x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xi x11") 2>&5 @@ -3026,10 +3070,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 "$XSETPOINTER_LIBS"; then + pkg_cv_XSETPOINTER_LIBS="$XSETPOINTER_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xi x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xi x11") 2>&5 @@ -3040,38 +3088,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XSETPOINTER_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xi x11"` + +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 + XSETPOINTER_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xi x11"` + else + XSETPOINTER_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xi x11"` + fi # Put the nasty error message in config.log where it belongs - echo "$XSETPOINTER_PKG_ERRORS" 1>&5 + echo "$XSETPOINTER_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xi x11) were not met: + +$XSETPOINTER_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xi x11) 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 XSETPOINTER_CFLAGS and XSETPOINTER_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 (xi x11) were not met. +Alternatively, you may set the environment variables XSETPOINTER_CFLAGS +and XSETPOINTER_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 (xi x11) were not met: + +$XSETPOINTER_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XSETPOINTER_CFLAGS and XSETPOINTER_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 XSETPOINTER_CFLAGS +and XSETPOINTER_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 XSETPOINTER_CFLAGS and XSETPOINTER_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 XSETPOINTER_CFLAGS +and XSETPOINTER_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 @@ -3079,9 +3148,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 XSETPOINTER_CFLAGS and XSETPOINTER_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 XSETPOINTER_CFLAGS +and XSETPOINTER_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;} diff --git a/app/xsetroot/aclocal.m4 b/app/xsetroot/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/xsetroot/aclocal.m4 +++ b/app/xsetroot/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/xsetroot/configure b/app/xsetroot/configure index dadd8427a..f9084c7c5 100644 --- a/app/xsetroot/configure +++ b/app/xsetroot/configure @@ -1403,6 +1403,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 && @@ -3016,6 +3057,9 @@ echo "$as_me:$LINENO: checking for XSETROOT" >&5 echo $ECHO_N "checking for XSETROOT... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XSETROOT_CFLAGS"; then + pkg_cv_XSETROOT_CFLAGS="$XSETROOT_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xmuu x11 xbitmaps\"") >&5 ($PKG_CONFIG --exists --print-errors "xmuu x11 xbitmaps") 2>&5 @@ -3026,10 +3070,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 "$XSETROOT_LIBS"; then + pkg_cv_XSETROOT_LIBS="$XSETROOT_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xmuu x11 xbitmaps\"") >&5 ($PKG_CONFIG --exists --print-errors "xmuu x11 xbitmaps") 2>&5 @@ -3040,38 +3088,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XSETROOT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xmuu x11 xbitmaps"` + +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 + XSETROOT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xmuu x11 xbitmaps"` + else + XSETROOT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xmuu x11 xbitmaps"` + fi # Put the nasty error message in config.log where it belongs - echo "$XSETROOT_PKG_ERRORS" 1>&5 + echo "$XSETROOT_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xmuu x11 xbitmaps) were not met: + +$XSETROOT_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xmuu x11 xbitmaps) 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 XSETROOT_CFLAGS and XSETROOT_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 (xmuu x11 xbitmaps) were not met. +Alternatively, you may set the environment variables XSETROOT_CFLAGS +and XSETROOT_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 (xmuu x11 xbitmaps) were not met: + +$XSETROOT_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XSETROOT_CFLAGS and XSETROOT_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 XSETROOT_CFLAGS +and XSETROOT_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 XSETROOT_CFLAGS and XSETROOT_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 XSETROOT_CFLAGS +and XSETROOT_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 @@ -3079,9 +3148,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 XSETROOT_CFLAGS and XSETROOT_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 XSETROOT_CFLAGS +and XSETROOT_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;} diff --git a/app/xsm/aclocal.m4 b/app/xsm/aclocal.m4 index cf4de4f63..d8c0aaaab 100644 --- a/app/xsm/aclocal.m4 +++ b/app/xsm/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/xsm/configure b/app/xsm/configure index 14bf0130c..121f0cc40 100644 --- a/app/xsm/configure +++ b/app/xsm/configure @@ -1416,6 +1416,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 && @@ -3393,6 +3434,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3403,10 +3447,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3417,16 +3465,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK1"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3444,6 +3507,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3454,10 +3520,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3468,16 +3538,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK2"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3521,6 +3606,9 @@ echo "$as_me:$LINENO: checking for APPDEFS" >&5 echo $ECHO_N "checking for APPDEFS... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$APPDEFS_CFLAGS"; then + pkg_cv_APPDEFS_CFLAGS="$APPDEFS_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3531,10 +3619,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 "$APPDEFS_LIBS"; then + pkg_cv_APPDEFS_LIBS="$APPDEFS_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3545,38 +3637,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + +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 + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xt"` + else + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + fi # Put the nasty error message in config.log where it belongs - echo "$APPDEFS_PKG_ERRORS" 1>&5 + echo "$APPDEFS_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xt) were not met: + +$APPDEFS_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xt) 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 APPDEFS_CFLAGS and APPDEFS_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 (xt) were not met. +Alternatively, you may set the environment variables APPDEFS_CFLAGS +and APPDEFS_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 (xt) were not met: + +$APPDEFS_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 @@ -3584,9 +3697,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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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;} diff --git a/app/xstdcmap/aclocal.m4 b/app/xstdcmap/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/xstdcmap/aclocal.m4 +++ b/app/xstdcmap/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/xstdcmap/configure b/app/xstdcmap/configure index e7d1d8fd1..0b560846b 100644 --- a/app/xstdcmap/configure +++ b/app/xstdcmap/configure @@ -1403,6 +1403,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 && @@ -3016,6 +3057,9 @@ echo "$as_me:$LINENO: checking for XSTDCMAP" >&5 echo $ECHO_N "checking for XSTDCMAP... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XSTDCMAP_CFLAGS"; then + pkg_cv_XSTDCMAP_CFLAGS="$XSTDCMAP_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xmu x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xmu x11") 2>&5 @@ -3026,10 +3070,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 "$XSTDCMAP_LIBS"; then + pkg_cv_XSTDCMAP_LIBS="$XSTDCMAP_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xmu x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xmu x11") 2>&5 @@ -3040,38 +3088,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XSTDCMAP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xmu x11"` + +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 + XSTDCMAP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xmu x11"` + else + XSTDCMAP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xmu x11"` + fi # Put the nasty error message in config.log where it belongs - echo "$XSTDCMAP_PKG_ERRORS" 1>&5 + echo "$XSTDCMAP_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xmu x11) were not met: + +$XSTDCMAP_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xmu x11) 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 XSTDCMAP_CFLAGS and XSTDCMAP_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 (xmu x11) were not met. +Alternatively, you may set the environment variables XSTDCMAP_CFLAGS +and XSTDCMAP_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 (xmu x11) were not met: + +$XSTDCMAP_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XSTDCMAP_CFLAGS and XSTDCMAP_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 XSTDCMAP_CFLAGS +and XSTDCMAP_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 XSTDCMAP_CFLAGS and XSTDCMAP_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 XSTDCMAP_CFLAGS +and XSTDCMAP_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 @@ -3079,9 +3148,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 XSTDCMAP_CFLAGS and XSTDCMAP_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 XSTDCMAP_CFLAGS +and XSTDCMAP_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;} diff --git a/app/xtrap/aclocal.m4 b/app/xtrap/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/xtrap/aclocal.m4 +++ b/app/xtrap/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/xtrap/configure b/app/xtrap/configure index 69cdf74cb..d48e827a5 100644 --- a/app/xtrap/configure +++ b/app/xtrap/configure @@ -1403,6 +1403,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 && @@ -3016,6 +3057,9 @@ echo "$as_me:$LINENO: checking for XTRAP_APP" >&5 echo $ECHO_N "checking for XTRAP_APP... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XTRAP_APP_CFLAGS"; then + pkg_cv_XTRAP_APP_CFLAGS="$XTRAP_APP_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xtrap\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xtrap") 2>&5 @@ -3026,10 +3070,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 "$XTRAP_APP_LIBS"; then + pkg_cv_XTRAP_APP_LIBS="$XTRAP_APP_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xtrap\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xtrap") 2>&5 @@ -3040,38 +3088,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XTRAP_APP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xtrap"` + +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 + XTRAP_APP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 xtrap"` + else + XTRAP_APP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xtrap"` + fi # Put the nasty error message in config.log where it belongs - echo "$XTRAP_APP_PKG_ERRORS" 1>&5 + echo "$XTRAP_APP_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11 xtrap) were not met: + +$XTRAP_APP_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11 xtrap) 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 XTRAP_APP_CFLAGS and XTRAP_APP_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 (x11 xtrap) were not met. +Alternatively, you may set the environment variables XTRAP_APP_CFLAGS +and XTRAP_APP_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 (x11 xtrap) were not met: + +$XTRAP_APP_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XTRAP_APP_CFLAGS and XTRAP_APP_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 XTRAP_APP_CFLAGS +and XTRAP_APP_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 XTRAP_APP_CFLAGS and XTRAP_APP_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 XTRAP_APP_CFLAGS +and XTRAP_APP_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 @@ -3079,9 +3148,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 XTRAP_APP_CFLAGS and XTRAP_APP_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 XTRAP_APP_CFLAGS +and XTRAP_APP_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;} diff --git a/app/xvidtune/aclocal.m4 b/app/xvidtune/aclocal.m4 index cf4de4f63..d8c0aaaab 100644 --- a/app/xvidtune/aclocal.m4 +++ b/app/xvidtune/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/xvidtune/configure b/app/xvidtune/configure index a4c9d9009..a75085c37 100644 --- a/app/xvidtune/configure +++ b/app/xvidtune/configure @@ -1435,6 +1435,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 && @@ -3352,6 +3393,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3362,10 +3406,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5 @@ -3376,16 +3424,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK1"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3403,6 +3466,9 @@ echo "$as_me:$LINENO: checking for TMP_XAW" >&5 echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$TMP_XAW_CFLAGS"; then + pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3413,10 +3479,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 "$TMP_XAW_LIBS"; then + pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5 ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5 @@ -3427,16 +3497,31 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + +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 + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK2"` + else + TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"` + fi # Put the nasty error message in config.log where it belongs - echo "$TMP_XAW_PKG_ERRORS" 1>&5 + echo "$TMP_XAW_PKG_ERRORS" >&5 - success=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + success=no elif test $pkg_failed = untried; then success=no else @@ -3476,6 +3561,9 @@ echo "$as_me:$LINENO: checking for XVIDTUNE" >&5 echo $ECHO_N "checking for XVIDTUNE... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XVIDTUNE_CFLAGS"; then + pkg_cv_XVIDTUNE_CFLAGS="$XVIDTUNE_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xxf86vm\"") >&5 ($PKG_CONFIG --exists --print-errors "xxf86vm") 2>&5 @@ -3486,10 +3574,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 "$XVIDTUNE_LIBS"; then + pkg_cv_XVIDTUNE_LIBS="$XVIDTUNE_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xxf86vm\"") >&5 ($PKG_CONFIG --exists --print-errors "xxf86vm") 2>&5 @@ -3500,38 +3592,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XVIDTUNE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xxf86vm"` + +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 + XVIDTUNE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xxf86vm"` + else + XVIDTUNE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xxf86vm"` + fi # Put the nasty error message in config.log where it belongs - echo "$XVIDTUNE_PKG_ERRORS" 1>&5 + echo "$XVIDTUNE_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xxf86vm) were not met: + +$XVIDTUNE_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xxf86vm) 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 XVIDTUNE_CFLAGS and XVIDTUNE_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 (xxf86vm) were not met. +Alternatively, you may set the environment variables XVIDTUNE_CFLAGS +and XVIDTUNE_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 (xxf86vm) were not met: + +$XVIDTUNE_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XVIDTUNE_CFLAGS and XVIDTUNE_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 XVIDTUNE_CFLAGS +and XVIDTUNE_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 XVIDTUNE_CFLAGS and XVIDTUNE_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 XVIDTUNE_CFLAGS +and XVIDTUNE_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 @@ -3539,9 +3652,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 XVIDTUNE_CFLAGS and XVIDTUNE_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 XVIDTUNE_CFLAGS +and XVIDTUNE_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;} @@ -3578,6 +3691,9 @@ echo "$as_me:$LINENO: checking for APPDEFS" >&5 echo $ECHO_N "checking for APPDEFS... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$APPDEFS_CFLAGS"; then + pkg_cv_APPDEFS_CFLAGS="$APPDEFS_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3588,10 +3704,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 "$APPDEFS_LIBS"; then + pkg_cv_APPDEFS_LIBS="$APPDEFS_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5 ($PKG_CONFIG --exists --print-errors "xt") 2>&5 @@ -3602,38 +3722,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + +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 + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xt"` + else + APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"` + fi # Put the nasty error message in config.log where it belongs - echo "$APPDEFS_PKG_ERRORS" 1>&5 + echo "$APPDEFS_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xt) were not met: + +$APPDEFS_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xt) 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 APPDEFS_CFLAGS and APPDEFS_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 (xt) were not met. +Alternatively, you may set the environment variables APPDEFS_CFLAGS +and APPDEFS_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 (xt) were not met: + +$APPDEFS_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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 @@ -3641,9 +3782,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 APPDEFS_CFLAGS and APPDEFS_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 APPDEFS_CFLAGS +and APPDEFS_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;} diff --git a/app/xvinfo/aclocal.m4 b/app/xvinfo/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/xvinfo/aclocal.m4 +++ b/app/xvinfo/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/xvinfo/configure b/app/xvinfo/configure index 22920d2f8..2a0462278 100644 --- a/app/xvinfo/configure +++ b/app/xvinfo/configure @@ -1402,6 +1402,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 && @@ -3015,6 +3056,9 @@ echo "$as_me:$LINENO: checking for XVINFO" >&5 echo $ECHO_N "checking for XVINFO... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XVINFO_CFLAGS"; then + pkg_cv_XVINFO_CFLAGS="$XVINFO_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xv x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xv x11") 2>&5 @@ -3025,10 +3069,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 "$XVINFO_LIBS"; then + pkg_cv_XVINFO_LIBS="$XVINFO_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xv x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xv x11") 2>&5 @@ -3039,38 +3087,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XVINFO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xv x11"` + +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 + XVINFO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xv x11"` + else + XVINFO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xv x11"` + fi # Put the nasty error message in config.log where it belongs - echo "$XVINFO_PKG_ERRORS" 1>&5 + echo "$XVINFO_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xv x11) were not met: + +$XVINFO_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xv x11) 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 XVINFO_CFLAGS and XVINFO_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 (xv x11) were not met. +Alternatively, you may set the environment variables XVINFO_CFLAGS +and XVINFO_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 (xv x11) were not met: + +$XVINFO_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XVINFO_CFLAGS and XVINFO_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 XVINFO_CFLAGS +and XVINFO_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 XVINFO_CFLAGS and XVINFO_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 XVINFO_CFLAGS +and XVINFO_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 @@ -3078,9 +3147,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 XVINFO_CFLAGS and XVINFO_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 XVINFO_CFLAGS +and XVINFO_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;} diff --git a/app/xwd/aclocal.m4 b/app/xwd/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/xwd/aclocal.m4 +++ b/app/xwd/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/xwd/configure b/app/xwd/configure index b6b1df6cd..093cebb10 100644 --- a/app/xwd/configure +++ b/app/xwd/configure @@ -1401,6 +1401,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 && @@ -3014,6 +3055,9 @@ echo "$as_me:$LINENO: checking for XWD" >&5 echo $ECHO_N "checking for XWD... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XWD_CFLAGS"; then + pkg_cv_XWD_CFLAGS="$XWD_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xmuu x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xmuu x11") 2>&5 @@ -3024,10 +3068,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 "$XWD_LIBS"; then + pkg_cv_XWD_LIBS="$XWD_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xmuu x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xmuu x11") 2>&5 @@ -3038,38 +3086,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XWD_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xmuu x11"` + +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 + XWD_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xmuu x11"` + else + XWD_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xmuu x11"` + fi # Put the nasty error message in config.log where it belongs - echo "$XWD_PKG_ERRORS" 1>&5 + echo "$XWD_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xmuu x11) were not met: + +$XWD_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xmuu x11) 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 XWD_CFLAGS and XWD_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 (xmuu x11) were not met. +Alternatively, you may set the environment variables XWD_CFLAGS +and XWD_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 (xmuu x11) were not met: + +$XWD_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XWD_CFLAGS and XWD_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 XWD_CFLAGS +and XWD_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 XWD_CFLAGS and XWD_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 XWD_CFLAGS +and XWD_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 @@ -3077,9 +3146,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 XWD_CFLAGS and XWD_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 XWD_CFLAGS +and XWD_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;} diff --git a/app/xwininfo/aclocal.m4 b/app/xwininfo/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/xwininfo/aclocal.m4 +++ b/app/xwininfo/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/xwininfo/configure b/app/xwininfo/configure index bac7c08ec..9c4240dbc 100644 --- a/app/xwininfo/configure +++ b/app/xwininfo/configure @@ -1403,6 +1403,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 && @@ -3016,6 +3057,9 @@ echo "$as_me:$LINENO: checking for XWININFO" >&5 echo $ECHO_N "checking for XWININFO... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XWININFO_CFLAGS"; then + pkg_cv_XWININFO_CFLAGS="$XWININFO_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xmuu xext x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xmuu xext x11") 2>&5 @@ -3026,10 +3070,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 "$XWININFO_LIBS"; then + pkg_cv_XWININFO_LIBS="$XWININFO_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xmuu xext x11\"") >&5 ($PKG_CONFIG --exists --print-errors "xmuu xext x11") 2>&5 @@ -3040,38 +3088,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XWININFO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xmuu xext x11"` + +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 + XWININFO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xmuu xext x11"` + else + XWININFO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xmuu xext x11"` + fi # Put the nasty error message in config.log where it belongs - echo "$XWININFO_PKG_ERRORS" 1>&5 + echo "$XWININFO_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (xmuu xext x11) were not met: + +$XWININFO_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (xmuu xext x11) 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 XWININFO_CFLAGS and XWININFO_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 (xmuu xext x11) were not met. +Alternatively, you may set the environment variables XWININFO_CFLAGS +and XWININFO_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 (xmuu xext x11) were not met: + +$XWININFO_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XWININFO_CFLAGS and XWININFO_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 XWININFO_CFLAGS +and XWININFO_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 XWININFO_CFLAGS and XWININFO_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 XWININFO_CFLAGS +and XWININFO_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 @@ -3079,9 +3148,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 XWININFO_CFLAGS and XWININFO_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 XWININFO_CFLAGS +and XWININFO_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;} diff --git a/app/xwud/aclocal.m4 b/app/xwud/aclocal.m4 index 89a893bec..b511cb709 100644 --- a/app/xwud/aclocal.m4 +++ b/app/xwud/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/xwud/configure b/app/xwud/configure index 8b6322943..6b632219c 100644 --- a/app/xwud/configure +++ b/app/xwud/configure @@ -1401,6 +1401,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 && @@ -3014,6 +3055,9 @@ echo "$as_me:$LINENO: checking for XWUD" >&5 echo $ECHO_N "checking for XWUD... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then + if test -n "$XWUD_CFLAGS"; then + pkg_cv_XWUD_CFLAGS="$XWUD_CFLAGS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 @@ -3024,10 +3068,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 "$XWUD_LIBS"; then + pkg_cv_XWUD_LIBS="$XWUD_LIBS" + else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 @@ -3038,38 +3086,59 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi + fi else pkg_failed=untried fi + + if test $pkg_failed = yes; then - XWUD_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + +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 + XWUD_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11"` + else + XWUD_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + fi # Put the nasty error message in config.log where it belongs - echo "$XWUD_PKG_ERRORS" 1>&5 + echo "$XWUD_PKG_ERRORS" >&5 + + { { echo "$as_me:$LINENO: error: Package requirements (x11) were not met: + +$XWUD_PKG_ERRORS - { { echo "$as_me:$LINENO: error: Package requirements (x11) 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 XWUD_CFLAGS and XWUD_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 (x11) were not met. +Alternatively, you may set the environment variables XWUD_CFLAGS +and XWUD_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 (x11) were not met: + +$XWUD_PKG_ERRORS + Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively you may set the XWUD_CFLAGS and XWUD_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 XWUD_CFLAGS +and XWUD_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 XWUD_CFLAGS and XWUD_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 XWUD_CFLAGS +and XWUD_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 @@ -3077,9 +3146,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 XWUD_CFLAGS and XWUD_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 XWUD_CFLAGS +and XWUD_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;} |