Suggestion for MSVC build - Mailing list pgsql-hackers

From Chuck McDevitt
Subject Suggestion for MSVC build
Date
Msg-id EB48EBF3B239E948AC1E3F3780CF8F8802A1B24F@MI8NYCMAIL02.Mi8.com
Whole thread Raw
Responses Re: Suggestion for MSVC build
List pgsql-hackers

It seems like there isn’t any good reason the perl scripts for the MSVC build don’t support readline

 

Readline for windows is available as part of the GnuWin32 project.

 

http://gnuwin32.sourceforge.net/packages/readline.htm

 

It normally installs to “c:\Program Files\GnuWin32"

 

I’d update the scripts myself, but I’m not a PERL programmer.

From what I can see, you’d add another line to config.pl for readline, and then add some stuff to  mkvcbuild.pm for psql  to do something like:

 

if ($solution->{options}->{readline})

    {

                                $psql->AddIncludeDir($solution->{options}->{readline} . '\include');

                                $psql->AddLibrary($solution->{options}->{readline} . '\lib\readline.lib');

                                $psql->AddLibrary($solution->{options}->{readline} . '\lib\history.lib');

}

 

And something to solution.pm in the part that builds pg_config.h that looks something like:

 

if ($self->{options}->{readline})

                                {

                                                print O "#define HAVE_LIBREADLINE 1\n";

                                                print O "#define HAVE_READLINE_READLINE_H 1\n";

                                                print O "#define HAVE_READLINE_HISTORY_H 1\n";

                                                print O "#define USE_READLINE 1\n";

                                                print O "#define USE_READLINE_STATIC 1\n";

                                }

(Not sure about the last line).

 

I don’t know if this is a good idea, but I would think this would make psql more “user-friendly” on windows.

 

Perhaps someone who understands readline and perl better than me might want to take this on?

 

pgsql-hackers by date:

Previous
From: "Chuck McDevitt"
Date:
Subject: Problem with MSVC install script
Next
From: Andrew Dunstan
Date:
Subject: Re: Problem with MSVC install script