Re: Patches to fix compilations on NetBSD - Mailing list pgsql-hackers
From | Bruce Momjian |
---|---|
Subject | Re: Patches to fix compilations on NetBSD |
Date | |
Msg-id | 200005110426.AAA15344@candle.pha.pa.us Whole thread Raw |
Responses |
Re: Re: Patches to fix compilations on NetBSD
|
List | pgsql-hackers |
Can someone comment on this patch? It appears it should be applied. > As postgresql 7.0 grew more imminent, I decided to try compiling the > latest release candidate 7.0RC4. The following diff against the 7.0RC4 > tree accomplishes the following things: > > 1) pl/tcl no longer builds correctly since it doesn't use the > Tcl header directory passed in via --with-includes="tcldir". > The configure script saves this directory in "CPPFLAGS", so > I patched Makefile.global.in to substitute for CPPFLAGS, and > pl/tcl/Makefile to include CPPFLAGS in its header search path. > > 2) bin/pgtclsh and pl/tcl use pgsql headers but don't properly > use -I$(LIBPQDIR) to include the correct header directory. > This has been fixed. > > 3) I couldn't find anything in the tree which still needs > ncurses/curses. I removed the check for those libraries from > configure.in. If I'm wrong please let me know. > > 4) Properly build the shared object in the odbc directory on > NetBSD. Well, at least it works on NetBSD/ELF. > > I hope all of this makes it into 7.0. > > Thanks! > > -- Johnny C. Lam <lamj@stat.cmu.edu> > Department of Statistics, Carnegie Mellon University > http://www.stat.cmu.edu/~lamj/ > > --- Makefile.global.in.orig Sun Apr 16 23:44:56 2000 > +++ Makefile.global.in Thu May 4 19:31:24 2000 > @@ -208,8 +208,9 @@ > YACC= @YACC@ > LEX= @LEX@ > AROPT= @AROPT@ > -CFLAGS= -I$(SRCDIR)/include -I$(SRCDIR)/backend @CPPFLAGS@ @CFLAGS@ > +CFLAGS= -I$(SRCDIR)/include -I$(SRCDIR)/backend $(CPPFLAGS) @CFLAGS@ > CFLAGS_SL= @SHARED_LIB@ > +CPPFLAGS= @CPPFLAGS@ > LIBS= @LIBS@ > LDFLAGS= @LDFLAGS@ $(LIBS) > LDREL= -r > --- bin/pgtclsh/Makefile.orig Tue Mar 7 20:58:21 2000 > +++ bin/pgtclsh/Makefile Thu May 4 19:31:24 2000 > @@ -22,7 +22,7 @@ > include Makefile.tkdefs > endif > > -CFLAGS+= $(X_CFLAGS) -I$(LIBPGTCLDIR) > +CFLAGS+= $(X_CFLAGS) -I$(LIBPQDIR) -I$(LIBPGTCLDIR) > > ifdef KRBVERS > LDFLAGS+= $(KRBLIBS) > --- configure.in.orig Wed May 3 15:10:55 2000 > +++ configure.in Thu May 4 19:31:24 2000 > @@ -655,10 +655,6 @@ > AC_SUBST(YFLAGS) > > AC_CHECK_LIB(sfio, main) > -for curses in ncurses curses ; do > - AC_CHECK_LIB(${curses}, main, > - [LIBS="-l${curses} $LIBS"; break]) > -done > AC_CHECK_LIB(termcap, main) > AC_CHECK_LIB(readline, main) > AC_CHECK_LIB(readline, using_history, AC_DEFINE(HAVE_HISTORY_IN_READLINE), > --- interfaces/odbc/psqlodbc.c.orig Mon Dec 28 20:49:57 1998 > +++ interfaces/odbc/psqlodbc.c Thu May 4 19:31:24 2000 > @@ -33,8 +33,14 @@ > > GLOBAL_VALUES globals; > > -BOOL _init(void); > -BOOL _fini(void); > +#ifdef linux > +# define STATIC > +#else > +# define STATIC static > +#endif > + > +STATIC BOOL _init(void); > +STATIC BOOL _fini(void); > RETCODE SQL_API SQLDummyOrdinal(void); > > #ifdef WIN32 > @@ -98,7 +104,7 @@ > #endif > > /* These two functions do shared library initialziation on UNIX, well at least > - * on Linux. I don't know about other systems. > + * on Linux and some of the BSDs. I don't know about other systems. > */ > BOOL > _init(void) > --- pl/tcl/Makefile.orig Sat Apr 29 13:45:42 2000 > +++ pl/tcl/Makefile Thu May 4 19:31:24 2000 > @@ -70,7 +70,7 @@ > > CFLAGS+= $(TCL_SHLIB_CFLAGS) $(TCL_DEFS) > > -CFLAGS+= -I$(SRCDIR)/include -I$(SRCDIR)/backend > +CFLAGS+= -I$(SRCDIR)/include -I$(SRCDIR)/backend -I$(LIBPQDIR) $(CPPFLAGS) > > # > # Uncomment the following to enable the unknown command lookup > --- pl/tcl/Makefile.orig Sat Apr 29 13:45:42 2000 > +++ pl/tcl/Makefile Thu May 4 19:21:57 2000 > @@ -70,7 +70,7 @@ > > CFLAGS+= $(TCL_SHLIB_CFLAGS) $(TCL_DEFS) > > -CFLAGS+= -I$(SRCDIR)/include -I$(SRCDIR)/backend > +CFLAGS+= -I$(SRCDIR)/include -I$(SRCDIR)/backend -I$(LIBPQDIR) $(CPPFLAGS) > > # > # Uncomment the following to enable the unknown command lookup > -- Bruce Momjian | http://www.op.net/~candle 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, Pennsylvania19026
pgsql-hackers by date: