更改pg_config

时间:2012-04-26 03:04:02

标签: postgresql

我遇到了与I'm trying to install psycopg2 onto Mac OS 10.6.3; it claims it can't find "stdarg.h" but I can see it's there; what should I do?非常类似的问题(除了我在OS X 10.7和PostgreSQL v 9.0.5上),我正在考虑更改我的psql配置c编译器。

当我在终端输入pg_config时,我得到:

BINDIR = /usr/bin
DOCDIR = /usr/share/doc/postgresql
HTMLDIR = /Library/WebServer/Documents/postgresql
INCLUDEDIR = /usr/include
PKGINCLUDEDIR = /usr/include/postgresql
INCLUDEDIR-SERVER = /usr/include/postgresql/server
LIBDIR = /usr/lib
PKGLIBDIR = /usr/lib/postgresql
LOCALEDIR = /usr/share/locale
MANDIR = /usr/share/man
SHAREDIR = /usr/share/postgresql
SYSCONFDIR = /private/etc/postgresql
PGXS = /usr/lib/postgresql/pgxs/src/makefiles/pgxs.mk
CONFIGURE = '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--disable-dependency-tracking' '--prefix=/usr' '--sbindir=/usr/libexec' '--sysconfdir=/private/etc' '--localstatedir=/var/pgsql' '--htmldir=/Library/WebServer/Documents/postgresql' '--enable-thread-safety' '--enable-dtrace' '--with-tcl' '--with-perl' '--with-python' '--with-gssapi' '--with-krb5' '--with-pam' '--with-ldap' '--with-bonjour' '--with-openssl' '--with-libxml' '--with-libxslt' '--with-system-tzdata=/usr/share/zoneinfo' 'CFLAGS=-arch x86_64 -arch i386 -pipe -Os -g -Wall -Wno-deprecated-declarations' 'LDFLAGS=-arch x86_64 -arch i386 -pipe -Os -g -Wall -Wno-deprecated-declarations' 'LDFLAGS_EX=-mdynamic-no-pic'
CC = gcc
CPPFLAGS = -I/usr/include/libxml2
CFLAGS = -arch x86_64 -arch i386 -pipe -Os -g -Wall -Wno-deprecated-declarations -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv
CFLAGS_SL = 
LDFLAGS = -arch x86_64 -arch i386 -pipe -Os -g -Wall -Wno-deprecated-declarations -Wl,-dead_strip_dylibs
LDFLAGS_EX = -mdynamic-no-pic
LDFLAGS_SL = 
LIBS = -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm 
VERSION = PostgreSQL 9.0.5

我想知道如何更改pg_config(所以我可以设置CC = gcc-4.2)或类似的东西。

1 个答案:

答案 0 :(得分:1)

pg_config只是一个提供信息的工具,它不是典型意义上的“配置”,您可以编辑属性。如果要更改pg_config提供的值,则需要在util之外手动执行此操作(在您的情况下,您需要安装新的C编译器)。