Re: [PATCHES] utils C files

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: [PATCHES] utils C files
Дата
Msg-id Pine.LNX.4.44.0207182006150.9047-100000@localhost.localdomain
обсуждение исходный текст
Ответы Re: [PATCHES] utils C files  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
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@gmx.net



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: compiler warnings from cvs tip
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [PATCHES] utils C files