diff options
-rw-r--r-- | m4/ax_create_pkgconfig_info.m4 | 89 |
1 files changed, 47 insertions, 42 deletions
diff --git a/m4/ax_create_pkgconfig_info.m4 b/m4/ax_create_pkgconfig_info.m4 index df34f1f..35f0213 100644 --- a/m4/ax_create_pkgconfig_info.m4 +++ b/m4/ax_create_pkgconfig_info.m4 | |||
@@ -1,4 +1,6 @@ | |||
1 | ##### http://autoconf-archive.cryp.to/ax_create_pkgconfig_info.html | 1 | # ============================================================================= |
2 | # https://www.gnu.org/software/autoconf-archive/ax_create_pkgconfig_info.html | ||
3 | # ============================================================================= | ||
2 | # | 4 | # |
3 | # SYNOPSIS | 5 | # SYNOPSIS |
4 | # | 6 | # |
@@ -6,64 +8,57 @@ | |||
6 | # | 8 | # |
7 | # DESCRIPTION | 9 | # DESCRIPTION |
8 | # | 10 | # |
9 | # defaults: | 11 | # Defaults: |
10 | # | 12 | # |
11 | # $1 = $PACKAGE_NAME.pc | 13 | # $1 = $PACKAGE_NAME.pc |
12 | # $2 = (empty) | 14 | # $2 = (empty) |
13 | # $3 = $PACKAGE_LIBS $LIBS (as set at that point in configure.ac) | 15 | # $3 = $PACKAGE_LIBS $LIBS (as set at that point in configure.ac) |
14 | # $4 = $PACKAGE_SUMMARY (or $1 Library) | 16 | # $4 = $PACKAGE_SUMMARY (or $1 Library) |
15 | # $5 = $CPPFLAGS $PACKAGE_CFLAGS (as set at the point in configure.ac) | 17 | # $5 = $PACKAGE_CFLAGS (as set at the point in configure.ac) |
16 | # $6 = $LDFLAGS $PACKAGE_LDFLAGS (as set at the point in configure.ac) | 18 | # $6 = $PACKAGE_LDFLAGS (as set at the point in configure.ac) |
17 | # | 19 | # |
18 | # PACKAGE_NAME defaults to $PACKAGE if not set. | 20 | # PACKAGE_NAME defaults to $PACKAGE if not set. |
19 | # PACKAGE_LIBS defaults to -l$PACKAGE_NAME if not set. | 21 | # PACKAGE_LIBS defaults to -l$PACKAGE_NAME if not set. |
20 | # | 22 | # |
21 | # the resulting file is called $PACKAGE.pc.in / $PACKAGE.pc | 23 | # The resulting file is called $PACKAGE.pc.in / $PACKAGE.pc |
22 | # | 24 | # |
23 | # You will find this macro most useful in conjunction with | 25 | # You will find this macro most useful in conjunction with |
24 | # ax_spec_defaults that can read good initializers from the .spec | 26 | # ax_spec_defaults that can read good initializers from the .spec file. In |
25 | # file. In consequencd, most of the generatable installable stuff can | 27 | # consequence, most of the generatable installable stuff can be made from |
26 | # be made from information being updated in a single place for the | 28 | # information being updated in a single place for the whole project. |
27 | # whole project. | ||
28 | # | 29 | # |
29 | # LAST MODIFICATION | 30 | # LICENSE |
30 | # | 31 | # |
31 | # 2006-10-13 | 32 | # Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de> |
33 | # Copyright (c) 2008 Sven Verdoolaege <skimo@kotnet.org> | ||
32 | # | 34 | # |
33 | # COPYLEFT | 35 | # This program is free software; you can redistribute it and/or modify it |
34 | # | 36 | # under the terms of the GNU General Public License as published by the |
35 | # Copyright (c) 2006 Sven Verdoolaege <skimo*liacs.nl> | 37 | # Free Software Foundation; either version 3 of the License, or (at your |
36 | # Copyright (c) 2006 Guido U. Draheim <guidod@gmx.de> | 38 | # option) any later version. |
37 | # | ||
38 | # This program is free software; you can redistribute it and/or | ||
39 | # modify it under the terms of the GNU General Public License as | ||
40 | # published by the Free Software Foundation; either version 2 of the | ||
41 | # License, or (at your option) any later version. | ||
42 | # | 39 | # |
43 | # This program is distributed in the hope that it will be useful, but | 40 | # This program is distributed in the hope that it will be useful, but |
44 | # WITHOUT ANY WARRANTY; without even the implied warranty of | 41 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
45 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 42 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
46 | # General Public License for more details. | 43 | # Public License for more details. |
47 | # | 44 | # |
48 | # You should have received a copy of the GNU General Public License | 45 | # You should have received a copy of the GNU General Public License along |
49 | # along with this program; if not, write to the Free Software | 46 | # with this program. If not, see <https://www.gnu.org/licenses/>. |
50 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
51 | # 02111-1307, USA. | ||
52 | # | 47 | # |
53 | # As a special exception, the respective Autoconf Macro's copyright | 48 | # As a special exception, the respective Autoconf Macro's copyright owner |
54 | # owner gives unlimited permission to copy, distribute and modify the | 49 | # gives unlimited permission to copy, distribute and modify the configure |
55 | # configure scripts that are the output of Autoconf when processing | 50 | # scripts that are the output of Autoconf when processing the Macro. You |
56 | # the Macro. You need not follow the terms of the GNU General Public | 51 | # need not follow the terms of the GNU General Public License when using |
57 | # License when using or distributing such scripts, even though | 52 | # or distributing such scripts, even though portions of the text of the |
58 | # portions of the text of the Macro appear in them. The GNU General | 53 | # Macro appear in them. The GNU General Public License (GPL) does govern |
59 | # Public License (GPL) does govern all other use of the material that | 54 | # all other use of the material that constitutes the Autoconf Macro. |
60 | # constitutes the Autoconf Macro. | ||
61 | # | 55 | # |
62 | # This special exception to the GPL applies to versions of the | 56 | # This special exception to the GPL applies to versions of the Autoconf |
63 | # Autoconf Macro released by the Autoconf Macro Archive. When you | 57 | # Macro released by the Autoconf Archive. When you make and distribute a |
64 | # make and distribute a modified version of the Autoconf Macro, you | 58 | # modified version of the Autoconf Macro, you may extend this special |
65 | # may extend this special exception to the GPL to apply to your | 59 | # exception to the GPL to apply to your modified version as well. |
66 | # modified version as well. | 60 | |
61 | #serial 16 | ||
67 | 62 | ||
68 | AC_DEFUN([AX_CREATE_PKGCONFIG_INFO],[dnl | 63 | AC_DEFUN([AX_CREATE_PKGCONFIG_INFO],[dnl |
69 | AS_VAR_PUSHDEF([PKGCONFIG_suffix],[ax_create_pkgconfig_suffix])dnl | 64 | AS_VAR_PUSHDEF([PKGCONFIG_suffix],[ax_create_pkgconfig_suffix])dnl |
@@ -152,13 +147,13 @@ PKGCONFIG_libs=`eval echo "$PKGCONFIG_libs"` | |||
152 | AC_MSG_RESULT($PKGCONFIG_libs) | 147 | AC_MSG_RESULT($PKGCONFIG_libs) |
153 | 148 | ||
154 | AC_MSG_CHECKING(our pkgconfig cppflags) | 149 | AC_MSG_CHECKING(our pkgconfig cppflags) |
155 | PKGCONFIG_cppflags="ifelse($5,,$CPPFLAGS $PACKAGE_CFLAGS,$5)" | 150 | PKGCONFIG_cppflags="ifelse($5,,$PACKAGE_CFLAGS,$5)" |
156 | PKGCONFIG_cppflags=`eval echo "$PKGCONFIG_cppflags"` | 151 | PKGCONFIG_cppflags=`eval echo "$PKGCONFIG_cppflags"` |
157 | PKGCONFIG_cppflags=`eval echo "$PKGCONFIG_cppflags"` | 152 | PKGCONFIG_cppflags=`eval echo "$PKGCONFIG_cppflags"` |
158 | AC_MSG_RESULT($PKGCONFIG_cppflags) | 153 | AC_MSG_RESULT($PKGCONFIG_cppflags) |
159 | 154 | ||
160 | AC_MSG_CHECKING(our pkgconfig ldflags) | 155 | AC_MSG_CHECKING(our pkgconfig ldflags) |
161 | PKGCONFIG_ldflags="ifelse($6,,$LDFLAGS $PACKAGE_LDFLAGS,$5)" | 156 | PKGCONFIG_ldflags="ifelse($6,,$PACKAGE_LDFLAGS,$6)" |
162 | PKGCONFIG_ldflags=`eval echo "$PKGCONFIG_ldflags"` | 157 | PKGCONFIG_ldflags=`eval echo "$PKGCONFIG_ldflags"` |
163 | PKGCONFIG_ldflags=`eval echo "$PKGCONFIG_ldflags"` | 158 | PKGCONFIG_ldflags=`eval echo "$PKGCONFIG_ldflags"` |
164 | AC_MSG_RESULT($PKGCONFIG_ldflags) | 159 | AC_MSG_RESULT($PKGCONFIG_ldflags) |
@@ -185,7 +180,7 @@ PKGCONFIG_src_headers=`pwd` | |||
185 | v="$ac_top_srcdir" ; | 180 | v="$ac_top_srcdir" ; |
186 | test ".$v" != "." || v="$ax_spec_dir" | 181 | test ".$v" != "." || v="$ax_spec_dir" |
187 | test ".$v" != "." || v="$srcdir" | 182 | test ".$v" != "." || v="$srcdir" |
188 | case "$v" in /*) PKG_CONFIG_src_headers="" ;; esac | 183 | case "$v" in /*) PKGCONFIG_src_headers="" ;; esac |
189 | PKGCONFIG_src_headers=`AS_DIRNAME("$PKGCONFIG_src_headers/$v/x")` | 184 | PKGCONFIG_src_headers=`AS_DIRNAME("$PKGCONFIG_src_headers/$v/x")` |
190 | test ! -d $PKGCONFIG_src_headers/incl[]ude || \ | 185 | test ! -d $PKGCONFIG_src_headers/incl[]ude || \ |
191 | PKGCONFIG_src_headers="$PKGCONFIG_src_headers/incl[]ude" | 186 | PKGCONFIG_src_headers="$PKGCONFIG_src_headers/incl[]ude" |
@@ -210,6 +205,8 @@ prefix=@prefix@ | |||
210 | exec_prefix=@exec_prefix@ | 205 | exec_prefix=@exec_prefix@ |
211 | bindir=@bindir@ | 206 | bindir=@bindir@ |
212 | libdir=@libdir@ | 207 | libdir=@libdir@ |
208 | datarootdir=@datarootdir@ | ||
209 | datadir=@datadir@ | ||
213 | sysconfdir=@sysconfdir@ | 210 | sysconfdir=@sysconfdir@ |
214 | includedir=@includedir@ | 211 | includedir=@includedir@ |
215 | package=@PACKAGE@ | 212 | package=@PACKAGE@ |
@@ -229,6 +226,8 @@ s|@prefix@|${pkgconfig_prefix}| | |||
229 | s|@exec_prefix@|${pkgconfig_execprefix}| | 226 | s|@exec_prefix@|${pkgconfig_execprefix}| |
230 | s|@bindir@|${pkgconfig_bindir}| | 227 | s|@bindir@|${pkgconfig_bindir}| |
231 | s|@libdir@|${pkgconfig_libdir}| | 228 | s|@libdir@|${pkgconfig_libdir}| |
229 | s|@datarootdir@|${pkgconfig_datarootdir}| | ||
230 | s|@datadir@|${pkgconfig_datadir}| | ||
232 | s|@sysconfdir@|${pkgconfig_sysconfdir}| | 231 | s|@sysconfdir@|${pkgconfig_sysconfdir}| |
233 | s|@includedir@|${pkgconfig_includedir}| | 232 | s|@includedir@|${pkgconfig_includedir}| |
234 | s|@suffix@|${pkgconfig_suffix}| | 233 | s|@suffix@|${pkgconfig_suffix}| |
@@ -252,6 +251,8 @@ s|@prefix@|${pkgconfig_prefix}| | |||
252 | s|@exec_prefix@|${pkgconfig_execprefix}| | 251 | s|@exec_prefix@|${pkgconfig_execprefix}| |
253 | s|@bindir@|${pkgconfig_bindir}| | 252 | s|@bindir@|${pkgconfig_bindir}| |
254 | s|@libdir@|${pkgconfig_src_libdir}| | 253 | s|@libdir@|${pkgconfig_src_libdir}| |
254 | s|@datarootdir@|${pkgconfig_datarootdir}| | ||
255 | s|@datadir@|${pkgconfig_datadir}| | ||
255 | s|@sysconfdir@|${pkgconfig_sysconfdir}| | 256 | s|@sysconfdir@|${pkgconfig_sysconfdir}| |
256 | s|@includedir@|${pkgconfig_src_headers}| | 257 | s|@includedir@|${pkgconfig_src_headers}| |
257 | s|@suffix@|${pkgconfig_suffix}| | 258 | s|@suffix@|${pkgconfig_suffix}| |
@@ -279,6 +280,8 @@ s|@prefix@|\"${pkgconfig_prefix}\"| | |||
279 | s|@exec_prefix@|\"${pkgconfig_execprefix}\"| | 280 | s|@exec_prefix@|\"${pkgconfig_execprefix}\"| |
280 | s|@bindir@|\"${pkgconfig_bindir}\"| | 281 | s|@bindir@|\"${pkgconfig_bindir}\"| |
281 | s|@libdir@|\"${pkgconfig_src_libdir}\"| | 282 | s|@libdir@|\"${pkgconfig_src_libdir}\"| |
283 | s|@datarootdir@|\"${pkgconfig_datarootdir}\"| | ||
284 | s|@datadir@|\"${pkgconfig_datadir}\"| | ||
282 | s|@sysconfdir@|\"${pkgconfig_sysconfdir}\"| | 285 | s|@sysconfdir@|\"${pkgconfig_sysconfdir}\"| |
283 | s|@includedir@|\"${pkgconfig_src_headers}\"| | 286 | s|@includedir@|\"${pkgconfig_src_headers}\"| |
284 | s|@suffix@|\"${pkgconfig_suffix}\"| | 287 | s|@suffix@|\"${pkgconfig_suffix}\"| |
@@ -316,6 +319,8 @@ pkgconfig_execprefix='$exec_prefix' | |||
316 | pkgconfig_bindir='$bindir' | 319 | pkgconfig_bindir='$bindir' |
317 | pkgconfig_libdir='$libdir' | 320 | pkgconfig_libdir='$libdir' |
318 | pkgconfig_includedir='$includedir' | 321 | pkgconfig_includedir='$includedir' |
322 | pkgconfig_datarootdir='$datarootdir' | ||
323 | pkgconfig_datadir='$datadir' | ||
319 | pkgconfig_sysconfdir='$sysconfdir' | 324 | pkgconfig_sysconfdir='$sysconfdir' |
320 | pkgconfig_suffix='$ax_create_pkgconfig_suffix' | 325 | pkgconfig_suffix='$ax_create_pkgconfig_suffix' |
321 | pkgconfig_package='$PACKAGE_NAME' | 326 | pkgconfig_package='$PACKAGE_NAME' |