11
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
12
# PARTICULAR PURPOSE.
15
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
16
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
17
dnl also defines GSTUFF_PKG_ERRORS on error
18
AC_DEFUN(PKG_CHECK_MODULES, [
21
if test -z "$PKG_CONFIG"; then
22
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
25
if test "$PKG_CONFIG" = "no" ; then
26
echo "*** The pkg-config script could not be found. Make sure it is"
27
echo "*** in your path, or set the PKG_CONFIG environment variable"
28
echo "*** to the full path to pkg-config."
29
echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
31
PKG_CONFIG_MIN_VERSION=0.9.0
32
if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
33
AC_MSG_CHECKING(for $2)
35
if $PKG_CONFIG --exists "$2" ; then
39
AC_MSG_CHECKING($1_CFLAGS)
40
$1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
41
AC_MSG_RESULT($$1_CFLAGS)
43
AC_MSG_CHECKING($1_LIBS)
44
$1_LIBS=`$PKG_CONFIG --libs "$2"`
45
AC_MSG_RESULT($$1_LIBS)
49
## If we have a custom action on failure, don't print errors, but
50
## do set a variable so people can do so.
51
$1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
52
ifelse([$4], ,echo $$1_PKG_ERRORS,)
14
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
16
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
18
# This program is free software; you can redistribute it and/or modify
19
# it under the terms of the GNU General Public License as published by
20
# the Free Software Foundation; either version 2 of the License, or
21
# (at your option) any later version.
23
# This program is distributed in the hope that it will be useful, but
24
# WITHOUT ANY WARRANTY; without even the implied warranty of
25
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
26
# General Public License for more details.
28
# You should have received a copy of the GNU General Public License
29
# along with this program; if not, write to the Free Software
30
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
32
# As a special exception to the GNU General Public License, if you
33
# distribute this file as part of a program that contains a
34
# configuration script generated by Autoconf, you may include it under
35
# the same distribution terms that you use for the rest of that program.
37
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
38
# ----------------------------------
39
AC_DEFUN([PKG_PROG_PKG_CONFIG],
40
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
41
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
42
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
43
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
44
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
46
if test -n "$PKG_CONFIG"; then
47
_pkg_min_version=m4_default([$1], [0.9.0])
48
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
49
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
57
])# PKG_PROG_PKG_CONFIG
59
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
61
# Check to see whether a particular set of modules exists. Similar
62
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
65
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
66
# this or PKG_CHECK_MODULES is called, or make sure to call
67
# PKG_CHECK_EXISTS manually
68
# --------------------------------------------------------------
69
AC_DEFUN([PKG_CHECK_EXISTS],
70
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
71
if test -n "$PKG_CONFIG" && \
72
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
73
m4_ifval([$2], [$2], [:])
79
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
80
# ---------------------------------------------
81
m4_define([_PKG_CONFIG],
82
[if test -n "$PKG_CONFIG"; then
83
if test -n "$$1"; then
86
PKG_CHECK_EXISTS([$3],
87
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
95
# _PKG_SHORT_ERRORS_SUPPORTED
96
# -----------------------------
97
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
98
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
99
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
100
_pkg_short_errors_supported=yes
102
_pkg_short_errors_supported=no
104
])# _PKG_SHORT_ERRORS_SUPPORTED
107
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
108
# [ACTION-IF-NOT-FOUND])
111
# Note that if there is a possibility the first call to
112
# PKG_CHECK_MODULES might not happen, you should be sure to include an
113
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
116
# --------------------------------------------------------------
117
AC_DEFUN([PKG_CHECK_MODULES],
118
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
119
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
120
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
123
AC_MSG_CHECKING([for $1])
125
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
126
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
128
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
129
and $1[]_LIBS to avoid the need to call pkg-config.
130
See the pkg-config man page for more details.])
132
if test $pkg_failed = yes; then
133
_PKG_SHORT_ERRORS_SUPPORTED
134
if test $_pkg_short_errors_supported = yes; then
135
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
137
$1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
58
echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
59
echo "*** See http://www.freedesktop.org/software/pkgconfig"
63
if test $succeeded = yes; then
64
ifelse([$3], , :, [$3])
66
ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
73
# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
74
# Generated from amversion.in; do not edit by hand.
76
# This program is free software; you can redistribute it and/or modify
77
# it under the terms of the GNU General Public License as published by
78
# the Free Software Foundation; either version 2, or (at your option)
81
# This program is distributed in the hope that it will be useful,
82
# but WITHOUT ANY WARRANTY; without even the implied warranty of
83
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
84
# GNU General Public License for more details.
86
# You should have received a copy of the GNU General Public License
87
# along with this program; if not, write to the Free Software
88
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
139
# Put the nasty error message in config.log where it belongs
140
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
142
ifelse([$4], , [AC_MSG_ERROR(dnl
143
[Package requirements ($2) were not met:
147
Consider adjusting the PKG_CONFIG_PATH environment variable if you
148
installed software in a non-standard prefix.
154
elif test $pkg_failed = untried; then
155
ifelse([$4], , [AC_MSG_FAILURE(dnl
156
[The pkg-config script could not be found or is too old. Make sure it
157
is in your PATH or set the PKG_CONFIG environment variable to the full
162
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
165
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
166
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
168
ifelse([$3], , :, [$3])
170
])# PKG_CHECK_MODULES
172
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
174
# This file is free software; the Free Software Foundation
175
# gives unlimited permission to copy and/or distribute it,
176
# with or without modifications, as long as this notice is preserved.
90
178
# AM_AUTOMAKE_VERSION(VERSION)
91
179
# ----------------------------
98
186
# Call AM_AUTOMAKE_VERSION so it can be traced.
99
187
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
100
188
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
101
[AM_AUTOMAKE_VERSION([1.9.4])])
105
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
107
# This program is free software; you can redistribute it and/or modify
108
# it under the terms of the GNU General Public License as published by
109
# the Free Software Foundation; either version 2, or (at your option)
112
# This program is distributed in the hope that it will be useful,
113
# but WITHOUT ANY WARRANTY; without even the implied warranty of
114
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
115
# GNU General Public License for more details.
117
# You should have received a copy of the GNU General Public License
118
# along with this program; if not, write to the Free Software
119
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
189
[AM_AUTOMAKE_VERSION([1.9.6])])
191
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
193
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
195
# This file is free software; the Free Software Foundation
196
# gives unlimited permission to copy and/or distribute it,
197
# with or without modifications, as long as this notice is preserved.
122
199
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
123
200
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
164
241
am_aux_dir=`cd $ac_aux_dir && pwd`
167
# AM_CONDITIONAL -*- Autoconf -*-
169
# Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
171
# This program is free software; you can redistribute it and/or modify
172
# it under the terms of the GNU General Public License as published by
173
# the Free Software Foundation; either version 2, or (at your option)
176
# This program is distributed in the hope that it will be useful,
177
# but WITHOUT ANY WARRANTY; without even the implied warranty of
178
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
179
# GNU General Public License for more details.
181
# You should have received a copy of the GNU General Public License
182
# along with this program; if not, write to the Free Software
183
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
244
# AM_CONDITIONAL -*- Autoconf -*-
246
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
247
# Free Software Foundation, Inc.
249
# This file is free software; the Free Software Foundation
250
# gives unlimited permission to copy and/or distribute it,
251
# with or without modifications, as long as this notice is preserved.
188
255
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
189
256
# -------------------------------------
207
274
Usually this means the macro was only invoked conditionally.]])
210
# serial 7 -*- Autoconf -*-
212
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
278
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
213
279
# Free Software Foundation, Inc.
215
# This program is free software; you can redistribute it and/or modify
216
# it under the terms of the GNU General Public License as published by
217
# the Free Software Foundation; either version 2, or (at your option)
220
# This program is distributed in the hope that it will be useful,
221
# but WITHOUT ANY WARRANTY; without even the implied warranty of
222
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
223
# GNU General Public License for more details.
225
# You should have received a copy of the GNU General Public License
226
# along with this program; if not, write to the Free Software
227
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
281
# This file is free software; the Free Software Foundation
282
# gives unlimited permission to copy and/or distribute it,
283
# with or without modifications, as long as this notice is preserved.
231
287
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
232
288
# written in clear, in which case automake, when reading aclocal.m4,
375
430
AC_SUBST([AMDEPBACKSLASH])
378
# Generate code to set up dependency tracking. -*- Autoconf -*-
380
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
381
# Free Software Foundation, Inc.
383
# This program is free software; you can redistribute it and/or modify
384
# it under the terms of the GNU General Public License as published by
385
# the Free Software Foundation; either version 2, or (at your option)
388
# This program is distributed in the hope that it will be useful,
389
# but WITHOUT ANY WARRANTY; without even the implied warranty of
390
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
391
# GNU General Public License for more details.
393
# You should have received a copy of the GNU General Public License
394
# along with this program; if not, write to the Free Software
395
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
433
# Generate code to set up dependency tracking. -*- Autoconf -*-
435
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
436
# Free Software Foundation, Inc.
438
# This file is free software; the Free Software Foundation
439
# gives unlimited permission to copy and/or distribute it,
440
# with or without modifications, as long as this notice is preserved.
400
444
# _AM_OUTPUT_DEPENDENCY_COMMANDS
401
445
# ------------------------------
454
498
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
457
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
459
# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
461
# This program is free software; you can redistribute it and/or modify
462
# it under the terms of the GNU General Public License as published by
463
# the Free Software Foundation; either version 2, or (at your option)
466
# This program is distributed in the hope that it will be useful,
467
# but WITHOUT ANY WARRANTY; without even the implied warranty of
468
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
469
# GNU General Public License for more details.
471
# You should have received a copy of the GNU General Public License
472
# along with this program; if not, write to the Free Software
473
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
501
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
502
# Free Software Foundation, Inc.
504
# This file is free software; the Free Software Foundation
505
# gives unlimited permission to copy and/or distribute it,
506
# with or without modifications, as long as this notice is preserved.
478
510
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
479
511
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
481
# Do all the work for Automake. -*- Autoconf -*-
483
# This macro actually does too much some checks are only needed if
513
# Do all the work for Automake. -*- Autoconf -*-
515
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
516
# Free Software Foundation, Inc.
518
# This file is free software; the Free Software Foundation
519
# gives unlimited permission to copy and/or distribute it,
520
# with or without modifications, as long as this notice is preserved.
524
# This macro actually does too much. Some checks are only needed if
484
525
# your package does certain things. But this isn't really a big deal.
486
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
487
# Free Software Foundation, Inc.
489
# This program is free software; you can redistribute it and/or modify
490
# it under the terms of the GNU General Public License as published by
491
# the Free Software Foundation; either version 2, or (at your option)
494
# This program is distributed in the hope that it will be useful,
495
# but WITHOUT ANY WARRANTY; without even the implied warranty of
496
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
497
# GNU General Public License for more details.
499
# You should have received a copy of the GNU General Public License
500
# along with this program; if not, write to the Free Software
501
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
506
527
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
507
528
# AM_INIT_AUTOMAKE([OPTIONS])
508
529
# -----------------------------------------------
604
625
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
627
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
629
# This file is free software; the Free Software Foundation
630
# gives unlimited permission to copy and/or distribute it,
631
# with or without modifications, as long as this notice is preserved.
606
633
# AM_PROG_INSTALL_SH
607
634
# ------------------
608
635
# Define $install_sh.
610
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
612
# This program is free software; you can redistribute it and/or modify
613
# it under the terms of the GNU General Public License as published by
614
# the Free Software Foundation; either version 2, or (at your option)
617
# This program is distributed in the hope that it will be useful,
618
# but WITHOUT ANY WARRANTY; without even the implied warranty of
619
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
620
# GNU General Public License for more details.
622
# You should have received a copy of the GNU General Public License
623
# along with this program; if not, write to the Free Software
624
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
627
636
AC_DEFUN([AM_PROG_INSTALL_SH],
628
637
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
629
638
install_sh=${install_sh-"$am_aux_dir/install-sh"}
630
639
AC_SUBST(install_sh)])
633
# Copyright (C) 2003 Free Software Foundation, Inc.
635
# This program is free software; you can redistribute it and/or modify
636
# it under the terms of the GNU General Public License as published by
637
# the Free Software Foundation; either version 2, or (at your option)
640
# This program is distributed in the hope that it will be useful,
641
# but WITHOUT ANY WARRANTY; without even the implied warranty of
642
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
643
# GNU General Public License for more details.
645
# You should have received a copy of the GNU General Public License
646
# along with this program; if not, write to the Free Software
647
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
641
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
643
# This file is free software; the Free Software Foundation
644
# gives unlimited permission to copy and/or distribute it,
645
# with or without modifications, as long as this notice is preserved.
652
649
# Check whether the underlying file-system supports filenames
653
650
# with a leading dot. For instance MS-DOS doesn't.
889
842
AC_DEFUN([_AM_IF_OPTION],
890
843
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
893
# Check to make sure that the build environment is sane.
896
# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
898
# This program is free software; you can redistribute it and/or modify
899
# it under the terms of the GNU General Public License as published by
900
# the Free Software Foundation; either version 2, or (at your option)
903
# This program is distributed in the hope that it will be useful,
904
# but WITHOUT ANY WARRANTY; without even the implied warranty of
905
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
906
# GNU General Public License for more details.
908
# You should have received a copy of the GNU General Public License
909
# along with this program; if not, write to the Free Software
910
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
845
# Check to make sure that the build environment is sane. -*- Autoconf -*-
847
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
848
# Free Software Foundation, Inc.
850
# This file is free software; the Free Software Foundation
851
# gives unlimited permission to copy and/or distribute it,
852
# with or without modifications, as long as this notice is preserved.
915
856
# AM_SANITY_CHECK
916
857
# ---------------