head	1.20;
access;
symbols
	REL9_0_0:1.20
	REL9_1_ALPHA1:1.20
	REL9_0_RC1:1.20
	REL9_0_BETA4:1.20
	REL9_0_STABLE:1.20.0.2
	REL9_0_BETA3:1.20
	REL9_0_BETA2:1.19
	REL7_4_29:1.12
	REL8_0_25:1.14
	REL8_1_21:1.16
	REL8_2_17:1.17
	REL8_3_11:1.19
	REL8_4_4:1.19
	REL9_0_BETA1:1.19
	REL9_0_ALPHA5_BRANCH:1.19.0.14
	REL9_0_ALPHA5:1.19
	REL7_4_28:1.12
	REL8_0_24:1.14
	REL8_1_20:1.16
	REL8_2_16:1.17
	REL8_3_10:1.19
	REL8_4_3:1.19
	REL9_0_ALPHA4:1.19
	REL9_0_ALPHA4_BRANCH:1.19.0.12
	REL8_5_ALPHA3:1.19
	REL8_5_ALPHA3_BRANCH:1.19.0.10
	REL7_4_27:1.12
	REL8_0_23:1.14
	REL8_1_19:1.16
	REL8_2_15:1.17
	REL8_3_9:1.19
	REL8_4_2:1.19
	REL8_5_ALPHA2:1.19
	REL8_5_ALPHA2_BRANCH:1.19.0.8
	REL7_4_26:1.12
	REL8_0_22:1.14
	REL8_1_18:1.16
	REL8_2_14:1.17
	REL8_3_8:1.19
	REL8_4_1:1.19
	REL8_5_ALPHA1:1.19
	REL8_5_ALPHA1_BRANCH:1.19.0.6
	REL8_4_STABLE:1.19.0.4
	REL8_4_0:1.19
	REL8_4_RC2:1.19
	REL8_4_RC1:1.19
	REL8_4_BETA2:1.19
	REL8_4_BETA1:1.19
	REL7_4_25:1.12
	REL8_0_21:1.14
	REL8_1_17:1.16
	REL8_2_13:1.17
	REL8_3_7:1.19
	REL7_4_24:1.12
	REL8_0_20:1.14
	REL8_1_16:1.16
	REL8_2_12:1.17
	REL8_3_6:1.19
	REL7_4_23:1.12
	REL8_0_19:1.14
	REL8_1_15:1.16
	REL8_2_11:1.17
	REL8_3_5:1.19
	REL7_4_22:1.12
	REL8_0_18:1.14
	REL8_1_14:1.16
	REL8_2_10:1.17
	REL8_3_4:1.19
	REL7_4_21:1.12
	REL8_0_17:1.14
	REL8_1_13:1.16
	REL8_2_9:1.17
	REL8_3_3:1.19
	REL7_4_20:1.12
	REL8_0_16:1.14
	REL8_1_12:1.16
	REL8_2_8:1.17
	REL8_3_2:1.19
	REL8_2_7:1.17
	REL8_3_1:1.19
	REL8_3_STABLE:1.19.0.2
	REL8_3_0:1.19
	REL8_3_RC2:1.19
	REL7_3_21:1.12
	REL7_4_19:1.12
	REL8_0_15:1.14
	REL8_1_11:1.16
	REL8_2_6:1.17
	REL8_3_RC1:1.19
	REL8_3_BETA4:1.19
	REL8_3_BETA3:1.19
	REL8_3_BETA2:1.18
	REL8_3_BETA1:1.18
	REL7_3_20:1.12
	REL7_4_18:1.12
	REL8_0_14:1.14
	REL8_1_10:1.16
	REL8_2_5:1.17
	REL7_3_19:1.12
	REL7_4_17:1.12
	REL8_0_13:1.14
	REL8_1_9:1.16
	REL8_2_4:1.17
	REL8_0_12:1.14
	REL8_1_8:1.16
	REL8_2_3:1.17
	REL7_3_18:1.12
	REL7_4_16:1.12
	REL8_0_11:1.14
	REL8_1_7:1.16
	REL8_2_2:1.17
	REL8_0_10:1.14
	REL8_1_6:1.16
	REL8_2_1:1.17
	REL7_4_15:1.12
	REL7_3_17:1.12
	REL8_2_STABLE:1.17.0.2
	REL8_2_0:1.17
	REL8_2_RC1:1.17
	REL8_2_BETA3:1.17
	REL8_2_BETA2:1.17
	REL8_1_5:1.16
	REL8_0_9:1.14
	REL7_4_14:1.12
	REL7_3_16:1.12
	REL8_2_BETA1:1.17
	REL7_3_15:1.12
	REL7_4_13:1.12
	REL8_0_8:1.14
	REL8_1_4:1.16
	REL7_3_14:1.12
	REL7_4_12:1.12
	REL8_0_7:1.14
	REL8_1_3:1.16
	REL7_3_13:1.12
	REL7_4_11:1.12
	REL8_0_6:1.14
	REL8_1_2:1.16
	REL7_3_12:1.12
	REL7_4_10:1.12
	REL8_0_5:1.14
	REL8_1_1:1.16
	REL8_1_STABLE:1.16.0.2
	REL8_1_0:1.16
	REL8_1_0RC1:1.16
	REL8_1_0BETA4:1.16
	REL8_1_0BETA3:1.16
	REL7_3_11:1.12
	REL7_4_9:1.12
	REL8_0_4:1.14
	REL8_1_0BETA2:1.15
	REL8_1_0BETA1:1.15
	REL7_2_8:1.11
	REL7_3_10:1.12
	REL7_4_8:1.12
	REL8_0_3:1.14
	REL8_0_2:1.14
	REL7_2_7:1.11
	REL7_3_9:1.12
	REL7_4_7:1.12
	REL8_0_1:1.14
	REL8_0_STABLE:1.14.0.4
	REL8_0_0:1.14.0.2
	REL8_0_0RC5:1.14
	REL8_0_0RC4:1.14
	REL8_0_0RC3:1.14
	REL8_0_0RC2:1.14
	REL8_0_0RC1:1.14
	REL8_0_0BETA5:1.14
	REL8_0_0BETA4:1.14
	REL7_4_6:1.12
	REL7_3_8:1.12
	REL7_2_6:1.11
	REL8_0_0BETA3:1.14
	REL8_0_0BETA2:1.14
	REL7_3_7:1.12
	REL7_2_5:1.11
	REL7_4_5:1.12
	REL7_4_4:1.12
	REL8_0_0BETA1:1.13
	REL7_4_3:1.12
	REL7_4_2:1.12
	REL7_3_6:1.12
	REL7_4_1:1.12
	REL7_3_5:1.12
	REL7_4:1.12
	REL7_4_RC2:1.12
	REL7_4_STABLE:1.12.0.6
	REL7_4_RC1:1.12
	REL7_4_BETA5:1.12
	REL7_4_BETA4:1.12
	REL7_4_BETA3:1.12
	REL7_4_BETA2:1.12
	WIN32_DEV:1.12.0.4
	REL7_4_BETA1:1.12
	REL7_3_4:1.12
	REL7_3_2:1.12
	REL7_2_4:1.11
	REL7_3_STABLE:1.12.0.2
	REL7_2_3:1.11
	REL7_2_STABLE:1.11.0.2
	REL7_2:1.11
	REL7_2_RC2:1.11
	REL7_2_RC1:1.11
	REL7_2_BETA5:1.11
	REL7_2_BETA4:1.11
	REL7_2_BETA3:1.11
	REL7_2_BETA2:1.11
	REL7_2_BETA1:1.11
	REL7_1_2:1.8
	REL7_1_STABLE:1.8.0.2
	REL7_1_BETA:1.7
	REL7_1_BETA3:1.7
	REL7_1_BETA2:1.7
	REL7_1:1.8
	REL7_0_PATCHES:1.1.0.6
	REL7_0:1.1
	REL6_5_PATCHES:1.1.0.4
	REL6_5:1.1
	REL6_4:1.1.0.2;
locks; strict;
comment	@# @;


1.20
date	2010.07.05.23.15.55;	author tgl;	state Exp;
branches;
next	1.19;

1.19
date	2007.11.10.23.59.50;	author momjian;	state Exp;
branches;
next	1.18;

1.18
date	2007.06.26.22.05.02;	author tgl;	state Exp;
branches;
next	1.17;

1.17
date	2006.02.27.12.54.38;	author petere;	state Exp;
branches;
next	1.16;

1.16
date	2005.09.27.17.13.02;	author tgl;	state Exp;
branches;
next	1.15;

1.15
date	2005.07.24.23.30.09;	author tgl;	state Exp;
branches;
next	1.14;

1.14
date	2004.08.20.20.13.03;	author momjian;	state Exp;
branches;
next	1.13;

1.13
date	2003.11.29.19.51.35;	author pgsql;	state Exp;
branches;
next	1.12;

1.12
date	2002.09.20.03.47.22;	author momjian;	state Exp;
branches;
next	1.11;

1.11
date	2001.09.06.10.49.29;	author petere;	state Exp;
branches;
next	1.10;

1.10
date	2001.06.18.21.38.01;	author momjian;	state Exp;
branches;
next	1.9;

1.9
date	2001.05.30.12.58.45;	author momjian;	state Exp;
branches;
next	1.8;

1.8
date	2001.02.20.19.20.27;	author petere;	state Exp;
branches;
next	1.7;

1.7
date	2000.10.20.21.03.03;	author petere;	state Exp;
branches;
next	1.6;

1.6
date	2000.07.09.13.13.00;	author petere;	state Exp;
branches;
next	1.5;

1.5
date	2000.07.04.16.16.44;	author momjian;	state Exp;
branches;
next	1.4;

1.4
date	2000.06.19.13.53.18;	author momjian;	state Exp;
branches;
next	1.3;

1.3
date	2000.06.16.18.58.26;	author momjian;	state Exp;
branches;
next	1.2;

1.2
date	2000.06.15.18.54.46;	author momjian;	state Exp;
branches;
next	1.1;

1.1
date	98.06.16.03.55.14;	author momjian;	state Exp;
branches;
next	;


desc
@@


1.20
log
@Fix a few single-file (MODULES, not MODULE_big) contrib makefiles that were
supposing that they should set SHLIB_LINK rather than LDFLAGS_SL.  Since these
don't go through Makefile.shlib that was a no-op on most platforms.  Also
regularize the few platform-specific Makefiles that did pay attention to
SHLIB_LINK: it seems that the real value of that is to pull in BE_DLLLIBS,
so do that instead.  Per buildfarm failures on cygwin.
@
text
@# $PostgreSQL: pgsql/contrib/earthdistance/Makefile,v 1.19 2007/11/10 23:59:50 momjian Exp $

MODULES = earthdistance
DATA_built = earthdistance.sql
DATA = uninstall_earthdistance.sql
REGRESS = earthdistance

LDFLAGS_SL += $(filter -lm, $(LIBS))

ifdef USE_PGXS
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
else
subdir = contrib/earthdistance
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
endif
@


1.19
log
@Remove references to READMEs from /contrib Makefiles.
@
text
@d1 1
a1 1
# $PostgreSQL: pgsql/contrib/earthdistance/Makefile,v 1.18 2007/06/26 22:05:02 tgl Exp $
d8 1
a8 1
SHLIB_LINK += $(filter -lm, $(LIBS))
@


1.18
log
@Fix PGXS conventions so that extensions can be built against Postgres
installations whose pg_config program does not appear first in the PATH.
Per gripe from Eddie Stanley and subsequent discussions with Fabien Coelho
and others.
@
text
@d1 1
a1 1
# $PostgreSQL: pgsql/contrib/earthdistance/Makefile,v 1.17 2006/02/27 12:54:38 petere Exp $
a5 1
DOCS = README.earthdistance
@


1.17
log
@contrib uninstall scripts

by David Fetter
@
text
@d1 1
a1 1
# $PostgreSQL: pgsql/contrib/earthdistance/Makefile,v 1.16 2005/09/27 17:13:02 tgl Exp $
d12 2
a13 1
PGXS := $(shell pg_config --pgxs)
@


1.16
log
@PGXS should be set with := not =, as specified in the documentation,
to avoid useless multiple executions of pg_config.
@
text
@d1 1
a1 1
# $PostgreSQL: pgsql/contrib/earthdistance/Makefile,v 1.15 2005/07/24 23:30:09 tgl Exp $
d5 1
@


1.15
log
@Partial fixes for contrib build on AIX: include -lm where needed.
Per Rocco Altier.
@
text
@d1 1
a1 1
# $PostgreSQL: pgsql/contrib/earthdistance/Makefile,v 1.14 2004/08/20 20:13:03 momjian Exp $
d11 1
a11 1
PGXS = $(shell pg_config --pgxs)
@


1.14
log
@> Please find enclose a submission to fix these problems.
>
> The patch adds missing the "libpgport.a" file to the installation under
> "install-all-headers". It is needed by some contribs. I install the
> library in "pkglibdir", but I was wondering whether it should be "libdir"?
> I was wondering also whether it would make sense to have a "libpgport.so"?
>
> It fixes various macros which are used by contrib makefiles, especially
> libpq_*dir and LDFLAGS when used under PGXS. It seems to me that they are
> needed to
>
> It adds the ability to test and use PGXS with contribs, with "make
> USE_PGXS=1". Without the macro, this is exactly as before, there should be
> no difference, esp. wrt the vpath feature that seemed broken by previous
> submission. So it should not harm anybody, and it is useful at least to me.
>
> It fixes some inconsistencies in various contrib makefiles
> (useless override, ":=" instead of "=").

Fabien COELHO
@
text
@d1 1
a1 1
# $PostgreSQL: contrib/earthdistance/Makefile,v 1.13 2003/11/29 19:51:35 pgsql Exp $
d8 2
@


1.13
log
@
$Header: -> $PostgreSQL Changes ...
@
text
@d1 1
a1 5
# $PostgreSQL: /cvsroot/contrib/earthdistance/Makefile,v 1.12 2002/09/20 03:47:22 momjian Exp $

subdir = contrib/earthdistance
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
d8 7
d16 1
@


1.12
log
@I have included fixes to declare some floating point constants as double
instead of int, change the calculation method to use the haversine
formula
which is more accurrate for short distances, added a grant to public for
geo_distance and added a regression test.

I will resubmit the earth distance stuff based on cube after 7.3 is
released.

Bruno Wolff III
@
text
@d1 1
a1 1
# $Header: /cvsroot/contrib/earthdistance/Makefile,v 1.11 2001/09/06 10:49:29 petere Exp $
@


1.11
log
@To fix the perpetually broken makefiles in the contrib tree, I have
written a generic framework of rules that the contrib makefiles can
use instead of writing their own each time.  You only need to set a few
variables and off you go.
@
text
@d1 1
a1 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/contrib/earthdistance/Makefile,v 1.10 2001/06/18 21:38:01 momjian Exp $
d10 1
@


1.10
log
@The attached patch enables the contrib subtree to build cleanly under
Cygwin with the possible exception of mSQL-interface.  Since I don't
have mSQL installed, I skipped this tool.

Except for dealing with a missing getopt.h (oid2name) and HUGE (seg),
the bulk of the patch uses the standard PostgreSQL approach to deal with
Windows DLL issues.

I tested the build aspect of this patch under Cygwin and Linux without
any ill affects.  Note that I did not actually attempt to test the code
for functionality.

The procedure to apply the patch is as follows:

    $ # save the attachment as /tmp/contrib.patch
    $ # change directory to the top of the PostgreSQL source tree
    $ patch -p0 </tmp/contrib.patch

Jason
@
text
@d1 1
a1 3
#
# $Header: /home/projects/pgsql/cvsroot/pgsql/contrib/earthdistance/Makefile,v 1.9 2001/05/30 12:58:45 momjian Exp $
#
d5 1
a5 1
include ../../src/Makefile.global
d7 3
a9 2
NAME	:= earthdistance
SONAME	:= $(NAME)$(DLSUFFIX)
d11 1
a11 29
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
override CFLAGS += $(CFLAGS_SL)
override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)

all: $(SONAME) $(NAME).sql

$(NAME).sql: $(NAME).sql.in
	sed -e 's:MODULE_PATHNAME:$(libdir)/contrib/$(SONAME):g' < $< > $@@

install: all installdirs
	$(INSTALL_SHLIB) $(SONAME)	$(libdir)/contrib
	$(INSTALL_DATA) $(NAME).sql	$(datadir)/contrib
	$(INSTALL_DATA) README.$(NAME)	$(docdir)/contrib

installdirs:
	$(mkinstalldirs) $(libdir)/contrib $(datadir)/contrib $(docdir)/contrib

uninstall:
	rm -f $(libdir)/contrib/$(SONAME) $(datadir)/contrib/$(NAME).sql $(docdir)/contrib/README.$(NAME)

clean distclean maintainer-clean:
	rm -f $(SONAME) $(NAME).sql

depend dep:
	$(CC) -MM -MG $(CFLAGS) *.c > depend

ifeq (depend,$(wildcard depend))
include depend
endif
@


1.9
log
@Playing with the earthdistance stuff, and found I needed the following
patch:

Larry Rosenman
@
text
@d2 1
a2 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/contrib/earthdistance/Makefile,v 1.8 2001/02/20 19:20:27 petere Exp $
d14 1
@


1.8
log
@Make sure -L and -I's for our source tree are always before system include
or library directories on the command line.
@
text
@d2 1
a2 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/contrib/earthdistance/Makefile,v 1.7 2000/10/20 21:03:03 petere Exp $
d18 1
a18 1
	sed -e 's:MODULE_PATHNAME:$(datadir)/contrib/$(SONAME):g' < $< > $@@
@


1.7
log
@Add support for VPATH builds, that is, building somewhere else than in the
source directory.  This involves mostly makefiles using $(srcdir) when they
might have used ".".  (Regression tests don't work with this, yet.)

Sort out usage of CPPFLAGS, CFLAGS (and CXXFLAGS).  Add "override" keyword
in most places, to preserve necessary flags even when the user overrode the
flags.
@
text
@d2 1
a2 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/contrib/earthdistance/Makefile,v 1.6 2000/07/09 13:13:00 petere Exp $
d12 1
a12 1
override CPPFLAGS += -I$(srcdir)
@


1.6
log
@Another round of those unportable config/build changes :-/

* Add option to build with OpenSSL out of the box. Fix thusly exposed
  bit rot. Although it compiles now, getting this to do something
  useful is left as an exercise.

* Fix Kerberos options to defer checking for required libraries until
  all the other libraries are checked for.

* Change default odbcinst.ini and krb5.srvtab path to PREFIX/etc.

* Install work around for Autoconf's install-sh relative path anomaly.
  Get rid of old INSTL_*_OPTS variables, now that we don't need them
  anymore.

* Use `gunzip -c' instead of g?zcat. Reportedly broke on AIX.

* Look for only one of readline.h or readline/readline.h, not both.

* Make check for PS_STRINGS cacheable. Don't test for the header files
  separately.

* Disable fcntl(F_SETLK) test on Linux.

* Substitute the standard GCC warnings set into CFLAGS in configure,
  don't add it on in Makefile.global.

* Sweep through contrib tree to teach makefiles standard semantics.

... and in completely unrelated news:

* Make postmaster.opts arbitrary options-aware. I still think we need to
  save the environment as well.
@
text
@d2 1
a2 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/contrib/earthdistance/Makefile,v 1.5 2000/07/04 16:16:44 momjian Exp $
d12 2
a13 1
CFLAGS += -I. $(CFLAGS_SL)
@


1.5
log
@Makefile cleanup from Karel.
@
text
@d2 1
a2 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/contrib/earthdistance/Makefile,v 1.4 2000/06/19 13:53:18 momjian Exp $
d5 3
a7 1
TOPDIR=../..
d9 2
a10 11
include ../Makefile.global

NAME	= earthdistance

PROGRAM	= 
OBJS	= $(NAME).o
DOCS	= README.$(NAME)
SQLS	= $(NAME).sql
BINS    =
EXAMPLES=
MODS	= $(NAME)$(DLSUFFIX)
d14 1
a14 1
OTHER_CLEAN = $(SQLS)
d16 2
a17 1
all: $(MODS) $(SQLS)
d19 4
a22 2
%.sql: %.sql.in
	$(SED) "s|MODULE_PATHNAME|$(CONTRIB_MODDIR)/$(@@:.sql=$(DLSUFFIX))|" < $< > $@@
d24 2
a25 1
install: install_doc install_sql install_mod
d27 2
a28 4
install_doc:
	for inst_file in $(DOCS); do \
		$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_DOCDIR); \
	done
d30 2
a31 9
install_sql:
	for inst_file in $(SQLS); do \
		$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_SQLDIR); \
	done

install_mod:
	for inst_file in $(MODS); do \
		$(INSTALL) $(INSTL_SHLIB_OPTS) $$inst_file $(CONTRIB_MODDIR); \
	done
a34 3

clean:
	$(RM) *~ $(OBJS) $(MODS) $(PROGRAM) depend $(OTHER_CLEAN) core log
@


1.4
log
@Update to /contrib from Karel.
@
text
@d2 1
a2 1
# $Header$
d26 1
a26 1
	$(SED) "s|MODULE_PATHNAME|$(CONTRIB_MODDIR)/$@@|" < $< > $@@
@


1.3
log
@Cleanup README Makefile installs.
@
text
@d2 1
a2 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/contrib/earthdistance/Makefile,v 1.2 2000/06/15 18:54:46 momjian Exp $
d13 1
a13 1
DOCS	= README
d32 1
a32 1
		$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_DOCDIR)/$(DOCS).$(NAME); \
@


1.2
log
@/contrib patch from Karel.
@
text
@d2 1
a2 1
# $Header$
d13 1
a13 1
DOCS	= $(NAME).doc
d32 1
a32 1
		$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_DOCDIR); \
@


1.1
log
@Add FAQ_CVS.
@
text
@d1 3
a3 1
# PGLIB is probably /usr/local/pgsql/lib
d5 1
a5 2
PGINCLUDE=${PGLIB}/../include
CFLAGS+=-I${PGINCLUDE}
d7 1
a7 1
install-earthdistance: ${PGLIB}/earthdistance.so
d9 1
a9 2
${PGLIB}/earthdistance.so: earthdistance.so
	sudo install -C -g bin -o bin earthdistance.so ${PGLIB}
d11 7
a17 2
earthdistance.so:  earthdistance.o
	$(LD) -o $@@ -Bshareable $<
d19 35
a53 2
earthdistance.o:  earthdistance.c
	$(CC) -o $@@ -c $(CFLAGS) $<
@
