Re: [PATCHES] utils C files

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCHES] utils C files
Date: 2002-07-18 23:05:30
Message-ID: 200207182305.g6IN5UZ11961@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


Wow. I think I will hold for a while.

---------------------------------------------------------------------------

Peter Eisentraut wrote:
> Bruce Momjian writes:
>
> > Oh, so you are saying let most uses of src/port use the *.o files that
> > are in the directory, and it isn't needed to have other directories use
> > the link trick. Just let me know what people want.
>
> What I want is this:
>
> In configure.in, call
>
> AC_REPLACE_FUNCS([inet_aton ...]) # the whole list
>
> If you need more sophisticated checks on top of "function exists", you
> keep the existing tests, but instead of, say,
>
> SNPRINTF=snprintf.c
> AC_SUBST(SNPRINTF)
>
> you'd call
>
> AC_LIBOBJ(snprintf)
>
> In Makefile.global.in:
>
> LIBOBJS = @LIBOBJS@
>
> In utils/port/Makefile:
>
> libpgport.a: $(LIBOBJS)
> ar crs $@ $^
>
> In Makefile.global.in:
>
> Add -L$(top_builddir)/src/port to LDFLAGS (near the start), -lpgport to
> LIBS (near the end).
>
> Then you need to make sure that the src/port directory is build before
> being referred to.
>
> In the libpq makefile, you can write the rules like:
>
> ifneq(,$(filter snprintf.o, $(LIBOBJS)))
> # do what it's doing now in case of 'ifdef SNPRINF'
> endif
>
>
> Caveat implementor.
>
> --
> Peter Eisentraut peter_e(at)gmx(dot)net
>
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-07-18 23:07:00 lock item completed
Previous Message Peter Eisentraut 2002-07-18 23:00:05 Re: [PATCHES] utils C files

Browse pgsql-patches by date

  From Date Subject
Next Message Christopher Kings-Lynne 2002-07-19 08:50:24 Demo patch for DROP COLUMN
Previous Message Peter Eisentraut 2002-07-18 23:00:05 Re: [PATCHES] utils C files