mirror of
https://github.com/flatpak/flatpak.git
synced 2026-04-04 23:25:54 -04:00
Include libglnx-config.h instead of config.h
This avoids colliding with a config.h generated by a parent Meson project. In the Meson build system, we generate libglnx-config.h by doing our own checks, so we want to avoid it colliding. In the Autotools build system, we assume that the parent project will generate its own config.h that contains the results of LIBGLNX_CONFIGURE, and create a forwarding header libglnx-config.h in the $(top_builddir) (so that it is next to config.h). Note that after updating libglnx in an Autotools non-recursive-Make project (libostree, flatpak, flatpak-builder) it will be necessary to re-run autogen.sh. Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -2,6 +2,8 @@
|
||||
# subdir-objects
|
||||
Makefile-libglnx.am.inc
|
||||
|
||||
libglnx-config.h
|
||||
|
||||
# Some standard bits
|
||||
.deps
|
||||
.libs
|
||||
|
||||
@@ -21,6 +21,10 @@ EXTRA_DIST += \
|
||||
$(libglnx_srcpath)/libglnx.m4 \
|
||||
$(NULL)
|
||||
|
||||
BUILT_SOURCES += $(top_builddir)/libglnx-config.h
|
||||
$(top_builddir)/libglnx-config.h: Makefile.am
|
||||
echo '#include "config.h"' > $@
|
||||
|
||||
libglnx_la_SOURCES = \
|
||||
$(libglnx_srcpath)/glnx-macros.h \
|
||||
$(libglnx_srcpath)/glnx-backport-autocleanups.h \
|
||||
@@ -49,7 +53,7 @@ libglnx_la_SOURCES = \
|
||||
$(libglnx_srcpath)/tests/libglnx-testlib.h \
|
||||
$(NULL)
|
||||
|
||||
libglnx_la_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags)
|
||||
libglnx_la_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags) -I$(builddir)
|
||||
libglnx_la_LDFLAGS = -avoid-version -Bsymbolic-functions -export-symbols-regex "^glnx_" -no-undefined -export-dynamic
|
||||
libglnx_la_LIBADD = $(libglnx_libs)
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "libglnx-config.h"
|
||||
|
||||
#include "glnx-backports.h"
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "libglnx-config.h"
|
||||
|
||||
#include "glnx-console.h"
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "libglnx-config.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "libglnx-config.h"
|
||||
|
||||
#include <glnx-backport-autocleanups.h>
|
||||
#include <glnx-errors.h>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "libglnx-config.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "libglnx-config.h"
|
||||
|
||||
#include "glnx-local-alloc.h"
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include "config.h"
|
||||
#include "libglnx-config.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
Add abstraction model for BPF programs
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "libglnx-config.h"
|
||||
|
||||
#if !HAVE_DECL_RENAMEAT2
|
||||
# ifndef __NR_renameat2
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "libglnx-config.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "libglnx-config.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -35,7 +35,7 @@ foreach check_function : check_functions
|
||||
conf.set10('HAVE_DECL_' + check_function.underscorify().to_upper(), have_it)
|
||||
endforeach
|
||||
config_h = configure_file(
|
||||
output : 'config.h',
|
||||
output : 'libglnx-config.h',
|
||||
configuration : conf,
|
||||
)
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "libglnx-config.h"
|
||||
#include "libglnx-testlib.h"
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "libglnx-config.h"
|
||||
#include "libglnx.h"
|
||||
#include <glib.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "libglnx-config.h"
|
||||
#include "libglnx.h"
|
||||
#include <glib.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "libglnx-config.h"
|
||||
#include "libglnx.h"
|
||||
#include <glib.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "libglnx-config.h"
|
||||
#include "libglnx.h"
|
||||
#include <glib.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "libglnx-config.h"
|
||||
#include "libglnx.h"
|
||||
#include <glib.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
Reference in New Issue
Block a user