I have added:

	AC_CHECK_LIB(getopt,   main)

to configure.in to allow PostgreSQL to perhaps find getopt_long() in a
separate library.

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

Mon, 15 Jul 2002 18:40:18 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
getopt_long search in configure
Bruce Momjian writes:

> I have added:
>
> 	AC_CHECK_LIB(getopt,   main)
>
> to configure.in to allow PostgreSQL to perhaps find getopt_long() in a
> separate library.

Is there a system that distributes a libgetopt library that contains
getopt_long()?

-- 
Peter Eisentraut   peter_e@gmx.net


Tue, 16 Jul 2002 01:05:42 +0200 (CEST)
Peter Eisentraut <peter_e@gmx.net>
Re: getopt_long search in configure
Peter Eisentraut wrote:
> Bruce Momjian writes:
> 
> > I have added:
> >
> > 	AC_CHECK_LIB(getopt,   main)
> >
> > to configure.in to allow PostgreSQL to perhaps find getopt_long() in a
> > separate library.
> 
> Is there a system that distributes a libgetopt library that contains
> getopt_long()?

I have it here in /usr/local/include.  Not sure how it got there.  It
must have been installed by some other software.

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

Mon, 15 Jul 2002 19:26:36 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: getopt_long search in configure
Bruce Momjian writes:

> I have it here in /usr/local/include.  Not sure how it got there.  It
> must have been installed by some other software.

OK good.  But the check should be

AC_SEARCH_LIBS(getopt_long, [getopt])

That way you check if the library actually contains the function you want.

-- 
Peter Eisentraut   peter_e@gmx.net


Tue, 16 Jul 2002 23:56:37 +0200 (CEST)
Peter Eisentraut <peter_e@gmx.net>
Re: getopt_long search in configure
Peter Eisentraut wrote:
> Bruce Momjian writes:
> 
> > I have it here in /usr/local/include.  Not sure how it got there.  It
> > must have been installed by some other software.
> 
> OK good.  But the check should be
> 
> AC_SEARCH_LIBS(getopt_long, [getopt])
> 
> That way you check if the library actually contains the function you want.

Thanks.  Change made.  I was finding it hard to debug the pg_restore
flag problems without long options.  This way, I have them.  I will try
to research how I got libgetopt.a in /usr/local/include.  Does anyone
else have one?  Maybe I generated it by hand.

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

Tue, 16 Jul 2002 22:54:28 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: getopt_long search in configure