How to compile PosgreSQL under X with a maximum of options ?
Here is a tested configure script:
#!/bin/bash export ANT_HOME=/Developer/Java/J2EE/Ant export PATH="$"/bin:"$" export JAVA_HOME=/Library/Java/Home export YACC=/usr/local/bin/bison export THREAD_SUPPORT=yes ./configure --bindir=/usr/local/bin --mandir=/usr/local/share/man/ --enable-recode --with-CXX --enable-odbc --enable-syslog --with-java --with-pam --with-rendezvous --enable-unicode-conversion --enable-multibyte --with-perl --with-python --with-krb5=/usr --with-openssl=/usr --enable-thread-safetyCopy it and put it in a
myconfigurefile into the
postgresql-7.4generated by the expanding of the archive you have downloaded from PostgreSQL site.
/usr/local/binleaving intact the original one, hence the
YACCline in the configure script.
antare copied-pasted from the Apple's ant installation coming with Panther's developer tools.
make. Here you will get some problems with Python, but these can't be solved until a first (failing)
makehas been done.
src/Makefile.globaland fix the line defining
python_libspecby replacing it with:
python_libspec = -framework PythonNow go to the
src/pl/plpython/directory and open the
Makefilewith your favorite text editor, comment out the lines testing for a shared Python library (since on Mac OS X, this one is in a Framework, the test fails as written).
#ifneq (,$(wildcard $(python_configdir)/libpython*$(DLSUFFIX)*)) #shared_libpython = yes #endifand
#ifneq (,$(findstring yes, $(shared_libpython)$(allow_nonpic_in_shlib)))and don't forget the
elsepart of it at the end of the file:
#else # can't build #all: # @echo ""; # echo "*** Cannot build PL/Python because libpython is not a shared #library." ; # echo "*** You might have to rebuild your Python installation. Refer to"; # echo "*** the documentation for details."; # echo "" #endif # can't buildNow you are ready to
makeagain. It should work.