/[debian]/bti/branches/upstream/current/aclocal.m4
ViewVC logotype

Diff of /bti/branches/upstream/current/aclocal.m4

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2448 by gregoa, Thu Sep 2 23:11:45 2010 UTC revision 2449 by gregoa, Fri Mar 18 11:13:50 2011 UTC
# Line 13  Line 13 
13    
14  m4_ifndef([AC_AUTOCONF_VERSION],  m4_ifndef([AC_AUTOCONF_VERSION],
15    [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl    [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16  m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,  m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
17  [m4_warning([this file was generated for autoconf 2.65.  [m4_warning([this file was generated for autoconf 2.68.
18  You have another version of autoconf.  It may work, but is not guaranteed to.  You have another version of autoconf.  It may work, but is not guaranteed to.
19  If you have problems, you may need to regenerate the build system entirely.  If you have problems, you may need to regenerate the build system entirely.
20  To do so, use the procedure documented by the package, typically `autoreconf'.])])  To do so, use the procedure documented by the package, typically `autoreconf'.])])
21    
22  # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-  # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
23    # serial 1 (pkg-config-0.24)
24  #  #
25  # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.  # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
26  #  #
# Line 47  To do so, use the procedure documented b Line 48  To do so, use the procedure documented b
48  AC_DEFUN([PKG_PROG_PKG_CONFIG],  AC_DEFUN([PKG_PROG_PKG_CONFIG],
49  [m4_pattern_forbid([^_?PKG_[A-Z_]+$])  [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
50  m4_pattern_allow([^PKG_CONFIG(_PATH)?$])  m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
51  AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl  AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
52    AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
53    AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
54    
55  if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then  if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
56          AC_PATH_TOOL([PKG_CONFIG], [pkg-config])          AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
57  fi  fi
# Line 60  if test -n "$PKG_CONFIG"; then Line 64  if test -n "$PKG_CONFIG"; then
64                  AC_MSG_RESULT([no])                  AC_MSG_RESULT([no])
65                  PKG_CONFIG=""                  PKG_CONFIG=""
66          fi          fi
                   
67  fi[]dnl  fi[]dnl
68  ])# PKG_PROG_PKG_CONFIG  ])# PKG_PROG_PKG_CONFIG
69    
# Line 69  fi[]dnl Line 72  fi[]dnl
72  # Check to see whether a particular set of modules exists.  Similar  # Check to see whether a particular set of modules exists.  Similar
73  # to PKG_CHECK_MODULES(), but does not set variables or print errors.  # to PKG_CHECK_MODULES(), but does not set variables or print errors.
74  #  #
75  #  # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
76  # Similar to PKG_CHECK_MODULES, make sure that the first instance of  # only at the first occurence in configure.ac, so if the first place
77  # this or PKG_CHECK_MODULES is called, or make sure to call  # it's called might be skipped (such as if it is within an "if", you
78  # PKG_CHECK_EXISTS manually  # have to call PKG_CHECK_EXISTS manually
79  # --------------------------------------------------------------  # --------------------------------------------------------------
80  AC_DEFUN([PKG_CHECK_EXISTS],  AC_DEFUN([PKG_CHECK_EXISTS],
81  [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl  [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
82  if test -n "$PKG_CONFIG" && \  if test -n "$PKG_CONFIG" && \
83      AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then      AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
84    m4_ifval([$2], [$2], [:])    m4_default([$2], [:])
85  m4_ifvaln([$3], [else  m4_ifvaln([$3], [else
86    $3])dnl    $3])dnl
87  fi])  fi])
88    
   
89  # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])  # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
90  # ---------------------------------------------  # ---------------------------------------------
91  m4_define([_PKG_CONFIG],  m4_define([_PKG_CONFIG],
# Line 136  and $1[]_LIBS to avoid the need to call Line 138  and $1[]_LIBS to avoid the need to call
138  See the pkg-config man page for more details.])  See the pkg-config man page for more details.])
139    
140  if test $pkg_failed = yes; then  if test $pkg_failed = yes; then
141            AC_MSG_RESULT([no])
142          _PKG_SHORT_ERRORS_SUPPORTED          _PKG_SHORT_ERRORS_SUPPORTED
143          if test $_pkg_short_errors_supported = yes; then          if test $_pkg_short_errors_supported = yes; then
144                  $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`                  $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
# Line 145  if test $pkg_failed = yes; then Line 148  if test $pkg_failed = yes; then
148          # Put the nasty error message in config.log where it belongs          # Put the nasty error message in config.log where it belongs
149          echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD          echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
150    
151          ifelse([$4], , [AC_MSG_ERROR(dnl          m4_default([$4], [AC_MSG_ERROR(
152  [Package requirements ($2) were not met:  [Package requirements ($2) were not met:
153    
154  $$1_PKG_ERRORS  $$1_PKG_ERRORS
# Line 153  $$1_PKG_ERRORS Line 156  $$1_PKG_ERRORS
156  Consider adjusting the PKG_CONFIG_PATH environment variable if you  Consider adjusting the PKG_CONFIG_PATH environment variable if you
157  installed software in a non-standard prefix.  installed software in a non-standard prefix.
158    
159  _PKG_TEXT  _PKG_TEXT])[]dnl
160  ])],          ])
                 [AC_MSG_RESULT([no])  
                 $4])  
161  elif test $pkg_failed = untried; then  elif test $pkg_failed = untried; then
162          ifelse([$4], , [AC_MSG_FAILURE(dnl          AC_MSG_RESULT([no])
163            m4_default([$4], [AC_MSG_FAILURE(
164  [The pkg-config script could not be found or is too old.  Make sure it  [The pkg-config script could not be found or is too old.  Make sure it
165  is in your PATH or set the PKG_CONFIG environment variable to the full  is in your PATH or set the PKG_CONFIG environment variable to the full
166  path to pkg-config.  path to pkg-config.
167    
168  _PKG_TEXT  _PKG_TEXT
169    
170  To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],  To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
171                  [$4])          ])
172  else  else
173          $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS          $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
174          $1[]_LIBS=$pkg_cv_[]$1[]_LIBS          $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
175          AC_MSG_RESULT([yes])          AC_MSG_RESULT([yes])
176          ifelse([$3], , :, [$3])          $3
177  fi[]dnl  fi[]dnl
178  ])# PKG_CHECK_MODULES  ])# PKG_CHECK_MODULES
179    

Legend:
Removed from v.2448  
changed lines
  Added in v.2449

  ViewVC Help
Powered by ViewVC 1.1.26