Reverse this patch:
Reverse this patch:

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

> A quick look shows that when you use --with-libraries=/foo/bar the
> generated link line for libraries says
>
>  -L/foo/bar -lpq
>
> and it should probably be the other way around (as it is for the
> executables).
>
> So I suspect we need some makefile tuning.

You were correct. This patch fixes it.

Jim C. Nasby

pavanvd/postgres-xl,chrishajas/gpdb,techdragon/Postgres-XL,xuegang/gpdb,atris/gpdb,0x0FFF/gpdb,rvs/gpdb,ashwinstar/gpdb,xuegang/gpdb,lpetrov-pivotal/gpdb,zaksoup/gpdb,tpostgres-projects/tPostgres,edespino/gpdb,edespino/gpdb,arcivanov/postgres-xl,postmind-net/postgres-xl,Postgres-XL/Postgres-XL,rvs/gpdb,50wu/gpdb,rvs/gpdb,Quikling/gpdb,rvs/gpdb,greenplum-db/gpdb,tangp3/gpdb,chrishajas/gpdb,Quikling/gpdb,CraigHarris/gpdb,xinzweb/gpdb,greenplum-db/gpdb,snaga/postgres-xl,CraigHarris/gpdb,tangp3/gpdb,greenplum-db/gpdb,janebeckman/gpdb,royc1/gpdb,lpetrov-pivotal/gpdb,lisakowen/gpdb,CraigHarris/gpdb,janebeckman/gpdb,janebeckman/gpdb,adam8157/gpdb,foyzur/gpdb,oberstet/postgres-xl,ovr/postgres-xl,kaknikhil/gpdb,pavanvd/postgres-xl,royc1/gpdb,ahachete/gpdb,zeroae/postgres-xl,jmcatamney/gpdb,yuanzhao/gpdb,lintzc/gpdb,techdragon/Postgres-XL,jmcatamney/gpdb,0x0FFF/gpdb,Quikling/gpdb,kaknikhil/gpdb,atris/gpdb,edespino/gpdb,zaksoup/gpdb,jmcatamney/gpdb,techdragon/Postgres-XL,xuegang/gpdb,randomtask1155/gpdb,lisakowen/gpdb,lintzc/gpdb,snaga/postgres-xl,ahachete/gpdb,royc1/gpdb,royc1/gpdb,xinzweb/gpdb,50wu/gpdb,foyzur/gpdb,yuanzhao/gpdb,yuanzhao/gpdb,Quikling/gpdb,atris/gpdb,randomtask1155/gpdb,randomtask1155/gpdb,atris/gpdb,zeroae/postgres-xl,cjcjameson/gpdb,ovr/postgres-xl,arcivanov/postgres-xl,randomtask1155/gpdb,foyzur/gpdb,arcivanov/postgres-xl,yuanzhao/gpdb,lpetrov-pivotal/gpdb,Chibin/gpdb,cjcjameson/gpdb,greenplum-db/gpdb,royc1/gpdb,rvs/gpdb,50wu/gpdb,ovr/postgres-xl,zeroae/postgres-xl,ashwinstar/gpdb,yazun/postgres-xl,CraigHarris/gpdb,lintzc/gpdb,rvs/gpdb,techdragon/Postgres-XL,chrishajas/gpdb,edespino/gpdb,chrishajas/gpdb,yuanzhao/gpdb,adam8157/gpdb,Postgres-XL/Postgres-XL,adam8157/gpdb,foyzur/gpdb,tpostgres-projects/tPostgres,ashwinstar/gpdb,randomtask1155/gpdb,cjcjameson/gpdb,ahachete/gpdb,CraigHarris/gpdb,oberstet/postgres-xl,0x0FFF/gpdb,rubikloud/gpdb,xuegang/gpdb,tangp3/gpdb,yazun/postgres-xl,greenplum-db/gpdb,arcivanov/postgres-xl,ahachete/gpdb,atris/gpdb,xinzweb/gpdb,Chibin/gpdb,edespino/gpdb,Chibin/gpdb,adam8157/gpdb,ovr/postgres-xl,edespino/gpdb,Quikling/gpdb,chrishajas/gpdb,janebeckman/gpdb,greenplum-db/gpdb,xinzweb/gpdb,xinzweb/gpdb,jmcatamney/gpdb,lisakowen/gpdb,CraigHarris/gpdb,tangp3/gpdb,Quikling/gpdb,lisakowen/gpdb,lisakowen/gpdb,oberstet/postgres-xl,Postgres-XL/Postgres-XL,kaknikhil/gpdb,greenplum-db/gpdb,yazun/postgres-xl,oberstet/postgres-xl,rubikloud/gpdb,lpetrov-pivotal/gpdb,zaksoup/gpdb,kaknikhil/gpdb,tangp3/gpdb,Chibin/gpdb,xuegang/gpdb,xuegang/gpdb,lintzc/gpdb,tpostgres-projects/tPostgres,50wu/gpdb,50wu/gpdb,Chibin/gpdb,chrishajas/gpdb,yazun/postgres-xl,lisakowen/gpdb,lpetrov-pivotal/gpdb,chrishajas/gpdb,cjcjameson/gpdb,ashwinstar/gpdb,Quikling/gpdb,kaknikhil/gpdb,0x0FFF/gpdb,lintzc/gpdb,foyzur/gpdb,arcivanov/postgres-xl,yazun/postgres-xl,Postgres-XL/Postgres-XL,kaknikhil/gpdb,zaksoup/gpdb,yuanzhao/gpdb,kaknikhil/gpdb,pavanvd/postgres-xl,rvs/gpdb,ahachete/gpdb,rubikloud/gpdb,ahachete/gpdb,royc1/gpdb,zeroae/postgres-xl,kmjungersen/PostgresXL,lpetrov-pivotal/gpdb,postmind-net/postgres-xl,postmind-net/postgres-xl,lisakowen/gpdb,ovr/postgres-xl,lintzc/gpdb,rubikloud/gpdb,pavanvd/postgres-xl,zaksoup/gpdb,ahachete/gpdb,xuegang/gpdb,kmjungersen/PostgresXL,janebeckman/gpdb,Chibin/gpdb,tangp3/gpdb,janebeckman/gpdb,lisakowen/gpdb,rvs/gpdb,edespino/gpdb,Chibin/gpdb,rubikloud/gpdb,yuanzhao/gpdb,CraigHarris/gpdb,xinzweb/gpdb,cjcjameson/gpdb,yuanzhao/gpdb,edespino/gpdb,CraigHarris/gpdb,zeroae/postgres-xl,kaknikhil/gpdb,tpostgres-projects/tPostgres,cjcjameson/gpdb,janebeckman/gpdb,rubikloud/gpdb,atris/gpdb,kmjungersen/PostgresXL,jmcatamney/gpdb,rvs/gpdb,tangp3/gpdb,postmind-net/postgres-xl,0x0FFF/gpdb,Quikling/gpdb,0x0FFF/gpdb,xuegang/gpdb,xinzweb/gpdb,kmjungersen/PostgresXL,lintzc/gpdb,tpostgres-projects/tPostgres,royc1/gpdb,lintzc/gpdb,Chibin/gpdb,edespino/gpdb,techdragon/Postgres-XL,cjcjameson/gpdb,edespino/gpdb,postmind-net/postgres-xl,foyzur/gpdb,kaknikhil/gpdb,atris/gpdb,ahachete/gpdb,kaknikhil/gpdb,kmjungersen/PostgresXL,ashwinstar/gpdb,randomtask1155/gpdb,adam8157/gpdb,Chibin/gpdb,snaga/postgres-xl,0x0FFF/gpdb,chrishajas/gpdb,50wu/gpdb,royc1/gpdb,xuegang/gpdb,rubikloud/gpdb,snaga/postgres-xl,zaksoup/gpdb,adam8157/gpdb,jmcatamney/gpdb,snaga/postgres-xl,randomtask1155/gpdb,cjcjameson/gpdb,janebeckman/gpdb,adam8157/gpdb,cjcjameson/gpdb,ashwinstar/gpdb,cjcjameson/gpdb,0x0FFF/gpdb,50wu/gpdb,ashwinstar/gpdb,foyzur/gpdb,Quikling/gpdb,Quikling/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,lpetrov-pivotal/gpdb,xinzweb/gpdb,arcivanov/postgres-xl,tangp3/gpdb,janebeckman/gpdb,janebeckman/gpdb,rubikloud/gpdb,ashwinstar/gpdb,adam8157/gpdb,zaksoup/gpdb,jmcatamney/gpdb,oberstet/postgres-xl,50wu/gpdb,Postgres-XL/Postgres-XL,lpetrov-pivotal/gpdb,Chibin/gpdb,zaksoup/gpdb,yuanzhao/gpdb,atris/gpdb,CraigHarris/gpdb,pavanvd/postgres-xl,yuanzhao/gpdb,rvs/gpdb,randomtask1155/gpdb,lintzc/gpdb,foyzur/gpdb