xref: /OK3568_Linux_fs/buildroot/package/postgresql/pg_config (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1#!/bin/sh
2
3#
4# Minimal pg_config implementation as replacement for the native pg_config application
5#
6
7prefix=/usr
8
9case "$1" in
10  --includedir)
11	echo "$prefix/include"
12	;;
13  --pkgincludedir)
14	echo "$prefix/include/postgresql"
15	;;
16  --includedir-server)
17	echo "$prefix/include/postgresql/server"
18	;;
19  --libdir)
20	echo "$prefix/lib"
21	;;
22  --version)
23	echo "PostgreSQL @POSTGRESQL_VERSION@"
24	;;
25  --configure)
26	echo "@POSTGRESQL_CONF_OPTIONS@"
27	;;
28  --pgxs)
29	echo "$prefix/lib/postgresql/pgxs/src/makefiles/pgxs.mk"
30	;;
31  --cflags)
32	echo "@TARGET_CFLAGS@"
33	;;
34  --cflags_sl)
35	# defined at src/template/linux
36	echo "-fPIC"
37	;;
38  --cc)
39	echo "@TARGET_CC@"
40	;;
41  --pkglibdir)
42	echo "/usr/lib/postgresql"
43	;;
44  --bindir)
45	echo "/usr/bin"
46	;;
47  --sharedir)
48	echo "/usr/share/postgresql"
49	;;
50  --localedir)
51	echo "/usr/share/locale"
52	;;
53  --docdir)
54	echo "/usr/share/doc/postgresql"
55	;;
56  --mandir)
57	echo "/usr/share/man"
58	;;
59  *)
60	echo "Usage: $0 {OPTION}"
61	echo
62	echo "Options:"
63	echo
64	echo "	--includedir		show location of C header files of the client interfaces"
65	echo "	--pkgincludedir		show location of other C header files"
66	echo "	--includedir-server	show location of C header files for the server"
67	echo "	--libdir		show location of object code libraries"
68	echo "	--version		show the PostgreSQL version"
69	echo "	--configure		show options given to configure script"
70	echo "	--pgxs			show location of extension makefile"
71	echo "	--cflags		show CFLAGS value used when PostgreSQL was built"
72	echo "	--cc			show CC value used when PostgreSQL was built"
73	echo "	--pkglibdir		show location of dynamically loadable modules"
74	echo "	--bindir		show location of user executables"
75	echo "	--sharedir		show location of architecture-independent support files"
76	echo "	--localedir		show location of locale support files"
77	echo "	--docdir		show location of documentation files"
78	echo "	--mandir		show location of manual pages"
79esac
80