Imported Upstream version 0.27.1
[platform/upstream/pkg-config.git] / Makefile.am
1 ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}
2
3 if INTERNAL_GLIB
4 GLIB_SUBDIR = glib
5 endif
6
7 # Normally we'd want glib to be part of DIST_SUBDIRS unconditionally,
8 # but distclean gets broken unless we always run glib's configure
9 SUBDIRS = $(GLIB_SUBDIR) . check
10 DIST_SUBDIRS = $(SUBDIRS)
11
12 # Escape paths properly on windows
13 if NATIVE_WIN32
14 AM_CPPFLAGS = \
15         -DPKG_CONFIG_PC_PATH="\"$(subst /,\/,$(pc_path))\"" \
16         -DPKG_CONFIG_SYSTEM_INCLUDE_PATH="\"$(subst /,\/,$(system_include_path))\"" \
17         -DPKG_CONFIG_SYSTEM_LIBRARY_PATH="\"$(subst /,\/,$(system_library_path))\""
18 else
19 AM_CPPFLAGS = \
20         -DPKG_CONFIG_PC_PATH="\"$(pc_path)\"" \
21         -DPKG_CONFIG_SYSTEM_INCLUDE_PATH="\"$(system_include_path)\"" \
22         -DPKG_CONFIG_SYSTEM_LIBRARY_PATH="\"$(system_library_path)\""
23 endif
24
25 AM_CFLAGS = \
26         $(WARN_CFLAGS) \
27         $(GLIB_CFLAGS)
28
29 bin_PROGRAMS = pkg-config
30 pkg_config_LDADD = $(GLIB_LIBS)
31 pkg_config_SOURCES= \
32         pkg.h \
33         pkg.c \
34         parse.h \
35         parse.c \
36         main.c
37
38 # Various data files
39 m4dir = $(datadir)/aclocal
40 dist_m4_DATA = pkg.m4
41 dist_doc_DATA = pkg-config-guide.html
42 dist_man_MANS = pkg-config.1
43 EXTRA_DIST = README.win32
44
45 # Since we can't always have glib in DIST_SUBDIRS, we need to make sure
46 # glib is configured when we want to run dist. Unfortunately, there's no
47 # DIST_CONFIGURE_FLAGS.
48 DISTCHECK_CONFIGURE_FLAGS = --with-internal-glib
49 if !INTERNAL_GLIB
50 dist-hook:
51         @echo "error: --with-internal-glib is required to include glib in dist"
52         @exit 1
53 endif