diff options
author | NIIBE Yutaka <[email protected]> | 2018-08-29 02:01:53 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2018-08-29 02:01:53 +0000 |
commit | c5f040325b59fccf5f895ab94a3027c1650628dc (patch) | |
tree | 80984a5eb779ec10891ccf173b5edfb79119f856 | |
parent | pkg-config compatible .pc file support. (diff) | |
download | libgpg-error-c5f040325b59fccf5f895ab94a3027c1650628dc.tar.gz libgpg-error-c5f040325b59fccf5f895ab94a3027c1650628dc.zip |
More changes for new gpg-error-config.
* configure.ac: Change generating gpg-error-config.
(GPG_ERROR_CONFIG_ISUBDIRAFTER): Remove.
(GPG_ERROR_CONFIG_CFLAGS): Put -idirafter here.
* src/Makefile.am (pkgconfig_DATA): Add.
(EXTRA_DIST): Add gpg-error-config-head.in, pkgconf-funcs.sh,
gpg-error-config-main.sh, gpg-error.pc.in.
* src/gpg-error-config-head.in: New.
* src/gpg-error-config-main.sh: Rename from src/gpg-error-config.in.
* src/gpg-error.pc.in (isubdirafter): Remove.
Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r-- | configure.ac | 20 | ||||
-rw-r--r-- | src/Makefile.am | 8 | ||||
-rw-r--r-- | src/gpg-error-config-head.in | 17 | ||||
-rw-r--r-- | src/gpg-error-config-main.sh (renamed from src/gpg-error-config.in) | 18 | ||||
-rw-r--r-- | src/gpg-error.pc.in | 1 | ||||
-rw-r--r-- | src/pkgconf-funcs.sh | 4 |
6 files changed, 38 insertions, 30 deletions
diff --git a/configure.ac b/configure.ac index 1ea2135..5b460bf 100644 --- a/configure.ac +++ b/configure.ac @@ -483,13 +483,16 @@ if test "x$LIBMULTITHREAD" != x; then else GPG_ERROR_CONFIG_MT_LIBS="" fi -GPG_ERROR_CONFIG_CFLAGS="" +if test "$have_w32ce_system" = yes; then + GPG_ERROR_CONFIG_CFLAGS="-idirafter \${includedir}/gpg-extra" +else + GPG_ERROR_CONFIG_CFLAGS="" +fi if test "x$THREADLIB_CPPFLAGS" != x; then GPG_ERROR_CONFIG_MT_CFLAGS="${THREADLIB_CPPFLAGS}" else GPG_ERROR_CONFIG_MT_CFLAGS="" fi -GPG_ERROR_CONFIG_ISUBDIRAFTER="" GPG_ERROR_CONFIG_HOST="$host" case "$includedir" in '${prefix}/include'|/usr/include|/include) GPG_ERROR_CONFIG_INCLUDEDIR="" ;; @@ -500,17 +503,13 @@ case "$libdir" in *) GPG_ERROR_CONFIG_LIBDIR="-L$libdir" ;; esac -PKGCONF_FUNCS_SH_CONTENT=$(cat $srcdir/src/pkgconf-funcs.sh) - AC_SUBST(GPG_ERROR_CONFIG_LIBS) AC_SUBST(GPG_ERROR_CONFIG_CFLAGS) AC_SUBST(GPG_ERROR_CONFIG_MT_LIBS) AC_SUBST(GPG_ERROR_CONFIG_MT_CFLAGS) -AC_SUBST(GPG_ERROR_CONFIG_ISUBDIRAFTER) AC_SUBST(GPG_ERROR_CONFIG_HOST) AC_SUBST(GPG_ERROR_CONFIG_INCLUDEDIR) AC_SUBST(GPG_ERROR_CONFIG_LIBDIR) -AC_SUBST(PKGCONF_FUNCS_SH_CONTENT) # # Special defines for certain platforms @@ -523,7 +522,6 @@ if test "$have_w32_system" = yes; then fi if test "$have_w32ce_system" = yes; then AC_DEFINE(HAVE_W32CE_SYSTEM,1,[Defined if we run on WindowsCE]) - GPG_ERROR_CONFIG_ISUBDIRAFTER="gpg-extra" fi force_use_syscfg=yes fi @@ -637,8 +635,14 @@ AC_CONFIG_FILES([doc/Makefile po/Makefile.in m4/Makefile]) AC_CONFIG_FILES([src/Makefile tests/Makefile]) AC_CONFIG_FILES([lang/Makefile lang/cl/Makefile lang/cl/gpg-error.asd]) AC_CONFIG_FILES([src/versioninfo.rc src/gpg-error.w32-manifest]) -AC_CONFIG_FILES([src/gpg-error-config], [chmod +x src/gpg-error-config]) AC_CONFIG_FILES([src/gpg-error.pc]) +AC_CONFIG_FILES([src/gpg-error-config-head]) +AC_CONFIG_COMMANDS([gen-gpg-error-config], [ +cat src/gpg-error-config-head \ + $srcdir/src/pkgconf-funcs.sh \ + $srcdir/src/gpg-error-config-main.sh > src/gpg-error-config +chmod +x src/gpg-error-config +]) AC_OUTPUT diff --git a/src/Makefile.am b/src/Makefile.am index fcfbb83..98e3b94 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -88,11 +88,17 @@ nodist_bin_SCRIPTS = gpgrt-config m4datadir = $(datadir)/aclocal m4data_DATA = gpg-error.m4 gpgrt.m4 +pkgconfigdir = $(datadir)/pkgconfig +pkgconfig_DATA = gpg-error.pc + EXTRA_DIST = mkstrtable.awk err-sources.h.in err-codes.h.in \ mkerrnos.awk errnos.in README \ mkerrcodes.awk mkerrcodes1.awk mkerrcodes2.awk mkerrcodes.c \ mkheader.c gpg-error.h.in mkw32errmap.c w32-add.h w32ce-add.h \ - err-sources.h err-codes.h gpg-error-config.in gpg-error.m4 gpgrt.m4 \ + err-sources.h err-codes.h \ + gpg-error-config-head.in pkgconf-funcs.sh gpg-error-config-main.sh \ + gpg-error.pc.in \ + gpg-error.m4 gpgrt.m4 \ gpg-error.vers gpg-error.def.in \ versioninfo.rc.in gpg-error.w32-manifest.in \ $(lock_obj_pub) diff --git a/src/gpg-error-config-head.in b/src/gpg-error-config-head.in new file mode 100644 index 0000000..1c50fa0 --- /dev/null +++ b/src/gpg-error-config-head.in @@ -0,0 +1,17 @@ +#!/bin/sh +# Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc. +# +# This file is free software; as a special exception the author gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. +# +# This file is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# SPDX-License-Identifier: FSFULLR + +prefix=@prefix@ +datarootdir=@datarootdir@ +datadir=@datadir@ +PKG_CONFIG_PATH="${datadir}/pkgconfig" +# diff --git a/src/gpg-error-config.in b/src/gpg-error-config-main.sh index a0a0141..e2ff26d 100644 --- a/src/gpg-error-config.in +++ b/src/gpg-error-config-main.sh @@ -1,21 +1,3 @@ -#!/bin/sh -# Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc. -# -# This file is free software; as a special exception the author gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. -# -# This file is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# SPDX-License-Identifier: FSFULLR - -prefix=@prefix@ -datarootdir=@datarootdir@ -datadir=@datadir@ -PKG_CONFIG_PATH="${datadir}/pkgconfig" - -@PKGCONF_FUNCS_SH_CONTENT@ if echo "$0" | grep gpg-error-config 2>/dev/null >/dev/null; then myname="gpg-error-config" diff --git a/src/gpg-error.pc.in b/src/gpg-error.pc.in index fe8b553..3e8d328 100644 --- a/src/gpg-error.pc.in +++ b/src/gpg-error.pc.in @@ -2,7 +2,6 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ includedir=@includedir@ libdir=@libdir@ -isubdirafter=@GPG_ERROR_CONFIG_ISUBDIRAFTER@ host=@GPG_ERROR_CONFIG_HOST@ mtcflags=@GPG_ERROR_CONFIG_MT_CFLAGS@ mtlibs=@GPG_ERROR_CONFIG_MT_LIBS@ diff --git a/src/pkgconf-funcs.sh b/src/pkgconf-funcs.sh index 381243c..d06b68b 100644 --- a/src/pkgconf-funcs.sh +++ b/src/pkgconf-funcs.sh @@ -1,4 +1,4 @@ -#################### start of pkgconf-funcs +#### start of pkgconf-funcs # # Bourne shell functions for config file in pkg-config style, so that @@ -116,4 +116,4 @@ find_file_in_path () { RESULT="" return 1 } -#################### end of pkgconf-funcs +#### end of pkgconf-funcs |